Bridges-Python 3.5.0-dev1
Bridges(Python API)
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Properties | List of all members
bridges.polyline.Polyline Class Reference

This class defines a polygon and is part of the symbol collection. More...

Inheritance diagram for bridges.polyline.Polyline:
bridges.symbol.Symbol bridges.polygon.Polygon

Public Member Functions

 __init__ (self, pts=None)
 Constructor.
 
 get_shape_type (self)
 Get the name of the symbol.
 
 add_point (self, x, y)
 Add a point to the polyline.
 
 get_json_representation (self)
 Get the json representation of the Symbol class.
 
- Public Member Functions inherited from bridges.symbol.Symbol
 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)
 

Protected Attributes

 _points
 
- Protected Attributes inherited from bridges.symbol.Symbol
 _label
 
 _fill_color
 
 _stroke_color
 
 _opacity
 
 _stroke_width
 
 _stroke_dash
 
 _layer
 
 _transform
 
 _xform
 
 _xform_flag
 

Properties

 points = property
 Get the number of points in polyline.
 
- Properties inherited from bridges.symbol.Symbol
 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
 

Detailed Description

This class defines a polygon and is part of the symbol collection.

A polygon has a set of vertices, with vertices connected by line segments. It differs from the polyline in the sense that the last and first vertex are connect to close the shape.

Author
David Burlinson, Kalpathi Subramanian
Date
2018, 7/23/19, 1/2/21
See also
Shape collection tutorial, https://bridgesuncc.github.io/tutorials/Symbol_Collection.html

Constructor & Destructor Documentation

◆ __init__()

bridges.polyline.Polyline.__init__ (   self,
  pts = None 
)

Constructor.

Sets the number of points in the polyline

Parameters
ptsnumber of points to be used in constructing the polyline

Reimplemented from bridges.symbol.Symbol.

Reimplemented in bridges.polygon.Polygon.

Member Function Documentation

◆ add_point()

bridges.polyline.Polyline.add_point (   self,
  x,
  y 
)

Add a point to the polyline.

Parameters
xpoint's x coordinate
ypoint's y coordinate

◆ get_json_representation()

bridges.polyline.Polyline.get_json_representation (   self)

Get the json representation of the Symbol class.

Returns
dict the JSON representation

Reimplemented from bridges.symbol.Symbol.

◆ get_shape_type()

bridges.polyline.Polyline.get_shape_type (   self)

Get the name of the symbol.

Returns
the symbol name

Reimplemented from bridges.symbol.Symbol.

Reimplemented in bridges.polygon.Polygon.

Member Data Documentation

◆ _points

bridges.polyline.Polyline._points
protected

Property Documentation

◆ points

bridges.polyline.Polyline.points = property
static

Get the number of points in polyline.

Returns
the number of points in symbol.

The documentation for this class was generated from the following file: