Circle/Ellipse: Ellipse(x1,y1,x2,y2);
Line:MoveTo(x1,y1), LineTo(x2,y2)
Rectangle: Rectangle(x1,y1,x2,y2);
Rounded Rectangle: RoundRect(x1,y1,x2,y2,x3,y3);
x3,y3 are used for round
shape.
Pie: Pie(x1,y1,x2,y2,x3,y3,x4,y4);
x3,y3 indicates arc’s
starting point x4,y4 indicates arc’s
end point.
Polygon: One way is MoveTo(),LineTo()
Another way is: POINT
p[8]={x1,y1,x2,y2,…,x8,y8);
Polygon(p,8);
Ex:
Void OnPaint()
{
CPaintDCd(this);
d.MoveTo(10,10);
d.LineTo(200,10);
d.Rectangle(10,20,200,100);
d.RoundRect(10,120,200,220,20,20);
d.Ellipse(10,10,100,200);
d.Pie(250,10,350,110,350,110,350,10);
POINT
p[5]={250,150,250,300,300,350,400,300,320,190};
d.Polygon(p,5);
}
No comments:
Write comments