CODLineOrientation Class

class CODLineOrientation: public CODProperty, public CPropertyContainer< IODPropertyContainer, sfl::CPropertyAccessor< CODLineOrientation > >

Determines the orientation of an object in relation to a line. This class is used to orient labels and other components along a given line. The orientation consists of a percentage along the given line, an anchor point, and a distance value. The percentage along value is used to calculate a position on the line based a percentage of the line length. The anchor point is an OD_CONTROL_POINT value that indicates the point on the label or component that should coincide with the calculated point on the line. The distance value is a distance in logical units away from the line to offset the final calculated point. This is a distance along an imaginary perpendicular bisecting line.

This class is both a property and a container for properties. It implements the  IODPropertyContainer interface for getting and setting values that it contains. Each sub-property contained by line orientation property objects has a unique identifier (see  Line Orientation Property Identifiers) for getting and setting each value. There are also methods to directly set each property.

Defined in: OdLineOrientation.h

Class Members

 CODLineOrientation(int nId = OD_PROP_LINEORIENTATION)

Constructor.

 CODLineOrientation(const CODLineOrientation& propOrientation)

Copy constructor.

virtual  ~CODLineOrientation()

Destructor.

int m_nPctAlong

Percent along the line.

OD_CONTROL_POINT m_anchorPt

Anchor point.

int m_nLineDistance

Distance from line in logical units.

int  GetPercentAlong() const

Gets the percentage along the line.

void  SetPercentAlong(const int nPctAlong)

Sets the percentage along the line.

OD_CONTROL_POINT  GetAnchor() const

Get the anchor point.

void  SetAnchor(const OD_CONTROL_POINT anchorPt)

Sets the anchor point.

int  GetLineDistance() const

Gets the distance from line in logical units.

void  SetLineDistance(const int nLineDistance)

Sets the distance from line in logical units.

virtual BOOL  CompareId(const int nId) const

Compare the property identifier with another identifier.

CODLineOrientation&  operator=(const CODLineOrientation& propOrientation)

Assigns another property to this property.

BOOL  operator==(const CODLineOrientation propOrientation) const

Compares two orientation properties.

virtual CODProperty*  Dup()

Makes a copy of this properties object.

virtual void  Merge(CODProperty* pProperty, DWORD dwChangeFlags = OD_CHANGE_ALL)

Merges another set of properties with this one.

virtual BOOL  IsEqual(CODProperty* pProp)

Determines if another set of properties is equal to this one.

ULONG STDMETHODCALLTYPE  AddRef()

Add a reference to this object.

ULONG STDMETHODCALLTYPE  Release()

Release a reference to this object.

virtual BOOL  GetValue(const int nPropId, CString& strValue) const

Gets the value of the given string property.

virtual BOOL  GetValue(const int nPropId, int& nValue) const

Gets the value of the given integer property.

virtual BOOL  GetValue(const int nPropId, UINT& nValue) const

Gets the value of the given unsigned integer property.

virtual BOOL  GetValue(const int nPropId, DWORD& dwValue) const

Gets the value of the given DWORD property.

virtual BOOL  GetValue(const int nPropId, float& fValue) const

Gets the value of the given float property.

virtual BOOL  SetValue(const int nPropId, LPCTSTR lpszValue)

Sets the value of the given string property.

virtual BOOL  SetValue(const int nPropId, const int nValue)

Sets the value of the given integer property.

virtual BOOL  SetValue(const int nPropId, const UINT nValue)

Sets the value of the given unsigned integer property.

virtual BOOL  SetValue(const int nPropId, const DWORD dwValue)

Sets the value of the given unsigned DWORD property.

virtual BOOL  SetValue(const int nPropId, const float fValue)

Sets the value of the given float property.

virtual void  Serialize(CArchive& ar)

Serializes the orientation properties.