Browse Source

Fixed round brush

main
neauoire 5 years ago
parent
commit
2c4be60bf4
  1. 8
      nasu.c

8
nasu.c

@ -167,7 +167,7 @@ fill(int x, int y, int mode, int size, int color)
int ox, oy;
for(ox = x - (size / 2); ox < x + size; ++ox)
for(oy = y - (size / 2); oy < y + size; ++oy)
if(distance(x, y, ox, oy) < size)
if(distance(x, y, ox, oy) > size)
continue;
else if(mode == 4 && jagg(ox, oy))
putchr(ox, oy, 0);
@ -525,24 +525,18 @@ int
main(int argc, char **argv)
{
int ticknext = 0;
brush.erase = 0;
brush.down = 0;
brush.color = 1;
brush.size = 8;
brush.mode = 0;
if(!init())
return error("Init", "Failure");
loadtheme(fopen("theme.svg", "r"));
newchr();
if(argc > 1)
loadchr(fopen(argv[1], "r"));
redraw(pixels);
while(1) {
int tick = SDL_GetTicks();
SDL_Event event;

Loading…
Cancel
Save