en:software:qview:qview_6:qcl_library:vi10addarcbetweenangles

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

VI10AddArcBetweenAngles

V = Vector

I = Image

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

The VI10AddArcBetweenAngles function adds, queued instructions to be processed into the Buffer to perform the drawing, a set of instructions to draw an arc whose route goes from point A to point B in a circle whose X-Y coordinates are passed of the center of the radius.
Point A and point B are not expressed with X-Y coordinates but with circumferential corners.
The X and Y coordinates of the B point (calculated within the function) it also set, at end of statement, as current coordinates.

Buffer

VI10AddArcBetweenAngles (awBuffer, Centre_Xo, Centre_Yo, Angle_A, Angle_B, Radius)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN ARRSYS /
ARRGBL
awBuffer W Array that serves as a buffer for instructions/data
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
Angle_A W Variable containing the A angle value of the start arc.
(Expressed in tenths of a degree)
IN CONST/
GLOBAL
Angle_B W Variable containing the B angle value of the end arc.
(Expressed in tenths of a degree)
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
 
Centre_Xo = 0					;Sets the coordinates of the center circumference
 
Centre_Yo = 50
 
Angle_A = 200					;Sets the angle of the A point (20°)
 
Angle_B = 900					;Sets the angle of the B point (90°)
 
Radius = 20					;Sets the Radius of the circumference
 
VI10AddArcBetweenAngles (awBuffer, Centre_Xo, Centre_Yo, Angle_A, Angle_B, Radius)
 
;Adds Construction arch with corners
 
.... 
 
WAIT 1
JUMP MAIN
 
END

Note

  • Considered the pictures below:

the function trace an arc from point A to point B (expressed as angles) of the unit identified by the X-Y coordinates of the center and the radius is passed to the function.

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