en:software:qview:qview_6:qcl_library:vi10addrect

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

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

VI10AddRect (awBuffer, Coord_X, Coord_Y, Fill)

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 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

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

Note

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