aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2022-09-07 04:07:51 +0200
committerkdx <kikoodx@paranoici.org>2022-09-07 04:33:48 +0200
commit1151afe6323bcfb287d9f4aa45848436badf69ea (patch)
treea6c21f7f24978c0134cce183acce0bab1e5959f7
parentd66ff720b877b7b747f8539d2525082829050a62 (diff)
downloadlzr-1151afe6323bcfb287d9f4aa45848436badf69ea.tar.gz
draw line & draw point
-rw-r--r--lzr.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/lzr.c b/lzr.c
index 9f77a4e..a013840 100644
--- a/lzr.c
+++ b/lzr.c
@@ -297,6 +297,24 @@ int LZR_DrawClear(void)
return 0;
}
+int LZR_DrawPoint(int x, int y)
+{
+ if (SDL_RenderDrawPoint(renderer, x, y) < 0) {
+ dx_log_error("%s", SDL_GetError());
+ return -1;
+ }
+ return 0;
+}
+
+int LZR_DrawLine(int x0, int y0, int x1, int y1)
+{
+ if (SDL_RenderDrawLine(renderer, x0, y0, x1, y1) < 0) {
+ dx_log_error("%s", SDL_GetError());
+ return -1;
+ }
+ return 0;
+}
+
int LZR_DrawImage(int id, int x, int y)
{
if (id < 0) {