|
OpenTTD Source 20251213-master-g1091fa6071
|
Text drawing parameters, which can change while drawing a line, but are kept between multiple parts of the same text, e.g. More...
#include <gfx_layout.h>
Public Member Functions | |
| FontState (TextColour colour, FontSize fontsize, FontIndex font_index) | |
| auto | operator<=> (const FontState &) const =default |
| void | SetColour (TextColour c) |
| Switch to new colour c. | |
| void | PopColour () |
| Switch to and pop the last saved colour on the stack. | |
| void | PushColour () |
| Push the current colour on to the stack. | |
| void | SetFontSize (FontSize f) |
| Switch to using a new font f. | |
Data Fields | |
| FontSize | fontsize |
| Current font size. | |
| FontIndex | font_index |
| Current font index. | |
| TextColour | cur_colour |
| Current text colour. | |
| std::vector< TextColour > | colour_stack |
| Stack of colours to assist with colour switching. | |
Text drawing parameters, which can change while drawing a line, but are kept between multiple parts of the same text, e.g.
on line breaks.
Definition at line 22 of file gfx_layout.h.
|
inline |
Definition at line 28 of file gfx_layout.h.
|
inline |
Definition at line 29 of file gfx_layout.h.
|
inline |
Switch to and pop the last saved colour on the stack.
Definition at line 47 of file gfx_layout.h.
References colour_stack, and SetColour().
Referenced by GetLayouter().
|
inline |
Push the current colour on to the stack.
Definition at line 57 of file gfx_layout.h.
References colour_stack.
Referenced by GetLayouter().
|
inline |
Switch to new colour c.
| c | New colour to use. |
Definition at line 37 of file gfx_layout.h.
References TC_COLOUR_MASK, TC_FLAGS_MASK, and TC_FORCED.
Referenced by GetLayouter(), and PopColour().
|
inline |
Switch to using a new font f.
| f | New font to use. |
Definition at line 66 of file gfx_layout.h.
Referenced by GetLayouter().
| std::vector<TextColour> FontState::colour_stack |
Stack of colours to assist with colour switching.
Definition at line 26 of file gfx_layout.h.
Referenced by PopColour(), and PushColour().
| TextColour FontState::cur_colour |
| FontIndex FontState::font_index |
| FontSize FontState::fontsize |