Fill 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.fillColor = (255, 0, 0, 150)
>>> polygon2.fillColor = color.navyblue
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.
Mekanimo uses the fill styles provided by the wx library as listed below.
>>> circle1.fillStyle = wx.CROSS_HATCH
>>> polygon2.fillColor = color.navyblue
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
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.
Mekanimo uses the line styles provided by the wx library as listed below.
Rigid bodies can display user specified labels.
>>> circle1.label = 'Target'
Labels can be hidden by setting the showLabel attribute to False.
>>> circle1.showLabel = False
Label offset is specified for x and y direction in pixels. Positive Y direction is downwards.
>>> circle1.labelOffsetX = 20
>>> circle1.labelOffsetY = -20