Tool LINE

From RealWorld Wiki

Jump to: navigation, search

LINE is a drawing tool capable of drawing polylines. The polylines might be dashed and may have arbitrary (non-integral width), and various join and cap styles.

[edit] Scripting parameters

LINE tool can be used from scripts. The command in script must have the following arguments:

  • width - line width in pixels
  • dash_pattern (optional) - a string consisting of spaces and minus signs (example:-- -- - -). Maximum length of the dash pattern is 32 characters.
  • join_style (optional) - one of "JROUND", "JBEVEL" (default), "JMITER".
  • cap_style (optional) - one of "CROUND", "CBUTT", "CSQUARE" (default).
  • coords - pairs of floating point numbers representing coordinates. There must be at least 4 numbers to define X and Y coordinates of two points.
  • poly (optional) - "CLOSE" or "OPEN" (default). If "CLOSE" is specified, the last point will be connected to the first one.

[edit] Example

DrawTool.LINE(Document, 5, "-   -", "JROUND", "CROUND", 10, 10, 90, 10, 10, 90);