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 ff0706d61e00ba22fcb83e4902461b1832ab1023 (commit) from d0453af494e305191b9d85f6f35fbc06b828d61d (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/ff0706d61e00ba22fcb83e4902461b1832ab1...
commit ff0706d61e00ba22fcb83e4902461b1832ab1023 Author: Cyril Hrubis metan@ucw.cz Date: Wed Oct 31 18:30:59 2012 +0100
gfx: algo: Fix negative and zero radius for Circle
The gfx prototypes are not correct though.
diff --git a/libs/gfx/algo/Circle.algo.h b/libs/gfx/algo/Circle.algo.h index f5f5acc..76deb83 100644 --- a/libs/gfx/algo/Circle.algo.h +++ b/libs/gfx/algo/Circle.algo.h @@ -74,10 +74,20 @@ * FN_NAME - name of the function to be defined */ #define DEF_CIRCLE_FN(FN_NAME, CONTEXT_T, PIXVAL_T, PUTPIXEL) -void FN_NAME(CONTEXT_T context, int xcenter, int ycenter, unsigned int r, +void FN_NAME(CONTEXT_T context, int xcenter, int ycenter, int r, PIXVAL_T pixval) { int x, y, error; ++ /* Special case for r == 0 */ + if (r == 0) { + PUTPIXEL(context, xcenter, ycenter, pixval); + return; + } ++ /* Clip negative r */ + r = r < 0 ? -r : r; + for (x = 0, error = -r, y = r; y >= 0; y--) { /* Iterate X until we can pass to the next line. */ -----------------------------------------------------------------------
Summary of changes: libs/gfx/algo/Circle.algo.h | 12 +++++++++++- 1 files changed, 11 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.