CODLineProperties Class
class CODLineProperties: public CODProperty, public CPropertyContainer< IODPropertyContainer, sfl::CPropertyAccessor< CODLineProperties > >
A collection of properties that define how the lines will be drawn for a component.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 property objects has a unique identifier (see Line Property Identifiers) for getting and setting each value. There are also methods to directly set each property.
Defined in: OdLineProp.h
Class Members
CODLineProperties(int nId = OD_PROP_LINE)
Constructor.
CODLineProperties(const CODLineProperties& propLine)
Copy constructor.
virtual ~CODLineProperties()
Destructor.
COLORREF m_crColor
The line color.
BOOL m_bTransparent
TRUE if the line is transparent.
int m_nPointSize
The line width in points.
int m_nWidth
The line width in logical units.
int m_nStyle
The line style.
CPen* m_pPen
Cached GDI pen.
COLORREF GetColor() const
Gets the line color.
void SetColor(const COLORREF crColor)
Sets the line color.
BOOL GetTransparent() const
Gets the transparent setting.
void SetTransparent(const BOOL bTransparent)
Sets the transparency.
int GetPointSize() const
Gets the point size of the font.
void SetPointSize(const int nPointSize, CDC* pDC = NULL)
Sets the point size of the font.
int GetWidth() const
Gets the line width.
void SetWidth(const int nWidth, CDC* pDC = NULL)
Sets the line width.
int GetStyle() const
Gets the line style.
void SetStyle(const int nPenStyle)
Sets the line style.
virtual BOOL CompareId(const int nId) const
Compare the property identifier with another identifier.
CODLineProperties& operator=(const CODLineProperties& propLine)
Sets this set of line properties equal to another.
BOOL operator==(const CODLineProperties propLine) const
Determines if another set of line properties is equal to this one.
CPen* CreatePen(CDC* pDC = NULL) const
Creates a GDI pen object. The caller is responsible for freeing this memory!
CPen* GetPen(CDC* pDC = NULL)
Returns a pointer to the cached GDI pen object.
void ReleasePen()
Releases the cached pen object.
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 line properties.