SimpleGFX  1.0
Simple Graphics Library for C Programming Education
simplegfx.h
Go to the documentation of this file.
1 
11 #pragma once
12 
13 #define GFX_VERSION "1.0"
31 int gfx_init(int width, int height);
32 
38 void gfx_clear();
39 
55 void gfx_putpixel(int x, int y);
56 
75 void gfx_putpixel_color(int x, int y, unsigned char r,
76  unsigned char g,
77  unsigned char b);
78  // end of Pixel Operations
80 
100 void gfx_line(int x1, int y1, int x2, int y2);
101 
116 void gfx_rect(int x, int y, int w, int h);
117 
131 void gfx_circle(int cx, int cy, int r);
132  // end of Geometry Functions
134 
153 void gfx_drawtext(int x, int y, const char *text);
154  // end of Text Functions
156 
173 void gfx_present();
174 
186 void gfx_delay(int ms);
187 
199 void gfx_close();
200  // end of Display Control
void gfx_putpixel(int x, int y)
Draw a single black pixel at the specified coordinates.
Definition: simplegfx.c:72
void gfx_close()
Close the graphics window and free resources.
Definition: simplegfx.c:120
void gfx_present()
Display all drawn graphics on the screen.
Definition: simplegfx.c:108
void gfx_delay(int ms)
Pause program execution for specified milliseconds.
Definition: simplegfx.c:115
void gfx_putpixel_color(int x, int y, unsigned char r, unsigned char g, unsigned char b)
Draw a single pixel with custom RGB color.
Definition: simplegfx.c:77
int gfx_init(int width, int height)
Initialize the graphics window with specified dimensions.
Definition: simplegfx.c:34
void gfx_drawtext(int x, int y, const char *text)
Draw text at the specified position.
Definition: simplegfx.c:101
void gfx_clear()
Clear the entire graphics window to white.
Definition: simplegfx.c:67
void gfx_circle(int cx, int cy, int r)
Draw a circle outline.
Definition: simplegfx.c:96
void gfx_line(int x1, int y1, int x2, int y2)
Draw a line between two points.
Definition: simplegfx.c:85
void gfx_rect(int x, int y, int w, int h)
Draw a rectangle outline.
Definition: simplegfx.c:91