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

VIEWS_API CODLineOrientation(int nId = OD_PROP_LINEORIENTATION)

Constructor.

VIEWS_API CODLineOrientation(const CODLineOrientation& propOrientation)

Copy constructor.

VIEWS_API 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.

VIEWS_API int GetPercentAlong() const

Gets the percentage along the line.

VIEWS_API void SetPercentAlong(const int nPctAlong)

Sets the percentage along the line.

VIEWS_API OD_CONTROL_POINT GetAnchor() const

Get the anchor point.

VIEWS_API void SetAnchor(const OD_CONTROL_POINT anchorPt)

Sets the anchor point.

VIEWS_API int GetLineDistance() const

Gets the distance from line in logical units.

VIEWS_API void SetLineDistance(const int nLineDistance)

Sets the distance from line in logical units.

VIEWS_API virtual BOOL CompareId(const int nId) const

Compare the property identifier with another identifier.

VIEWS_API CODLineOrientation& operator=(const CODLineOrientation& propOrientation)

Assigns another property to this property.

VIEWS_API BOOL operator==(const CODLineOrientation propOrientation) const

Compares two orientation properties.

VIEWS_API virtual CODProperty* Dup()

Makes a copy of this properties object.

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

Merges another set of properties with this one.

VIEWS_API virtual BOOL IsEqual(CODProperty* pProp)

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

VIEWS_API ULONG STDMETHODCALLTYPE AddRef()

Add a reference to this object.

VIEWS_API ULONG STDMETHODCALLTYPE Release()

Release a reference to this object.

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

Gets the value of the given string property.

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

Gets the value of the given integer property.

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

Gets the value of the given unsigned integer property.

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

Gets the value of the given DWORD property.

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

Gets the value of the given float property.

VIEWS_API virtual BOOL SetValue(const int nPropId, LPCTSTR lpszValue)

Sets the value of the given string property.

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

Sets the value of the given integer property.

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

Sets the value of the given unsigned integer property.

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

Sets the value of the given unsigned DWORD property.

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

Sets the value of the given float property.

VIEWS_API virtual void Serialize(CArchive& ar)

Serializes the orientation properties.