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, master has been updated via b9b02ed950aa9b8c45aa065ef1e5175b6e7ea2e8 (commit) via 76e72cf5507bca2ec0e6da9aff3b82a566543f89 (commit) from 23a61ce77d10e1f69552bca123878f3c7602d363 (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/b9b02ed950aa9b8c45aa065ef1e5175b6e7ea...
commit b9b02ed950aa9b8c45aa065ef1e5175b6e7ea2e8 Author: Cyril Hrubis metan@ucw.cz Date: Sun Dec 9 14:26:06 2012 +0100
gfx: Fix second special case of GP_Line().
diff --git a/libs/gfx/algo/Line.algo.h b/libs/gfx/algo/Line.algo.h index c6ca4f8..a69d053 100644 --- a/libs/gfx/algo/Line.algo.h +++ b/libs/gfx/algo/Line.algo.h @@ -46,12 +46,11 @@ void FN_NAME(CONTEXT_T context, int x0, int y0, int x1, int y1, PUTPIXEL(context, x0, y0, pixval); return; } - int y = y0; - while (y != y1) { + if (y0 > y1) + GP_SWAP(y0, y1); + int y; + for (y = y0; y <= y1; y++) PUTPIXEL(context, x0, y, pixval); - if (y0 > y1) y--; - else y++; - } return; } http://repo.or.cz/w/gfxprim.git/commit/76e72cf5507bca2ec0e6da9aff3b82a566543...
commit 76e72cf5507bca2ec0e6da9aff3b82a566543f89 Author: Cyril Hrubis metan@ucw.cz Date: Sun Dec 9 14:23:08 2012 +0100
gfx: Fix one special case for GP_Line().
diff --git a/libs/gfx/algo/Line.algo.h b/libs/gfx/algo/Line.algo.h index afc37dc..c6ca4f8 100644 --- a/libs/gfx/algo/Line.algo.h +++ b/libs/gfx/algo/Line.algo.h @@ -42,6 +42,10 @@ void FN_NAME(CONTEXT_T context, int x0, int y0, int x1, int y1, PIXVAL_T pixval) { if (x0 == x1) { + if (y0 == y1) { + PUTPIXEL(context, x0, y0, pixval); + return; + } int y = y0; while (y != y1) { PUTPIXEL(context, x0, y, pixval); -----------------------------------------------------------------------
Summary of changes: libs/gfx/algo/Line.algo.h | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 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.