2D_ARC

2D_ARC X,Y,R,S,E

DRAWS AN ARC OF CIRCLE DEFINED BY A CENTER (X,Y), A RADIUS R, A STARTING ANGLE S, AN ENDING ANGLE E

  • Type: Command
  • Parameters: 5
  • Group: Drawing

ACTION

The command 2D_ARC X,Y,R,S,E draws on the "2D target" system object (set by 2D_TARGET_IS), an arc of circle defined by a center (X,Y), a radius R, a starting angle S, an ending angle E.

X, Y and R are expressed in pixels and the origin (0,0) of the coordinates is the upper left corner of the system object.

The starting angle S and the ending angle E are clockwise and related to the X-axis (the value 0 corresponds to the X-axis). By default, they are expressed in radians, but the degrees can be used if the command DEGREES has been executed.

The line takes the drawing color set by 2D_PEN_COLOR, the drawing width set by 2D_PEN_WIDTH.

By default, the drawing color is black, the drawing width is 1 pixel, and the filling color is the background color and the "2D target" system object is : FORM number 0.

SYNTAX: 2D_ARC X,Y,R,S,E

  • X = X-component value (integer or real) of the center.
  • Y = Y-component value (integer or real) of the center.
  • R = value (integer or real) of the radius.
  • S = value (integer or real) of the starting angle.
  • E = value (integer or real) of the ending angle.

USE

  • The command 2D_ARC is used to draw an arc of circle.

ERROR

  • If X or Y or R or S or E are not correct expressions.

EXAMPLE

rem draw an arc of circle: center (100,100), radius = 50 pixels

rem starting angle 0°, ending angle 90°

degrees

2d_arc 100,100,50,0,90

SEE ALSO

2D_CIRCLE

2D_RECTANGLE

2D_ELLIPSE

2D_LINE

2D_POLY_FROM

2D_POLY_TO

2D_PEN_COLOR

2D_PEN_DASH

2D_PEN_DASH_DOT

2D_PEN_DASH_DOT_DOT

2D_PEN_DOT

2D_PEN_SOLID

2D_PEN_WIDTH

2D_FILL_COLOR

2D_FILL_CROSS

2D_FILL_DIAGONAL_CROSS

2D_FILL_DIAGONAL_DOWN

2D_FILL_DIAGONAL_UP

2D_FILL_HORIZONTAL

2D_FILL_SOLID

2D_FILL_VERTICAL