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 7e70914d42f31e963a39ed92efe54f31cfce0782 (commit) via 740b7028f534fbd12a22257f701f28c1df603cbc (commit) via b3779d6def780f74dc0dbaed7ed5f5172a9faa7c (commit) from 2d34007fde18efe7a66079b899a16eae0bfd2dbc (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/7e70914d42f31e963a39ed92efe54f31cfce0...
commit 7e70914d42f31e963a39ed92efe54f31cfce0782 Author: Cyril Hrubis metan@ucw.cz Date: Sun Jul 17 20:53:34 2011 +0200
Fix merge.
diff --git a/include/gfx/GP_Circle.h b/include/gfx/GP_Circle.h index 2ff4dac..c82c346 100644 --- a/include/gfx/GP_Circle.h +++ b/include/gfx/GP_Circle.h @@ -40,10 +40,10 @@ void GP_FillCircle(GP_Context *context, GP_Coord xcenter, GP_Coord ycenter, void GP_TFillCircle(GP_Context *context, GP_Coord xcenter, GP_Coord ycenter, GP_Size r, GP_Pixel pixel);
-void GP_FillRing(GP_Context *context, int xcenter, int ycenter, - unsigned int outer_r, unsigned int inner_r, GP_Pixel pixel); +void GP_FillRing(GP_Context *context, GP_Coord xcenter, GP_Coord ycenter, + GP_Size outer_r, GP_Size inner_r, GP_Pixel pixel);
-void GP_TFillRing(GP_Context *context, int xcenter, int ycenter, - unsigned int outer_r, unsigned int inner_r, GP_Pixel pixel); +void GP_TFillRing(GP_Context *context, GP_Coord xcenter, GP_Coord ycenter, + GP_Size outer_r, GP_Size inner_r, GP_Pixel pixel);
#endif /* GP_CIRCLE_H */ diff --git a/libs/gfx/GP_Circle.c b/libs/gfx/GP_Circle.c index ade89f7..07b3955 100644 --- a/libs/gfx/GP_Circle.c +++ b/libs/gfx/GP_Circle.c @@ -78,25 +78,19 @@ void GP_TFillCircle(GP_Context *context, GP_Coord xcenter, GP_Coord ycenter, #include "algo/FillRing.algo.h"
/* Generate drawing functions for various bit depths. */ -DEF_FILLRING_FN(GP_FillRing1bpp, GP_Context *, GP_Pixel, GP_HLine1bpp) -DEF_FILLRING_FN(GP_FillRing2bpp, GP_Context *, GP_Pixel, GP_HLine2bpp) -DEF_FILLRING_FN(GP_FillRing4bpp, GP_Context *, GP_Pixel, GP_HLine4bpp) -DEF_FILLRING_FN(GP_FillRing8bpp, GP_Context *, GP_Pixel, GP_HLine8bpp) -DEF_FILLRING_FN(GP_FillRing16bpp, GP_Context *, GP_Pixel, GP_HLine16bpp) -DEF_FILLRING_FN(GP_FillRing24bpp, GP_Context *, GP_Pixel, GP_HLine24bpp) -DEF_FILLRING_FN(GP_FillRing32bpp, GP_Context *, GP_Pixel, GP_HLine32bpp) - -void GP_FillRing(GP_Context *context, int xcenter, int ycenter, - unsigned int outer_r, unsigned int inner_r, GP_Pixel pixel) +GP_DEF_FILL_FN_PER_BPP(GP_FillRing, DEF_FILLRING_FN) + +void GP_FillRing(GP_Context *context, GP_Coord xcenter, GP_Coord ycenter, + GP_Size outer_r, GP_Size inner_r, GP_Pixel pixel) { GP_CHECK_CONTEXT(context);
- GP_FN_PER_BPP(GP_FillRing, context->bpp, context, - xcenter, ycenter, outer_r, inner_r, pixel); + GP_FN_PER_BPP_CONTEXT(GP_FillRing, context, context, + xcenter, ycenter, outer_r, inner_r, pixel); }
-void GP_TFillRing(GP_Context *context, int xcenter, int ycenter, - unsigned int outer_r, unsigned int inner_r, GP_Pixel pixel) +void GP_TFillRing(GP_Context *context, GP_Coord xcenter, GP_Coord ycenter, + GP_Size outer_r, GP_Size inner_r, GP_Pixel pixel) { GP_CHECK_CONTEXT(context); diff --git a/tests/SDL/shapetest.c b/tests/SDL/shapetest.c index 4af2152..7f420c2 100644 --- a/tests/SDL/shapetest.c +++ b/tests/SDL/shapetest.c @@ -164,12 +164,11 @@ void draw_testing_ring(int x, int y, int xradius, GP_TCircle(&context, x, y, xradius, yellow);
if (fill) { - if (xradius == yradius) { + if (xradius == yradius) GP_TFillRing(&context, x, y, xradius, xradius/2, red); - } else { + else GP_TFillRing(&context, x, y, GP_MAX(xradius, yradius), GP_MIN(xradius, yradius), red); - } }
if (outline == 2)
http://repo.or.cz/w/gfxprim.git/commit/740b7028f534fbd12a22257f701f28c1df603...
commit 740b7028f534fbd12a22257f701f28c1df603cbc Merge: 2d34007 b3779d6 Author: Cyril Hrubis metan@ucw.cz Date: Sun Jul 17 20:43:10 2011 +0200
Merge branch 'master' into generate
diff --cc include/gfx/GP_Circle.h index aaab27a,57b5a0a..2ff4dac --- a/include/gfx/GP_Circle.h +++ b/include/gfx/GP_Circle.h @@@ -28,16 -28,22 +28,22 @@@
#include "core/GP_Context.h"
-void GP_Circle(GP_Context *context, int xcenter, int ycenter, - unsigned int r, GP_Pixel pixel); +void GP_Circle(GP_Context *context, GP_Coord xcenter, GP_Coord ycenter, + GP_Size r, GP_Pixel pixel);
-void GP_TCircle(GP_Context *context, int xcenter, int ycenter, - unsigned int r, GP_Pixel pixel); +void GP_TCircle(GP_Context *context, GP_Coord xcenter, GP_Coord ycenter, + GP_Size r, GP_Pixel pixel);
-void GP_FillCircle(GP_Context *context, int xcenter, int ycenter, - unsigned int r, GP_Pixel pixel); +void GP_FillCircle(GP_Context *context, GP_Coord xcenter, GP_Coord ycenter, + GP_Size r, GP_Pixel pixel);
-void GP_TFillCircle(GP_Context *context, int xcenter, int ycenter, - unsigned int r, GP_Pixel pixel); +void GP_TFillCircle(GP_Context *context, GP_Coord xcenter, GP_Coord ycenter, + GP_Size r, GP_Pixel pixel);
+ void GP_FillRing(GP_Context *context, int xcenter, int ycenter, + unsigned int outer_r, unsigned int inner_r, GP_Pixel pixel); + + void GP_TFillRing(GP_Context *context, int xcenter, int ycenter, + unsigned int outer_r, unsigned int inner_r, GP_Pixel pixel); + #endif /* GP_CIRCLE_H */
-----------------------------------------------------------------------
Summary of changes: include/gfx/GP_Circle.h | 6 ++ libs/gfx/GP_Circle.c | 24 ++++++++++ .../algo/{FillCircle.algo.h => FillRing.algo.h} | 49 +++++++++++++------- tests/SDL/shapetest.c | 29 ++++++++++- 4 files changed, 88 insertions(+), 20 deletions(-) copy libs/gfx/algo/{FillCircle.algo.h => FillRing.algo.h} (66%)
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.