WAGE: Improved accuracy of think line drawing.

Still not perfect, it looks like our Bresenham is a bit different
from the one used by QuickDraw, or (most likely) the polygon
drawing is different.
This commit is contained in:
Eugene Sandulenko 2016-04-17 13:24:34 +02:00
parent 44a49dbec5
commit b351cd28e9

View File

@ -208,9 +208,9 @@ void drawPixel(int x, int y, int color, void *data) {
if (p->thickness == 1) {
p->design->adjustBounds(x, y);
} else {
int x1 = x - p->thickness / 2;
int x1 = x;
int x2 = x1 + p->thickness;
int y1 = y - p->thickness / 2;
int y1 = y;
int y2 = y1 + p->thickness;
for (y = y1; y < y2; y++)
@ -233,9 +233,9 @@ void drawPixel(int x, int y, int color, void *data) {
color : kColorWhite;
}
} else {
int x1 = x - p->thickness / 2;
int x1 = x;
int x2 = x1 + p->thickness;
int y1 = y - p->thickness / 2;
int y1 = y;
int y2 = y1 + p->thickness;
for (y = y1; y < y2; y++)