Thicker XOR outline around stamps
This commit is contained in:
parent
98cb1e62e7
commit
c19f5b1d4c
2 changed files with 39 additions and 0 deletions
|
|
@ -17,6 +17,10 @@ https://tuxpaint.org/
|
||||||
Pere Pujal i Carabantes <perepujal@gmail.com> (feature)
|
Pere Pujal i Carabantes <perepujal@gmail.com> (feature)
|
||||||
Bill Kendrick <bill@newbreedsoftware.com> (on/off control)
|
Bill Kendrick <bill@newbreedsoftware.com> (on/off control)
|
||||||
|
|
||||||
|
* Outline while placing & rotating stamp is now thicker.
|
||||||
|
Bill Kendrick <bill@newbreedsoftware.com>
|
||||||
|
h/t Pere for reporting this & Albert for explaining things.
|
||||||
|
|
||||||
* New Magic Tools:
|
* New Magic Tools:
|
||||||
----------------
|
----------------
|
||||||
* "Googly Eyes"; place eyeballs in your drawing.
|
* "Googly Eyes"; place eyeballs in your drawing.
|
||||||
|
|
|
||||||
|
|
@ -20137,6 +20137,23 @@ static void wait_for_sfx(void)
|
||||||
/* XOR-based outline of rubber stamp shapes
|
/* XOR-based outline of rubber stamp shapes
|
||||||
(unused if LOW_QUALITY_STAMP_OUTLINE is #defined) */
|
(unused if LOW_QUALITY_STAMP_OUTLINE is #defined) */
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
#define STIPLE_W 10
|
||||||
|
#define STIPLE_H 10
|
||||||
|
static char stiple[] =
|
||||||
|
"8844221100"
|
||||||
|
"8844221100"
|
||||||
|
"1100884422"
|
||||||
|
"1100884422"
|
||||||
|
"4422110088"
|
||||||
|
"4422110088"
|
||||||
|
"0088442211"
|
||||||
|
"0088442211"
|
||||||
|
"2211008844"
|
||||||
|
"2211008844"
|
||||||
|
;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
#define STIPLE_W 5
|
#define STIPLE_W 5
|
||||||
#define STIPLE_H 5
|
#define STIPLE_H 5
|
||||||
|
|
@ -20303,7 +20320,25 @@ static void stamp_xor(int x, int y)
|
||||||
sy = y + yy - stamp_outline_h / 2;
|
sy = y + yy - stamp_outline_h / 2;
|
||||||
if (stiple[sx % STIPLE_W + sy % STIPLE_H * STIPLE_W] != '8')
|
if (stiple[sx % STIPLE_W + sy % STIPLE_H * STIPLE_W] != '8')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
xorpixel(sx, sy);
|
xorpixel(sx, sy);
|
||||||
|
|
||||||
|
if (xx < stamp_outline_w - 1) {
|
||||||
|
if (stiple[(sx + 1) % STIPLE_W + sy % STIPLE_H * STIPLE_W] != '8') {
|
||||||
|
xorpixel(sx + 1, sy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (yy < stamp_outline_h - 1) {
|
||||||
|
if (stiple[sx % STIPLE_W + (sy + 1) % STIPLE_H * STIPLE_W] != '8') {
|
||||||
|
xorpixel(sx, sy + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xx < stamp_outline_w - 1) {
|
||||||
|
if (stiple[(sx + 1) % STIPLE_W + (sy + 1) % STIPLE_H * STIPLE_W] != '8') {
|
||||||
|
xorpixel(sx + 1, sy + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SDL_UnlockSurface(screen);
|
SDL_UnlockSurface(screen);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue