本文整理汇总了C++中Bitmap::Rectfill方法的典型用法代码示例。如果您正苦于以下问题:C++ Bitmap::Rectfill方法的具体用法?C++ Bitmap::Rectfill怎么用?C++ Bitmap::Rectfill使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bitmap
的用法示例。
在下文中一共展示了Bitmap::Rectfill方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Draw
void PlayArea::Draw(Bitmap &canvas) {
canvas.Clear(Color::black);
int x = 0;
int y = PIECESIZE*PLAYHEIGHT;
MyColor c;
for (int j=0; j<PLAYHEIGHT; j++) {
x = 0;
y -= PIECESIZE;
for (int i=0; i<PLAYWIDTH; i++) {
//canvas.Rectangle(x, y, x+PIECESIZE, y+PIECESIZE, Color::darkgray);
c = GetTile(i,j);
if (c.c1) {
//canvas.Rectfill(x, y, x+PIECESIZE, y+PIECESIZE, c);
canvas.Rectfill( x, y, x+PIECESIZE-1, y+PIECESIZE-1, c.c1);
canvas.Rectangle(x+1, y+1, x+PIECESIZE-2, y+PIECESIZE-2, c.c2);
canvas.Rectangle(x+3, y+3, x+PIECESIZE-4, y+PIECESIZE-4, c.c3);
}
x += PIECESIZE;
}
}
if (curPiece) {
curPiece->Draw(canvas);
}
}
示例2: switch
//.........这里部分代码省略.........
bmp->Hline(3, 4, 10, c_font);
bmp->Hline(3, 18, 10, c_font);
bmp->Hline(3, 32, 10, c_disable);
bmp->Hline(3, 46, 10, c_font);
break;
case ICONMIN:
bmp->Draw3DFrame(0, 0, 14, 13, c_face, c_shad1, c_shad2);
bmp->Draw3DFrame(0, 14, 14, 27, c_face, c_shad2, c_shad1);
bmp->Draw3DFrame(0, 28, 14, 41, c_face, c_shad1, c_shad2);
bmp->Draw3DFrame(0, 42, 14, 55, c_face, c_shad1, c_shad2);
bmp->Rectangle(3, 9, 10, 10, c_font);
bmp->Rectangle(3, 23, 10, 24, c_font);
bmp->Rectangle(3, 37, 10, 38, c_disable);
bmp->Rectangle(3, 51, 10, 52, c_font);
break;
case ICONRESTORE:
bmp->Draw3DFrame(0, 0, 14, 13, c_face, c_shad1, c_shad2);
bmp->Draw3DFrame(0, 14, 14, 27, c_face, c_shad2, c_shad1);
bmp->Draw3DFrame(0, 28, 14, 41, c_face, c_shad1, c_shad2);
bmp->Draw3DFrame(0, 42, 14, 55, c_face, c_shad1, c_shad2);
bmp->Rectangle(3, 3, 10, 10, c_font);
bmp->Rectangle(3, 17, 10, 24, c_font);
bmp->Rectangle(3, 31, 10, 38, c_disable);
bmp->Rectangle(3, 45, 10, 52, c_font);
bmp->Hline(3, 4, 10, c_font);
bmp->Hline(3, 18, 10, c_font);
bmp->Hline(3, 32, 10, c_disable);
bmp->Hline(3, 46, 10, c_font);
break;
case LIST:
bmp->Rectfill(0, 0, 35, 11, c_sunken);
bmp->Rectfill(0, 12, 35, 23, c_face);
bmp->Rectfill(0, 24, 35, 35, c_sunken);
bmp->Rectfill(0, 36, 35, 47, c_face);
bmp->Rectfill(0, 48, 35, 59, c_select);
bmp->Rectfill(0, 60, 35, 71, c_select);
bmp->Rectfill(0, 72, 35, 83, c_face);
bmp->Rectfill(0, 84, 35, 95, c_face);
break;
case MENU_BACK:
bmp->Draw3DFrame(0, 0, 63, 63, c_face, c_shad1, c_shad2);
break;
case MENU_BUTTON:
bmp->Clear(c_deselect);
bmp->Rectfill(0, 12, 17, 23, c_select);
break;
case MENU_ITEM:
bmp->Clear(c_face);
bmp->Rectfill( 2, 2, 45, 13, c_face);
bmp->Rectfill( 2, 18, 45, 29, c_select);
bmp->Hline( 4, 38, 43, c_shad2);
bmp->Hline( 4, 39, 43, c_shad1);
bmp->Rectfill( 2, 50, 45, 61, c_face);
bmp->DrawArrow(40, 53, c_font, 1);
bmp->Rectfill( 2, 66, 45, 77, c_select);