2D_ELLIPSE

2D_ELLIPSE X1,Y1,X2,Y2

DRAWS AN ELLIPSE INSIDE THE BOUNDING RECTANGLE DEFINED BY THE 2 POINTS (X1,Y1) AND (X2,Y2)

  • Type: Command
  • Parameters: 4
  • Group: Drawing

ACTION

The command 2D_ELLIPSE X1,Y1,X2,Y2 draws on the "2D target" system object (set by 2D_TARGET_IS), an ellipse inside a bounding rectangle defined by 2 different points (X1,Y1) and (X2,Y2). The line takes the drawing color set by 2D_PEN_COLOR, the drawing width set by 2D_PEN_WIDTH and the ellipse is filled with the filling color set by 2D_FILL_COLOR.

X1,Y1,X2,Y2 are expressed in pixels and the origin (0,0) of the coordinates is the upper left corner of the system object.

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_ELLIPSE X1,Y1,X2,Y2

  • X1 = X-component value (integer or real) of first point.
  • Y1 = Y-component value (integer or real) of first point.
  • X2 = X-component value (integer or real) of second point.
  • Y2 = Y-component value (integer or real) of second point.

USE

  • The command 2D_ELLIPSE is used to draw an ellipse.

ERROR

  • If X1 or Y1 or X2 or Y2 is not a correct expression.

EXAMPLE

rem draw an ellipse inside the bounding rectangle between (10,20) and (110,120)

2d_pen_color 0,0,255:rem draw with a blue pen

2d_pen_width 3:rem draw with a pen width of 3 pixels

2d_ellipse 10,20,110,120

SEE ALSO

2D_ARC

2D_CIRCLE

2D_RECTANGLE

2D_LINE

2D_POLY_FROM

2D_POLY_TO

2D_PEN_COLOR

2D_PEN_WIDTH

2D_FILL_COLOR