Difference between revisions of "CanvasDrawRectangle"
(Included in category image and canvas functions) |
(swapXY) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Image and canvas functions]] | [[Category:Image and canvas functions]] | ||
+ | {{ReleaseBar}} | ||
''New to [[Analytica 5.0]]'' | ''New to [[Analytica 5.0]]'' | ||
− | == CanvasDrawRectangle( canvas, x, y, width, height'', lineColor, fillColor, lineWidth, dash'' ) == | + | == CanvasDrawRectangle( canvas, x, y, width, height'', lineColor, fillColor, lineWidth, dash{{Release|5.2||, swapXY}}'' ) == |
Draws a rectangle on a canvas. | Draws a rectangle on a canvas. | ||
Line 11: | Line 12: | ||
* «x», «y»: The location where the top-left corner will be placed. | * «x», «y»: The location where the top-left corner will be placed. | ||
* «width», «height»: The size of the rectangle | * «width», «height»: The size of the rectangle | ||
− | * «lineColor», «fillColor»: (Optional) The color for the edge and fill respectively, each is either a textual color name or a color integer. | + | * «lineColor», «fillColor»: (Optional) The color for the edge and fill respectively, each is either a textual color name or a color integer. See [[Color parameters]] for an enumeration of textual color names and a description of color integers. «lineColor» defaults to 'Black'. |
* «lineWidth»: (Optional) The width of the border line. Defaults to 1.0. | * «lineWidth»: (Optional) The width of the border line. Defaults to 1.0. | ||
− | * «dash»; The dither style of the border line, one of: <code>'Solid', 'Dash', 'Dot', 'DashDot', 'DashDotDot'</code>. | + | * «dash»; (Optional) The dither style of the border line, one of: <code>'Solid', 'Dash', 'Dot', 'DashDot', 'DashDotDot'</code>.{{Release|5.2|| |
+ | * «swapXY»: (Optional) Swap the parameters «x» with «y» and «width» with «height».}} | ||
+ | |||
When «fillColor» is omitted, the border is drawn and the rectangle is not filled. When fill color is specified but note of the line-relevant parameters is specified (i.e., «lineColor», «lineWidth» or «dash»), the rectangle is filled and no border is drawn. When «fillColor» and at least one line-relevant parameter is specified, the rectangle is drawn filled with a border line. | When «fillColor» is omitted, the border is drawn and the rectangle is not filled. When fill color is specified but note of the line-relevant parameters is specified (i.e., «lineColor», «lineWidth» or «dash»), the rectangle is filled and no border is drawn. When «fillColor» and at least one line-relevant parameter is specified, the rectangle is drawn filled with a border line. |
Latest revision as of 22:25, 15 March 2019
Release: |
4.6 • 5.0 • 5.1 • 5.2 • 5.3 • 5.4 • 6.0 • 6.1 • 6.2 • 6.3 • 6.4 • 6.5 |
---|
New to Analytica 5.0
CanvasDrawRectangle( canvas, x, y, width, height, lineColor, fillColor, lineWidth, dash, swapXY )
Draws a rectangle on a canvas.
- «canvas» is a canvas obtained from calling the
Canvas()
function, or a canvas context obtained by calling theCanvasContext()
function.
- «x», «y»: The location where the top-left corner will be placed.
- «width», «height»: The size of the rectangle
- «lineColor», «fillColor»: (Optional) The color for the edge and fill respectively, each is either a textual color name or a color integer. See Color parameters for an enumeration of textual color names and a description of color integers. «lineColor» defaults to 'Black'.
- «lineWidth»: (Optional) The width of the border line. Defaults to 1.0.
- «dash»; (Optional) The dither style of the border line, one of:
'Solid', 'Dash', 'Dot', 'DashDot', 'DashDotDot'
. - «swapXY»: (Optional) Swap the parameters «x» with «y» and «width» with «height».
When «fillColor» is omitted, the border is drawn and the rectangle is not filled. When fill color is specified but note of the line-relevant parameters is specified (i.e., «lineColor», «lineWidth» or «dash»), the rectangle is filled and no border is drawn. When «fillColor» and at least one line-relevant parameter is specified, the rectangle is drawn filled with a border line.
See also
Comments
Enable comment auto-refresher