|
|
Today I will discuss with you how to use the circle method to draw various shapes related to circle. The circle method can be used to draw a circle, a sector, an arc and an ellipse. Before we use the circle, we also need to set the scale mode of the form. The default coordinate of the origin is (0,0) from the upper left corner and the default scale is measured in twips, where an inch is equivalent to 1440 twips or 1 cm=567 twips. You can set the scale mode to user-defined, inch, centimeters and etc. Let say we set the scale mode to centimeter, so we can draw circle, sector, arc and ellipse in the following formats: i) Circle (x, y ),r will draw a circle with coordinates (x,y) and radius r. ii) Circle (x,y),r, color,-angle1,-angle2 where angle1 and angle 2 are measured in radians. iii) Circle (x,y),r, color,angle1,angle2 where angle1 and angle 2 are measured in radians. (Notice that the signs in front of the angles are positive) iv) Circle (x, y ),r ,color,,,ratio will draw an ellipse with certain ratio
Examples are illustrated below:
|