26 INLINE
void PNMTextMaker::
27 set_align(PNMTextMaker::Alignment align_type) {
34 INLINE PNMTextMaker::Alignment PNMTextMaker::
50 if (_interior_flag != interior_flag) {
51 _interior_flag = interior_flag;
59 INLINE
bool PNMTextMaker::
60 get_interior_flag()
const {
61 return _interior_flag;
108 _distance_field_radius = distance_field_radius;
117 return _distance_field_radius;
The name of this class derives from the fact that we originally implemented it as a layer on top of t...
This class can be used to convert text between multiple representations, e.g.
const LColor & get_fg() const
Returns the foreground color of text that will be generated by future calls to generate_into().
int generate_into(const std::string &text, PNMImage &dest_image, int x, int y)
Generates a single line of text into the indicated image at the indicated position; the return value ...
set_text
Changes the text that is stored in the encoder.
void set_distance_field_radius(int radius)
If this is set to something other than 0, Panda will generate a signed distance field with the given ...
void set_interior(const LColor &interior)
Sets the color that will be used to render the interior portions of hollow fonts in future calls to g...
int get_distance_field_radius() const
Returns the radius previously set with set_distance_field_radius, or 0 otherwise.
void set_interior_flag(bool interior_flag)
Sets the flag that indicates whether the interior of hollow fonts is identified as a preprocess as ea...
int calc_width(const std::string &text)
Returns the width in pixels of the indicated line of text.
bool is_valid() const
Returns true if the PNMTextMaker is valid and ready to generate text, false otherwise.
void set_fg(const LColor &fg)
Sets the foreground color of text that will be generated by future calls to generate_into().
const std::wstring & get_wtext() const
Returns the text associated with the TextEncoder, as a wide-character string.
const LColor & get_interior() const
Returns the color that will be used to render the interior portions of hollow fonts.