void CReagentAreaCtrl::OnPaint() { CPaintDC dc(this); CMemDC memDC(&dc,m_rcClient); // 默认矩形为裁剪区域 memDC.CopyFromSrcDC(); _DrawFrame(&memDC); memDC.CopyToSrcDC(); }
void MacDecorator::Draw() { STRACE("MacDecorator::Draw()\n"); fDrawingEngine->SetDrawState(&fDrawState); _DrawFrame(fBorderRect); _DrawTab(fTabRect); }
//! Forces a complete decorator update void TabDecorator::Draw() { STRACE(("TabDecorator: Draw()")); fDrawingEngine->SetDrawState(&fDrawState); _DrawFrame(fBorderRect); _DrawTabs(fTitleBarRect); }
void WinDecorator::Draw(void) { STRACE(("WinDecorator::Draw()\n")); fDrawingEngine->SetDrawState(&fDrawState); _DrawFrame(fBorderRect); _DrawTab(fTabRect); }
void WinDecorator::Draw(BRect update) { STRACE(("WinDecorator::Draw(): ")); update.PrintToStream(); fDrawingEngine->SetDrawState(&fDrawState); _DrawFrame(update); _DrawTab(update); }
/*! \brief Updates the decorator in the rectangular area \a updateRect. Updates all areas which intersect the frame and tab. \param updateRect The rectangular area to update. */ void TabDecorator::Draw(BRect updateRect) { STRACE(("TabDecorator::Draw(BRect updateRect): ")); updateRect.PrintToStream(); fDrawingEngine->SetDrawState(&fDrawState); _DrawFrame(updateRect & fBorderRect); _DrawTabs(updateRect & fTitleBarRect); }
/*! \brief Updates the decorator in the rectangular area \a updateRect. Updates all areas which intersect the frame and tab. \param updateRect The rectangular area to update. */ void TabDecorator::Draw(BRect updateRect) { STRACE(("TabDecorator::Draw(BRect " "updateRect(l:%.1f, t:%.1f, r:%.1f, b:%.1f))\n", updateRect.left, updateRect.top, updateRect.right, updateRect.bottom)); fDrawingEngine->SetDrawState(&fDrawState); _DrawFrame(updateRect & fBorderRect); _DrawTabs(updateRect & fTitleBarRect); }
//! Forces a complete decorator update void WinDecorator::Draw() { STRACE(("WinDecorator: Draw()")); // Easy way to draw everything - no worries about drawing only certain // things fDrawingEngine->SetDrawState(&fDrawState); _DrawFrame(fBorderRect); _DrawTabs(fTitleBarRect); }
void MacDecorator::Draw(BRect update) { STRACE(("MacDecorator: Draw(%.1f,%.1f,%.1f,%.1f)\n", update.left, update.top, update.right, update.bottom)); // We need to draw a few things: the tab, the borders, // and the buttons fDrawingEngine->SetDrawState(&fDrawState); _DrawFrame(update); _DrawTab(update); }
/*! \brief Updates the decorator in the rectangular area \a updateRect. Updates all areas which intersect the frame and tab. \param updateRect The rectangular area to update. */ void WinDecorator::Draw(BRect updateRect) { STRACE(("WinDecorator::Draw(BRect updateRect): ")); updateRect.PrintToStream(); // We need to draw a few things: the tab, the resize knob, the borders, // and the buttons fDrawingEngine->SetDrawState(&fDrawState); _DrawFrame(updateRect & fBorderRect); _DrawTabs(updateRect & fTitleBarRect); }
void DrawFrame(HDC hdc, POINT const *pPoints, int iCount, COLORREF clrBorder, COLORREF clrBack) { HGDIOBJ hPen = NULL; HGDIOBJ hOldPen; HBRUSH hBrush = NULL; HBRUSH hOldBrush; hPen = CreatePen(PS_SOLID, 1, clrBorder); hOldPen = SelectObject(hdc, hPen); hBrush = CreateSolidBrush (clrBack); hOldBrush = (HBRUSH__*)SelectObject(hdc, hBrush); Polygon(hdc, (POINT *)pPoints,iCount); SelectObject(hdc, hOldPen); DeleteObject(hPen); SelectObject(hdc, hOldBrush); DeleteObject(hBrush); _DrawFrame(hdc,pPoints,iCount,clrBorder); }
//! draws the frame void Decorator::DrawFrame() { _DrawFrame(fFrame); }
//! Forces a complete decorator update void Decorator::Draw() { _DrawFrame(fFrame); _DrawTab(fTabRect); }
/*! \brief Updates the decorator's look in the area \a rect The default version updates all areas which intersect the frame and tab. \param rect The area to update. */ void Decorator::Draw(BRect rect) { _DrawFrame(rect & fFrame); _DrawTab(rect & fTabRect); }