This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, generate has been updated via 79941fab71a6136cc5ad405d77ff8fb3164b5ce9 (commit) from b8038ff42052c3ff217d4739e5501279936d0303 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/79941fab71a6136cc5ad405d77ff8fb3164b5...
commit 79941fab71a6136cc5ad405d77ff8fb3164b5ce9 Author: Cyril Hrubis metan@ucw.cz Date: Sat Oct 15 20:17:46 2011 +0200
Back at the size - 1 for GP_*XYWH GP_*XYW and GP_*XYH.
diff --git a/libs/gfx/GP_HLine.c b/libs/gfx/GP_HLine.c index 1abb073..720475c 100644 --- a/libs/gfx/GP_HLine.c +++ b/libs/gfx/GP_HLine.c @@ -34,8 +34,8 @@ DEF_HLINE_BU_FN(GP_HLine_Raw_1BPP_LE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_W DEF_HLINE_BU_FN(GP_HLine_Raw_1BPP_BE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels1bpp) DEF_HLINE_BU_FN(GP_HLine_Raw_2BPP_LE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels2bpp) DEF_HLINE_BU_FN(GP_HLine_Raw_2BPP_BE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels2bpp) -DEF_HLINE_BU_FN(GP_HLine_Raw_4BPP_LE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels4bpp) -DEF_HLINE_BU_FN(GP_HLine_Raw_4BPP_BE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels4bpp) +DEF_HLINE_BU_FN(GP_HLine_Raw_4BPP_LE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels2bpp) +DEF_HLINE_BU_FN(GP_HLine_Raw_4BPP_BE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels2bpp)
DEF_HLINE_FN(GP_HLine_Raw_8BPP, GP_Context *, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels8bpp) DEF_HLINE_FN(GP_HLine_Raw_16BPP, GP_Context *, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels16bpp) @@ -55,7 +55,10 @@ void GP_HLineXXY_Raw(GP_Context *context, GP_Coord x0, GP_Coord x1, void GP_HLineXYW_Raw(GP_Context *context, GP_Coord x, GP_Coord y, GP_Size w, GP_Pixel pixel) { - GP_HLineXXY_Raw(context, x, x + w, y, pixel); + if (w == 0) + return; + + GP_HLineXXY_Raw(context, x, x + w - 1, y, pixel); }
void GP_HLineXXY(GP_Context *context, GP_Coord x0, GP_Coord x1, GP_Coord y, @@ -79,5 +82,8 @@ void GP_HLineXXY(GP_Context *context, GP_Coord x0, GP_Coord x1, GP_Coord y, void GP_HLineXYW(GP_Context *context, GP_Coord x, GP_Coord y, GP_Size w, GP_Pixel pixel) { - GP_HLineXXY(context, x, x + w, y, pixel); + if (w == 0) + return; + + GP_HLineXXY(context, x, x + w - 1, y, pixel); } diff --git a/libs/gfx/GP_Rect.c b/libs/gfx/GP_Rect.c index f6a303e..5e8fbc7 100644 --- a/libs/gfx/GP_Rect.c +++ b/libs/gfx/GP_Rect.c @@ -37,10 +37,10 @@ void GP_RectXYXY_Raw(GP_Context *context, GP_Coord x0, GP_Coord y0, void GP_RectXYWH_Raw(GP_Context *context, GP_Coord x, GP_Coord y, GP_Size w, GP_Size h, GP_Pixel pixel) { - GP_HLine_Raw(context, x, x + w, y, pixel); - GP_HLine_Raw(context, x, x + w, y + h, pixel); - GP_VLine_Raw(context, x, y, y + h, pixel); - GP_VLine_Raw(context, x + w, y, y + h, pixel); + if (w == 0 || h == 0) + return; + + GP_RectXYXY_Raw(context, x, y, x + w - 1, y + h - 1, pixel); }
void GP_RectXYXY(GP_Context *context, GP_Coord x0, GP_Coord y0, @@ -57,7 +57,10 @@ void GP_RectXYXY(GP_Context *context, GP_Coord x0, GP_Coord y0, void GP_RectXYWH(GP_Context *context, GP_Coord x, GP_Coord y, GP_Size w, GP_Size h, GP_Pixel pixel) { - GP_RectXYXY(context, x, y, x + w, y + h, pixel); + if (w == 0 || h == 0) + return; + + GP_RectXYXY(context, x, y, x + w - 1, y + h - 1, pixel); }
void GP_FillRectXYXY_Raw(GP_Context *context, GP_Coord x0, GP_Coord y0, @@ -76,7 +79,10 @@ void GP_FillRectXYXY_Raw(GP_Context *context, GP_Coord x0, GP_Coord y0, void GP_FillRectXYWH_Raw(GP_Context *context, GP_Coord x, GP_Coord y, GP_Size w, GP_Size h, GP_Pixel pixel) { - GP_FillRectXYXY_Raw(context, x, y, x + w, y + h, pixel); + if (w == 0 || h == 0) + return; + + GP_FillRectXYXY_Raw(context, x, y, x + w - 1, y + h - 1, pixel); }
void GP_FillRectXYXY(GP_Context *context, GP_Coord x0, GP_Coord y0, @@ -93,5 +99,8 @@ void GP_FillRectXYXY(GP_Context *context, GP_Coord x0, GP_Coord y0, void GP_FillRectXYWH(GP_Context *context, GP_Coord x, GP_Coord y, GP_Size w, GP_Size h, GP_Pixel pixel) { - GP_FillRectXYXY(context, x, y, x + w, y + h, pixel); + if (w == 0 || h == 0) + return; + + GP_FillRectXYXY(context, x, y, x + w - 1, y + h - 1, pixel); } diff --git a/libs/gfx/GP_VLine.c b/libs/gfx/GP_VLine.c index af9ad15..88cde1e 100644 --- a/libs/gfx/GP_VLine.c +++ b/libs/gfx/GP_VLine.c @@ -42,7 +42,10 @@ void GP_VLineXYY_Raw(GP_Context *context, GP_Coord x, GP_Coord y0, void GP_VLineXYH_Raw(GP_Context *context, GP_Coord x, GP_Coord y, GP_Size h, GP_Pixel pixel) { - GP_VLineXYY(context, x, y, y + h, pixel); + if (h == 0) + return; + + GP_VLineXYY(context, x, y, y + h - 1, pixel); }
void GP_VLineXYY(GP_Context *context, GP_Coord x, GP_Coord y0, @@ -66,5 +69,8 @@ void GP_VLineXYY(GP_Context *context, GP_Coord x, GP_Coord y0, void GP_VLineXYH(GP_Context *context, GP_Coord x, GP_Coord y, GP_Size h, GP_Pixel pixel) { - GP_VLineXYY(context, x, y, y + h, pixel); + if (h == 0) + return; + + GP_VLineXYY(context, x, y, y + h - 1, pixel); }
-----------------------------------------------------------------------
Summary of changes: libs/gfx/GP_HLine.c | 14 ++++++++++---- libs/gfx/GP_Rect.c | 23 ++++++++++++++++------- libs/gfx/GP_VLine.c | 10 ++++++++-- 3 files changed, 34 insertions(+), 13 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.