LVectorArc::LVectorArc
#include "ltwrappr.h"
L_VOID LVectorArc::LVectorArc(pArc =NULL)
L_VOID LVectorArc::LVectorArc(pObject, pVector =NULL)
pVECTORARC pArc; |
/* pointer to a VECTORCARC structure */ |
pVECTOROBJECT pObject; |
/* pointer to a VECTOROBJECT structure */ |
LVectorBase *pVector; |
/* pointer to an LVectorBase object */ |
Constructs and initializes the different member variables of the LVectorArc object.
Parameter |
Description |
pArc |
Pointer to a VECTORARC structure that contains information used to create and initialize the new vector arc object. |
pObject |
Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector arc object. |
pVector |
Pointer to an LVectorBase object with which the newly constructed Vector Arc object will be associated. |
Returns
None.
Comments
LVectorArc::LVectorArc(pArc) is a constructor for the LVectorArc object. It takes a valid pVECTORARC pointer and creates an LVectorArc object.
LVectorArc::LVectorArc(pObject, pVector=NULL) creates an LVectorArc object based on the information provided in pObject and associates the newly created LVectorArc 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 LVectorArc object using the LVectorArc::LVectorArc(pObject, pVector=NULL) constructor. For example:
//pObject->nType == type other than VECTOR_ARC
//LVectorBase *pVector is valid
LVectorArc MyVectorArc(pObject, pVectorBase);
if (MyVectorArc.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);
Required DLLs and Libraries
LVKRN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Functions: |
Example
For an example for LVectorArc::LVectorArc(pArc), refer to LVectorArc::LockObject.
This is an example for LVectorArc::LVectorArc(pObject, pVector=NULL):
//This example takes a pVECTOROBJECT and creates an LVectorObject derived class object
// for examining/modifying properties
L_INT ChangeVectorObjectProps(pVECTOROBJECT pObject, LVectorBase *pVectorBase)
{
L_INT nRet = SUCCESS;
if (pObject == NULL)
{
nRet = FAILURE;
}
else
{
switch (pObject->nType)
{
case VECTOR_VERTEX:
{
VECTORVERTEX Vertex;
LVectorVertex VectorVertex(pObject, pVectorBase);
VectorVertex.LockObject(&Vertex);
//...
//... Examine and/or change Vertex properties
//...
VectorVertex.UnlockObject(&Vertex);
}
break;
case VECTOR_LINE:
{
VECTORLINE Line;
LVectorLine VectorLine(pObject, pVectorBase);
VectorLine.LockObject(&Line);
//...
//... Examine and/or change line properties
//...
VectorLine.UnlockObject(&Line);
}
break;
case VECTOR_RECTANGLE :
{
VECTORRECTANGLE Rectangle ;
LVectorRectangle VectorRectangle (pObject, pVectorBase);
VectorRectangle.LockObject(&Rectangle );
//...
//... Examine and/or change rectangle properties
//...
VectorRectangle.UnlockObject(&Rectangle );
}
break;
case VECTOR_POLYLINE :
{
VECTORPOLYLINE Polyline ;
LVectorPolyLine VectorPolyline (pObject, pVectorBase);
VectorPolyline.LockObject(&Polyline);
//...
//... Examine and/or change polyline properties
//...
VectorPolyline.UnlockObject(&Polyline );
}
break;
case VECTOR_POLYBEZIER :
{
VECTORPOLYBEZIER Polybezier ;
LVectorPolyBezier VectorPolybezier (pObject, pVectorBase);
VectorPolybezier.LockObject(&Polybezier );
//...
//... Examine and/or change polybezier properties
//...
VectorPolybezier.UnlockObject(&Polybezier );
}
break;
case VECTOR_POLYGON :
{
VECTORPOLYGON Polygon ;
LVectorPolygon VectorPolygon (pObject, pVectorBase);
VectorPolygon.LockObject(&Polygon );
//...
//... Examine and/or change polygon properties
//...
VectorPolygon.UnlockObject(&Polygon );
}
break;
case VECTOR_ELLIPSE :
{
VECTORELLIPSE Ellipse ;
LVectorEllipse VectorEllipse (pObject, pVectorBase);
VectorEllipse.LockObject(&Ellipse );
//...
//... Examine and/or change ellipse properties
//...
VectorEllipse.UnlockObject(&Ellipse );
}
break;
case VECTOR_CIRCLE :
{
VECTORCIRCLE Circle ;
LVectorCircle VectorCircle (pObject, pVectorBase);
VectorCircle.LockObject(&Circle );
//...
//... Examine and/or change circle properties
//...
VectorCircle.UnlockObject(&Circle );
}
break;
case VECTOR_ARC :
{
VECTORARC Arc ;
LVectorArc VectorArc (pObject, pVectorBase);
VectorArc.LockObject(&Arc );
//...
//... Examine and/or change arc properties
//...
VectorArc.UnlockObject(&Arc );
}
break;
case VECTOR_ELLIPTICALARC :
{
VECTORELLIPTICALARC EllipticalArc ;
LVectorEllipticalArc VectorEllipticalArc (pObject, pVectorBase);
VectorEllipticalArc.LockObject(&EllipticalArc );
//...
//... Examine and/or change elliptical arc properties
//...
VectorEllipticalArc.UnlockObject(&EllipticalArc );
}
break;
case VECTOR_TEXT :
{
VECTORTEXT Text ;
LVectorText VectorText (pObject, pVectorBase);
VectorText.LockObject(&Text );
//...
//... Examine and/or change text properties
//...
VectorText.UnlockObject(&Text );
}
break;
case VECTOR_PIE :
{
VECTORPIE Pie ;
LVectorPie VectorPie (pObject, pVectorBase);
VectorPie.LockObject(&Pie );
//...
//... Examine and/or change pie properties
//...
VectorPie.UnlockObject(&Pie );
}
break;
case VECTOR_CHORD :
{
VECTORCHORD Chord ;
LVectorChord VectorChord (pObject, pVectorBase);
VectorChord.LockObject(&Chord );
//...
//... Examine and/or change chord properties
//...
VectorChord.UnlockObject(&Chord );
}
break;
case VECTOR_POLYDRAW :
{
VECTORPOLYDRAW Polydraw ;
LVectorPolyDraw VectorPolydraw (pObject, pVectorBase);
VectorPolydraw.LockObject(&Polydraw );
//...
//... Examine and/or change Polydraw properties
//...
VectorPolydraw.UnlockObject(&Polydraw );
}
break;
case VECTOR_SPLINE :
{
VECTORSPLINE Spline ;
LVectorSpline VectorSpline (pObject, pVectorBase);
VectorSpline.LockObject(&Spline );
//...
//... Examine and/or change Spline properties
//...
VectorSpline.UnlockObject(&Spline );
}
break;
case VECTOR_HPOLYBEZIER :
{
VECTORHPOLYBEZIER HPolyBezier ;
LVectorHPolyBezier VectorHPolyBezier (pObject, pVectorBase);
VectorHPolyBezier.LockObject(& HPolyBezier );
//...
//... Examine and/or change HPolyBezier properties
//...
VectorHPolyBezier.UnlockObject(& HPolyBezier );
}
break;
case VECTOR_RASTER :
{
VECTORRASTER Raster ;
LVectorRaster VectorRaster (pObject, pVectorBase);
VectorRaster.LockObject(&Raster );
//...
//... Examine and/or change Raster properties
//...
VectorRaster.UnlockObject(&Raster );
}
break;
case VECTOR_STOCK :
{
LVectorStock VectorStock (pObject, pVectorBase);
//...
//...
//...
}
break;
case VECTOR_CLONE :
{
VECTORCLONE Clone ;
LVectorClone VectorClone (pObject, pVectorBase);
VectorClone.LockObject(&Clone );
//...
//... Examine and/or change Clone properties
//...
VectorClone.UnlockObject(&Clone );
}
break;
}
}
return nRet;
}