AvogadroLibs 1.98.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
TextRenderStrategy Class Referenceabstract

The TextRenderStrategy class defines an interface for generating text images. More...

#include <textrenderstrategy.h>

Inheritance diagram for TextRenderStrategy:
QtTextRenderStrategy

Public Member Functions

virtual TextRenderStrategynewInstance () const =0
 
virtual void boundingBox (const std::string &string, const TextProperties &tprop, int bbox[4]) const =0
 Calculate a bounding box.
 
virtual void render (const std::string &string, const TextProperties &tprop, unsigned char *buffer, const Vector2i &dims) const =0
 render Render the string.
 

Detailed Description

<avogadro/rendering/textrenderstrategy.h>

Member Function Documentation

◆ newInstance()

virtual TextRenderStrategy * newInstance ( ) const
pure virtual

Copy the current TextRenderStrategy implementation into an new object.

Implemented in QtTextRenderStrategy.

◆ boundingBox()

virtual void boundingBox ( const std::string &  string,
const TextProperties tprop,
int  bbox[4] 
) const
pure virtual
Parameters
stringThe text.
tpropThe properties.
bboxThe result in pixels (left, right, top, bottom).

Implemented in QtTextRenderStrategy.

◆ render()

virtual void render ( const std::string &  string,
const TextProperties tprop,
unsigned char *  buffer,
const Vector2i &  dims 
) const
pure virtual
Parameters
stringThe text.
tpropThe properties.
bufferThe target. Must be dims[0]*dims[1]*4 bytes. The buffer will be filled with RGBA image data, with the top scan row at the beginning.
dimsDimensions in pixels of the target buffer.

Implemented in QtTextRenderStrategy.


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