MMpy.Symbol
Syntax
MMpy.Symbol(font_name, size, description, bold, italic, rotation, border_type, colour, scaled=False, border_colour=MMpy.Colour(null=True))
Description
Create a symbol object.
Parameters
Name |
Type |
Description |
---|---|---|
font_name |
str |
Name of the font to use. |
index |
int |
Index of the symbol. |
size |
float |
Size of the symbol. |
description |
str |
Description of the symbol. |
bold |
bool |
Controls drawing the symbol in bold. |
italic |
bool |
Controls drawing the symbol in italics. |
rotation |
int |
Angle of rotation of the symbol. |
border_type |
MMpy.BorderType |
Type of the border. |
colour |
MMpy.Colour |
Colour of the symbol. |
scaled |
bool (optional) |
Controls whether the size parameter given is expressed in grid units. Defaults to False. |
border_colour |
MMpy.Colour (optional) |
Colour of the symbol's border. Defaults to MMpy.Colour(null=True). |
Returns
Type |
Description |
---|---|
MMpy.Symbol |
A new symbol object instance. |
See Also
MMpy.BorderType
MMpy.Colour
Notes
Valid choices for border_type are:
-
MMpy.BorderType.no_border
-
MMpy.BorderType.white_border
-
MMpy.BorderType.black_border
border_style will be used if it is MMpy.BorderType.no_border, or if border_colour is MMpy.Colour(null=true). Otherwise, border_colour takes priority.
Examples
symbol = MMpy.Symbol('Mm Symbols', 189, 12, 'ExampleSymbol', False, False, 0, MMpy.BorderType.black_border, MMpy.Colour(0, 0, 0), False, MMpy.Colour(255, 0, 0))
Resource ID
IDPH_SYMBOL_CSTR