Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:software:qview:qview_6:qcl_library:vi10addarcbetweenangles [2017/03/21 16:15] – created qem103en:software:qview:qview_6:qcl_library:vi10addarcbetweenangles [2019/08/29 17:01] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== 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|
 +|{{:software:qview:qview 5:funzioni_qcl:vi10addarcbetweenangles:vi10addarcbetweenangles_01.png?nolink200|}}|
 +
 +===== IMPLEMENTATION =====
 +
 +**VI10AddArcBetweenAngles (awBuffer, Centre_Xo, Centre_Yo, Angle_A, Angle_B, 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  |  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//
 +<code QCL>
 +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
 +</code>
 +
 +=== Note ===
 +
 +  *Considered the pictures below:
 +
 +{{:software:qview:qview 5:funzioni_qcl:vi10addarcbetweenangles:vi10addarcbetweenangles_02.png?nolink100|}}
 +
 +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.