en:software:qview:qview_6:qcl_library:vi10addarc2

Differences

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

Link to this comparison view

en:software:qview:qview_6:qcl_library:vi10addarc2 [2017/03/21 15:36] – created qem103en:software:qview:qview_6:qcl_library:vi10addarc2 [2019/08/29 17:01] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== VI10AddArc2 ======
 +
 +**V = **//Vector//
 +
 +**I = **//Image//
 +
 +Function that is used to manage the Vector Image feature (object that resides on some Qpaint versions).
 +
 +The VI10AddArc2 function __dds the ARC2 command queued to be processed in the Buffer instructions to perform the drawing__.\\
 +The ARC2 command trace an arc of type II or IV (see drawing in notes) current coordinates to X and Y coordinates passed through the function.\\
 +The X and Y coordinates are also set, at end of statement, as current coordinates.
 +
 +|Buffer|
 +|{{:software:qview:qview 5:funzioni_qcl:vi10addarc2:vi10addarc2_01.png?nolink200|}}|
 +
 +===== IMPLEMENTATION =====
 +
 +**VI10AddArc2 (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 value of the X coordinate of the end point of arc, within the Vector Image.|
 +|  IN  |  CONST/\\ GLOBAL  |  Coord_Y  |  W  |Variable containing the value of the Y 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//
 +<code QCL>
 +MAIN:
 +
 +VI10InitBuffer (awBuffer) ;Initializes the Buffer
 +
 +Color = 0 ;Sets the 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 for ARC2
 +
 +Coord_y = 50
 +
 +Radius = 200
 +
 +VI10AddArc2 (awBuffer, Coord_X, Coord_Y, Radius);Adds the ARC2 command
 +
 +.... 
 +
 +WAIT 1
 +JUMP MAIN
 +
 +END
 +</code>
 +
 +=== Note ===
 +
 +  * Considered the picture below:
 +{{:software:qview:qview 5:funzioni_qcl:vi10addarc2:vi10addarc2_02.png?nolink150|}}
 +
 +The circumference arc between point A and point B can be executed through one of the four trajectories I, II, III or IV. The ARC2 function execute the trajectories that belong to the circumference with the most "high" between the two (coordinate Y0 greater), then, in drawing,  the circumference whit Center C1. This circumference can execute the trajectory II or the trajectory IV. The trajectory II is execute if you set a negative radius, while the trajectory IV is executed if you set a positive radius.\\
 +If you want to execute a cricumference arc It belongs to the circumference whose Center Co such as that represented by the trajectories I or III, you must use th ARC1e function, with which, by setting a negative radius, will be the I trajectory, while setting a positive radius will be the trajectory III.