Bridges-Python-3.0.2  3.0.2
Bridges(PythonAPI)
Public Member Functions | Public Attributes | List of all members
bridges.circle.Circle Class Reference
Inheritance diagram for bridges.circle.Circle:
bridges.symbol.Symbol

Detailed Description

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

A circle has a radius and a center, which is also its location

Author
Matthew Mcquaigue
Date
2018, 7/23/19

Shape collection tutorial, http://bridgesuncc.github.io/tutorials/Symbol_Collection.html

Public Member Functions

def __init__ (self, kwargs)
 Constructor for a circle symbol. More...
 
def get_name (self)
 Gets the name of the shape/symbol. More...
 
def radius (self)
 Getter function for the radius of this circle. More...
 
def radius (self, r)
 Setter for the radius of this circle. More...
 
def set_circle (self, locx, locy, r)
 Set the location and size of the circle. More...
 
def get_dimensions (self)
 Getter for the dimensions for the circle. More...
 
def translate
 translate the circle More...
 
def scale
 Scale the circle. More...
 
def get_json_representation (self)
 Get the json representation of the Circle object. More...
 
- Public Member Functions inherited from bridges.symbol.Symbol
def __init__ (self)
 Constructor for a Symbol. More...
 
def label (self)
 Getter for symbol label. More...
 
def label
 Setter for symbol label. More...
 
def identifier (self)
 Getter for the symbols identifier. More...
 
def fill_color (self)
 Getter for the fill color. More...
 
def fill_color (self, args, kwargs)
 Setter for the fill color. More...
 
def stroke_color (self)
 Getter for the stroke color. More...
 
def stroke_color (self, args, kwargs)
 Setter for the stroke color. More...
 
def stroke_width (self)
 Getter for the stroke width. More...
 
def stroke_width
 Setter for the stroke width. More...
 
def opacity (self)
 Getter for opacity. More...
 
def opacity
 Setter for opacity. More...
 
def stroke_dash (self)
 Getter for stroke_dash. More...
 
def stroke_dash
 Setter for stroke_dash. More...
 
def shape_type (self)
 
def shape_type (self, shape)
 
def set_location
 Setter for the location of the center of the symbol. More...
 
def get_location (self)
 Getter for the location of a symbol. More...
 
def get_dimensions (self)
 Getter for the dimensions. More...
 
def translate_point (self, pt, tx, ty)
 
def scale_point (self, pt, sx, sy)
 
def rotate_point (self, pt, angle)
 
def get_json_representation (self)
 Get the json representation of the Symbol class. More...
 

Public Attributes

 radius
 
 shape_type
 

Constructor & Destructor Documentation

◆ __init__()

def bridges.circle.Circle.__init__ (   self,
  kwargs,
  None 
)

Constructor for a circle symbol.

(int) locx: x location of the circle (int) locy: y location of the circle (float) r: radius of the circle

Returns
None
Exceptions
ValueErrorif the radius is not a positive number

Member Function Documentation

◆ get_dimensions()

def bridges.circle.Circle.get_dimensions (   self,
  list 
)

Getter for the dimensions for the circle.

Returns
list bounding box of the circle (xmin, xmax, ymin, ymax)

◆ get_json_representation()

def bridges.circle.Circle.get_json_representation (   self,
  dict 
)

Get the json representation of the Circle object.

Returns
dict representing the JSON

◆ get_name()

def bridges.circle.Circle.get_name (   self,
  str 
)

Gets the name of the shape/symbol.

Returns
str representing the name

◆ radius() [1/2]

def bridges.circle.Circle.radius (   self,
  float 
)

Getter function for the radius of this circle.

Returns
float representing radius

◆ radius() [2/2]

def bridges.circle.Circle.radius (   self,
  r,
  None 
)

Setter for the radius of this circle.

(float) r: radius to be set

Returns
None
Exceptions
ValueErrorif the radius is not a positive number

◆ scale()

def bridges.circle.Circle.scale (   self,
  scale 
)

Scale the circle.

Only the radius needs to be scaled, using a single scale value

       (float) scale: scale factor

◆ set_circle()

def bridges.circle.Circle.set_circle (   self,
  locx,
  locy,
  r,
  None 
)

Set the location and size of the circle.

(int) locx: x coordinate of the center of the circle (int) locy: y coordinate of the center of the circle (float) r: radius of the circle

Returns
None
Exceptions
ValueErrorif the radius is not a positive number

◆ translate()

def bridges.circle.Circle.translate (   self,
  tx 
)

translate the circle

Arrgs
(float) tx: x translation (float) ty: y translation

Member Data Documentation

◆ radius

bridges.circle.Circle.radius

◆ shape_type

bridges.circle.Circle.shape_type

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