The positioning parameters allow you to easily position elements on the Canvas. For more background information see the Points and Rects explanation.

Each element is combined one after the other to produce a final rectangle that defines the drawing area. For example the following all produce the same output:

[VBScript]
DrawShape "rect", "Pos=10,10 Size = 80,80"
DrawShape "rect", "Rect = 10,10,90,90"
DrawShape "rect", "Rect=0,0,100,100 Inset=10"
DrawShape "rect", "Pos=0,0 Size = 80,80 Move=10,10"

Note: If you use no parameters the rect will default to that of the canvas.

 

   
1
 
Position or Pos    
     

This sets the point at which the object will be drawn. The position is relative to the alignment of the object (typically top left).

The default is 0,0.


   
2
 
Size    
     

This sets the width and height that the object will be drawn at as a comma separated string (width, height).

The default is the width and height of the Canvas.

 

   
3
 
Rectangle or Rect    
     

This specifies the absolute rectangle which the object will be drawn within. If this parameter is used it will override any Pos and Size parameters.

 

   
4
 
Inset    
     

This parameter is designed to make your life easy if you are drawing nested objects.

It insets (shrinks) the item rectangle by a number of pixels. Both the top and left coordinates are increased by this number while the bottom and right coordinates are reduced by it. If you use a negative number the rectangle will be enlarged.

 

   
5
 
Move    
     

This parameter is designed to make your life easy if you are drawing a series of successive offset objects.

It moves the current rectangle by a horizontal and vertical distance specified as a comma separated string (horizontal, vertical). The left and right coordinates are increased by the horizontal shift. The top and bottom coordinates are increased by the vertical shift. You can use negative numbers to shift the rectangle up or left.

 

   
6
 
X    
     

This sets the leftmost point at which the object will be drawn. It can be used together with the Y parameter in place of the Position parameter.

 

   
7
 
Y    
     

This sets the topmost point at which the object will be drawn. It can be used together with the X parameter in place of the Position parameter.

 

   
8
 
Width    
     

This sets the width that the object will be drawn in. It can be used together with the Height parameter in place of the Size parameter.

 

   
9
 
Height    
     

This sets the height that the object will be drawn in. It can be used together with the Width parameter in place of the Size parameter.