Class BitmapText¶
Defined in File render_stack.h
Inheritance Relationships¶
Base Type¶
public BlamRendering::RenderStack::StackObjectBase
(Class StackObjectBase)
Class Documentation¶
-
class
BitmapText
: public BlamRendering::RenderStack::StackObjectBase¶ Class representing text drawn using a Bitmap-based engine font.
Public Functions
-
BitmapText
()¶ Sets the stack type, default shadow color, and default zone color.
-
~BitmapText
()¶ Releases the rendered bitmap containing the text.
-
void
Draw
()¶ Draws the stack object.
Specific functionality may vary depending on the type of object.
-
void
ShowImPropertyEditor
()¶ Shows a set of ImGUI properties associated with the object.
This will call functions to draw only the property controls for the item, and nothing else. The window/container for the properties must be handled externally.
-
void
updateCachedProperties
()¶ Updates the currently cached properties.
The cached properties are used to avoid unneeded regeneration of the text bitmap when only things like the location have changed.
-
bool
hasAnyPropertyChanged
()¶ Determines if any current properties differ from their cached copies.
- Return
Whether or not any cached properties are different.
Public Members
-
std::string
font_id
= "undefined"¶ The ID of the font.
-
std::string
text
= "abba"¶ The text to display.
-
int
shadow_x
= 1¶ The X offset of the drop shadow.
-
int
shadow_y
= 1¶ The Y offset of the drop shadow.
-
D2D1_COLOR_F
shadow_color
¶ The color to use for the drop shadow.
-
bool
use_shadow
= false¶ Whether or not to draw the text with a drop shadow.
-
bool
show_zone
= false¶ Whether or not to show the text zone.
-
D2D1_COLOR_F
zone_color
¶ The color to use for the zone border.
-
float
zone_thickness
= 1¶ The thickness of the zone border.
-
ID2D1Bitmap *
text_bitmap
¶ The bitmap containing the fully rendered representation of the object.
-
D2D1_RECT_F
text_area
¶ The area to use for the text bitmap.
-
int
bitmap_width
= 0¶ The width of the bitmap.
-
int
bitmap_height
= 0¶ The height of the bitmap.
-
bool
force_regenerate
= false¶ If enabled, will force the bitmap to regenerate on the next frame.
-
bool
currently_locked
= false¶ While drawing, this is used to prevent deletion.
-
char
font_buffer
[256] = ""¶ Font name buffer for ImGUI editor.
-
std::string
c_font
¶ Cached copy of
font
-
std::string
c_text
¶ Cached copy of
text
-
float
c_x
¶ Cached copy of
x
-
float
c_y
¶ Cached copy of
y
-
D2D1_COLOR_F
c_color
¶ Cached copy of
color
-
bool
c_use_shadow
¶ Cached copy of
use_shadow
-
int
c_shadow_x
¶ Cached copy of
shadow_x
-
int
c_shadow_y
¶ Cached copy of
shadow_y
-
D2D1_COLOR_F
c_shadow_color
¶ Cached copy of
shadow_color
-
bool
c_show_zone
¶ Cached copy of
show_zone
-
D2D1_COLOR_F
c_zone_color
¶ Cached copy of
zone_color
-
float
c_zone_thickness
¶ Cached copy of
zone_thickness
-
int
c_bitmap_width
¶ Cached copy of
bitmap_width
-
int
c_bitmap_height
¶ Cached copy of
bitmap_height
-
float
c_scale_factor
¶ Cachced copy of the
ui_scale_factor
global.
-