MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLTrackGraphicArrow Class Reference
Inheritance diagram for TSLTrackGraphicArrow:

Detailed Description

This class provides a track graphic which displays an arrow within the TSLTrackDisplayManager

  • This graphic may have a maximum of 2 control points
  • The first control point added is the back/start of the arrow, and the second is the front/end of the arrow
  • By default the arrow will be drawn pointing towards the 'front' of the arrow
  • Arrow heads may be displayed at either end of the arrow, or none
  • The width of the arrow tail and head may be controlled separately
  • The rendering attributes of the arrow may be controlled via the rendering method

This class is reference counted internally to allow objects to be shared within the track manager SDK

  • Ownership of this object will never be transferred from the application to MapLink
  • The application must call release() in order to relinquish its ownership, even if the object has been passed to another

Public Member Functions

void tailWidth (double width, TSLDimensionUnits units)
 
double tailWidth () const
 
TSLDimensionUnits tailWidthUnits () const
 
void headWidth (double width, TSLDimensionUnits units)
 
double headWidth () const
 
TSLDimensionUnits headWidthUnits () const
 
void headAtBack (bool head)
 
bool headAtBack () const
 
void headAtFront (bool head)
 
bool headAtFront () const
 
void headClosed (bool closed)
 
bool headClosed () const
 
void headAcuity (double angle)
 
double headAcuity () const
 
const TSLRenderingAttributesrendering () const
 
void rendering (const TSLRenderingAttributes &attribs)
 
- Public Member Functions inherited from TSLTrackGraphic
TSLTrackGraphic::GraphicType type () const
 
void release ()
 
void featureID (TSLFeatureID featureID)
 
TSLFeatureID featureID () const
 
bool featureName (const char *featureName)
 
void userID (uint32_t id)
 
uint32_t userID () const
 
TSLTrack::TrackID graphicID () const
 
bool addControlPoint (double lat, double lon)
 
bool addControlPoint (TSLTrack *track)
 
bool getControlPointLocation (uint32_t index, double &lat, double &lon) const
 
TSLTrackgetControlPointTrack (uint32_t index) const
 
TSLTrackGraphic::ControlPointType controlPointType (uint32_t index) const
 
bool removeControlPoint (uint32_t index)
 
uint32_t numControlPoints () const
 
bool insertControlPoint (uint32_t index, double lat, double lon)
 
bool insertControlPoint (uint32_t index, TSLTrack *track)
 
bool moveControlPoint (uint32_t index, double lat, double lon)
 

Static Public Member Functions

static TSLTrackGraphicArrowcreate ()
 
static TSLTrackGraphicArrowcreate (TSLTrack *track1, TSLTrack *track2)
 

Additional Inherited Members

- Public Types inherited from TSLTrackGraphic
enum  ControlPointType { LatLonControlPoint , TrackControlPoint }
 The control point types supported by track graphics. More...
 
enum  GraphicType { TrackGraphicLink , TrackGraphicArrow , TrackGraphicRuler }
 The types of graphic provided by the MapLink Track Manager SDK. More...
 
- Protected Member Functions inherited from TSLTrackGraphic
 TSLTrackGraphic ()
 
 TSLTrackGraphic (const TSLTrackGraphic &other)
 
virtual ~TSLTrackGraphic ()
 
void operator delete (void *ptr)
 

Member Function Documentation

◆ create() [1/2]

static TSLTrackGraphicArrow * TSLTrackGraphicArrow::create ( )
static

Create an arrow graphic

After calling this method the application must call addControlPoint twice in order to define the start and end points of the arrow.

After calling this method the application may set the graphic's rendering attributes via the rendering method

◆ create() [2/2]

static TSLTrackGraphicArrow * TSLTrackGraphicArrow::create ( TSLTrack * track1,
TSLTrack * track2 )
static

Create an arrow graphic between 2 tracks

After calling this method the application may set the graphic's rendering attributes via the rendering method

Parameters
track1The track to attach the 'back' of the arrow to
track2The track to attach the 'front' of the arrow to

◆ headAcuity() [1/2]

