示例#1
0
// Draw document background
void FXRulerView::drawBackground(FXDCWindow& dc) {
    FXint docx,docy,docw,doch;

    // Background
    dc.setForeground(backColor);
    docx=getDocumentX();
    docy=getDocumentY();
    docw=getDocumentWidth();
    doch=getDocumentHeight();

    dc.fillRectangle(0,0,docx,height);
    dc.fillRectangle(docx+docw,0,width-docx-docw,height);
    dc.fillRectangle(docx,0,docw,docy);
    dc.fillRectangle(docx,docy+doch,docw,height-docy-doch);

    // Document insides
    dc.setForeground(docColor);
    dc.fillRectangle(docx,docy,docw,doch);
    dc.setForeground(FXRGB(0,0,0));
    dc.drawRectangle(docx-1,docy-1,docw+1,doch+1);
    dc.fillRectangle(docx+1,docy+doch+1,docw+2,2);
    dc.fillRectangle(docx+docw+1,docy+1,2,doch+2);
}
示例#2
0
void FXToolBarShell::drawBorderRectangle(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h){
  dc.setForeground(borderColor);
  dc.drawRectangle(x,y,w-1,h-1);
  }