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

Static Public Member Functions

static std::shared_ptr< STK::TextRenderItemcreateTextItem (const std::string &text, const std::shared_ptr< STK::FontManager > &fontManager, const STK::Vector2f &pos, float angle, HorizontalAnchor horizAnchor, VerticalAnchor vertAnchor, const DrawObjectData &drawObjectData, const std::string &fontName, int fontPixelSize, const STK::RGBA &fontColor, const STK::RGBA &fontOutlineColor, const STK::FontStyle &fontStyle)
 
static std::shared_ptr< CustomTextRenderItemcreateCustomTextItem (const std::string &text, const std::shared_ptr< STK::FontManager > &fontManager, const STK::Vector2f &pos, float angle, HorizontalAnchor horizAnchor, VerticalAnchor vertAnchor, const DrawObjectData &drawObjectData, const std::string &fontName, int fontPixelSize, const STK::RGBA &fontColor, const STK::FontStyle &fontStyle)
 
static std::shared_ptr< CustomTextRenderItemSDFcreateCustomTextItemSDF (const std::string &text, const std::shared_ptr< STK::FontManager > &fontManager, const STK::Vector2f &pos, float angle, HorizontalAnchor horizAnchor, VerticalAnchor vertAnchor, const DrawObjectData &drawObjectData, const std::string &fontName, int fontPixelSize, const STK::RGBA &fontColor, const STK::RGBA &fontOutlineColor, const STK::FontStyle &fontStyle)
 
static std::shared_ptr< CustomTextRenderItemSDFtestcreateCustomTextItemSDFtest (const std::string &text, const std::shared_ptr< STK::FontManager > &fontManager, const STK::Vector2f &pos, float angle, HorizontalAnchor horizAnchor, VerticalAnchor vertAnchor, const DrawObjectData &drawObjectData, const std::string &fontName, int fontPixelSize, const STK::RGBA &fontColor, const STK::RGBA &fontOutlineColor, const STK::FontStyle &fontStyle)
 
static std::shared_ptr< STK::TextRenderItemcreateCustomTextItem (const std::string &text, const std::shared_ptr< STK::FontManager > &fontManager, const STK::Vector2f &pos, float angle, HorizontalAnchor horizAnchor, VerticalAnchor vertAnchor, const DrawObjectData &drawObjectData, const std::string &fontName, int fontPixelSize, const STK::RGBA &fontColor, const STK::RGBA &fontOutlineColor, const STK::FontStyle &fontStyle, STK::Vector2f scalableOffset, float minOffsetLength, float maxOffsetLength)
 
static void GetBasicGeometry (const std::shared_ptr< EllipseGeometry > &eg, BasicGeoTypes::GeoPos &centerPos, BasicGeoTypes::GeoPos &vPos, double &vm, BasicGeoTypes::GeoPos &hPos, double &hm)
 Get basic geometry based on ellipse primitive.
 
static double getGridSize (const DrawObjectData &drawObject)
 Get grid size for draw object.
 
static int getUTMGridSize (const DrawObjectData &drawObject, double vm, double hm)
 Get grid size for draw object. Ensure a more constrained selection: - 10,100,1000 or 10000.
 
static bool RenderUTMSimplified (const DrawObjectData &drawObject, int gridSize, int rows, int cols, double vm, double hm, const std::shared_ptr< RasterProjector > &rp)
 Check if UTM grid should be rendered as simplified.
 
static bool getOutlinePoints (const DrawObjectData &drawObject, const BasicGeoTypes::GeoPos &centerPos, double vm, double hm, int gridSize, const std::shared_ptr< RasterProjector > &rp, std::vector< STK::Vector2f > &pts, double &cellw)
 Returns simplified outline polygon.
 
static bool getPt (const MUtmPos &uc, const std::shared_ptr< RasterProjector > &rp, STK::Vector2f &pt)
 
static int getNumberPadReferences (const DrawObjectData &drawObject, std::set< std::string > &refs)
 Get number pad cell references for draw object.
 
static std::string getStartLabel (const DrawObjectData &drawObject, const LabelAxis &axis)
 Get start label for draw object.
 
static int getLabelSkips (const DrawObjectData &drawObject, const LabelAxis &axis, std::set< std::string > &skips)
 Get label skips for draw object.
 
static LabelType getLabelType (const DrawObjectData &drawObject, const LabelAxis &axis)
 Get label type (numeric/alphabetic) for draw object.
 
static std::string strTrimToUpper (const std::string &s)
 
static std::vector< std::string > getAlphabeticLabels (const DrawObjectData &drawObject, const LabelAxis axis, int numberOfLabels)
 Gets an array of lenght 'numberOfLabels' of lexicographically consecutive(*) capital-letter strings of arbitrary lenght. (*) Successor of AA = AB, successor of NILZ = NIMA, successor of ZZZ = AAAA.
 
