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

Detailed Description

This class defines a polyline and is used as part of a SymbolCollection.

A polyline has a sequence of points (x, y coordinate pairs)

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

Note that since a Polyline is typically an open shape one usually want a fill that is transparent.

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

Public Member Functions

 Polyline ()
 
 Polyline (ArrayList< Float > pts)
 
String getShapeType ()
 
void addPoint (float x, float y)
 
ArrayList< Float > getPoints ()
 
void setPolyline (ArrayList< Float > pts)
 
JSONObject getJSONRepresentation ()
 
- Public Member Functions inherited from bridges.base.Symbol
 Symbol ()
 
Symbol setLabel (String label)
 
String getLabel ()
 
Symbol setFillColor (String c)
 
Symbol setFillColor (Color 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
 
- Package Attributes inherited from bridges.base.Symbol
Boolean xform_flag = false
 

Constructor & Destructor Documentation

◆ Polyline() [1/2]

bridges.base.Polyline.Polyline ( )

Construct a default polyline structure

◆ Polyline() [2/2]

bridges.base.Polyline.Polyline ( ArrayList< Float >  pts)

Construct a polyline with the give set of points

Parameters
ptsthe given set of input 2D points

Member Function Documentation

◆ addPoint()

void bridges.base.Polyline.addPoint ( float  x,
float  y 
)

This method adds a point to the polyline

Parameters
x,yCoordinates of the point

◆ getJSONRepresentation()

JSONObject bridges.base.Polyline.getJSONRepresentation ( )

This method returns the JSON representation of the shape

Returns
string JSON string

Reimplemented from bridges.base.Symbol.

◆ getPoints()

ArrayList<Float> bridges.base.Polyline.getPoints ( )

This method returns the point list of the polyline

Returns
points point list of the polyline - sequence of x, y values

◆ getShapeType()

String bridges.base.Polyline.getShapeType ( )

This method gets the name of the shape

Returns
shape name

Reimplemented from bridges.base.Symbol.

Reimplemented in bridges.base.Polygon.

◆ setPolyline()

void bridges.base.Polyline.setPolyline ( ArrayList< Float >  pts)

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