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 feff7abe0be63662f56d82aa080f3c7c8be9d194 (commit) via 5e0e6305889ab3f26302bf5c2b31aa83d0a1ec45 (commit) from 59b7db7636f17da18520d71c091dd9c23694ea91 (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/feff7abe0be63662f56d82aa080f3c7c8be9d...
commit feff7abe0be63662f56d82aa080f3c7c8be9d194 Author: Cyril Hrubis metan@ucw.cz Date: Tue Apr 9 15:09:43 2013 +0200
gfx: Ellipse: Fix special case for a == 0 || b == 0
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/libs/gfx/algo/Ellipse.algo.h b/libs/gfx/algo/Ellipse.algo.h index f10fbb0..a964e86 100644 --- a/libs/gfx/algo/Ellipse.algo.h +++ b/libs/gfx/algo/Ellipse.algo.h @@ -19,7 +19,7 @@ * Copyright (C) 2009-2010 Jiri "BlueBear" Dluhos * * jiri.bluebear.dluhos@gmail.com * * * - * Copyright (C) 2009-2012 Cyril Hrubis metan@ucw.cz * + * Copyright (C) 2009-2013 Cyril Hrubis metan@ucw.cz * * * *****************************************************************************/
@@ -80,6 +80,19 @@ static void FN_NAME(CONTEXT_T context, int xcenter, int ycenter, int b2 = b*b; int x, y, error; ++ if (a == 0) { + for (y = -b; y <= (int)b; y++) + PUTPIXEL(context, xcenter, ycenter + y, pixval); + return; + } ++ if (b == 0) { + for (x = -a; x <= (int)a; x++) + PUTPIXEL(context, xcenter + x, ycenter, pixval); + return; + } + for (x = 0, error = -b2*a, y = b; y >= 0; y--) { while (error < 0) { http://repo.or.cz/w/gfxprim.git/commit/5e0e6305889ab3f26302bf5c2b31aa83d0a1e...
commit 5e0e6305889ab3f26302bf5c2b31aa83d0a1ec45 Author: Cyril Hrubis metan@ucw.cz Date: Tue Apr 9 14:47:26 2013 +0200
core: WritePixel: Fix 24 BPP with count == 0.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/libs/core/GP_WritePixel.c b/libs/core/GP_WritePixel.c index 916f9ef..0cd1cc7 100644 --- a/libs/core/GP_WritePixel.c +++ b/libs/core/GP_WritePixel.c @@ -376,6 +376,9 @@ void GP_WritePixels_24BPP(void *start, size_t count, unsigned int value) { uint8_t *bytep = (uint8_t *) start;
+ if (count == 0) + return; + /* How much bytes we are offset against the 32-bit boundary. */ int shift = ((intptr_t) bytep) % 4;
-----------------------------------------------------------------------
Summary of changes: libs/core/GP_WritePixel.c | 3 +++ libs/gfx/algo/Ellipse.algo.h | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 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.