 |
Blamite Game Engine - blam!
00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
8 #include <Strings/components/utils/saferelease/saferelease.h>
49 namespace MFFontGlobals
126 virtual HRESULT __stdcall
QueryInterface(REFIID iid,
void** ppvObject);
131 virtual ULONG __stdcall
AddRef();
136 virtual ULONG __stdcall
Release();
152 virtual HRESULT __stdcall
CreateEnumeratorFromKey(IDWriteFactory* factory,
void const* collectionKey, UINT32 collectionKeySize, IDWriteFontFileEnumerator** fontFileEnumerator);
155 ULONG reference_count;
179 HRESULT
Initialize(UINT
const* collectionKey, UINT32 keySize);
186 SafeRelease(¤t_file);
198 virtual HRESULT __stdcall
QueryInterface(REFIID iid,
void** ppvObject);
203 virtual ULONG __stdcall
AddRef();
208 virtual ULONG __stdcall
Release();
221 virtual HRESULT __stdcall
MoveNext(BOOL* hasCurrentFile);
233 ULONG reference_count;
235 IDWriteFontFile* current_file;
236 std::vector<std::wstring> file_paths;
StackItemDrawMode draw_mode
The drawing mode of the object.
Definition: render_stack.h:373
D2D1_COLOR_F shadow_color
The color to use for the drop shadow.
Definition: render_stack.h:963
BLAM HRESULT DrawEllipse(D2D1_COLOR_F outline_color, D2D1_COLOR_F fill_color, D2D1_ELLIPSE ellipse, float thickness, StackItemDrawMode mode)
Draws an ellipse.
Definition: ellipse.cpp:10
BLAM HRESULT ConvertWICBitmapToD2D(IWICBitmap *wic_bitmap, ID2D1Bitmap **d2d_bitmap)
Converts a WIC bitmap to a D2D bitmap.
Definition: wic.cpp:91
void Draw()
Draws the stack object.
Definition: Text.cpp:163
D2D1_COLOR_F shadow_color
The color to use for the drop shadow.
Definition: render_stack.h:851
BLAM Ogre::HlmsUnlitDatablock * CreateDefaultUnlitDatablockForPrimitives(std::string id)
Definition: materials.cpp:916
bool visible
Whether or not the object is visible.
Definition: render_stack.h:375
void SetText(std::string text)
Sets the text to display.
Definition: Text.cpp:39
float font_size
The size of the text.
Definition: render_stack.h:753
D2D1_COLOR_F zone_color
The color to use for the zone border.
Definition: render_stack.h:855
HRESULT recolor_bitmap(ID2D1Bitmap **bitmap, D2D1_COLOR_F color, Font *font, FontGlyph *current_glyph, char current_char, ID2D1RenderTarget *target)
Recolors the specified glyph.
Definition: text.cpp:48
BYTE * r
The Red value of the pixel.
Definition: render_utils.h:16
void Draw()
Draws the stack object.
Definition: DWText.cpp:12
D2D1_RECT_F text_area
The area to use for the text bitmap.
Definition: render_stack.h:859
bool show_zone
Whether or not to show the line area.
Definition: render_stack.h:648
BlamUIWidget_Text(BlamUIWidget_Group *_parent, bool _new_render_method=true)
Definition: text.cpp:30
MFFontCollectionLoader()
Sets the reference count to 0.
Definition: FontLoader.h:112
BLAM Pixel GetPixelData(BYTE *origin, int x, int y, int width, int height)
Retrieves a pixel from the specified memory address.
Definition: bitmap_utils.cpp:152
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:142
std::string font_name
Definition: ui.h:325
std::string font_id
The ID of the font.
Definition: render_stack.h:844
int width
Definition: bgfx.cpp:19
void RebuildDatablocks()
Definition: text.cpp:580
int bitmap_height
The height of the bitmap.
Definition: render_stack.h:862
BLAM HRESULT ConvertWICBitmapTo32bppPBGRA(IWICBitmap *source, IWICBitmap **destination)
Converts a WIC bitmap to a WIC bitmap, with the 32 bits-per-pixe, PBGRA format.
Definition: wic.cpp:58
#define BLAM
Definition: FontLoader.h:11
bool auto_calculate_area
Whether or not to automatically calculate the area for the text.
Definition: render_stack.h:767
HRESULT Initialize(UINT const *collectionKey, UINT32 keySize)
Initializes a the enumerator.
Definition: MFFontFileEnumerator.cpp:16
ID2D1Bitmap * text_bitmap
The bitmap containing the fully rendered representation of the object.
Definition: render_stack.h:858
void UpdateAllProperties()
Applies any modified parent properties to the appropriate child object.
Definition: Text.cpp:74
IMGUI_API bool Checkbox(const char *label, bool *v)
Definition: imgui_widgets.cpp:974
D2D1_POINT_2F start_point
The starting point of the line.
Definition: render_stack.h:643
BLAM BlamRenderingEngine GetCurrentRenderingEngine()
Retrieves the current rendering engine being used.
Definition: rendering_abstraction.cpp:104
std::string GetFont()
Retrieves the ID of the active font.
Definition: Text.cpp:151
void Draw()
Draws the stack object.
Definition: ellipse.cpp:10
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying glyph
Definition: ARPHICPL.TXT:16
D2D1_COLOR_F zone_color
The color to use for the zone border.
Definition: render_stack.h:756
BlamFontPackage * font_package
Definition: ui.h:326
virtual HRESULT __stdcall GetCurrentFontFile(IDWriteFontFile **fontFile)
Retrieves the current font file.
Definition: MFFontFileEnumerator.cpp:91
int character_height
Definition: ui.h:321
BlamVector2 shadow_offset
Definition: ui.h:322
BLAM IDWriteFactory * GetDWriteFactory()
Retrieves the DirectWrite factory.
Definition: render_manage.cpp:573
Namespace containing things relating to the MF font loader.
Definition: FontLoader.h:44
@ OGRE
Definition: rendering.h:41
@ Basic_Ellipse
A basic filled or outline ellipse.
IMGUI_API bool InputText(const char *label, char *buf, size_t buf_size, ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=NULL, void *user_data=NULL)
Definition: imgui_widgets.cpp:3068
@ BitmapText
Bitmap-based text, uses Blamite font system.
Definition: render_stack.h:72
char font_buffer[256]
Font name buffer for ImGUI editor.
Definition: render_stack.h:977
void RefreshTranslation()
Refreshes any translation data and applies them to the child objects.
Definition: Text.cpp:55
BLAM ID2D1DeviceContext * GetD2DRenderTarget()
Retrieves the Direct2D render target.
Definition: render_manage.cpp:598
BLAM std::map< std::string, Font > * GetFontList()
Retrieves the list of loaded fonts.
Definition: fonts.cpp:835
StackType type_label
The type of the object.
Definition: render_stack.h:372
BLAM float * GetGlobalAsFloat(std::string name)
Retrieves a global's value as a float.
Definition: globals.cpp:407
std::vector< MFFontList > font_file_lists
The list of font lists.
Definition: FontLoader.cpp:12
void SetHidden(bool new_hidden) override
Definition: text.cpp:588
float zone_thickness
The thickness of the line area border.
Definition: render_stack.h:650
BLAM std::vector< StackItemDrawMode > GetDrawModesList()
Retrieves a list of all available drawing modes.
Definition: render_stack.cpp:216
D2D1_POINT_2F end_point
The ending point of the line.
Definition: render_stack.h:644
Namespace containing things relating to the Render Stack.
Definition: drawing.h:14
int shadow_y
The Y offset of the drop shadow.
Definition: render_stack.h:850
void SetFontSize(float new_size)
Sets the size to use for the font.
Definition: DWText.cpp:91
BLAM Font * GetFont(std::string id)
Retrieves a font from the list of loaded fonts.
Definition: fonts.cpp:806
float thickness
The current border thickness.
Definition: render_stack.h:565
BlamMap< char, BlamFontGlyph * > glyphs
Definition: fonts.h:63
virtual ULONG __stdcall Release()
Releases the object.
Definition: MFFontFileEnumerator.cpp:56
IMGUI_API bool DragInt(const char *label, int *v, float v_speed=1.0f, int v_min=0, int v_max=0, const char *format="%d")
Definition: imgui_widgets.cpp:2209
virtual HRESULT __stdcall QueryInterface(REFIID iid, void **ppvObject)
Queries the interface.
Definition: MFFontFileEnumerator.cpp:36
void ShowImGuiPropertyEditor() override
Definition: text.cpp:168
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)
Definition: imgui.cpp:7147
std::wstring font_name
The current font name. Defaults to Comic Sans MS. :lmao:
Definition: render_stack.h:752
float zone_thickness
The thickness of the zone border.
Definition: render_stack.h:969
bool force_regenerate
If enabled, will force the bitmap to regenerate on the next frame.
Definition: render_stack.h:864
int shadow_x
The X offset of the drop shadow.
Definition: render_stack.h:961
BLAM BlamFontPackage * GetFont(std::string id)
Definition: fonts_new.cpp:662
virtual HRESULT __stdcall QueryInterface(REFIID iid, void **ppvObject)
Queries the interface.
Definition: MFFontCollectionLoader.cpp:5
D2D1_ELLIPSE ellipse
The data for the ellipse.
Definition: render_stack.h:567
~MFFontFileEnumerator()
Releases the current file in the enumerator.
Definition: FontLoader.h:184
#define DRAWMODE_BOTH
Definition: render_stack.h:35
float zone_thickness
The thickness of the zone border.
Definition: render_stack.h:856
D2D1_COLOR_F zone_color
The color of the line area border.
Definition: render_stack.h:649
BYTE * b
The Blue value of the pixel.
Definition: render_utils.h:18
Structure to contain data for a Font Glyph.
Definition: fonts.h:111
BLAM Ogre::SceneManager * Get2DSceneManager()
Definition: ogre.cpp:395
int monospace_width
Definition: fonts.h:66
virtual HRESULT __stdcall CreateEnumeratorFromKey(IDWriteFactory *factory, void const *collectionKey, UINT32 collectionKeySize, IDWriteFontFileEnumerator **fontFileEnumerator)
Creates a new Font File Enumerator.
Definition: MFFontCollectionLoader.cpp:37
bool use_background
Whether or not to draw a background behind the text.
Definition: render_stack.h:972
void SetFont(std::string new_font_name)
Sets the font to use for the text.
Definition: DWText.cpp:51
Ogre::HlmsDatablock * CreateCopiedDatablock()
Definition: BlamFontPackage.cpp:35
~BlamUIWidget_Text()
Definition: text.cpp:76
IMGUI_API bool DragFloat(const char *label, float *v, float v_speed=1.0f, float v_min=0.0f, float v_max=0.0f, const char *format="%.3f", float power=1.0f)
Definition: imgui_widgets.cpp:2164
std::string text
The text to display.
Definition: render_stack.h:846
Namespace containing functions to handle the drawing of Direct2D primitives.
Definition: drawing.h:28
MFFontFileEnumerator(IDWriteFactory *factory)
Sets reference counts and indexes to 0.
Definition: MFFontFileEnumerator.cpp:9
D2D1_COLOR_F color
The color of the object.
Definition: render_stack.h:370
void UpdateMetrics() override
Definition: text.cpp:194
IMGUI_API bool DragFloat2(const char *label, float v[2], float v_speed=1.0f, float v_min=0.0f, float v_max=0.0f, const char *format="%.3f", float power=1.0f)
Definition: imgui_widgets.cpp:2169
IMGUI_API bool CollapsingHeader(const char *label, ImGuiTreeNodeFlags flags=0)
Definition: imgui_widgets.cpp:5422
D2D1_COLOR_F zone_color
The color to use for the zone border.
Definition: render_stack.h:968
void SetText(std::string new_text)
Sets the text to display.
Definition: DWText.cpp:46
void Draw() override
Definition: text.cpp:115
BLAM BlamColor TranslateTextColorCode(char character)
Converts a character to its equivalent color code for use in multi-colored text.
Definition: color.cpp:5
float y
The Y coordinate of the object.
Definition: render_stack.h:378
Text()
Sets the stack type, creates the needed resources, and sets some default colors.
Definition: Text.cpp:12
void SetZoneColor(float new_color[3])
Sets the color to use for the zone edge.
Definition: DWText.cpp:63
void SetFont(std::string new_font_id)
Sets the font to use for the text.
Definition: Text.cpp:134
#define DRAWMODE_OUTLINE
Definition: render_stack.h:34
virtual HRESULT __stdcall MoveNext(BOOL *hasCurrentFile)
Moves to the next item in the enumerator.
Definition: MFFontFileEnumerator.cpp:68
BlamColor color
Definition: ui.h:323
void log_bitmap_error(std::string message, Font *font, char current_char, BlamLogLevel severity)
Logs a message to file, and adds information about the font and character that errored.
Definition: text.cpp:31
BlamFontPackageType type
Definition: fonts.h:62
void Draw()
Draws the stack object.
Definition: BitmapText.cpp:13
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1249
BLAM ID2D1Factory * GetD2DFactory()
Retrieves the Direct2D factory.
Definition: render_manage.cpp:603
int line_height
Definition: fonts.h:68
IMGUI_API bool BeginCombo(const char *label, const char *preview_value, ImGuiComboFlags flags=0)
Definition: imgui_widgets.cpp:1416
IMGUI_API bool Selectable(const char *label, bool selected=false, ImGuiSelectableFlags flags=0, const ImVec2 &size=ImVec2(0, 0))
Definition: imgui_widgets.cpp:5469
BLAM HRESULT DrawRect(D2D1_COLOR_F outline_color, D2D1_COLOR_F fill_color, D2D1_RECT_F rect, float thickness, StackItemDrawMode mode)
Draws a rectangle.
Definition: rect.cpp:9
#define DEFAULT_DRAWMODE
Definition: render_stack.h:37
virtual ULONG __stdcall AddRef()
Acquires a new reference to the object.
Definition: MFFontFileEnumerator.cpp:51
BLAM std::vector< MFFontList > & getFontFileLists()
Retrieves the list of font lists.
Definition: FontLoader.cpp:95
float translate_speed
Definition: Line.cpp:11
BLAM int GetRenderHeight()
Definition: ogre.cpp:375
int bitmap_width
The width of the bitmap.
Definition: render_stack.h:861
Definition: material.h:53
D2D1_COLOR_F fill_color
The current fill color.
Definition: render_stack.h:566
float zone_thickness
The thickness of the zone border.
Definition: render_stack.h:757
void SetThickness(float new_thickness)
Sets the thickness of the ellipse's border.
Definition: ellipse.cpp:29
#define STACKTYPE_TEXT
Definition: render_stack.h:29
bool use_shadow
Whether or not to draw the text with a drop shadow.
Definition: render_stack.h:852
bool show_zone
Whether or not to show the text zone.
Definition: render_stack.h:755
int shadow_y
The Y offset of the drop shadow.
Definition: render_stack.h:962
bool rect_limit_to_window
Definition: Line.cpp:10
bool monospace
Definition: fonts.h:65
void ShowZoneEdge(bool show)
Enables or disables the display of the text area bounds.
Definition: DWText.cpp:56
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting changing font or adding deleting some characters in from glyph table PL means Public License Copyright Holder means whoever is named in the copyright or copyrights for the Font You means the or person redistributing or modifying the Font Freely Available means that you have the freedom to copy or modify the Font as well as redistribute copies of the Font under the same conditions you not price If you you can charge for this service Copying &Distribution You may copy and distribute verbatim copies of this Font in any without provided that you retain this license including modifying reordering converting changing font or adding deleting some characters in from glyph and copy and distribute such modifications under the terms of Section provided that the following conditions are such as by offering access to copy the modifications from a designated or distributing the modifications on a medium customarily used for software interchange c If the modified fonts normally reads commands interactively when you must cause it
Definition: ARPHICPL.TXT:36
Structure to contain data for a Font.
Definition: fonts.h:134
@ Basic_Triangle
A basic filled or outline triangle.
#define IM_ARRAYSIZE(_ARR)
Definition: imgui.h:75
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: DWText.cpp:96
void ValidateSizeAndTranslation()
Validates X/Y coordinates and Width/Height sizes after the area has been modified.
Definition: StackObjectBase.cpp:135
BLAM HRESULT DrawBitmapText(BlamRendering::RenderStack::BitmapText *text_object, Blam::Content::Fonts::Font *font, bool replace_color_codes)
Draws the specified text using a Bitmap-based Blamite Font.
Definition: text.cpp:550
void PokeTranslation()
Updates the area of the object to account for any x/y coordinate changes.
Definition: StackObjectBase.cpp:97
IMGUI_API void EndCombo()
Definition: imgui_widgets.cpp:1522
D2D1_RECT_F area
The area of the object.
Definition: render_stack.h:369
bool use_engine_font
Whether to use a font within the engine or a system font.
Definition: render_stack.h:759
std::vector< std::wstring > MFFontList
Somewhat pointless font list type definition, but it does make things slightly easier to read.
Definition: FontLoader.h:17
std::string text
Definition: ui.h:327
short width
The width of the glyph image, in pixels.
Definition: fonts.h:121
float width
The width of the object.
Definition: render_stack.h:379
int height
Definition: bgfx.cpp:20
bool show_zone
Whether or not to show the text zone.
Definition: render_stack.h:854
virtual ULONG __stdcall AddRef()
Acquires a new reference to the object.
Definition: MFFontCollectionLoader.cpp:20
IMGUI_API bool ColorEdit4(const char *label, float col[4], ImGuiColorEditFlags flags=0)
Definition: imgui_widgets.cpp:4154
BlamColor shadow_color
Definition: ui.h:324
BLAM int GetRenderWidth()
Definition: ogre.cpp:370
BLAM void addFontCollection(std::string id, IDWriteFontCollection *collection)
Adds a font collection to the list of font collections.
Definition: FontLoader.cpp:65
virtual ULONG __stdcall Release()
Releases the object.
Definition: MFFontCollectionLoader.cpp:25
BLAM HRESULT GetWICBitmapPixelData(IWICBitmap **bitmap, UINT *width, UINT *height, IWICBitmapLock **bitmap_lock, UINT *buffer_size, BYTE **start_address)
Retrieves the pixel data from a WIC bitmap.
Definition: bitmap_utils.cpp:182
BLAM std::string GetDrawModeLabel(StackItemDrawMode type)
Retrieves a string representation of the specified drawing mode.
Definition: render_stack.cpp:176
bool auto_calculate_area
Whether or not to automatically calculate the text area.
Definition: render_stack.h:979
void SetZoneThickness(float new_thickness)
Sets the thickness of the zone edge.
Definition: DWText.cpp:86
int shadow_x
The X offset of the drop shadow.
Definition: render_stack.h:849
BLAM IWICImagingFactory * GetWICFactory()
Retrieves the WIC Imaging Factory.
Definition: wic.cpp:53
BYTE * a
The Alpha value of the pixel.
Definition: render_utils.h:19
std::map< std::string, IDWriteFontCollection * > font_collections
The list of font collections.
Definition: FontLoader.cpp:20
bool use_shadow
Whether or not to draw the text with a drop shadow.
Definition: render_stack.h:964
BLAM D2D1_COLOR_F D2DColorFromBlamColor(BlamColor color)
Converts a BlamColor object into its equivalent D2D1_COLOR_F object.
Definition: color.cpp:46
D2D1_COLOR_F bg_color
The color to use for the text background.
Definition: render_stack.h:973
BLAM HRESULT IntegerBitmapScale(IWICBitmap *source, int scale_factor, ID2D1Bitmap **destination, ID2D1RenderTarget *target)
Scales a bitmap using integer scaling.
Definition: bitmap_utils.cpp:10
#define DRAWMODE_FILL
Definition: render_stack.h:33
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: Text.cpp:188
IMGUI_API void Separator()
Definition: imgui_widgets.cpp:1284
BYTE * g
The Green value of the pixel.
Definition: render_utils.h:17
BlamWidgetType
Enumerator listing possible UI widget types.
Definition: ui.h:60
HRESULT draw_text_main(int origin_x, int origin_y, ID2D1RenderTarget *target, int text_length, const char *text_cstr, Font *font, D2D1_COLOR_F color, bool ignore_color_codes)
Main function to draw text data.
Definition: text.cpp:143
BLAM HRESULT CreateFontCollection(MFFontList &newCollection, std::string font_id)
Creates a new font collection.
Definition: FontLoader.cpp:26
float height
The height of the object.
Definition: render_stack.h:380
BLAM std::string GetStringFromHResult(HRESULT hr)
Converts a result handle to a string.
Definition: errors.cpp:120
void PokeEllipseTranslation()
Updates the ellipse origin point based on the x/y coordinates.
Definition: ellipse.cpp:23
std::wstring text
The current text to display.
Definition: render_stack.h:751
Ogre::FontPtr ttf_font
Definition: fonts.h:77
Class representing text drawn using a Bitmap-based engine font.
Definition: render_stack.h:794
BlamVector4 resolve_font_uv(int coord_x, int coord_y, int tex_width, int tex_height, int slots_x, int slots_y)
Definition: text.cpp:17
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: Line.cpp:53
Class to implement the DirectWrite Font File Enumerator interface.
Definition: FontLoader.h:163
BLAM int push(MFFontList &collection)
Inserts a font list into the list of font lists.
Definition: FontLoader.cpp:56
~Text()
Deletes any used resources.
Definition: Text.cpp:32
BLAM HRESULT DrawRoundedRect(D2D1_COLOR_F outline_color, D2D1_COLOR_F fill_color, D2D1_ROUNDED_RECT rounded_rect, float thickness, StackItemDrawMode mode)
Draws a rounded rectangle.
Definition: rounded_rect.cpp:10
Class to assist in the loading of font collections.
Definition: FontLoader.h:106
BLAM FontGlyph * GetFontGlyph(Font *font, char glyph)
Retrieves a glyph from a font.
Definition: fonts.cpp:820
void updateCachedProperties()
Updates the currently cached properties.
Definition: BitmapText.cpp:50
BLAM IDWriteFontCollection * getFontCollection(std::string id)
Retrieves a font collection from the list of font collections.
Definition: FontLoader.cpp:70
void RebuildTextObject()
Definition: text.cpp:310
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: ellipse.cpp:34
StackItemDrawMode
Enumerator to specify the stack item draw mode.
Definition: render_stack.h:85
@ Text
Master text object that wraps around both BitmapText and DWText.
Definition: render_stack.h:73
char text_buffer[1024]
Text buffer for ImGUI editor.
Definition: render_stack.h:976
void SetThickness(float new_thickness)
Sets the thickness of the line.
Definition: Line.cpp:48
int charspacing
Definition: fonts.h:67
bool auto_scale_shadow
Definition: ui.h:320
@ DWText
DirectWrite Text, does not utilize our font system - probably dont use this.
Definition: render_stack.h:63
IMGUI_API bool InputFloat(const char *label, float *v, float step=0.0f, float step_fast=0.0f, const char *format="%.3f", ImGuiInputTextFlags flags=0)
Definition: imgui_widgets.cpp:2975
short height
The height of the glyph image, in pixels.
Definition: fonts.h:122
std::string engine_font_id
The ID of the font collection to use.
Definition: render_stack.h:760
HRESULT generate_bitmap(Font *font, std::string text, float x, float y, D2D1_COLOR_F color, bool use_shadow, int shadow_x, int shadow_y, D2D1_COLOR_F shadow_color, bool show_zone, D2D1_COLOR_F zone_color, float zone_thickness, ID2D1Bitmap **text_bitmap, D2D1_RECT_F *area)
Generates a bitmap containing the full text object to display.
Definition: text.cpp:331
BLAM HRESULT DWDrawText(std::wstring text, std::wstring font, float size, D2D1_RECT_F area, D2D1_COLOR_F color)
Draws a string using DirectWrite.
Definition: dwtext.cpp:16
bool hasAnyPropertyChanged()
Determines if any current properties differ from their cached copies.
Definition: BitmapText.cpp:71
BLAM void cleanupCollectionList()
Cleans up the font collection list.
Definition: FontLoader.cpp:85
int space_width
Definition: fonts.h:69
IWICBitmap * bitmap
The WIC bitmap for this glyph.
Definition: fonts.h:127
float thickness
The line thickness.
Definition: render_stack.h:646
void Draw()
Draws the stack object.
Definition: Line.cpp:14
float x
The X coordinate of the object.
Definition: render_stack.h:377
void PokeLineTranslation()
Pokes the line start/end points to match the coordinates/area.
Definition: Line.cpp:37
Structure representing a single pixel.
Definition: render_utils.h:14
float font_size
The size of the font. Only used with TrueType fonts.
Definition: render_stack.h:957
bool show_zone
Whether or not to show the text zone.
Definition: render_stack.h:967
std::string text
The text to display.
Definition: render_stack.h:956
std::vector< unsigned int > collection_keys
The list of collection keys. (?)
Definition: FontLoader.cpp:22
BLAM HRESULT DrawLine(D2D1_COLOR_F color, D2D1_POINT_2F start_point, D2D1_POINT_2F end_point, float thickness)
Draws a line.
Definition: line.cpp:10