#include <bitmapgriddropdown.h>
Inheritance diagram for CBGDDBrushItem:
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 | |
AttrBrushType * | m_pabtBrush |
BOOL | m_bDelete |
Definition at line 292 of file bitmapgriddropdown.h.
|
Definition at line 502 of file bitmapgriddropdown.cpp. 00503 : CBGDDCachedItem(strLabel) 00504 { 00505 m_pabtBrush = pabtBrush; 00506 m_bDelete = bAutodelete; 00507 }
|
|
Definition at line 509 of file bitmapgriddropdown.cpp. 00510 { 00511 if (m_bDelete) 00512 delete m_pabtBrush; 00513 }
|
|
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 }
|
|
Definition at line 303 of file bitmapgriddropdown.h. |
|
Definition at line 302 of file bitmapgriddropdown.h. |