This class defines a rectangle and is part of the symbol collection.
More...
|
None | __init__ (self, **kwargs) |
| Constructor for the rectangle symbol.
|
|
str | get_shape_type (self) |
| Getter for the name of the shape.
|
|
| set_rectangle (self, locx, locy, w, h) |
| Setter function for setting the rectangles size and location from scratch.
|
|
dict | get_json_representation (self) |
| Getter function for the json representation of the data structure/shape.
|
|
| print_mat (self, list m) |
| print the current matrix for debugging
|
|
list | identity (self, list m) |
| create the identity matrix
|
|
list | mat_mult (self, list m1, list m2) |
|
list | vec_mat_mult (self, list m, list v) |
|
| translate (self, float tx, float ty) |
|
| scale (self, *args) |
| scale the symbol from a particular center location
|
|
| rotate (self, *args) |
|
| set_transform (self, float a, float b, float c, float d, float e, float f) |
|
| add_all_json (self, symbol_json, parent) |
|
|
| width = property |
| Getter for the rectangle width.
|
|
| height = property |
| Getter for the height of the rectangle.
|
|
| lower_left = property |
|
| label = property |
| Getter for symbol label.
|
|
| fill_color = property |
| Getter for the fill color.
|
|
| stroke_color = property |
| Getter for the stroke color.
|
|
| stroke_width = property |
| Getter for the stroke width.
|
|
| opacity = property |
| Getter for opacity.
|
|
| stroke_dash = property |
| Getter for stroke_dash.
|
|
| layer = property |
|
| xform = property |
|
This class defines a rectangle and is part of the symbol collection.
A rectangle is defined by the location of teh lower left corner (smaller values of x and y) and by height and width
- Author
- Matthew Mcquaigue
- Date
- 2018, 7/23/19
- See also
- Shape collection tutorial, https://bridgesuncc.github.io/tutorials/Symbol_Collection.html
◆ __init__()
None bridges.rectangle.Rectangle.__init__ |
( |
|
self, |
|
|
** |
kwargs |
|
) |
| |
Constructor for the rectangle symbol.
(float) w: width of the rectangle
(float) h: height of the rectangle
(float) locx: x location of the lower left of the rectangle
(float) locy: y loaction of the lower left of the rectangle
- Returns
-
None
- Exceptions
-
ValueError | if the width or height is less than 0 |
Reimplemented from bridges.symbol.Symbol.
◆ get_json_representation()
dict bridges.rectangle.Rectangle.get_json_representation |
( |
|
self | ) |
|
Getter function for the json representation of the data structure/shape.
- Returns
-
dict representing the json
Reimplemented from bridges.symbol.Symbol.
◆ get_shape_type()
str bridges.rectangle.Rectangle.get_shape_type |
( |
|
self | ) |
|
◆ set_rectangle()
bridges.rectangle.Rectangle.set_rectangle |
( |
|
self, |
|
|
|
locx, |
|
|
|
locy, |
|
|
|
w, |
|
|
|
h |
|
) |
| |
Setter function for setting the rectangles size and location from scratch.
(float) locx: the x location of the lower left of the rectangle
(float) locy: the y location of the lower left of the rectangle
(float) w: the width of rectangle
(float) h: the height of rectangle
- Returns
-
None
- Exceptions
-
ValueError | if the height or width is < 0 |
◆ _height
bridges.rectangle.Rectangle._height |
|
protected |
◆ _locx
bridges.rectangle.Rectangle._locx |
|
protected |
◆ _locy
bridges.rectangle.Rectangle._locy |
|
protected |
◆ _width
bridges.rectangle.Rectangle._width |
|
protected |
◆ height
bridges.rectangle.Rectangle.height = property |
|
static |
Getter for the height of the rectangle.
- Returns
-
float the height of the rectangle
◆ lower_left
bridges.rectangle.Rectangle.lower_left = property |
|
static |
◆ width
bridges.rectangle.Rectangle.width = property |
|
static |
Getter for the rectangle width.
- Returns
-
float the width
The documentation for this class was generated from the following file: