示例#1
0
void CLCDDisplay::draw_rectangle (int left,int top, int right, int bottom, int linestate,int fillstate)
{
	// coordinate checking in draw_pixel (-> you can draw lines only
	// partly on screen)

	draw_line(left,top,right,top,linestate);
	draw_line(left,top,left,bottom,linestate);
	draw_line(right,top,right,bottom,linestate);
	draw_line(left,bottom,right,bottom,linestate);
	draw_fill_rect(left,top,right,bottom,fillstate);  
}  
 void draw_fill_rect (const Vector2d& pos1, const Vector2d& pos2, Color color)
 {
   draw_fill_rect (pos1.x, pos1.y, pos2.x, pos2.y, color);
 }