static std::vector< std::string > getNumericLabels (const DrawObjectData &drawObject, const LabelAxis axis, int numberOfLabels)
 
static std::vector< std::string > getLabels (const DrawObjectData &drawObject, const LabelAxis axis, int numberOfLabels)
 

Member Function Documentation

◆ getAlphabeticLabels()

static std::vector< std::string > Maria::GridRendererUtils::getAlphabeticLabels ( const DrawObjectData drawObject,
const LabelAxis  axis,
int  numberOfLabels 
)
inlinestatic

Gets an array of lenght 'numberOfLabels' of lexicographically consecutive(*) capital-letter strings of arbitrary lenght. (*) Successor of AA = AB, successor of NILZ = NIMA, successor of ZZZ = AAAA.

The source alphabet [A,...,Z] may be purged by disregarding unwanted letters. If B is unwanted, successor of AA is AC Unwanted strings will not appear in the returned array. If NIMA is unwanted, successor of NILZ is NIMB

Parameters
drawObjectDataDraw object
axisAxis to get labels for.
numberOfLabelsNumber of labels requested

◆ GetBasicGeometry()

static void Maria::GridRendererUtils::GetBasicGeometry ( const std::shared_ptr< EllipseGeometry > &  eg,
BasicGeoTypes::GeoPos centerPos,
BasicGeoTypes::GeoPos vPos,
double &  vm,
BasicGeoTypes::GeoPos hPos,
double &  hm 
)
inlinestatic

Get basic geometry based on ellipse primitive.

Parameters
ellipseEllipse primitive representing grid.
centerPosCenter position for grid.
dSize vector.

◆ getGridSize()

static double Maria::GridRendererUtils::getGridSize ( const DrawObjectData drawObject)
inlinestatic

Get grid size for draw object.

Parameters
drawObjectDataDraw object to get grid size for.
Returns
Grid size.

◆ getLabelSkips()

static int Maria::GridRendererUtils::getLabelSkips ( const DrawObjectData drawObject,
const LabelAxis axis,
std::set< std::string > &  skips 
)
inlinestatic

Get label skips for draw object.

Parameters
drawObjectDraw object to get label skip list for.
axisAxis to get label skip list for.
Returns
label skip list.

◆ getLabelType()

static LabelType Maria::GridRendererUtils::getLabelType ( const DrawObjectData drawObject,
const LabelAxis axis 
)
inlinestatic

Get label type (numeric/alphabetic) for draw object.

Parameters
drawObjectDraw object to get label type for.
axisAxisAxis to get label type for.
Returns
Label type.

◆ getNumberPadReferences()

static int Maria::GridRendererUtils::getNumberPadReferences ( const DrawObjectData drawObject,
std::set< std::string > &  refs 
)
inlinestatic

Get number pad cell references for draw object.

Parameters
drawObjectDraw object to get number pad cell references for.
Returns
Number pad cell references.

◆ getOutlinePoints()

static bool Maria::GridRendererUtils::getOutlinePoints ( const DrawObjectData drawObject,
const BasicGeoTypes::GeoPos centerPos,
double  vm,
double  hm,
int  gridSize,
const std::shared_ptr< RasterProjector > &  rp,
std::vector< STK::Vector2f > &  pts,
double &  cellw 
)
inlinestatic

Returns simplified outline polygon.

Parameters
drawObjectData
ellipse
vp
cellw
Returns

◆ getStartLabel()

static std::string Maria::GridRendererUtils::getStartLabel ( const DrawObjectData drawObject,
const LabelAxis axis 
)
inlinestatic

Get start label for draw object.

Parameters
drawObjectaDraw object to get start label for.
axisAxis to get start label for.
Returns
Start label.

◆ getUTMGridSize()

static int Maria::GridRendererUtils::getUTMGridSize ( const DrawObjectData drawObject,
double  vm,
double  hm 
)
inlinestatic

Get grid size for draw object. Ensure a more constrained selection: - 10,100,1000 or 10000.

Parameters
drawObjectDataDraw object to get grid size for.
vpIVewport
Returns
Grid size.

◆ RenderUTMSimplified()

static bool Maria::GridRendererUtils::RenderUTMSimplified ( const DrawObjectData drawObject,
int  gridSize,
int  rows,
int  cols,
double  vm,
double  hm,
const std::shared_ptr< RasterProjector > &  rp 
)
inlinestatic

Check if UTM grid should be rendered as simplified.

Parameters
drawObjectGrid object.
egEllipse primitive representing grid object.
rpCurrent viewport.
Returns
True if simplified rendering, otherwise false.

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