This class used to render text as part of a SymbolCollection.
Text have a text string, font size, anchor location, and anchoring mode.
Basic styling such as stroke, color are defined in the superclass Symbol.
On a label the "stroke" refer to the outside of the of the letter, and the "fill" refers to the inside of the letters. In most case, you want no stroke but a fill.
Text is placed by defining an anchor position and what that position is for the text (is it the middle? is it the top left?). Check the tutorial for details.
- See also
- An example tutorial can be found at https://bridgesuncc.github.io/tutorials/Symbol_Collection.html
- Author
- David Burlinson, Erik Saule
- Date
- 2018, 7/15/19, 06/22/21
|
| Text () |
|
| Text (String label) |
|
String | getShapeType () |
|
Symbol | setText (String t) |
|
String | getText () |
|
Text | setFontSize (float size) |
|
float | getFontSize () |
|
Symbol | setAnchorLocation (float x, float y) |
|
float | getAnchorLocationX () |
|
float | getAnchorLocationY () |
|
Symbol | setAnchorAlignment (String typeLR, String typeTB) |
|
String | getAnchroAlignmentLR () |
|
String | getAnchroAlignmentTB () |
|
JSONObject | getJSONRepresentation () |
|
| 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) |
|