CanvasDrawRectangle

Revision as of 21:48, 31 May 2017 by Lchrisman (talk | contribs) (Included in category image and canvas functions)


New to Analytica 5.0

CanvasDrawRectangle( canvas, x, y, width, height, lineColor, fillColor, lineWidth, dash )

Draws a rectangle on a canvas.

  • «canvas» is a canvas obtained from calling the Canvas() function, or a canvas context obtained by calling the CanvasContext() 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 CellFill for an enumeration of textual color names). A color integer encodes red, green, blue and optionally alpha as 0x01000000 * alpha + 0x00010000 * red + 0x0000100 * green + 0x000001 * blue. Defaults to 'Black'.
  • «lineWidth»: (Optional) The width of the border line. Defaults to 1.0.
  • «dash»; The dither style of the border line, one of: 'Solid', 'Dash', 'Dot', 'DashDot', 'DashDotDot'.

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


You are not allowed to post comments.