![]() |
Bridges-Java-3.0.1
3.0.1
Bridges(JavaAPI)
|
This class defines a rectangle and is part of the symbol collection. A rectangle has height and width.
Basic styling such as stroke and fill are defined in the superclass Symbol.
Public Member Functions | |
Rectangle () | |
Rectangle (float w, float h) | |
Rectangle (float locx, float locy, float w, float h) | |
String | getName () |
void | setWidth (float w) |
float [] | getDimensions () |
void | setRectangle (float locx, float locy, float w, float h) |
void | translate (float tx, float ty) |
void | scale (float sx, float sy) |
JSONObject | getJSONRepresentation () |
![]() | |
Symbol () | |
void | setLabel (String label) |
String | getLabel () |
String | getIdentifier () |
void | setFillColor (Color c) |
void | setFillColor (String c) |
Color | getFillColor () |
void | setStrokeColor (Color c) |
Symbol | setStrokeColor (String c) |
Color | getStrokeColor () |
void | 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 () |
void | setLocation (float x, float y) |
float [] | getLocation () |
float [] | getDimensions () |
JSONObject | getJSONRepresentation () |
Additional Inherited Members | |
![]() | |
String | getShapeType () |
void | setShapeType (String sh) |
void | translatePoint (float[] pt, float tx, float ty) |
![]() | |
String | label = "" |
Color | fillColor = new Color("blue") |
float | opacity = DEFAULT_OPACITY |
Color | strokeColor = new Color("white") |
float | strokeWidth = DEFAULT_STROKEWIDTH |
Integer | strokeDash = DEFAULT_STROKEDASH |
float | locationX = DEFAULT_LOCATIONX |
float | locationY = DEFAULT_LOCATIONY |
bridges.base.Rectangle.Rectangle | ( | ) |
Construct a default rectangle
bridges.base.Rectangle.Rectangle | ( | float | w, |
float | h | ||
) |
Construct a rectangle with given height and width
w | width of rectangle |
h | height of rectangle |
bridges.base.Rectangle.Rectangle | ( | float | locx, |
float | locy, | ||
float | w, | ||
float | h | ||
) |
Construct a rectangle with given its location (center), height and width
locx | x coordinate of center |
locy | y coordinate of center |
w | width of rectangle |
h | height of rectangle |
float [] bridges.base.Rectangle.getDimensions | ( | ) |
This method returns the dimensions of the shape: min and max values in X and Y
JSONObject bridges.base.Rectangle.getJSONRepresentation | ( | ) |
This method returns the JSON representation of the shape
String bridges.base.Rectangle.getName | ( | ) |
This method gets the name of the shape
void bridges.base.Rectangle.scale | ( | float | sx, |
float | sy | ||
) |
Scale the rectangle about its center
sx,sy | scale factor along each axis |
void bridges.base.Rectangle.setRectangle | ( | float | locx, |
float | locy, | ||
float | w, | ||
float | h | ||
) |
void bridges.base.Rectangle.setWidth | ( | float | w | ) |
This method sets the shape width
w | width |
void bridges.base.Rectangle.translate | ( | float | tx, |
float | ty | ||
) |
Translate the rectangle
tx,ty | translation vector |