The TextRenderStrategy class defines an interface for generating text images.
More...
#include <textrenderstrategy.h>
<avogadro/rendering/textrenderstrategy.h>
◆ newInstance()
◆ boundingBox()
virtual void boundingBox |
( |
const std::string & |
string, |
|
|
const TextProperties & |
tprop, |
|
|
int |
bbox[4] |
|
) |
| const |
|
pure virtual |
- Parameters
-
string | The text. |
tprop | The properties. |
bbox | The 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
-
string | The text. |
tprop | The properties. |
buffer | The 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. |
dims | Dimensions in pixels of the target buffer. |
Implemented in QtTextRenderStrategy.
The documentation for this class was generated from the following file: