This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Draw a box with square or rounded corners in the currently selected canvas target
Syntax
n = Canvas_Box(x1, y1, x2, y2, [, corner [, rgbColor [, fillcolor [, fillstyle] ]]] )
Returns
Number
Parameters
Name |
Type |
Optional |
Meaning |
x1 |
Number |
No |
The upper left corner of the box |
y1 |
Number |
No |
The upper left corner of the box |
x2 |
Number |
No |
The lower right corner of the box. |
y2 |
Number |
No |
The lower right corner of the box. |
corner |
Number |
Yes |
The percentage of roundness of the corners, in the range of 0 to 100. A value of zero creates square corners, while 100 creates a circle/oval. A value of 20 being most common for a pleasant, rounded appearance. If corner is omitted, the default is 0, which creates a rectangle with square corners. |
rgbColor |
Number |
Yes |
RGB color of the box edge. If omitted (or -1), the edge color defaults to the current foreground color for the selected graphic window. |
fillcolor |
Number |
Yes |
RGB color of the box interior. If fillcolor is omitted (or -2), the interior of the box is not filled, allowing the background to show through. If fillcolor is -1, the interior is painted with the same color as the edge. Otherwise, fillcolor specifies the RGB color to be used. |
fillstyle |
Number |
Yes |
Fill style (pattern) to be used. If fillstyle is omitted, the default fill style is solid (0). If a hatch pattern is chosen (1 to 6), the foreground color is specified by the fillcolor, while the background is specified by the default background color. The fillstyle can be:
%Canvas_FillStyle_Solid %Canvas_FillStyle_HorizontalLines %Canvas_FillStyle_VerticalLines %Canvas_FillStyle_UpwardDiagonalLines %Canvas_FillStyle_DownwardDiagonalLines %Canvas_FillStyle_CrossedLines %Canvas_FillStyle_DiagonalCrossedLines |
Remarks
Restrictions
See also
Examples