Added ability to draw a non-filled rectangle
This commit is contained in:
1 parent
c1659dcf88
commit
a87eba8db7
7 files changed
+45
-12
No files matched your search
@@ -61,13 +61,14 @@ WindowSize get_window_real_size();
|
||||
*/
|
||||
WindowDrawingArea get_window_drawing_area();
|
||||
|
||||
void draw_rectangle(RenderRect rect, SDL_Color color);
|
||||
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_source_rect_to_drawing_area(RenderRect *src, RenderRect *dest);
|
||||
void clip_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);
|
||||
|
||||
@@ -37,6 +37,8 @@ Renderer *create_renderer(SDL_Window *window);
|
||||
void get_render_output_size(Renderer *renderer, int32_t *w, int32_t *h);
|
||||
|
||||
void render_clear(const Renderer *renderer, SDL_Color color);
|
||||
void draw_rect(const Renderer *renderer, SDL_Color color, float x, float y,
|
||||
float w, float h);
|
||||
void fill_rect(const Renderer *renderer, SDL_Color color, float x, float y,
|
||||
float w, float h);
|
||||
void render_surface(const Renderer *renderer, SDL_Surface *surface,
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef ALIASES_H
|
||||
#define ALIASES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // !__cplusplus
|
||||
|
||||
#define INTERNAL static
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // !__cplusplus
|
||||
|
||||
#endif // !ALIASES_H
|
||||
@@ -5,8 +5,6 @@
|
||||
extern "C" {
|
||||
#endif // !__cplusplus
|
||||
|
||||
#define INTERNAL static
|
||||
|
||||
#define MAX_OBJ_COUNT 10000
|
||||
#define MAX_ASSET_COUNT 1000
|
||||
#define HASH_PRIME_01 1987
|
||||
|
||||
Reference in new issue
Block a user