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 965a9237db419f83183eb4a59fc9bc741782093e (commit)
from e403e7ee1b9adba8f821a623d862a03ac7afc941 (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/965a9237db419f83183eb4a59fc9bc741782…
commit 965a9237db419f83183eb4a59fc9bc741782093e
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sun May 27 15:26:29 2012 +0200
loaders: Use png_set_packswap() (to reduce size of code).
diff --git a/libs/loaders/GP_PNG.c b/libs/loaders/GP_PNG.c
index 2afb072..742cf46 100644
--- a/libs/loaders/GP_PNG.c
+++ b/libs/loaders/GP_PNG.c
@@ -200,7 +200,7 @@ GP_Context *GP_ReadPNG(FILE *f, GP_ProgressCallback *callback)
}
if (color_type == PNG_COLOR_TYPE_GRAY)
- res->bit_endian = 1;
+ png_set_packswap(png);
uint32_t y;
@@ -305,48 +305,23 @@ static int prepare_png_header(const GP_Context *src, png_structp png,
return 0;
}
-static int write_png_data_g_swap(const GP_Context *src, png_structp png,
- GP_ProgressCallback *callback)
+static int write_png_data(const GP_Context *src, png_structp png,
+ GP_ProgressCallback *callback, int bit_endian_flag)
{
- unsigned int y;
- uint8_t row[src->bytes_per_row];
-
- for (y = 0; y < src->h; y++) {
- memcpy(row, GP_PIXEL_ADDR(src, 0, y), src->bytes_per_row);
-
+ /* Look if we need to swap data when writing */
+ if (bit_endian_flag) {
switch (src->pixel_type) {
case GP_PIXEL_G1:
- GP_BitSwapRow_B1(row, src->bytes_per_row);
- break;
case GP_PIXEL_G2:
- GP_BitSwapRow_B4(row, src->bytes_per_row);
- break;
case GP_PIXEL_G4:
- GP_BitSwapRow_B4(row, src->bytes_per_row);
+ png_set_packswap(png);
break;
default:
return ENOSYS;
break;
}
-
- png_write_row(png, row);
-
- if (GP_ProgressCallbackReport(callback, y, src->h, src->w)) {
- GP_DEBUG(1, "Operation aborted");
- return ECANCELED;
- }
}
- return 0;
-}
-
-static int write_png_data(const GP_Context *src, png_structp png,
- GP_ProgressCallback *callback, int bit_endian_flag)
-{
- /* Look if we need to swap data when writing */
- if (bit_endian_flag)
- return write_png_data_g_swap(src, png, callback);
-
unsigned int y;
for (y = 0; y < src->h; y++) {
-----------------------------------------------------------------------
Summary of changes:
libs/loaders/GP_PNG.c | 37 ++++++-------------------------------
1 files changed, 6 insertions(+), 31 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
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 e403e7ee1b9adba8f821a623d862a03ac7afc941 (commit)
from adef520463dc58869ba1570a8d5cd05b7691091a (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/e403e7ee1b9adba8f821a623d862a03ac7af…
commit e403e7ee1b9adba8f821a623d862a03ac7afc941
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sun May 27 14:51:17 2012 +0200
loaders: Set bit endian flag on grayscale PNG load.
* The 1BPP_BE 2BPP_BE and 4BPP_BE blits doesn't work yet, ugh :(
diff --git a/libs/loaders/GP_PNG.c b/libs/loaders/GP_PNG.c
index 3e8d6de..2afb072 100644
--- a/libs/loaders/GP_PNG.c
+++ b/libs/loaders/GP_PNG.c
@@ -199,6 +199,9 @@ GP_Context *GP_ReadPNG(FILE *f, GP_ProgressCallback *callback)
goto err2;
}
+ if (color_type == PNG_COLOR_TYPE_GRAY)
+ res->bit_endian = 1;
+
uint32_t y;
/* start the actuall reading */
-----------------------------------------------------------------------
Summary of changes:
libs/loaders/GP_PNG.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
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 adef520463dc58869ba1570a8d5cd05b7691091a (commit)
from f278f7d7683d97876757877353550e431700d180 (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/adef520463dc58869ba1570a8d5cd05b7691…
commit adef520463dc58869ba1570a8d5cd05b7691091a
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sun May 27 14:40:52 2012 +0200
spiv: Move the resampling workaround to a correct place.
diff --git a/demos/spiv/spiv.c b/demos/spiv/spiv.c
index 77c3bc4..91b9f35 100644
--- a/demos/spiv/spiv.c
+++ b/demos/spiv/spiv.c
@@ -152,6 +152,14 @@ int load_image(struct loader_params *params)
GP_BackendFlip(backend);
return 1;
}
+
+ /* Workaround */
+ if (img->pixel_type != GP_PIXEL_RGB888) {
+ GP_Context *tmp = GP_ContextConvert(img, GP_PIXEL_RGB888);
+ GP_ContextFree(img);
+ img = tmp;
+ }
+
cpu_timer_stop(&timer);
params->img = img;
@@ -221,13 +229,6 @@ static void *image_loader(void *ptr)
w = img->w;
h = img->h;
- /* Workaround */
- if (img->pixel_type != GP_PIXEL_RGB888) {
- GP_Context *tmp = GP_ContextConvert(img, GP_PIXEL_RGB888);
- GP_ContextFree(img);
- img = tmp;
- }
-
GP_Context *ret;
/* Do low pass filter */
-----------------------------------------------------------------------
Summary of changes:
demos/spiv/spiv.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
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 c404e7e68b3d6567519cb2fcb45ea5fc652add35 (commit)
from dcc74ee0d1808272efbf16ebb9a3d6dfaa20ff26 (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/c404e7e68b3d6567519cb2fcb45ea5fc652a…
commit c404e7e68b3d6567519cb2fcb45ea5fc652add35
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sun May 27 12:16:50 2012 +0200
demos: py_simple: Fix blur example.
diff --git a/demos/py_simple/blur.py b/demos/py_simple/blur.py
index 80c35de..ca50658 100755
--- a/demos/py_simple/blur.py
+++ b/demos/py_simple/blur.py
@@ -17,7 +17,7 @@ def main():
# Do in-place gaussian blur
filters.FilterGaussianBlur(img, img, radii, radii, None)
# Save result
- loaders.SaveJPG("out.jpg", img, None)
+ loaders.SaveJPG(img, "out.jpg", None)
if __name__ == '__main__':
main()
-----------------------------------------------------------------------
Summary of changes:
demos/py_simple/blur.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
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 dcc74ee0d1808272efbf16ebb9a3d6dfaa20ff26 (commit)
from 4b5f8e14db9cd157d1b3b616726b1c9fb1b3c9b5 (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/dcc74ee0d1808272efbf16ebb9a3d6dfaa20…
commit dcc74ee0d1808272efbf16ebb9a3d6dfaa20ff26
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sat May 26 20:54:43 2012 +0200
backends: Print error when initalizing not-compiled-in backend.
diff --git a/libs/backends/GP_SDL.c b/libs/backends/GP_SDL.c
index fcc0df7..5705eec 100644
--- a/libs/backends/GP_SDL.c
+++ b/libs/backends/GP_SDL.c
@@ -25,9 +25,10 @@
#include "../../config.h"
+#include "core/GP_Debug.h"
+
#ifdef HAVE_LIBSDL
-#include "core/GP_Debug.h"
#include "input/GP_InputDriverSDL.h"
#include "GP_Backend.h"
#include "GP_SDL.h"
@@ -208,6 +209,7 @@ GP_Backend *GP_BackendSDLInit(GP_Size w __attribute__((unused)),
uint8_t flags __attribute__((unused)),
const char *caption __attribute__((unused)))
{
+ GP_DEBUG(0, "FATAL: SDL support not compiled in.");
return NULL;
}
diff --git a/libs/backends/GP_X11.c b/libs/backends/GP_X11.c
index 3db2724..ffc7dca 100644
--- a/libs/backends/GP_X11.c
+++ b/libs/backends/GP_X11.c
@@ -22,12 +22,14 @@
#include "../../config.h"
+#include "core/GP_Debug.h"
+#include "core/GP_Common.h"
+
#ifdef HAVE_LIBX11
#include <X11/Xlib.h>
#include <X11/Xutil.h>
-#include "core/GP_Debug.h"
#include "input/GP_InputDriverX11.h"
#include "GP_X11.h"
@@ -375,10 +377,13 @@ err0:
#include "GP_Backend.h"
-GP_Backend *GP_BackendX11Init(const char *display, int x, int y,
- unsigned int w, unsigned int h,
- const char *caption)
+GP_Backend *GP_BackendX11Init(const char *GP_UNUSED(display),
+ int GP_UNUSED(x), int GP_UNUSED(y),
+ unsigned int GP_UNUSED(w),
+ unsigned int GP_UNUSED(h),
+ const char *GP_UNUSED(caption))
{
+ GP_DEBUG(0, "FATAL: X11 support not compiled in");
return NULL;
}
-----------------------------------------------------------------------
Summary of changes:
libs/backends/GP_SDL.c | 4 +++-
libs/backends/GP_X11.c | 13 +++++++++----
2 files changed, 12 insertions(+), 5 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")
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 4b5f8e14db9cd157d1b3b616726b1c9fb1b3c9b5 (commit)
via cb75b76577a6680789268db88f8133d6c5910743 (commit)
via 0fe41f6f329aa64d7f7cdefe6666b4140fcf49c9 (commit)
via 3c6ce96d9864ad661d99840a571888c2633c1f6f (commit)
from ce280e141cd211cffe37af58fe420428740ae7ba (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/4b5f8e14db9cd157d1b3b616726b1c9fb1b3…
commit 4b5f8e14db9cd157d1b3b616726b1c9fb1b3c9b5
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sat May 26 20:38:53 2012 +0200
py_simple: Fix python example after the API update.
diff --git a/demos/py_simple/rotate90.py b/demos/py_simple/rotate90.py
index d93756b..f4f2ad3 100755
--- a/demos/py_simple/rotate90.py
+++ b/demos/py_simple/rotate90.py
@@ -16,7 +16,7 @@ def main():
# Load Image
src = loaders.LoadImage(sys.argv[1], None)
# Rotate by 90 degrees
- res = filters.FilterRotate90Alloc(src, None)
+ res = filters.FilterRotate90_Alloc(src, None)
# Save Image
res.Save(sys.argv[2])
http://repo.or.cz/w/gfxprim.git/commit/cb75b76577a6680789268db88f8133d6c591…
commit cb75b76577a6680789268db88f8133d6c5910743
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sat May 26 20:35:48 2012 +0200
pywrap: Set GP_FilterSymmetryNames array to immutable.
diff --git a/pylib/gfxprim/filters/filters.i b/pylib/gfxprim/filters/filters.i
index 3ee7227..866ea9b 100644
--- a/pylib/gfxprim/filters/filters.i
+++ b/pylib/gfxprim/filters/filters.i
@@ -24,6 +24,8 @@
%include "GP_Resize.h"
/* Functions returning new allocated context */
+%immutable GP_FilterSymmetryNames;
+
%include "GP_Rotate.h"
%newobject GP_FilterMirrorH_Alloc;
http://repo.or.cz/w/gfxprim.git/commit/0fe41f6f329aa64d7f7cdefe6666b4140fcf…
commit 0fe41f6f329aa64d7f7cdefe6666b4140fcf49c9
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sat May 26 20:32:09 2012 +0200
doc: Update Rotate filters docs.
diff --git a/doc/filters.txt b/doc/filters.txt
index a751015..fad32b2 100644
--- a/doc/filters.txt
+++ b/doc/filters.txt
@@ -110,68 +110,83 @@ Rotation and Symmetry filters
-------------------------------------------------------------------------------
#include <GP_Filters.h>
-GP_Context *GP_FilterMirrorH(const GP_Context *src, GP_Context *dst,
- GP_ProgressCallback *callback);
+int GP_FilterMirrorH(const GP_Context *src, GP_Context *dst,
+ GP_ProgressCallback *callback);
+
+GP_Context *GP_FilterMirrorH_Alloc(const GP_Context *src,
+ GP_ProgressCallback *callback);
-------------------------------------------------------------------------------
Mirrors context horizontally.
Works 'in-place'.
-The destination has to have the same pixel type and the destination size must
-be at least as big as source.
+The destination has to have the same pixel type and the size must be at least
+as large as source.
[source,c]
-------------------------------------------------------------------------------
#include <GP_Filters.h>
-GP_Context *GP_FilterMirrorV(const GP_Context *src, GP_Context *dst,
- GP_ProgressCallback *callback);
+int GP_FilterMirrorV(const GP_Context *src, GP_Context *dst,
+ GP_ProgressCallback *callback);
+
+GP_Context *GP_FilterMirrorV_Alloc(const GP_Context *src,
+ GP_ProgressCallback *callback);
-------------------------------------------------------------------------------
Mirrors context vertically.
Works 'in-place'.
-the destination has to have the same pixel type and the destination size must
-be at least as big as source.
+The destination has to have the same pixel type and the size must be at least
+as large as source.
[source,c]
-------------------------------------------------------------------------------
#include <GP_Filters.h>
-GP_Context *GP_FilterRotate90(const GP_Context *src, GP_Context *dst,
- GP_ProgressCallback *callback);
+int GP_FilterRotate90(const GP_Context *src, GP_Context *dst,
+ GP_ProgressCallback *callback);
+
+GP_Context *GP_FilterRotate90_Alloc(const GP_Context *src,
+ GP_ProgressCallback *callback);
-------------------------------------------------------------------------------
Rotate context by 90 degrees.
Doesn't work 'in-place' (yet).
-The destination has to have the same pixel type and destination size must be
-big enough to fit rotated context (i.e. W and H are swapped).
+The destination has to have the same pixel type and size must be large enough to
+fit rotated context (i.e. W and H are swapped).
[source,c]
-------------------------------------------------------------------------------
#include <GP_Filters.h>
-GP_Context *GP_FilterRotate180(const GP_Context *src, GP_Context *dst,
- GP_ProgressCallback *callback);
+int GP_FilterRotate180(const GP_Context *src, GP_Context *dst,
+ GP_ProgressCallback *callback);
+
+GP_Context *GP_FilterRotate180_Alloc(const GP_Context *src,
+ GP_ProgressCallback *callback);
-------------------------------------------------------------------------------
Rotate context by 180 degrees.
Doesn't work 'in-place' (yet).
-the destination has to have the same pixel type and the destination size must
-be at least as big as source.
+The destination has to have the same pixel type and the size must be at least
+as large as source.
[source,c]
-------------------------------------------------------------------------------
#include <GP_Filters.h>
-GP_Context *GP_FilterRotate270(const GP_Context *src, GP_Context *dst,
- GP_ProgressCallback *callback);
+int GP_FilterRotate270(const GP_Context *src, GP_Context *dst,
+ GP_ProgressCallback *callback);
+
+GP_Context *GP_FilterRotate270_Alloc(const GP_Context *src,
+ GP_ProgressCallback *callback);
-------------------------------------------------------------------------------
Rotate context by 270 degrees.
@@ -179,7 +194,7 @@ Rotate context by 270 degrees.
Doesn't work 'in-place' (yet).
The destination has to have the same pixel type and destination size must be
-big enough to fit rotated context (eg. W and H are swapped).
+large enough to fit rotated context (eg. W and H are swapped).
[source,c]
-------------------------------------------------------------------------------
@@ -193,9 +208,13 @@ typedef enum GP_FilterSymmetries {
GP_MIRROR_V,
} GP_FilterSymmetries;
-GP_Context *GP_FilterSymmetry(const GP_Context *src, GP_Context *dst,
+GP_Context *GP_FilterSymmetry(const GP_Context *src,
GP_FilterSymmetries symmetry,
GP_ProgressCallback *callback);
+
+int GP_FilterSymmetry(const GP_Context *src, GP_Context *dst,
+ GP_FilterSymmetries symmetry,
+ GP_ProgressCallback *callback);
-------------------------------------------------------------------------------
Catch all function for symmetry filters.
http://repo.or.cz/w/gfxprim.git/commit/3c6ce96d9864ad661d99840a571888c2633c…
commit 3c6ce96d9864ad661d99840a571888c2633c1f6f
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sat May 26 20:31:27 2012 +0200
filters: Update Rotate filters API.
diff --git a/demos/c_simple/filters_symmetry.c b/demos/c_simple/filters_symmetry.c
index 3f130a4..c1f5068 100644
--- a/demos/c_simple/filters_symmetry.c
+++ b/demos/c_simple/filters_symmetry.c
@@ -99,7 +99,7 @@ int main(int argc, char *argv[])
}
/* Apply a symmetry filter */
- res = GP_FilterSymmetryAlloc(src, sym, NULL);
+ res = GP_FilterSymmetry_Alloc(src, sym, NULL);
/* Save Image */
if (GP_SaveImage(res, argv[optind+1], NULL)) {
diff --git a/demos/grinder/grinder.c b/demos/grinder/grinder.c
index fe51530..3da5037 100644
--- a/demos/grinder/grinder.c
+++ b/demos/grinder/grinder.c
@@ -227,13 +227,13 @@ static GP_RetCode rotate(GP_Context **c, const char *params)
switch (rot) {
case 0:
- res = GP_FilterRotate90Alloc(*c, progress_callback);
+ res = GP_FilterRotate90_Alloc(*c, progress_callback);
break;
case 1:
- res = GP_FilterRotate180Alloc(*c, progress_callback);
+ res = GP_FilterRotate180_Alloc(*c, progress_callback);
break;
case 2:
- res = GP_FilterRotate270Alloc(*c, progress_callback);
+ res = GP_FilterRotate270_Alloc(*c, progress_callback);
break;
}
diff --git a/demos/spiv/spiv.c b/demos/spiv/spiv.c
index c6b086e..77c3bc4 100644
--- a/demos/spiv/spiv.c
+++ b/demos/spiv/spiv.c
@@ -255,15 +255,15 @@ static void *image_loader(void *ptr)
break;
case 90:
callback.priv = "Rotating image (90)";
- img = GP_FilterRotate90Alloc(ret, &callback);
+ img = GP_FilterRotate90_Alloc(ret, &callback);
break;
case 180:
callback.priv = "Rotating image (180)";
- img = GP_FilterRotate180Alloc(ret, &callback);
+ img = GP_FilterRotate180_Alloc(ret, &callback);
break;
case 270:
callback.priv = "Rotating image (270)";
- img = GP_FilterRotate270Alloc(ret, &callback);
+ img = GP_FilterRotate270_Alloc(ret, &callback);
break;
}
diff --git a/include/filters/GP_Rotate.h b/include/filters/GP_Rotate.h
index 0957010..7c39ced 100644
--- a/include/filters/GP_Rotate.h
+++ b/include/filters/GP_Rotate.h
@@ -49,9 +49,9 @@ int GP_FilterMirrorH_Raw(const GP_Context *src, GP_Context *dst,
*
* The filter works 'in-place' which means that src and dst
* may be very same context. Note that when aborting in-place operation
- * the image buffer gets into an inconsitent state.
+ * the image buffer gets into an inconsistent state.
*
- * Retruns zero on success, non-zero if operation was aborted.
+ * Returns zero on success, non-zero if operation was aborted.
*/
int GP_FilterMirrorH(const GP_Context *src, GP_Context *dst,
GP_ProgressCallback *callback);
@@ -62,8 +62,8 @@ int GP_FilterMirrorH(const GP_Context *src, GP_Context *dst,
* Returns pointer to newly allocated context, or NULL if malloc() has failed
* or operation was aborted from withing a callback.
*/
-GP_Context *GP_FilterMirrorHAlloc(const GP_Context *src,
- GP_ProgressCallback *callback);
+GP_Context *GP_FilterMirrorH_Alloc(const GP_Context *src,
+ GP_ProgressCallback *callback);
/*
* Mirror vertically
@@ -82,9 +82,9 @@ int GP_FilterMirrorV_Raw(const GP_Context *src, GP_Context *dst,
*
* The filter works 'in-place' which means that src and dst
* may be very same context. Note that when aborting in-place operation
- * the image buffer gets into an inconsitent state.
+ * the image buffer gets into an inconsistent state.
*
- * Retruns zero on success, non-zero if operation was aborted.
+ * Returns zero on success, non-zero if operation was aborted.
*/
int GP_FilterMirrorV(const GP_Context *src, GP_Context *dst,
GP_ProgressCallback *callback);
@@ -95,8 +95,8 @@ int GP_FilterMirrorV(const GP_Context *src, GP_Context *dst,
* Returns pointer to newly allocated context, or NULL if malloc() has failed
* or operation was aborted from withing a callback.
*/
-GP_Context *GP_FilterMirrorVAlloc(const GP_Context *src,
- GP_ProgressCallback *callback);
+GP_Context *GP_FilterMirrorV_Alloc(const GP_Context *src,
+ GP_ProgressCallback *callback);
/*
* Rotate context by 90, 180 and 270.
@@ -123,20 +123,20 @@ int GP_FilterRotate270_Raw(const GP_Context *src, GP_Context *dst,
int GP_FilterRotate90(const GP_Context *src, GP_Context *dst,
GP_ProgressCallback *callback);
-GP_Context *GP_FilterRotate90Alloc(const GP_Context *src,
- GP_ProgressCallback *callback);
+GP_Context *GP_FilterRotate90_Alloc(const GP_Context *src,
+ GP_ProgressCallback *callback);
int GP_FilterRotate180(const GP_Context *src, GP_Context *dst,
GP_ProgressCallback *callback);
-GP_Context *GP_FilterRotate180Alloc(const GP_Context *src,
+GP_Context *GP_FilterRotate180_Alloc(const GP_Context *src,
GP_ProgressCallback *callback);
int GP_FilterRotate270(const GP_Context *src, GP_Context *dst,
GP_ProgressCallback *callback);
-GP_Context *GP_FilterRotate270Alloc(const GP_Context *src,
- GP_ProgressCallback *callback);
+GP_Context *GP_FilterRotate270_Alloc(const GP_Context *src,
+ GP_ProgressCallback *callback);
/*
* Calls a symmetry filter on bitmap.
@@ -168,12 +168,12 @@ extern const char **GP_FilterSymmetryNames;
*/
int GP_FilterSymmetryByName(const char *symmetry);
-GP_Context *GP_FilterSymmetryAlloc(const GP_Context *src,
- GP_FilterSymmetries symmetry,
- GP_ProgressCallback *callback);
-
int GP_FilterSymmetry(const GP_Context *src, GP_Context *dst,
GP_FilterSymmetries symmetry,
GP_ProgressCallback *callback);
+GP_Context *GP_FilterSymmetry_Alloc(const GP_Context *src,
+ GP_FilterSymmetries symmetry,
+ GP_ProgressCallback *callback);
+
#endif /* FILTERS_GP_ROTATE_H */
diff --git a/libs/filters/GP_Rotate.c b/libs/filters/GP_Rotate.c
index d758535..7bfa309 100644
--- a/libs/filters/GP_Rotate.c
+++ b/libs/filters/GP_Rotate.c
@@ -84,8 +84,8 @@ int GP_FilterMirrorH(const GP_Context *src, GP_Context *dst,
return 0;
}
-GP_Context *GP_FilterMirrorHAlloc(const GP_Context *src,
- GP_ProgressCallback *callback)
+GP_Context *GP_FilterMirrorH_Alloc(const GP_Context *src,
+ GP_ProgressCallback *callback)
{
GP_Context *res;
@@ -118,8 +118,8 @@ int GP_FilterMirrorV(const GP_Context *src, GP_Context *dst,
return 0;
}
-GP_Context *GP_FilterMirrorVAlloc(const GP_Context *src,
- GP_ProgressCallback *callback)
+GP_Context *GP_FilterMirrorV_Alloc(const GP_Context *src,
+ GP_ProgressCallback *callback)
{
GP_Context *res;
@@ -163,8 +163,8 @@ int GP_FilterRotate90(const GP_Context *src, GP_Context *dst,
return 0;
}
-GP_Context *GP_FilterRotate90Alloc(const GP_Context *src,
- GP_ProgressCallback *callback)
+GP_Context *GP_FilterRotate90_Alloc(const GP_Context *src,
+ GP_ProgressCallback *callback)
{
GP_Context *res;
@@ -198,8 +198,8 @@ int GP_FilterRotate180(const GP_Context *src, GP_Context *dst,
return 0;
}
-GP_Context *GP_FilterRotate180Alloc(const GP_Context *src,
- GP_ProgressCallback *callback)
+GP_Context *GP_FilterRotate180_Alloc(const GP_Context *src,
+ GP_ProgressCallback *callback)
{
GP_Context *res;
@@ -233,8 +233,8 @@ int GP_FilterRotate270(const GP_Context *src, GP_Context *dst,
return 0;
}
-GP_Context *GP_FilterRotate270Alloc(const GP_Context *src,
- GP_ProgressCallback *callback)
+GP_Context *GP_FilterRotate270_Alloc(const GP_Context *src,
+ GP_ProgressCallback *callback)
{
GP_Context *res;
@@ -274,21 +274,21 @@ int GP_FilterSymmetryByName(const char *symmetry)
return -1;
}
-GP_Context *GP_FilterSymmetryAlloc(const GP_Context *src,
- GP_FilterSymmetries symmetry,
- GP_ProgressCallback *callback)
+GP_Context *GP_FilterSymmetry_Alloc(const GP_Context *src,
+ GP_FilterSymmetries symmetry,
+ GP_ProgressCallback *callback)
{
switch (symmetry) {
case GP_ROTATE_90:
- return GP_FilterRotate90Alloc(src, callback);
+ return GP_FilterRotate90_Alloc(src, callback);
case GP_ROTATE_180:
- return GP_FilterRotate180Alloc(src, callback);
+ return GP_FilterRotate180_Alloc(src, callback);
case GP_ROTATE_270:
- return GP_FilterRotate270Alloc(src, callback);
+ return GP_FilterRotate270_Alloc(src, callback);
case GP_MIRROR_H:
- return GP_FilterMirrorHAlloc(src, callback);
+ return GP_FilterMirrorH_Alloc(src, callback);
case GP_MIRROR_V:
- return GP_FilterMirrorVAlloc(src, callback);
+ return GP_FilterMirrorV_Alloc(src, callback);
default:
GP_DEBUG(1, "Invalid symmetry %i", (int) symmetry);
return NULL;
diff --git a/pylib/gfxprim/filters/filters.i b/pylib/gfxprim/filters/filters.i
index 11a2426..3ee7227 100644
--- a/pylib/gfxprim/filters/filters.i
+++ b/pylib/gfxprim/filters/filters.i
@@ -26,15 +26,13 @@
/* Functions returning new allocated context */
%include "GP_Rotate.h"
-%newobject GP_FilterMirrorHAlloc;
-%newobject GP_FilterMirrorVAlloc;
-%newobject GP_FilterRotate90Alloc;
-%newobject GP_FilterRotate180Alloc;
-%newobject GP_FilterRotate270Alloc;
-%newobject GP_FilterSymmetryAlloc;
+%newobject GP_FilterMirrorH_Alloc;
+%newobject GP_FilterMirrorV_Alloc;
+%newobject GP_FilterRotate90_Alloc;
+%newobject GP_FilterRotate180_Alloc;
+%newobject GP_FilterRotate270_Alloc;
+%newobject GP_FilterSymmetry_Alloc;
-
-/* Dithering */
%include "GP_Dither.h"
%newobject GP_FilterFloydSteinberg_RGB888_Alloc;
-----------------------------------------------------------------------
Summary of changes:
demos/c_simple/filters_symmetry.c | 2 +-
demos/grinder/grinder.c | 6 ++--
demos/py_simple/rotate90.py | 2 +-
demos/spiv/spiv.c | 6 ++--
doc/filters.txt | 59 ++++++++++++++++++++++++------------
include/filters/GP_Rotate.h | 34 ++++++++++----------
libs/filters/GP_Rotate.c | 36 +++++++++++-----------
pylib/gfxprim/filters/filters.i | 16 +++++-----
8 files changed, 90 insertions(+), 71 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos(a)gmail.com
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
gfxprim.git ("A simple 2D graphics library with emphasis on correctness and well-defined operation.")