Connector graphics

Line color

Line color is specified as (red, green, blue, alpha) tuple. Red, green, blue, and alpha are specified as integers between 0 and 255. Without the alpha channel 16,777,216 (256 * 256 * 256) different colors can be defined. With the alpha channel the total number of possible colors become 4,294,967,296 (256 * 256 * 256 * 256).

>>> circle1.lineColor = (255, 0, 0, 150)
>>> polygon2.lineColor = color.navyblue

Transparency

When transparency is toggled off, the alpha value in the color definition becomes ineffective. Transparency can be toggled on or off from the menus or from the Python interpreter. Currently, running the models with the transparency option on is significantly slower than running the same model with no transparency due to the limitations of the underlying graphics libraries.

Line style

Mekanimo uses the line styles provided by the wx library as listed below.

  • SOLID
  • TRANSPARENT
  • DOT
  • LONG_DASH
  • SHORT_DASH
  • STIPPLE
  • USER_DASH
  • BDIAGONAL_HATCH
  • CROSSDIAG_HATCH
  • FDIAGONAL_HATCH
  • CROSS_HATCH
  • HORIZONTAL_HATCH
  • VERTICAL_HATCH
linestyles

Figure 2: Line styles

Line weight

Specifies the width of the border line. If set to zero then no line is drawn.

lineweights

Figure 3: Line weights

Table Of Contents

Previous topic

Rigid body graphics

Next topic

Sprites

This Page