Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Text Class Reference

Represents a text string positioned at a 2D point. More...

#include <point.H>

Inheritance diagram for Aleph::Text:
[legend]
Collaboration diagram for Aleph::Text:
[legend]

Public Member Functions

 Text (Point p, const std::string &str)
 Constructs a Text object.
 
 Text ()=default
 Default constructor.
 
const size_t & len () const
 Gets the estimated length of the text.
 
const Pointget_point () const
 Gets the position point of the text.
 
const std::string & get_str () const
 Gets the text string.
 
Point highest_point () const
 Gets the highest point (the anchor point).
 
Point lowest_point () const
 Gets the lowest point (the anchor point).
 
Point leftmost_point () const
 Gets the leftmost point (the anchor point).
 
Point rightmost_point () const
 Gets the rightmost point (the anchor point).
 
- Public Member Functions inherited from Aleph::Geom_Object
 Geom_Object ()=default
 
virtual ~Geom_Object ()=default
 

Static Public Attributes

static constexpr double font_width_in_points = 0.8
 
static constexpr double font_height_in_points = 1.2
 

Private Attributes

Point p_
 
std::string str_
 
size_t len_ = 0
 

Detailed Description

Represents a text string positioned at a 2D point.

Definition at line 2738 of file point.H.

Constructor & Destructor Documentation

◆ Text() [1/2]

Aleph::Text::Text ( Point  p,
const std::string &  str 
)
inline

Constructs a Text object.

Parameters
pThe position of the text.
strThe text string (can contain LaTeX commands).

Definition at line 2756 of file point.H.

◆ Text() [2/2]

Aleph::Text::Text ( )
default

Default constructor.

Member Function Documentation

◆ get_point()

const Point & Aleph::Text::get_point ( ) const
inline

Gets the position point of the text.

Definition at line 2769 of file point.H.

References p_.

Referenced by Aleph::Tikz_Plane::draw_text(), and Eepic_Plane::draw_text().

◆ get_str()

const std::string & Aleph::Text::get_str ( ) const
inline

Gets the text string.

Definition at line 2775 of file point.H.

References str_.

Referenced by Aleph::Tikz_Plane::draw_text(), and Eepic_Plane::draw_text().

◆ highest_point()

Point Aleph::Text::highest_point ( ) const
inline

Gets the highest point (the anchor point).

Definition at line 2778 of file point.H.

References p_.

Referenced by Aleph::Tikz_Plane::bbox_of().

◆ leftmost_point()

Point Aleph::Text::leftmost_point ( ) const
inline

Gets the leftmost point (the anchor point).

Definition at line 2790 of file point.H.

References p_.

Referenced by Aleph::Tikz_Plane::bbox_of().

◆ len()

const size_t & Aleph::Text::len ( ) const
inline

Gets the estimated length of the text.

Definition at line 2766 of file point.H.

References len_.

Referenced by Eepic_Plane::draw_text().

◆ lowest_point()

Point Aleph::Text::lowest_point ( ) const
inline

Gets the lowest point (the anchor point).

Definition at line 2784 of file point.H.

References p_.

Referenced by Aleph::Tikz_Plane::bbox_of().

◆ rightmost_point()

Point Aleph::Text::rightmost_point ( ) const
inline

Gets the rightmost point (the anchor point).

Definition at line 2796 of file point.H.

References p_.

Referenced by Aleph::Tikz_Plane::bbox_of().

Member Data Documentation

◆ font_height_in_points

constexpr double Aleph::Text::font_height_in_points = 1.2
staticconstexpr

Definition at line 2749 of file point.H.

Referenced by Eepic_Plane::draw_text().

◆ font_width_in_points

constexpr double Aleph::Text::font_width_in_points = 0.8
staticconstexpr

Definition at line 2747 of file point.H.

Referenced by Eepic_Plane::draw_text().

◆ len_

size_t Aleph::Text::len_ = 0
private

Definition at line 2744 of file point.H.

Referenced by len().

◆ p_

Point Aleph::Text::p_
private

Definition at line 2740 of file point.H.

Referenced by get_point(), highest_point(), leftmost_point(), lowest_point(), and rightmost_point().

◆ str_

std::string Aleph::Text::str_
private

Definition at line 2742 of file point.H.

Referenced by get_str().


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