en:software:qview:qview_6:qcl_library:vi10addarc3

This translation is older than the original page and might be outdated. See what has changed.

VI10AddArc3

V = Vector

I = Image

Function that is used to manage the Vector Image feature (object that resides on some Qpaint versions).

The VI10AddArc3 function adds the ARC3 command queued to be processed in the Buffer instructions to perform the drawing.
The ARC3 commandtrace an arc on the circumference of a circle whose center is located at Xo and Yo passed to the function. This arc go from current coordinates to the X, Y coordinates, these passed to the function.
The X and Y coordinates are also set, at the end of the statement, as current coordinates.

Buffer

VI10AddArc3 (awBuffer, Coord_X, Coord_Y, Centre_Xo, Centre_Yo, Radius)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN ARRSYS /
ARRGBL
awBuffer W Array that serves as a buffer for instructions/data
IN CONST/
GLOBAL
Coord_X W Variable containing the value of the X coordinate of the end point of arc, within the Vector Image object.
IN CONST/
GLOBAL
Coord_Y W Variable containing the value of the Y coordinate of the end point of arc, within the Vector Image object.
IN CONST/
GLOBAL
Centre_Xo W Variable containing the Xo circumferential Center coordinate value on which the arc is drawn.
IN CONST/
GLOBAL
Centre_Yo W Variable containing the Yo circumferential Center coordinate value on which the arc is drawn.
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 = 70
 
VI10AddMove (awBuffer, Coord_X, Coord_Y)	;Adds the MOve command
 
Coord_X = 20					;Sets the coordinates of the end point of arc
 
Coord_y = 50					
 
Centre_Xo = 0					;Sets the coordinates of the circumference center
 
Centre_Yo = 50
 
Radius = 20					;Sets the radius of the circumference
 
VI10AddArc3 (awBuffer, Coord_X, Coord_Y, Centre_Xo, Centre_Yo, Radius) ;Adds the ARC3 command
 
.... 
 
WAIT 1
JUMP MAIN
 
END

Note

  • Considered the picture below:

the ARC3 command trace an arc of a circle from point A to point B, on a circle that has its own centre in Co (Xo, Yo).

  • Last modified: 2019/08/29 17:01