added declared methods to readme

master
Anton Lydike 5 years ago
parent ce8d9ebb24
commit fc345d381e

@ -9,6 +9,37 @@ An easy to use image creation tool for C.
* Colors with transparency * Colors with transparency
* draw on individual pixels * 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 ## Might be added later
* draw lines * draw lines
@ -18,4 +49,5 @@ An easy to use image creation tool for C.
## Performance ## 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... 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...

Loading…
Cancel
Save