Differences

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

Link to this comparison view

en:software:qview:qview_6:qcl_library:vi10addrect [2017/03/20 16:46] – created qem103en:software:qview:qview_6:qcl_library:vi10addrect [2019/08/29 17:01] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== VI10AddRect ======
 +
 +**V = **//Vector//
 +
 +**I = **//Image//
 +
 +Function that is used to manage the Vector Image feature (object that resides on some Qpaint versions).
 +
 +The VI10AddRect function __adds the RECT command queued to be processed instructions in the Buffer to perform the drawing__.\\
 +The RECT command creates a rectangle with an edge set on the current coordinates and the opposite edge positioned at coordinates passed as an argument.\\
 +The same coordinates passed to the function, it also set then as current coordinates.
 +
 +|Buffer|
 +|{{:software:qview:qview 5:funzioni_qcl:vi10addrect:vi10addrect.png?nolink200|}}|
 +
 +===== IMPLEMENTATION =====
 +
 +**VI10AddRect (awBuffer, Coord_X, Coord_Y, Fill)**
 +
 +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 that determines where one edge of the rectangle to draw.|
 +|  IN  |  CONST/\\ GLOBAL  |  Coord_Y  |  W  |Variable containing the value of the y coordinate that determines where one edge of the rectangle to draw.|
 +|  IN  |  CONST/\\ GLOBAL  |  Fill  |  W  |Variable containing the information for the area fill inside of the rectangle.\\ Fill = 0: Inside area not filled with color\\ Fill ≠ 0 : Indoor area filled with color|
 +
 +=== Example ===
 +
 +//TASK_00//
 +<code QCL>
 +MAIN:
 +
 +VI10InitBuffer (awBuffer)         ;Initializes the Buffer
 +
 +VI10AddPen (awBuffer, Color)         ;Adds the PEN command
 +
 +Coord_X = 30         ;The X-coordinate of the starting edge of the rectangle
 +
 +Coord_Y = 30         ;The Y-coordinate of the starting edge of the rectangle
 +
 +VI10AddSet (awBuffer, Coord_X, Coord_Y)                 ;Adds the SET command
 +
 +Coord_X = 30         ;The X-coordinate of the opposite corner of the rectangle
 +
 +Coord_Y = 30         ;The Y-coordinate of the opposite corner of the rectangle
 +
 +Fill = 0 ;Sets the internal area not filled
 +
 +**VI10AddRect (awBuffer, Coord_X, Coord_Y, Fill)** ;Adds the RECT command
 +
 +.... 
 +
 +WAIT 1
 +JUMP MAIN
 +
 +END
 +</code>
 +
 +=== Note ===