spark: draw lines 2px wide instead of 1 in full-HD mode

This commit is contained in:
Stefan Seyfried
2012-03-10 16:11:47 +01:00
parent 1182430ac3
commit 8a127f08c2

View File

@@ -591,6 +591,7 @@ void CFrameBuffer::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t co
if (!getActive()) if (!getActive())
return; return;
int d = scaleX(1);
xa = scaleX(xa); xa = scaleX(xa);
xb = scaleX(xb); xb = scaleX(xb);
ya = scaleY(ya); ya = scaleY(ya);
@@ -624,7 +625,10 @@ void CFrameBuffer::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t co
step = yb < ya ? -1 : 1; step = yb < ya ? -1 : 1;
} }
paintPixel(x, y, col); if (d == 1)
paintPixel(x, y, col);
else
blitRect(x, y, 2, 2, col);
while (x < End) while (x < End)
{ {
@@ -636,7 +640,10 @@ void CFrameBuffer::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t co
y += step; y += step;
p += twoDyDx; p += twoDyDx;
} }
paintPixel(x, y, col); if (d == 1)
paintPixel(x, y, col);
else
blitRect(x, y, 2, 2, col);
} }
} }
else else
@@ -660,7 +667,10 @@ void CFrameBuffer::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t co
step = xb < xa ? -1 : 1; step = xb < xa ? -1 : 1;
} }
paintPixel(x, y, col); if (d == 1)
paintPixel(x, y, col);
else
blitRect(x, y, 2, 2, col);
while (y < End) while (y < End)
{ {
@@ -672,7 +682,10 @@ void CFrameBuffer::paintLine(int xa, int ya, int xb, int yb, const fb_pixel_t co
x += step; x += step;
p += twoDxDy; p += twoDxDy;
} }
paintPixel(x, y, col); if (d == 1)
paintPixel(x, y, col);
else
blitRect(x, y, 2, 2, col);
} }
} }
} }
@@ -689,7 +702,8 @@ void CFrameBuffer::paintVLineRel(int x, int y, int dy, const fb_pixel_t col)
int _x = scaleX(x); int _x = scaleX(x);
int _y = scaleY(y); int _y = scaleY(y);
int _dy = scaleY(dy); int _dy = scaleY(dy);
blitRect(_x, _y, 1, _dy, col); int w = scaleX(1);
blitRect(_x, _y, w, _dy, col);
} }
void CFrameBuffer::paintHLine(int xa, int xb, int y, const fb_pixel_t col) void CFrameBuffer::paintHLine(int xa, int xb, int y, const fb_pixel_t col)
@@ -704,7 +718,8 @@ void CFrameBuffer::paintHLineRel(int x, int dx, int y, const fb_pixel_t col)
int _x = scaleX(x); int _x = scaleX(x);
int _y = scaleY(y); int _y = scaleY(y);
int _dx = scaleX(dx); int _dx = scaleX(dx);
blitRect(_x, _y, _dx, 1, col); int w = scaleY(1);
blitRect(_x, _y, _dx, w, col);
} }
void CFrameBuffer::setIconBasePath(const std::string & iconPath) void CFrameBuffer::setIconBasePath(const std::string & iconPath)