circle.h 835 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include <stdint.h>
  3. typedef struct
  4. {
  5. int x;
  6. int y;
  7. uint8_t r;
  8. uint8_t colour;
  9. } circle_t;
  10. // create a circle.
  11. circle_t create_circle(int x, int y, int r, uint8_t colour);
  12. // draw a circle.
  13. void draw_circle(circle_t *circle);
  14. // draw a circle with a new position.
  15. // does not save the position of the circle to the struct.
  16. void draw_circle_position(circle_t *circle, int x, int y);
  17. //
  18. void draw_circle_scale(circle_t *circle, int r);
  19. // draw the circle with a new colour.
  20. // does not save the colour to the circle struct.
  21. void draw_circle_colour(circle_t *circle, uint8_t colour);
  22. // draw the circle with
  23. void draw_circle_set(circle_t *circle, int x, int y, int r, uint8_t colour);
  24. // re set the information of the circle.
  25. void set_circle(circle_t *circle, int x, int y, int r, uint8_t colour);