17 INLINE
bool TextProperties::
19 return !operator == (other);
27 return (_specified != 0);
38 _loaded_default_font =
true;
48 if (!_loaded_default_font) {
61 _specified |= F_has_font;
70 _specified &= ~F_has_font;
76 INLINE
bool TextProperties::
78 return (_specified & F_has_font) != 0;
106 _small_caps = small_caps;
107 _specified |= F_has_small_caps;
113 INLINE
void TextProperties::
116 _specified &= ~F_has_small_caps;
122 INLINE
bool TextProperties::
123 has_small_caps()
const {
124 return (_specified & F_has_small_caps) != 0;
142 _small_caps_scale = small_caps_scale;
148 INLINE
void TextProperties::
149 clear_small_caps_scale() {
150 _small_caps_scale = text_small_caps_scale;
151 _specified &= ~F_has_small_caps_scale;
157 INLINE
bool TextProperties::
158 has_small_caps_scale()
const {
159 return (_specified & F_has_small_caps_scale) != 0;
169 return _small_caps_scale;
178 _specified |= F_has_slant;
184 INLINE
void TextProperties::
187 _specified &= ~F_has_slant;
193 INLINE
bool TextProperties::
195 return (_specified & F_has_slant) != 0;
213 _underscore = underscore;
214 _specified |= F_has_underscore;
220 INLINE
void TextProperties::
223 _specified &= ~F_has_underscore;
229 INLINE
bool TextProperties::
230 has_underscore()
const {
231 return (_specified & F_has_underscore) != 0;
249 _underscore_height = underscore_height;
250 _specified |= F_has_underscore_height;
256 INLINE
void TextProperties::
257 clear_underscore_height() {
258 _underscore_height = 0.0f;
259 _specified &= ~F_has_underscore_height;
265 INLINE
bool TextProperties::
266 has_underscore_height()
const {
267 return (_specified & F_has_underscore_height) != 0;
275 return has_underscore_height() ? _underscore_height : text_default_underscore_height;
282 set_align(TextProperties::Alignment align_type) {
284 _specified |= F_has_align;
293 _specified &= ~F_has_align;
299 INLINE
bool TextProperties::
301 return (_specified & F_has_align) != 0;
307 INLINE TextProperties::Alignment TextProperties::
319 _specified |= F_has_indent;
327 _indent_width = 0.0f;
328 _specified &= ~F_has_indent;
334 INLINE
bool TextProperties::
336 return (_specified & F_has_indent) != 0;
342 INLINE PN_stdfloat TextProperties::
344 return _indent_width;
353 _wordwrap_width = wordwrap;
354 _specified |= F_has_wordwrap;
362 _wordwrap_width = 0.0f;
363 _specified &= ~F_has_wordwrap;
369 INLINE
bool TextProperties::
370 has_wordwrap()
const {
371 return (_specified & F_has_wordwrap) != 0;
377 INLINE PN_stdfloat TextProperties::
378 get_wordwrap()
const {
379 return _wordwrap_width;
391 _preserve_trailing_whitespace = preserve_trailing_whitespace;
392 _specified |= F_has_preserve_trailing_whitespace;
398 INLINE
void TextProperties::
399 clear_preserve_trailing_whitespace() {
400 _preserve_trailing_whitespace =
false;
401 _specified &= ~F_has_preserve_trailing_whitespace;
407 INLINE
bool TextProperties::
408 has_preserve_trailing_whitespace()
const {
409 return (_specified & F_has_preserve_trailing_whitespace) != 0;
418 return _preserve_trailing_whitespace;
424 INLINE
void TextProperties::
425 set_text_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a) {
426 set_text_color(LColor(r, g, b, a));
432 INLINE
void TextProperties::
433 set_text_color(
const LColor &text_color) {
434 _text_color = text_color;
435 _specified |= F_has_text_color;
445 _text_color.set(1.0f, 1.0f, 1.0f, 1.0f);
446 _specified &= ~F_has_text_color;
453 INLINE
bool TextProperties::
454 has_text_color()
const {
455 return (_specified & F_has_text_color) != 0;
461 INLINE LColor TextProperties::
462 get_text_color()
const {
469 INLINE
void TextProperties::
470 set_shadow_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a) {
471 set_shadow_color(LColor(r, g, b, a));
477 INLINE
void TextProperties::
478 set_shadow_color(
const LColor &shadow_color) {
479 _shadow_color = shadow_color;
480 _specified |= F_has_shadow_color;
481 _shadow_state.clear();
489 _shadow_color.set(0.0f, 0.0f, 0.0f, 1.0f);
490 _specified &= ~F_has_shadow_color;
491 _shadow_state.clear();
497 INLINE
bool TextProperties::
498 has_shadow_color()
const {
499 return (_specified & F_has_shadow_color) != 0;
505 INLINE LColor TextProperties::
506 get_shadow_color()
const {
507 return _shadow_color;
515 set_shadow(PN_stdfloat xoffset, PN_stdfloat yoffset) {
525 _shadow_offset = shadow_offset;
526 _specified |= F_has_shadow;
534 _specified &= ~F_has_shadow;
535 _shadow_offset.set(0.0f, 0.0f);
541 INLINE
bool TextProperties::
543 return (_specified & F_has_shadow) != 0;
552 return _shadow_offset;
565 set_bin(
const std::string &bin) {
567 _specified |= F_has_bin;
569 _shadow_state.clear();
578 _bin = std::string();
579 _specified &= ~F_has_bin;
581 _shadow_state.clear();
590 return (_specified & F_has_bin) != 0;
615 _draw_order = draw_order;
616 _specified |= F_has_draw_order;
618 _shadow_state.clear();
619 return _draw_order + 3;
625 INLINE
void TextProperties::
628 _specified &= ~F_has_draw_order;
630 _shadow_state.clear();
636 INLINE
bool TextProperties::
637 has_draw_order()
const {
638 return (_specified & F_has_draw_order) != 0;
655 _tab_width = tab_width;
656 _specified |= F_has_tab_width;
662 INLINE
void TextProperties::
664 _tab_width = text_tab_width;
665 _specified &= ~F_has_tab_width;
671 INLINE
bool TextProperties::
672 has_tab_width()
const {
673 return (_specified & F_has_tab_width) != 0;
697 _glyph_scale = glyph_scale;
698 _specified |= F_has_glyph_scale;
704 INLINE
void TextProperties::
705 clear_glyph_scale() {
706 _specified &= ~F_has_glyph_scale;
713 INLINE
bool TextProperties::
714 has_glyph_scale()
const {
715 return (_specified & F_has_glyph_scale) != 0;
733 _glyph_shift = glyph_shift;
734 _specified |= F_has_glyph_shift;
740 INLINE
void TextProperties::
741 clear_glyph_shift() {
742 _specified &= ~F_has_glyph_shift;
749 INLINE
bool TextProperties::
750 has_glyph_shift()
const {
751 return (_specified & F_has_glyph_shift) != 0;
772 _text_scale = text_scale;
773 _specified |= F_has_text_scale;
779 INLINE
void TextProperties::
781 _specified &= ~F_has_text_scale;
788 INLINE
bool TextProperties::
789 has_text_scale()
const {
790 return (_specified & F_has_text_scale) != 0;
809 _direction = direction;
810 _specified |= F_has_direction;
821 _specified &= ~F_has_direction;
830 return (_specified & F_has_direction) != 0;