Seg3D  2.4
Seg3D is a free volume segmentation and processing tool developed by the NIH Center for Integrative Biomedical Computing at the University of Utah Scientific Computing and Imaging (SCI) Institute.
Public Member Functions | List of all members
Core::TextRenderer Class Reference
Inheritance diagram for Core::TextRenderer:

Public Member Functions

void render (const std::string &text, unsigned char *buffer, int width, int height, int x_offset, int y_offset, unsigned int font_size)
 
void render (const std::string &text, unsigned char *buffer, int width, int height, int x_offset, int y_offset, unsigned int font_size, double angle)
 Render the given text to the target buffer with the specified font size and rotation.
 
void render (const std::vector< std::string > &text, unsigned char *buffer, int width, int height, int x_offset, int y_offset, unsigned int font_size, int line_spacing)
 Render multiple lines of text onto the buffer, with the specified line spacing.
 
void render_aligned (const std::string &text, unsigned char *buffer, int width, int height, unsigned int font_size, TextHAlignmentType halign=TextHAlignmentType::LEFT_E, TextVAlignmentType valign=TextVAlignmentType::BOTTOM_E, int left_margin=0, int right_margin=0, int bottom_margin=0, int top_margin=0)
 Render the given text to the target buffer with the specified font size and alignment.
 
void render_aligned (const std::string &text, unsigned char *buffer, int width, int height, unsigned int font_size, double angle, TextHAlignmentType halign=TextHAlignmentType::LEFT_E, TextVAlignmentType valign=TextVAlignmentType::BOTTOM_E)
 
void compute_size (const std::string &text, unsigned int font_size, int &width, int &height, int &x_offset, int &y_offset)
 Compute the size of the given text string when rendered in the specified font size.
 

Member Function Documentation

void Core::TextRenderer::render ( const std::string &  text,
unsigned char *  buffer,
int  width,
int  height,
int  x_offset,
int  y_offset,
unsigned int  font_size 
)

Render the given text to the target buffer with the specified font size. The result in the buffer is a 1-channel 8-bit gray scale bitmap.

void Core::TextRenderer::render_aligned ( const std::string &  text,
unsigned char *  buffer,
int  width,
int  height,
unsigned int  font_size,
double  angle,
TextHAlignmentType  halign = TextHAlignmentType::LEFT_E,
TextVAlignmentType  valign = TextVAlignmentType::BOTTOM_E 
)

Render the given text to the target buffer with the specified font size and alignment, after rotating the text by the given angle.


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