LVectorArc::LVectorArc

#include "ltwrappr.h"

LVectorArc::LVectorArc(pArc =NULL)

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:

LVectorArc::~LVectorArc, Class Members

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 LVectorArc__LVectorArcExample(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); 
            nRet = VectorVertex.LockObject(&Vertex); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change Vertex properties 
            //... 
            nRet = VectorVertex.UnlockObject(&Vertex); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_LINE: 
         { 
            VECTORLINE Line; 
            LVectorLine VectorLine(pObject, pVectorBase); 
            nRet = VectorLine.LockObject(&Line); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change line properties 
            //... 
            nRet = VectorLine.UnlockObject(&Line); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_RECTANGLE : 
         { 
            VECTORRECTANGLE Rectangle ; 
            LVectorRectangle VectorRectangle (pObject, pVectorBase); 
            nRet = VectorRectangle.LockObject(&Rectangle ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change rectangle properties 
            //... 
            nRet = VectorRectangle.UnlockObject(&Rectangle ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_POLYLINE : 
         { 
            VECTORPOLYLINE Polyline ; 
            LVectorPolyLine VectorPolyline (pObject, pVectorBase); 
            nRet = VectorPolyline.LockObject(&Polyline); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change polyline properties 
            //... 
            nRet = VectorPolyline.UnlockObject(&Polyline ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_POLYBEZIER : 
         { 
            VECTORPOLYBEZIER Polybezier ; 
            LVectorPolyBezier VectorPolybezier (pObject, pVectorBase); 
            nRet = VectorPolybezier.LockObject(&Polybezier ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change polybezier properties 
            //... 
            nRet = VectorPolybezier.UnlockObject(&Polybezier ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_POLYGON : 
         { 
            VECTORPOLYGON Polygon ; 
            LVectorPolygon VectorPolygon (pObject, pVectorBase); 
            nRet = VectorPolygon.LockObject(&Polygon ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change polygon properties 
            //... 
            nRet = VectorPolygon.UnlockObject(&Polygon ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_ELLIPSE : 
         { 
            VECTORELLIPSE Ellipse ; 
            LVectorEllipse VectorEllipse (pObject, pVectorBase); 
            nRet = VectorEllipse.LockObject(&Ellipse ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change ellipse properties 
            //... 
            nRet = VectorEllipse.UnlockObject(&Ellipse ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_CIRCLE : 
         { 
            VECTORCIRCLE Circle ; 
            LVectorCircle VectorCircle (pObject, pVectorBase); 
            nRet = VectorCircle.LockObject(&Circle ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change circle properties 
            //... 
            nRet = VectorCircle.UnlockObject(&Circle ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_ARC : 
         { 
            VECTORARC Arc ; 
            LVectorArc VectorArc (pObject, pVectorBase); 
            nRet = VectorArc.LockObject(&Arc ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change arc properties 
            //... 
            nRet = VectorArc.UnlockObject(&Arc ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_ELLIPTICALARC : 
         { 
            VECTORELLIPTICALARC EllipticalArc ; 
            LVectorEllipticalArc VectorEllipticalArc (pObject, pVectorBase); 
            nRet = VectorEllipticalArc.LockObject(&EllipticalArc ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change elliptical arc properties 
            //... 
            nRet = VectorEllipticalArc.UnlockObject(&EllipticalArc ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_TEXT : 
         { 
            VECTORTEXT Text ; 
            LVectorText VectorText (pObject, pVectorBase); 
            nRet = VectorText.LockObject(&Text ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change text properties 
            //... 
            nRet = VectorText.UnlockObject(&Text ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_PIE : 
         { 
            VECTORPIE Pie ; 
            LVectorPie VectorPie (pObject, pVectorBase); 
            nRet = VectorPie.LockObject(&Pie ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change pie properties 
            //... 
            nRet = VectorPie.UnlockObject(&Pie ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_CHORD : 
         { 
            VECTORCHORD Chord ; 
            LVectorChord VectorChord (pObject, pVectorBase); 
            nRet = VectorChord.LockObject(&Chord ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change chord properties 
            //... 
            nRet = VectorChord.UnlockObject(&Chord ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_POLYDRAW : 
         { 
            VECTORPOLYDRAW Polydraw ; 
            LVectorPolyDraw VectorPolydraw (pObject, pVectorBase); 
            nRet = VectorPolydraw.LockObject(&Polydraw ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change Polydraw properties 
            //... 
            nRet = VectorPolydraw.UnlockObject(&Polydraw ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_SPLINE : 
         { 
            VECTORSPLINE Spline ; 
            LVectorSpline VectorSpline (pObject, pVectorBase); 
            nRet = VectorSpline.LockObject(&Spline ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change Spline properties 
            //... 
            nRet = VectorSpline.UnlockObject(&Spline ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_HPOLYBEZIER : 
         { 
            VECTORHPOLYBEZIER HPolyBezier ; 
            LVectorHPolyBezier VectorHPolyBezier (pObject, pVectorBase); 
            nRet = VectorHPolyBezier.LockObject(& HPolyBezier ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change HPolyBezier properties 
            //... 
            nRet = VectorHPolyBezier.UnlockObject(& HPolyBezier ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_RASTER : 
         { 
            VECTORRASTER Raster ; 
            LVectorRaster VectorRaster (pObject, pVectorBase); 
            nRet = VectorRaster.LockObject(&Raster ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change Imaging Properties 
            //... 
            nRet = VectorRaster.UnlockObject(&Raster ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_STOCK : 
         { 
            VECTORSTOCK Stock ; 
            LVectorStock VectorStock (pObject, pVectorBase); 
            nRet = VectorStock.LockObject( (pVECTOROBJECT)&Stock ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change Stock properties 
            //... 
            nRet = VectorStock.UnlockObject( (pVECTOROBJECT)&Stock ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
         case VECTOR_CLONE : 
         { 
            VECTORCLONE Clone ; 
            LVectorClone VectorClone (pObject, pVectorBase); 
            nRet = VectorClone.LockObject(&Clone ); 
            if(nRet != SUCCESS) 
               return nRet; 
            //... 
            //... Examine and/or change Clone properties 
            //... 
            nRet = VectorClone.UnlockObject(&Clone ); 
            if(nRet != SUCCESS) 
               return nRet; 
         } 
         break; 
      } 
   } 
   return SUCCESS; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Vector C++ Class Library Help