diff options
Diffstat (limited to 'renderer.c')
| -rw-r--r-- | renderer.c | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -7,15 +7,8 @@ #include <SDL2/SDL_image.h> #include "microui.h" #include "renderer.h" - - -#define expect(x) do { \ - if (!(x)) { \ - fprintf(stderr, "Fatal error: %s:%d: assertion '%s' failed\n", \ - __FILE__, __LINE__, #x); \ - abort(); \ - } \ - } while (0) +#include "color.h" +#include "util.h" #define PIXEL_DEPTH 32 @@ -41,7 +34,7 @@ enum { CIRCLE_RADIUS = 16 }; static const char FONT[] = "font/P052-Roman.ttf"; enum font { FONTSIZE = 14, }; -static const mu_Color bg = {255, 255, 255, 255}; +static const mu_Color bg = WHITE; static const char button_map[256] = { [SDL_BUTTON_LEFT & 0xff] = MU_MOUSE_LEFT, @@ -452,6 +445,7 @@ r_canvas_draw_circle(int id, int x, int y, int r, mu_Color color) { canvas = &canvas_list.items[id]; + #pragma omp parallel for for (dy = -r; dy <= r; dy++) { for (dx = -r; dx <= r; dx++) { if (dx*dx + dy*dy <= r*r) { |