Constructs and initializes the different member variables of the LVectorRectangle object.
#include "ltwrappr.h"
LVectorRectangle::LVectorRectangle(pRectangle = NULL)
LVectorRectangle::LVectorRectangle(pObject, pVector =NULL)
Pointer to a VECTORRECTANGLE structure that contains information used to create and initialize the new vector raster object.
Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector rectangle object.
Pointer to an LVectorBase object with which the newly constructed vector rectangle object will be associated.
None.
LVectorRectangle::LVectorRectangle(pRectangle) is a constructor for the LVectorRectangle object. It takes a valid pVECTORRECTANGLEpointer and creates an LVectorRectangle object.
LVectorRectangle::LVectorRectangle(pObject, pVector=NULL) creates an LVectorRectangle object based on the information provided in pObject and associates the newly created LVectorRectangle object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.
Note that it is possible to construct an invalid LVectorRectangle object using the LVectorRectangle::LVectorRectangle(pObject, pVector=NULL) constructor. For example:
//pObject->nType == type other than VECTOR_RECTANGLE
//LVectorBase *pVector is valid
LVectorRectangle MyVectorRectangle(pObject, pVectorBase);
if (MyVectorRectangle.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);
For an example for LVectorRectangle::LVectorRectangle(pRectangle), refer to LVectorObject::UnlockObject.
For an example for LVectorRectangle::LVectorRectangle(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).