Modified the text rendering functions to allow for clipping the text

This commit is contained in:
abdelrahman committed 2023-02-04 18:47:02 +00:00
1 parent 76875ed81f
commit d429262aaa
4 files changed
+27 -15

No files matched your search

+4 -3
View File
@@ -70,15 +70,16 @@ void fill_rectangle(RenderRect rect, SDL_Color color);
* Ensures that a rendered rectangle is clipped to the drawing area when it is
* smaller than the actual size of the window.
*/
void clip_render_rects_to_drawing_area(RenderRect *src, RenderRect *dest);
void clip_texture_render_rects_to_drawing_area(RenderRect *src,
RenderRect *dest);
RenderRect get_texture_asset_rect(AssetID id);
void render_texture_asset(AssetID id, RenderRect *src, RenderRect *dest);
void modulate_texture_color(AssetID id, SDL_Color color);
void modulate_texture_alpha(AssetID id, u8 alpha);
TextSize get_text_size_from_font_asset(AssetID id, const char *text);
void render_text_with_font_asset(AssetID id, const char *text, f32 x, f32 y,
SDL_Color color);
void render_text_with_font_asset(AssetID id, const char *text, RenderRect dest,
SDL_Color color, const RenderRect *clip);
void set_font_asset_size(AssetID id, u32 size);
i32 set_font_direction(AssetID id, FontDirection direction);
i32 set_font_script_name(AssetID id, const char *script);