GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
base_text_renderer Class Referenceabstract

#include "base-text-renderer.h"

Inheritance diagram for base_text_renderer:
text_processor

Public Types

enum  { ROTATION_0 = 0 , ROTATION_90 = 1 , ROTATION_180 = 2 , ROTATION_270 = 3 }
 

Public Member Functions

 base_text_renderer ()
 
virtual ~base_text_renderer ()=default
 
void fix_bbox_anchor (Matrix &bbox, int halign, int valign, int rot_mode, bool handle_rotation) const
 
virtual Matrix get_extent (const std::string &txt, double rotation, const caseless_str &interpreter)=0
 
virtual Matrix get_extent (text_element *elt, double rotation)=0
 
virtual octave_map get_system_fonts ()=0
 
virtual bool ok ()
 
void rotate_pixels (uint8NDArray &pixels, int rot_mode) const
 
int rotation_to_mode (double rotation) const
 
virtual void set_anti_aliasing (bool val)=0
 
virtual void set_color (const Matrix &c)=0
 
virtual void set_font (const std::string &name, const std::string &weight, const std::string &angle, double size)=0
 
virtual void text_to_pixels (const std::string &txt, uint8NDArray &pxls, Matrix &bbox, int halign, int valign, double rotation, const caseless_str &interpreter, bool handle_rotation)=0
 
virtual void text_to_strlist (const std::string &txt, std::list< text_renderer::string > &lst, Matrix &box, int halign, int valign, double rotation, const caseless_str &interpreter="tex")=0
 
- Public Member Functions inherited from text_processor
virtual void reset ()
 
virtual void visit (text_element_color &)
 
virtual void visit (text_element_combined &)
 
virtual void visit (text_element_fontname &)
 
virtual void visit (text_element_fontsize &)
 
virtual void visit (text_element_fontstyle &)
 
virtual void visit (text_element_list &e)
 
virtual void visit (text_element_string &)
 
virtual void visit (text_element_subscript &e)
 
virtual void visit (text_element_superscript &e)
 
virtual void visit (text_element_symbol &)
 

Additional Inherited Members

- Protected Member Functions inherited from text_processor
virtual ~text_processor ()=default
 

Detailed Description

Definition at line 43 of file base-text-renderer.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ROTATION_0 
ROTATION_90 
ROTATION_180 
ROTATION_270 

Definition at line 48 of file base-text-renderer.h.

Constructor & Destructor Documentation

◆ base_text_renderer()

base_text_renderer::base_text_renderer ( )
inline

Definition at line 56 of file base-text-renderer.h.

◆ ~base_text_renderer()

virtual base_text_renderer::~base_text_renderer ( )
virtualdefault

Member Function Documentation

◆ fix_bbox_anchor()

void base_text_renderer::fix_bbox_anchor ( Matrix bbox,
int  halign,
int  valign,
int  rot_mode,
bool  handle_rotation 
) const

Definition at line 109 of file base-text-renderer.cc.

References ROTATION_180, ROTATION_270, and ROTATION_90.

◆ get_extent() [1/2]

virtual Matrix base_text_renderer::get_extent ( const std::string &  txt,
double  rotation,
const caseless_str interpreter 
)
pure virtual

◆ get_extent() [2/2]

virtual Matrix base_text_renderer::get_extent ( text_element elt,
double  rotation 
)
pure virtual

◆ get_system_fonts()

virtual octave_map base_text_renderer::get_system_fonts ( )
pure virtual

◆ ok()

virtual bool base_text_renderer::ok ( )
inlinevirtual

◆ rotate_pixels()

void base_text_renderer::rotate_pixels ( uint8NDArray pixels,
int  rot_mode 
) const

◆ rotation_to_mode()

int base_text_renderer::rotation_to_mode ( double  rotation) const

Definition at line 88 of file base-text-renderer.cc.

References ROTATION_0, ROTATION_180, ROTATION_270, and ROTATION_90.

◆ set_anti_aliasing()

virtual void base_text_renderer::set_anti_aliasing ( bool  val)
pure virtual

◆ set_color()

virtual void base_text_renderer::set_color ( const Matrix c)
pure virtual

◆ set_font()

virtual void base_text_renderer::set_font ( const std::string &  name,
const std::string &  weight,
const std::string &  angle,
double  size 
)
pure virtual

Referenced by text_renderer::set_font().

◆ text_to_pixels()

virtual void base_text_renderer::text_to_pixels ( const std::string &  txt,
uint8NDArray pxls,
Matrix bbox,
int  halign,
int  valign,
double  rotation,
const caseless_str interpreter,
bool  handle_rotation 
)
pure virtual

◆ text_to_strlist()

virtual void base_text_renderer::text_to_strlist ( const std::string &  txt,
std::list< text_renderer::string > &  lst,
Matrix box,
int  halign,
int  valign,
double  rotation,
const caseless_str interpreter = "tex" 
)
pure virtual

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