CODFillProperties Class
class CODFillProperties: public CODProperty, public CPropertyContainer< IODPropertyContainer, sfl::CPropertyAccessor< CODFillProperties > >
This set of properties determines how a component is filled. Normally, the component is either not filled or filled with a solid color. You can also specify hatching and patterns.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 fill property objects has a unique identifier (see Fill Property Identifiers) for getting and setting each value. There are also methods to directly set each property.
Defined in: OdFillProp.h
Class Members
CODFillProperties(int nId = OD_PROP_FILL)
Constructor.
CODFillProperties(const CODFillProperties& propFill)
Copy constructor.
virtual ~CODFillProperties()
Destructor.
COLORREF m_crColor
The fill color.
BOOL m_bTransparent
The transparent fill setting
int m_nStyle
The fill style.
int m_nHatch
The hatching style.
int m_nBkMode
The background mode for a hatched brush.
COLORREF m_crBkColor
The background color for a hatched brush.
sfl::SECDib* m_pPattern
A pointer to the bitmap to be used for a fill pattern.
CBitmap* m_pBitmap
A temporary pointer to the bitmap used for creating the brush.
CBrush* m_pBrush
Cached GDI brush.
COLORREF GetColor() const
Gets the fill color.
void SetColor(const COLORREF crColor)
Sets the fill color.
BOOL GetTransparent() const
Gets the transparent setting.
void SetTransparent(const BOOL bTransparent)
Sets the transparency.
int GetStyle() const
Gets the fill style.
void SetStyle(const int nPenStyle)
Sets the fill style.
int GetBkMode() const
Gets the background mode.
void SetBkMode(const int nBkMode)
Sets the background mode.
COLORREF GetBkColor() const
Gets the background color.
void SetBkColor(const COLORREF crBkColor)
Sets the background color.
int GetHatch() const
Gets the hatch style.
void SetHatch(const int nHatch)
Sets the hatch style.
sfl::SECDib* GetPattern() const
Gets the bitmap used for the fill pattern.
void SetPattern(sfl::SECDib* pPattern)
Sets the bitmap used for the fill pattern.
virtual BOOL CompareId(const int nId) const
Compare the property identifier with another identifier.
CODFillProperties& operator=(const CODFillProperties& propFill)
Sets this set of fill properties equal to another.
BOOL operator==(const CODFillProperties propFill) const
Determines if another set of fill properties is equal to this one.
CBrush* CreateBrush(CDC* pDC = NULL)
Creates a GDI brush object. The caller is responsible for freeing this memory!
CBrush* GetBrush(CDC* pDC = NULL)
Returns a pointer to the cached GDI brush object.
void ReleaseBrush()
Releases the cached brush 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.