double TSLTrackGraphicArrow::headAcuity ( ) const

Get the acuity angle of the arrow head(s)

Returns
The acuity angle in degrees

◆ headAcuity() [2/2]

void TSLTrackGraphicArrow::headAcuity ( double angle)

Set the acuity angle of the arrow head(s)

The acuity of the arrow heads is the angle between the tail of the arrow and the inside of the arrow head.

  • A low acuity will result in a flat/short arrow head
  • A high acuity will result in a pointy/long arrow head
  • This value will be clamped to the range 0.0 < angle < 90.0
Parameters
angleThe acuity angle in degrees, between 0.0 and 90.0

◆ headAtBack() [1/2]

bool TSLTrackGraphicArrow::headAtBack ( ) const

Get whether an arrow head is displayed at the 'back' of the arrow

Returns
true if the 'back' arrow head is displayed, false otherwise

◆ headAtBack() [2/2]

void TSLTrackGraphicArrow::headAtBack ( bool head)

Set whether an arrow head should be displayed at the 'back' of the arrow

Parameters
headWhether the 'back' arrow head should be displayed

◆ headAtFront() [1/2]

bool TSLTrackGraphicArrow::headAtFront ( ) const

Get whether an arrow head is displayed at the 'front' of the arrow

Returns
true if the 'front' arrow head is displayed, false otherwise

◆ headAtFront() [2/2]

void TSLTrackGraphicArrow::headAtFront ( bool head)

Set whether an arrow head should be displayed at the 'front' of the arrow

Parameters
headWhether the 'front' arrow head should be displayed

◆ headClosed() [1/2]

bool TSLTrackGraphicArrow::headClosed ( ) const

Get whether the arrow head(s) are 'closed'

Returns
true if the arrow head(s) are 'closed', false if they are 'open'

◆ headClosed() [2/2]

void TSLTrackGraphicArrow::headClosed ( bool closed)

Set whether the arrow head(s) should be drawn as 'closed'

A 'closed' arrow head will be drawn as a polygon and may be filled using TSLRenderingAttributes::m_fillStyle. Otherwise the arrow head will be drawn as 'open', i.e as a polyline

Parameters
closedWhether the arrow head(s) should be drawn as 'closed'

◆ headWidth() [1/2]

double TSLTrackGraphicArrow::headWidth ( ) const

Get the width of the arrow head(s)

Returns
The width of the arrow head(s). Units are defined by headWidthUnits

◆ headWidth() [2/2]

void TSLTrackGraphicArrow::headWidth ( double width,
TSLDimensionUnits units )

Set the width of the arrow head(s)

Parameters
widthThe width of the arrow head(s)
unitsThe units of the head width

◆ headWidthUnits()

TSLDimensionUnits TSLTrackGraphicArrow::headWidthUnits ( ) const

Get the units of the head width

Returns
The units of the head width

◆ rendering() [1/2]

const TSLRenderingAttributes & TSLTrackGraphicArrow::rendering ( ) const

Get the rendering attributes of the arrow

Returns
The rendering attributes of the arrow

◆ rendering() [2/2]

void TSLTrackGraphicArrow::rendering ( const TSLRenderingAttributes & attribs)

Set the rendering attributes of the arrow

The following settings will determine whether the arrow is made up of polylines, polygons, or both:

  • tailWidth: If width == 0.0 the tail will be a polyline, otherwise a polygon
  • headClosed: If true the head will be a polygon, otherwise a polyline

Applications should specify both polyline and polygon attributes when calling this method

◆ tailWidth() [1/2]

double TSLTrackGraphicArrow::tailWidth ( ) const

Get the width of the arrow tail

Returns
The width of the arrow tail. Units are defined by tailWidthUnits

◆ tailWidth() [2/2]

void TSLTrackGraphicArrow::tailWidth ( double width,
TSLDimensionUnits units )

Set the width of the arrow tail

Parameters
widthThe width of the tail
unitsThe units of the tail width

◆ tailWidthUnits()

TSLDimensionUnits TSLTrackGraphicArrow::tailWidthUnits ( ) const

Get the units of the tail width

Returns
The units of the tail width