VI10AddArc1
V = Vector
I = Image
Function that is used to manage the Vector Image feature (object that resides on some Qpaint versions).
The VI10AddArc1 function adds the ARC1 command queued to be processed in the Buffer instructions to perform the drawing.
The ARC1 command trace an arc type I or III (see drawing in notes) current coordinates x and y coordinates passed through the function.
The X and Y coordinates are also set, at end of statement, as current coordinates.
Buffer |
IMPLEMENTATION
VI10AddArc1 (awBuffer, Coord_X, Coord_Y, Radius)
Parameters:
IN/OUT | VARIABLE TYPE | EXAMPLE NAME | DIM | |
---|---|---|---|---|
IN | ARRSYS / ARRGBL | awBuffer | W | Array that serves as a buffer for instructions/data |
IN | CONST/ GLOBAL | Coord_X | W | Variable containing the X-value coordinate of the end point of arc, within the Vector Image. |
IN | CONST/ GLOBAL | Coord_Y | W | Variable containing the X-value coordinate of the end point of arc, within the Vector Image. |
IN | CONST/ GLOBAL | Radius | W | Variable containing the value of the radius of the circle on which you want to draw the arc. |
Example
TASK_00
MAIN: VI10InitBuffer (awBuffer) ;Initializes the Buffer Color = 0 ;Sets black color VI10AddPen (awBuffer, Color) ;Adds the PEN command Coord_X = 0 ;Sets the coordinates for the MOVE Coord_y = 0 VI10AddMove (awBuffer, Coord_X, Coord_Y) ;Adds the MOVE command Coord_X = 100 ;Sets the coordinates and the radius to ARC1 Coord_y = 50 Radius = 200 VI10AddArc1 (awBuffer, Coord_X, Coord_Y, Radius);Adds the ARC1 command .... WAIT 1 JUMP MAIN END
Note
-
Considered the figure below:
The arc between point A and point B can run through one of the four trajectories I, II, III o IV. The ARC1 function execute the trajectories that belong to the circle with the “low” center between the two (coordinate Y0 less), then, in drawing, the circle whose center is C0. This circumference can execute the trajectory I or the trajectory III.The trajectory I shall occur when you set a negative radius, while the trajectory III runs if you set a positive radius.
If you want to execute an arc that belongs to the circumference with C1 center as that represented by the trajectories II or IV, you must use the ARC2 function, with which, by setting a negative radius, we will make the trajectory II, while setting a positive RADIUS will be the trajectory IV.