CODComponentPosition Class
class CODComponentPosition: public CObject
This class encapsulates the position and size of a component. This class is used in conjuction with CODComponent::GetPosition and CODComponent::SetPosition to save and restore the position and size of components. This class stores the following information for components: bounding rectangle in world coordinates, transform, and local points. This class can be extended for types of components that require additional information to describe their position and size.Defined in: OdComponentPos.h
See Also
Class Members
CODComponentPosition(CODComponent* pComp = NULL)
Constructor.
virtual ~CODComponentPosition()
Destructor.
CRect m_rcBounds
Bounding rectangle for the component in world coordinates.
CODTransform* m_pXform
Pointer to transform for the component.
LPPOINT m_lpPoints
Pointer to array of local points for the component.
int m_nPointCount
Number of local points stored.
CODComponentPosition& operator=(const CODComponentPosition& src)
Assign a component position object to this object.
virtual BOOL MoveTo(CODComponent* pComp)
Set the position and size of the given component.
void SetBounds(const CRect& rcBounds)
Set the bounding rectangle for the component.
CRect GetBounds() const
Get the bounding rectangle for the component.
void SetTransform(CODTransform* pXform)
Set the transform for the component.
CODTransform* GetTransform() const
Get the transform for the component.
void SetPoints(LPPOINT lpPoints, const int nPointCount)
Set the local points for the component.
void SetPoints(IODPoints* pIPoints)
Set the local points for the component.
LPPOINT GetPoints() const
Get the local points for the component.
int GetPointCount() const
Get the number of local points for the component.
virtual void Serialize(CArchive& ar)
Serializes the component position to an archive.