Basic Functions to Draw Shapes in Graphics

Shape
Function
Syntax
Pixel
Draw a pixel
Putpixel(X1, Y1, Color)
Line
Draw a line
Line(X1, Y1, X2, Y2)
Rectangle
Draw a rectangle
Rectangle(Left, Top, Right, Bottom)
Circle
Draw a circle
Circle(X,Y, Radius)
Ellipse
Draw a ellipse
Ellipse(X1, Y1, 0, 360, XaxisRadius, YaxisRadius)
Arc
Draw a arc
Arc(X1, Y1, StartingAngle, EndingAngle, Radius)
Bar
Draw a filled rectangle
Bar(Left, Top, Right, Bottom)
Bar3d
Draw a filled 3d rectangle
Bar3d(Left, Top, Right, Bottom, Depth, topflag)
**topflag will be 0 or 1**

Here X1=distance of first point of shape from X axis, 

X2=Distance of last point of shape from X axis.

Here Y1=distance of first point of shape from Y axis, 

Y2=Distance of last point of shape from Y axis.

No comments:

Post a Comment