diff --git a/README.md b/README.md index 6ff7885..0bc4e50 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,37 @@ An easy to use image creation tool for C. * Colors with transparency * draw on individual pixels +## Available methods: +```c +// basic image operations +int image_new(int width, int height, Image* image); + +int image_set_px(Image image, int x, int y, int r, int g, int b); +int image_set_px_c(Image image, int x, int y, Color color); + +int image_destroy(Image image); + +// colors +Color color_new(int r, int g, int b); +Color color_new_alpha(int r, int g, int b, float alpha); + +Color color_mix(Color c1, Color c2, float ratio); + +void print_color(Color c); + +// drawing shapes +int image_draw_rect(Image image, int x1, int y1, int x2, int y2, Color color); +int image_draw_circ(Image image, int x, int y, int r, Color color); +int image_draw_square(Image image, int x, int y, int s, Color color); + + + +// bmp format specifics: +int image_save_bmp(Image image, char* path); + + +``` + ## Might be added later * draw lines @@ -18,4 +49,5 @@ An easy to use image creation tool for C. ## Performance -While perfomance is not through the roof, creating a 4k image with a simple color gradient takes about 1.5s on a mobile ryzen 5 chip. Smaller graphics (like the transparency demo) are drawn and saved within 20ms, so that's okay, I guess... \ No newline at end of file +While perfomance is not through the roof, creating a 4k image with a simple color gradient takes about 1.5s on a mobile ryzen 5 chip. Smaller graphics (like the transparency demo) are drawn and saved within 20ms, so that's okay, I guess... +