本文整理汇总了C++中FXDCWindow::drawLine方法的典型用法代码示例。如果您正苦于以下问题:C++ FXDCWindow::drawLine方法的具体用法?C++ FXDCWindow::drawLine怎么用?C++ FXDCWindow::drawLine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FXDCWindow
的用法示例。
在下文中一共展示了FXDCWindow::drawLine方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawSliderHead
// Draw slider head
void FXRealSlider::drawSliderHead(FXDCWindow& dc,FXint x,FXint y,FXint w,FXint h){
FXint m;
dc.setForeground(baseColor);
dc.fillRectangle(x,y,w,h);
if(options&REALSLIDER_VERTICAL){
m=(h>>1);
if(options&REALSLIDER_ARROW_LEFT){
dc.setForeground(hiliteColor);
dc.drawLine(x+m,y,x+w-1,y);
dc.drawLine(x,y+m,x+m,y);
dc.setForeground(shadowColor);
dc.drawLine(x+1,y+h-m-1,x+m+1,y+h-1);
dc.drawLine(x+m,y+h-2,x+w-1,y+h-2);
dc.drawLine(x+w-2,y+1,x+w-2,y+h-1);
dc.setForeground(borderColor);
dc.drawLine(x,y+h-m-1,x+m,y+h-1);
dc.drawLine(x+w-1,y+h-1,x+w-1,y);
dc.fillRectangle(x+m,y+h-1,w-m,1);
}
else if(options&REALSLIDER_ARROW_RIGHT){
dc.setForeground(hiliteColor);
dc.drawLine(x,y,x+w-m-1,y);
dc.drawLine(x,y+1,x,y+h-1);
dc.drawLine(x+w-1,y+m,x+w-m-1,y);
#ifndef WIN32
dc.setForeground(shadowColor);
dc.drawLine(x+w-2,y+h-m-1,x+w-m-2,y+h-1);
dc.drawLine(x+1,y+h-2,x+w-m-1,y+h-2);
dc.setForeground(borderColor);
dc.drawLine(x+w-1,y+h-m-1,x+w-m-1,y+h-1);
dc.drawLine(x,y+h-1,x+w-m-1,y+h-1);
#else
dc.setForeground(shadowColor);
dc.drawLine(x+w-1,y+h-m-2,x+w-m-2,y+h-1);
dc.drawLine(x+1,y+h-2,x+w-m-1,y+h-2);
dc.setForeground(borderColor);
dc.drawLine(x+w,y+h-m-2,x+w-m-1,y+h-1);
dc.drawLine(x,y+h-1,x+w-m-1,y+h-1);
#endif
}
else if(options&REALSLIDER_INSIDE_BAR){
drawDoubleRaisedRectangle(dc,x,y,w,h);
dc.setForeground(shadowColor);
dc.drawLine(x+1,y+m-1,x+w-2,y+m-1);
dc.setForeground(hiliteColor);
dc.drawLine(x+1,y+m,x+w-2,y+m);
}
else{
drawDoubleRaisedRectangle(dc,x,y,w,h);
}
}