CBGDDBrushItem Class Reference

#include <bitmapgriddropdown.h>

Inheritance diagram for CBGDDBrushItem:

CBGDDCachedItem CBGDDItemInfo CGridComboUserData List of all members.

Public Member Functions

 CBGDDBrushItem (AttrBrushType *pabtBrush, BOOL bAutodelete=TRUE, String_256 strLabel=String_256())
virtual ~CBGDDBrushItem ()

Protected Member Functions

virtual void RenderItemToGRenderRegion (GRenderRegion *pRenderRegion, DocRect drcItem) const

Protected Attributes

AttrBrushTypem_pabtBrush
BOOL m_bDelete

Detailed Description

Class : CBGDDBrushItem Base Class : public CBGDDCachedItem Author : Mikhail Tatarnikov Description : Item for displaying a brush. Pure Virtual : None Known Issues : None Usage Notes : None Override Notes: None

Definition at line 292 of file bitmapgriddropdown.h.


Constructor & Destructor Documentation

CBGDDBrushItem::CBGDDBrushItem AttrBrushType pabtBrush,
BOOL  bAutodelete = TRUE,
String_256  strLabel = String_256()
 

Definition at line 502 of file bitmapgriddropdown.cpp.

00503     : CBGDDCachedItem(strLabel)
00504 {
00505     m_pabtBrush  = pabtBrush;
00506     m_bDelete    = bAutodelete;
00507 }

CBGDDBrushItem::~CBGDDBrushItem  )  [virtual]
 

Definition at line 509 of file bitmapgriddropdown.cpp.

00510 {
00511     if (m_bDelete)
00512         delete m_pabtBrush;
00513 }


Member Function Documentation

void CBGDDBrushItem::RenderItemToGRenderRegion GRenderRegion pRenderRegion,
DocRect  drcItem
const [protected, virtual]
 

Function : CBGDDBrushItem::RenderItemToGRenderRegion Author : Mikhail Tatarnikov Purpose : Renders the brush into GRenderRegion. Returns : void Exceptions: Parameters: [in] GRenderRegion* pRenderRegion - Render region to draw to; [in] DocRect drcItem - item size. Notes :

Reimplemented from CBGDDCachedItem.

Definition at line 526 of file bitmapgriddropdown.cpp.

00527 {
00528     Path  pthBrush;
00529 
00530     pthBrush.Initialise(8);
00531     pthBrush.IsFilled  =  FALSE;
00532     pthBrush.IsStroked = TRUE;
00533     pthBrush.FindStartOfPath();
00534 
00535     // avoid overhead of allocation each time ....
00536     INT32 iWidth      = drcItem.Width();
00537     INT32 iHeight     = drcItem.Height();
00538     INT32 iBorderX    = (INT32)(0.025 * iWidth);
00539 //  INT32 iBorderY    = (INT32)(0.025 * iHeight);
00540 //  INT32 iHalfWidth  = iWidth  / 2;
00541     INT32 iHalfHeight = iHeight / 2;
00542 
00543     DocCoord dcrdStartPoint(iBorderX, iHalfHeight);
00544     DocCoord dcrdEndPoint(iWidth - iBorderX, iHalfHeight);
00545 
00546     pthBrush.InsertMoveTo(dcrdStartPoint);
00547     pthBrush.InsertLineTo(dcrdEndPoint);
00548 
00549 
00550     pRenderRegion->SetLineWidth(iHeight / 3);
00551 
00552     PathProcessorBrush* pPathProc = m_pabtBrush->GetPathProcessor();
00553     pPathProc->ScaleToValue(1);
00554     pRenderRegion->SetLineColour(COLOUR_BLACK);
00555 
00556     m_pabtBrush->Render(pRenderRegion);
00557     pRenderRegion->DrawPath (&pthBrush);
00558 }


Member Data Documentation

BOOL CBGDDBrushItem::m_bDelete [protected]
 

Definition at line 303 of file bitmapgriddropdown.h.

AttrBrushType* CBGDDBrushItem::m_pabtBrush [protected]
 

Definition at line 302 of file bitmapgriddropdown.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:51:54 2007 for Camelot by  doxygen 1.4.4