Bridges-C++  3.4.4
Bridges(C++ API)
Public Member Functions | List of all members
bridges::datastructure::Text Class Reference

#include <Text.h>

Inheritance diagram for bridges::datastructure::Text:
bridges::datastructure::Symbol

Detailed Description

This is a label object and used for defining text labels as part of the symbol collection.

Author
Kalpathi Subramanian
Date
12/23/18, 12/28/20

Public Member Functions

 Text ()
 
 Text (const Text &t)
 
Textoperator= (const Text &t)
 
 Text (string l)
 
 ~Text ()
 
virtual string getShapeType () const override
 
TextsetText (string lbl)
 Set the label text. More...
 
string getText () const
 Get the symbol label. More...
 
TextsetAnchorLocation (float *loc)
 This method sets the label origin;. More...
 
TextsetAnchorLocation (float locx, float locy)
 This method sets the label origin;. More...
 
TextsetAnchorAlignment (string typeLR, string typeTB)
 
double getAnchorLocationX ()
 This method gets the label anchor location. More...
 
double getAnchorLocationY ()
 This method gets the label anchor location. More...
 
SymbolsetAnchorType (string type)
 This method sets the label's anchor type. More...
 
string getAnchorType ()
 This method gets the label's anchor type. More...
 
SymbolsetFontSize (double sz)
 This method sets the font size. More...
 
double getFontSize ()
 This method gets the font size. More...
 
const string getSymbolRepresentation () const override
 This method returns the JSON representation of the shape. More...
 
- Public Member Functions inherited from bridges::datastructure::Symbol
 Symbol ()
 default constructor More...
 
 Symbol (const Symbol &s)
 
Symboloperator= (const Symbol &s)
 
 ~Symbol ()
 
int getIdentifier () const
 return the symbol identifier. More...
 
SymbolsetFillColor (Color c)
 Set the symbol fill color. More...
 
SymbolsetFillColor (string c)
 This method sets the symbol fill color. More...
 
Color getFillColor () const
 This method gets fill color. More...
 
SymbolsetStrokeColor (Color c)
 
SymbolsetStrokeColor (string c)
 This method sets the symbol stroke color. More...
 
Color getStrokeColor ()
 This method gets stroke color. More...
 
SymbolsetStrokeWidth (float strk_width)
 This method sets the symbol stroke width. More...
 
float getStrokeWidth () const
 This method gets stroke width. More...
 
SymbolsetOpacity (float op)
 This method sets the symbol opacity. More...
 
float getOpacity () const
 This method gets symbol opacity. More...
 
SymbolsetStrokeDash (int dash)
 This method sets the stroke dash level. More...
 
int getStrokeDash () const
 This method gets stroke dash level. More...
 
SymbolsetLayer (int l)
 
int getLayer () const
 
Symboltranslate (float tx, float ty)
 Translate a 2D point. More...
 
Symbolscale (float sx, float sy)
 Scale a Symbol. More...
 
Symbolscale (float scalefactor)
 Scale a Symbol. More...
 
Symbolrotate (float angle)
 Rotate a 2D point (about Z) More...
 
Symbolscale (float sx, float sy, float px, float py)
 Scale about an arbitrary point (px, py) More...
 
Symbolrotate (float angle, float px, float py)
 Rotate a 2D point about an arbitrary point (px, py) More...
 
SymbolsetTransform (float a, float b, float c, float d, float e, float f)
 

Additional Inherited Members

- Protected Member Functions inherited from bridges::datastructure::Symbol
const string getSymbolAttributeRepresentation () const
 Get the JSON of the symbol representation. More...
 

Constructor & Destructor Documentation

◆ Text() [1/3]

bridges::datastructure::Text::Text ( )
inline

constructors

◆ Text() [2/3]

bridges::datastructure::Text::Text ( const Text t)
inline

◆ Text() [3/3]

bridges::datastructure::Text::Text ( string  l)
inline

Create a label object with label l

Parameters
llabel

◆ ~Text()

bridges::datastructure::Text::~Text ( )
inline

Member Function Documentation

◆ getAnchorLocationX()

double bridges::datastructure::Text::getAnchorLocationX ( )
inline

This method gets the label anchor location.

Returns
anchor location x

◆ getAnchorLocationY()

double bridges::datastructure::Text::getAnchorLocationY ( )
inline

This method gets the label anchor location.

Returns
anchor location y

◆ getAnchorType()

string bridges::datastructure::Text::getAnchorType ( )
inline

This method gets the label's anchor type.

Returns
type

◆ getFontSize()

double bridges::datastructure::Text::getFontSize ( )
inline

This method gets the font size.

Returns
font size

◆ getShapeType()

virtual string bridges::datastructure::Text::getShapeType ( ) const
inlineoverridevirtual

Get the symbol type - implemented in subclasses

Returns
the shape type

Implements bridges::datastructure::Symbol.

◆ getSymbolRepresentation()

const string bridges::datastructure::Text::getSymbolRepresentation ( ) const
inlineoverridevirtual

This method returns the JSON representation of the shape.

Returns
string JSON string

Implements bridges::datastructure::Symbol.

◆ getText()

string bridges::datastructure::Text::getText ( ) const
inline

Get the symbol label.

Returns
the text label

◆ operator=()

Text& bridges::datastructure::Text::operator= ( const Text t)
inline

◆ setAnchorAlignment()

Text& bridges::datastructure::Text::setAnchorAlignment ( string  typeLR,
string  typeTB 
)
inline

Sets the alignment parameters for the text label

Parameters
typeLRvalid parameters are "left", "middle", and "right"
typeTBvalid parameters are "top", "bottom", "embottom", "emtop", "middle"
Returns
symbol

◆ setAnchorLocation() [1/2]

Text& bridges::datastructure::Text::setAnchorLocation ( float *  loc)
inline

This method sets the label origin;.

Parameters
loccoordinates of label location

◆ setAnchorLocation() [2/2]

Text& bridges::datastructure::Text::setAnchorLocation ( float  locx,
float  locy 
)
inline

This method sets the label origin;.

Parameters
locxx coordinate of label location
locyy coordinate of label location

◆ setAnchorType()

Symbol& bridges::datastructure::Text::setAnchorType ( string  type)
inline

This method sets the label's anchor type.

Parameters
typestring
Returns
symbol

◆ setFontSize()

Symbol& bridges::datastructure::Text::setFontSize ( double  sz)
inline

This method sets the font size.

Parameters
szfont size
Returns
symbol

◆ setText()

Text& bridges::datastructure::Text::setText ( string  lbl)
inline

Set the label text.

Parameters
lblthe text to set

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