Fixed an issue with clipping the render rectangle

This commit is contained in:
abdelrahman committed 2022-10-05 23:41:13 +01:00
1 parent 2eb8d83dc0
commit c1659dcf88
5 files changed
+99 -39

No files matched your search

+11 -4
View File
@@ -14,6 +14,13 @@ extern "C" {
typedef struct renderer Renderer;
typedef struct {
float x;
float y;
float width;
float height;
} RenderRect;
/**
* Attempts to allocate a Renderer object on the heap.
*
@@ -32,10 +39,10 @@ void get_render_output_size(Renderer *renderer, int32_t *w, int32_t *h);
void render_clear(const Renderer *renderer, SDL_Color color);
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, float x,
float y, float w, float h);
void render_texture(const Renderer *renderer, SDL_Texture *texture, float x,
float y, float w, float h);
void render_surface(const Renderer *renderer, SDL_Surface *surface,
const RenderRect *dest);
void render_texture(const Renderer *renderer, SDL_Texture *texture,
const RenderRect *src, const RenderRect *dest);
void swap_buffers(const Renderer *renderer);
/**