Mapper  0.9.0
API documentation
Public Types | Public Member Functions | Public Attributes | List of all members
OpenOrienteering::TextObjectLineInfo Struct Reference

TextObjectLineInfo contains layout information for a single line in a longer text. More...

#include <text_object.h>

Collaboration diagram for OpenOrienteering::TextObjectLineInfo:
Collaboration graph
[legend]

Public Types

typedef std::vector< TextObjectPartInfoPartInfoContainer
 A sequence container of TextObjectPartInfo objects. More...
 

Public Member Functions

double getX (int pos) const
 The sequence of parts which make up this line. More...
 
int getIndex (double pos_x) const
 Find the index of the character corresponding to a particular position. More...
 

Public Attributes

int start_index
 
int end_index
 The index of the part's first character in the original string. More...
 
bool paragraph_end
 The index of the part's last character in the original string. More...
 
double line_x
 Is this line the end of a paragraph? More...
 
double line_y
 The left endpoint of the baseline of this line in text coordinates. More...
 
double width
 The vertical position of the baseline of this line in text coordinates. More...
 
double ascent
 The total width of the text in this line. More...
 
double descent
 The height of the rendered text above the baseline. More...
 
PartInfoContainer part_infos
 The height of the rendered text below the baseline. More...
 

Detailed Description

TextObjectLineInfo contains layout information for a single line in a longer text.

A line is a sequence of different parts.

Member Typedef Documentation

◆ PartInfoContainer

A sequence container of TextObjectPartInfo objects.

Member Function Documentation

◆ getIndex()

int OpenOrienteering::TextObjectLineInfo::getIndex ( double  pos_x) const

Find the index of the character corresponding to a particular position.

Parameters
pos_xthe position for which the index is requested
Returns
the character's index in the original string

◆ getX()

double OpenOrienteering::TextObjectLineInfo::getX ( int  pos) const

The sequence of parts which make up this line.

Get the horizontal position of a particular character in a line.

Parameters
posthe index of the character in the original string
Returns
the character's horizontal position in text coordinates

Member Data Documentation

◆ ascent

double OpenOrienteering::TextObjectLineInfo::ascent

The total width of the text in this line.

◆ descent

double OpenOrienteering::TextObjectLineInfo::descent

The height of the rendered text above the baseline.

◆ end_index

int OpenOrienteering::TextObjectLineInfo::end_index

The index of the part's first character in the original string.

◆ line_x

double OpenOrienteering::TextObjectLineInfo::line_x

Is this line the end of a paragraph?

◆ line_y

double OpenOrienteering::TextObjectLineInfo::line_y

The left endpoint of the baseline of this line in text coordinates.

◆ paragraph_end

bool OpenOrienteering::TextObjectLineInfo::paragraph_end

The index of the part's last character in the original string.

◆ part_infos

PartInfoContainer OpenOrienteering::TextObjectLineInfo::part_infos

The height of the rendered text below the baseline.

◆ start_index

int OpenOrienteering::TextObjectLineInfo::start_index

◆ width

double OpenOrienteering::TextObjectLineInfo::width

The vertical position of the baseline of this line in text coordinates.


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