Bridges-Java  3.3.0
Bridges(Java API)
Public Member Functions | List of all members
bridges.base.Rectangle Class Reference
Inheritance diagram for bridges.base.Rectangle:
bridges.base.Symbol

Detailed Description

This class defines a rectangle and is part of the bridges::base::SymbolCollection.

A rectangle has height and width, and a location (rectangle center)

Basic styling such as stroke, fill, color are defined in the superclass Symbol.

See also
An example tutorial can be found at https://bridgesuncc.github.io/tutorials/Symbol_Collection.html
Author
Kalpathi Subramanian, Erik Saule
Date
12/23/18, 6/22/21

Public Member Functions

 Rectangle ()
 
 Rectangle (float w, float h)
 
 Rectangle (float locx, float locy, float w, float h)
 
String getShapeType ()
 
void setWidth (float w)
 
void setRectangle (float locx, float locy, float w, float h)
 
JSONObject getJSONRepresentation ()
 
- Public Member Functions inherited from bridges.base.Symbol
 Symbol ()
 
Symbol setLabel (String label)
 
String getLabel ()
 
Symbol setFillColor (String c)
 
Color getFillColor ()
 
Symbol setStrokeColor (Color c)
 
Symbol setStrokeColor (String c)
 
Color getStrokeColor ()
 
Symbol setStrokeWidth (float strokewidth)
 This method sets the symbol stroke width. More...
 
Float getStrokeWidth ()
 
Symbol setOpacity (float op)
 This method sets the symbol opacity. More...
 
Float getOpacity ()
 
Symbol setStrokeDash (int dash)
 
Integer getStrokeDash ()
 
Symbol setLayer (int layer)
 
Integer getLayer ()
 
float[][] identity (float[][] m)
 
Symbol translate (float tx, float ty)
 
Symbol scale (float s)
 
Symbol scale (float sx, float sy)
 
Symbol rotate (float angle)
 
Symbol scale (float sx, float sy, float px, float py)
 
Symbol rotate (float angle, float px, float py)
 
Symbol setTransform (float a, float b, float c, float d, float e, float f)
 
float[][] getTransform ()
 
void addAllJSON (JSONArray symbol_json, Integer parent)
 

Additional Inherited Members

- Protected Attributes inherited from bridges.base.Symbol
String label = null
 
Color fillColor = null
 
Float opacity = null
 
Color strokeColor = null
 
Float strokeWidth = null
 
Integer strokeDash = null
 
Integer layer = null
 
float[] transform = null
 

Constructor & Destructor Documentation

◆ Rectangle() [1/3]

bridges.base.Rectangle.Rectangle ( )

Construct a default rectangle

◆ Rectangle() [2/3]

bridges.base.Rectangle.Rectangle ( float  w,
float  h 
)

Construct a rectangle with given height and width

Parameters
wwidth of rectangle
hheight of rectangle

◆ Rectangle() [3/3]

bridges.base.Rectangle.Rectangle ( float  locx,
float  locy,
float  w,
float  h 
)

Construct a rectangle with given its location (center), height and width

Parameters
locxx coordinate of center
locyy coordinate of center
wwidth of rectangle
hheight of rectangle

Member Function Documentation

◆ getJSONRepresentation()

JSONObject bridges.base.Rectangle.getJSONRepresentation ( )

This method returns the JSON representation of the shape

Returns
JSON representation of rectangle (string)

Reimplemented from bridges.base.Symbol.

◆ getShapeType()

String bridges.base.Rectangle.getShapeType ( )

This method gets the name of the shape

Returns
name shape name

Reimplemented from bridges.base.Symbol.

◆ setRectangle()

void bridges.base.Rectangle.setRectangle ( float  locx,
float  locy,
float  w,
float  h 
)

◆ setWidth()

void bridges.base.Rectangle.setWidth ( float  w)

This method sets the shape width

Parameters
wwidth

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