Maria GDK 5.0.0.738
Documentation of native code in develop branch
Loading...
Searching...
No Matches
Maria::LabelRenderer Class Reference

#include <MLabelRenderer.h>

Public Member Functions

 LabelRenderer (std::shared_ptr< STK::ShaderProgramManager > shaderManager, std::shared_ptr< STK::FontManager > fontManager)
 
std::shared_ptr< LabelRenderItemaddLabel (const BasicGeoTypes::PointFXY &p, const std::string &text, const Maria::FontDescription &font, const Maria::RGBA color, const Maria::RGBA bgColor, const Maria::RGBA outlineColor, const Maria::LabelPlacement placement, double placementMargin, double angle, bool fixedRotation, bool allowOverlap)
 
std::shared_ptr< LabelRenderItemaddLabel (const std::vector< BasicGeoTypes::PointFXY > &path, bool continuedLine, const std::string &text, const Maria::FontDescription &font, const Maria::RGBA color, const Maria::RGBA bgColor, const Maria::RGBA outlineColor, const Maria::LabelPlacement placement, double placementMargin, double angle, bool fixedRotation, bool allowOverlap)
 
void renderItems (const std::shared_ptr< RasterProjector > &rp, const STK::Matrix4x4f &mv, const STK::Matrix4x4f &pj, double scale, const STK::Viewport &glViewport, float opacity)
 
void renderDebug (const std::shared_ptr< RasterProjector > &vp, const std::shared_ptr< RasterProjector > &tileRp, double scale, const STK::Matrix4x4f &mv, const STK::Matrix4x4f &vm, const STK::Matrix4x4f &pj, const STK::Viewport &glViewport)
 Render debug graphics.
 
void updateDisplayProjection (const std::shared_ptr< RasterProjector > &tileRp, const std::shared_ptr< RasterProjector > &vp)
 
void getPlacedCollisionFeatures (float xMin, float xMax, float yMin, float yMax, std::vector< PlacedCollisionFeature > &pcf)
 
void updateCollisionGrid (std::shared_ptr< LabelRenderer > neighLabels[])
 
void insertCollisionItems ()
 
void addGeoLabel (const std::shared_ptr< RasterProjector > &viewport, const std::vector< BasicGeoTypes::GeoPos > &path, const std::shared_ptr< Maria::TileLabel > &l, const std::shared_ptr< RasterProjector > &tileRp, bool continuedLine)
 
const BasicGeoTypes::DblTransform2DgetTileTransform () const
 

Detailed Description

LabelRenderer - Render a collection of text labels.

Member Function Documentation

◆ addLabel() [1/2]

std::shared_ptr< LabelRenderItem > LabelRenderer::addLabel ( const BasicGeoTypes::PointFXY p,
const std::string &  text,
const Maria::FontDescription font,
const Maria::RGBA  color,
const Maria::RGBA  bgColor,
const Maria::RGBA  outlineColor,
const Maria::LabelPlacement  placement,
double  placementMargin,
double  angle,
bool  fixedRotation,
bool  allowOverlap 
)

Add a text label at the given anchor point.

◆ addLabel() [2/2]

std::shared_ptr< LabelRenderItem > LabelRenderer::addLabel ( const std::vector< BasicGeoTypes::PointFXY > &  path,
bool  continuedLine,
const std::string &  text,
const Maria::FontDescription font,
const Maria::RGBA  color,
const Maria::RGBA  bgColor,
const Maria::RGBA  outlineColor,
const Maria::LabelPlacement  placement,
double  placementMargin,
double  angle,
bool  fixedRotation,
bool  allowOverlap 
)

Add a text label along a line.

◆ getPlacedCollisionFeatures()

void LabelRenderer::getPlacedCollisionFeatures ( float  xMin,
float  xMax,
float  yMin,
float  yMax,
std::vector< PlacedCollisionFeature > &  pcf 
)

Get all label collision boxes with placement scale within the given bounding box.

◆ renderItems()

void LabelRenderer::renderItems ( const std::shared_ptr< RasterProjector > &  rp,
const STK::Matrix4x4f mv,
const STK::Matrix4x4f pj,
double  scale,
const STK::Viewport glViewport,
float  opacity 
)

Draw all items with the given transforms.


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