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 97e18f4407aadb708f4ea171b0cbed30b829fa0b (commit)
via e0261e32ab9dbb92520dbd59eaab2a682ab63262 (commit)
from 3ff64e524d3ea031c6573df03ad9081b7238d41a (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/97e18f4407aadb708f4ea171b0cbed30b829…
commit 97e18f4407aadb708f4ea171b0cbed30b829fa0b
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sun Nov 13 19:50:26 2011 +0100
TODO: updated TODO a bit
diff --git a/TODO b/TODO
index 8c44da0..9606fe0 100644
--- a/TODO
+++ b/TODO
@@ -2,13 +2,10 @@ What's not implemented (and should be)
--------------------------------------
* bitmaps and blitting
- - create, destroy bitmap
- * DONE - GP_ContextAlloc(), GP_ContextFree()
- blit bitmaps (should respect rotation and pixel formats)
- - bitmap rotation (in order to speed up rotated blits)
- * DONE - see filters/
+ * IN PROGRESS
- loading bitmaps from image files (jpg, png, bmp, pnm ...)
- * IN PROGRESS - some pnm formats are working see loaders/
+ * IN NEARLY FINISHED
* backends
- finish framebuffer backend (SDL does not work on most of my framebuffers)
@@ -16,6 +13,12 @@ What's not implemented (and should be)
- some overall initialization routines
- backed event handling
+* Fix contrast - pass GP_Pixel so each channel could have different increment
+
+* Meditate about bit endians and why these aren't separate pixel types
+ (which would make our lives a bit easier)
+
+
Advanced features
-----------------
@@ -25,3 +28,5 @@ Advanced features
* gfx primitives
- drawing with alpha channel
- anti aliasing
+
+* freetype support
http://repo.or.cz/w/gfxprim.git/commit/e0261e32ab9dbb92520dbd59eaab2a682ab6…
commit e0261e32ab9dbb92520dbd59eaab2a682ab63262
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sun Nov 13 19:48:33 2011 +0100
core: Fix bit endian for context functions.
diff --git a/libs/core/GP_Context.c b/libs/core/GP_Context.c
index 7ecdb37..ab27966 100644
--- a/libs/core/GP_Context.c
+++ b/libs/core/GP_Context.c
@@ -58,6 +58,7 @@ GP_Context *GP_ContextCopy(const GP_Context *src, int flag)
new->h = src->h;
new->pixel_type = src->pixel_type;
+ new->bit_endian = src->bit_endian;
/* rotation and mirroring */
new->axes_swap = src->axes_swap;
@@ -93,6 +94,8 @@ GP_Context *GP_ContextAlloc(GP_Size w, GP_Size h, GP_PixelType type)
context->h = h;
context->pixel_type = type;
+ #warning Hmm, bit endianity..., Why isn't this settled by different pixel types?
+ context->bit_endian = 0;
/* rotation and mirroring */
context->axes_swap = 0;
@@ -152,6 +155,7 @@ GP_Context *GP_ContextSubContext(GP_Context *context, GP_Context *subcontext,
ret->h = h;
ret->pixel_type = context->pixel_type;
+ ret->bit_endian = context->bit_endian;
/* rotation and mirroring */
ret->axes_swap = context->axes_swap;
-----------------------------------------------------------------------
Summary of changes:
TODO | 15 ++++++++++-----
libs/core/GP_Context.c | 4 ++++
2 files changed, 14 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 4e46a97e8f7fab77c38ac3f2c3f3620ea7ea3aeb (commit)
from 87668c03813dbb86473d1080c58810a60e56f8f8 (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/4e46a97e8f7fab77c38ac3f2c3f3620ea7ea…
commit 4e46a97e8f7fab77c38ac3f2c3f3620ea7ea3aeb
Author: BlueBear <jiri.bluebear.dluhos(a)gmail.com>
Date: Sun Nov 6 17:22:10 2011 +0100
Fixed some typos in documentation.
diff --git a/doc/filters.txt b/doc/filters.txt
index af8e467..066d04c 100644
--- a/doc/filters.txt
+++ b/doc/filters.txt
@@ -3,7 +3,7 @@ Context filters
Pixel filters for 'GP_Context'.
-The context filter is basially an function that operates on context pixels.
+The context filter is basically a function that operates on context pixels.
The result may be stored into a new bitmap or placed to bitmap passed as
argument or, in some cases, the filter could be used 'in place' so the result
is stored into the same context as the one passed as filter source.
@@ -11,7 +11,7 @@ is stored into the same context as the one passed as filter source.
Common filter API
~~~~~~~~~~~~~~~~~
-The filters have, for your convinience unified API.
+For convenience, the filters API is unified:
* Each filter returns pointer to destination context or 'NULL' on failure
* The first two arguments are source and destination
@@ -19,13 +19,13 @@ The filters have, for your convinience unified API.
Each filter function could be used in two modes.
-By passing non 'NULL' argument as filter destination user requests result to
+By passing non-'NULL' argument as filter destination user requests result to
be stored into the destination context. The context must have correct pixel
type and the context size must be big enough to store the result.
-For filters that works 'in-place' (which is explicitly said for each filter)
+For filters that work 'in-place' (which is explicitly said for each filter)
the source and the destination could be the same context. Note that this is
-not expected to work if you do several overlaping subcontextes and pass these
+not expected to work if you do several overlaping subcontexts and pass these
as arguments.
When 'NULL' is passed as destination new context for storing the result is
@@ -148,7 +148,7 @@ Rotate context by 90 degrees.
Doesn't work 'in-place' (yet).
-The destinatoin has to have the same pixel type and destination size must be
+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).
[source,c]
@@ -252,8 +252,8 @@ destination defined by 'w' and 'h'.
Nearest Neighbour Interpolation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Fast, but produces "pixelated" images may however work better for images with
-sharp edges mostly consisting of big one colour regions (eg. doesn't blur the
+Fast, but produces "pixelated" images. May however work better for images with
+sharp edges mostly consisting of big one colour regions (it doesn't blur the
result on upscaling).
Bicubic Interpolation
@@ -261,7 +261,7 @@ Bicubic Interpolation
Works well as is on image upscaling. To get decent result on downscaling
low-pass filter (gaussian blur) must be used on original image before actuall
-downscaling. To do this reasonably fast we could cheat a little first resize
-big images a little without the low-past filter, then apply low-pass filter and
+downscaling. To do this reasonably fast we could cheat a little: first resize
+big images a little without the low-pass filter, then apply low-pass filter and
finally downscale it to desired size.
diff --git a/doc/loaders.txt b/doc/loaders.txt
index 73a6b28..7a752e8 100644
--- a/doc/loaders.txt
+++ b/doc/loaders.txt
@@ -36,7 +36,7 @@ Opens file and checks for 'PNG' signature upon successful return (file could
be opened, signature matches), the opened file is returned and the file
possition points right after the end of the 'PNG' signature.
-This function is semi-internal, you should rather use functions listed bellow.
+This function is semi-internal, you should rather use functions listed below.
[source,c]
-------------------------------------------------------------------------------
@@ -71,7 +71,7 @@ GP_RetCode GP_SavePNG(const char *dst_path, GP_Context *src,
-------------------------------------------------------------------------------
Writes a Context into a 'PNG' image. If aborted by a callback, the opened file
-is closed and unliked before the call returns 'GP_EINTR'.
+is closed and removed before the call returns 'GP_EINTR'.
Currently only 'RGB888' format is supported, you should convert the GP_Context
to 'RGB888' before calling this function otherwise 'GP_ENOIMPL' will be
@@ -93,7 +93,7 @@ Opens file and checks for 'JPG' signature upon successful return (file could
be opened, signature matches), the opened file is returned and the file
possition points right after the end of the 'JPG' signature.
-This function is semi-internal, you should rather use functions listed bellow.
+This function is semi-internal, you should rather use functions listed below.
'TODO:' This is not finished yet, currently this just opens and returns the
file and the 'GP_ReadJPG()' reads the signature instead.
@@ -120,7 +120,7 @@ GP_RetCode GP_LoadJPG(const char *src_path, GP_Context **res,
-------------------------------------------------------------------------------
Same as abowe but takes path to the file as a parameter and check for the
-signature. Basically this combines both of the calls abowe.
+signature. Basically this combines both of the calls above.
[source,c]
-------------------------------------------------------------------------------
@@ -131,7 +131,7 @@ GP_RetCode GP_SaveJPG(const char *dst_path, GP_Context *src,
-------------------------------------------------------------------------------
Writes a Context into a 'JPG' image. If aborted by a callback, the opened file
-is closed and unliked before the call returns 'GP_EINTR'.
+is closed and removed before the call returns 'GP_EINTR'.
The 'JPG' format could store either 'G8' or 'RGB888' pixeltypes and you must
convert the context into one of them before this fucntions is called.
-----------------------------------------------------------------------
Summary of changes:
doc/filters.txt | 20 ++++++++++----------
doc/loaders.txt | 10 +++++-----
2 files changed, 15 insertions(+), 15 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 87668c03813dbb86473d1080c58810a60e56f8f8 (commit)
via 73686098d636fbfd72a4ae5b3bb8d2e0c241ba80 (commit)
from 025f1bba56285d57ebab61325415cd2c07a0073c (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/87668c03813dbb86473d1080c58810a60e56…
commit 87668c03813dbb86473d1080c58810a60e56f8f8
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sun Nov 6 14:24:12 2011 +0100
doc: Fixed basic types and moved progress callback docs.
diff --git a/doc/basic_types.txt b/doc/basic_types.txt
index efc9c7b..8f7283c 100644
--- a/doc/basic_types.txt
+++ b/doc/basic_types.txt
@@ -19,7 +19,8 @@ typedef enum GP_RetCode {
GP_EBADFILE, /* error in file, or bad file format */
GP_ENOENT, /* no such file or another object */
GP_ENOMEM, /* not enough memory */
- GP_EMAX,
+ GP_EINTR, /* interrupted by a callback */
+ GP_EMAX,
} GP_RetCode;
--------------------------------------------------------------------------------
@@ -35,7 +36,6 @@ Coord and Size
For drawing API there are two integer types defined the 'GP_Coord' for
coordinates and 'GP_Size' for size, length or so.
-
Color and pixel types
~~~~~~~~~~~~~~~~~~~~~
@@ -58,6 +58,7 @@ typedef enum GP_Color {
GP_COL_INVALID = -1,
GP_COL_BLACK,
...
+ GP_COL_MAX,
} GP_Color;
--------------------------------------------------------------------------------
@@ -66,15 +67,62 @@ successful match and conversion and false otherwise.
[source,c]
--------------------------------------------------------------------------------
-#include <core/GP_Color.h>
+#include <GP_Color.h>
-GP_Pixel GP_ColorToPixel(GP_Context *context, GP_Color color);
+GP_Pixel GP_ColorToPixel(GP_Color color, GP_PixelType pixel_type);
+GP_Pixel GP_ColorToContextPixel(GP_Color color, GP_Context *context);
GP_Color GP_ColorNameToColor(const char *color_name);
-
const char *GP_ColorToColorName(GP_Color color);
-bool GP_ColorNameToPixel(GP_Context *context, const char *color_name,
+bool GP_ColorNameToPixel(const char *color_name, GP_PixelType pixel_type,
GP_Pixel *pixel);
+bool GP_ColorNameToContextPixel(const char *color_name, GP_Context *context,
+ GP_Pixel *pixel);
+--------------------------------------------------------------------------------
+
+Functions to convert color to pixel and color to context pixel. The last two
+returns true if color with such name was found.
+
+[source,c]
+--------------------------------------------------------------------------------
+#include <GP_Color.h>
+
+void GP_ColorLoadPixels(GP_Pixel pixels[], GP_PixelType pixel_type);
+void GP_ColorLoadContextPixels(GP_Pixel pixels[], GP_Context *context);
--------------------------------------------------------------------------------
+Loads array of 'GP_Pixel' of size 'GP_COL_MAX', the array is then used with
+the GP_Color enum as 'pixels[GP_COL_BLACK]'.
+
+Progress Callback
+~~~~~~~~~~~~~~~~~
+
+Progress callback is a structure that stores user-defined callback function,
+pointer to store location of user data and percentage.
+
+It is passed as last parameter to functions that could take some time to
+complete and adds capability to track the operation progress as well as to
+abort the operation.
+
+Currently it's used for filters and loaders.
+
+[source,c]
+-------------------------------------------------------------------------------
+typdedef struct GP_ProgressCallback {
+ float percentage;
+ int (*callback)(struct GP_ProgressCallback *self);
+ void *priv;
+} GP_ProgressCallback;
+-------------------------------------------------------------------------------
+
+If non 'NULL' progress callback structure is passed to a function, the
+callback function is periodically called and the percentage is updated.
+
+The return value from callback could abort the function execution. If non zero
+value is returned the filter is aborted, all memory freed etc. and the
+function either returns 'NULL' if pointer is returned or 'GP_EINTR' in case
+filter returns 'GP_RetCode'.
+
+The callback, if supported, is the last parameter of a function.
+
diff --git a/doc/filters.txt b/doc/filters.txt
index c189599..af8e467 100644
--- a/doc/filters.txt
+++ b/doc/filters.txt
@@ -8,31 +8,6 @@ The result may be stored into a new bitmap or placed to bitmap passed as
argument or, in some cases, the filter could be used 'in place' so the result
is stored into the same context as the one passed as filter source.
-Progress Callback
-~~~~~~~~~~~~~~~~~
-
-Progress callback is a structure that stores user-defined callback function,
-pointer to store location of user data and percentage.
-
-[source,c]
--------------------------------------------------------------------------------
-typdedef struct GP_ProgressCallback {
- float percentage;
- int (*callback)(struct GP_ProgressCallback *self);
- void *priv;
-} GP_ProgressCallback;
--------------------------------------------------------------------------------
-
-If non 'NULL' progress callback structure is passed to a filter function, the
-callback function is periodically called and the percentage is updated.
-
-The return value from callback could abort the filter execution. If non zero
-value is returned the filter is aborted, all memory freed etc. and the filter
-either returns 'NULL' if pointer is returned or 'GP_EINTR' in case filter
-returns 'GP_RetCode'.
-
-The callback, if supported, is the last parameter of the filter function.
-
Common filter API
~~~~~~~~~~~~~~~~~
http://repo.or.cz/w/gfxprim.git/commit/73686098d636fbfd72a4ae5b3bb8d2e0c241…
commit 73686098d636fbfd72a4ae5b3bb8d2e0c241ba80
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sun Nov 6 14:17:31 2011 +0100
core: Fix typo in color API.
diff --git a/include/core/GP_Color.h b/include/core/GP_Color.h
index 4e39e07..514fe82 100644
--- a/include/core/GP_Color.h
+++ b/include/core/GP_Color.h
@@ -94,11 +94,11 @@ bool GP_ColorNameToPixel(const char *color_name, GP_PixelType pixel_type,
*
* Returns true if conversion was successful false otherwise.
*/
-static inline bool GP_ColorNameContextToPixel(const char *color_name,
- GP_PixelType pixel_type,
- GP_Pixel *pixel)
+static inline bool GP_ColorNameToContextPixel(const char *color_name,
+ GP_Context *context,
+ GP_Pixel *pixel)
{
- return GP_ColorNameToPixel(color_name, pixel_type, pixel);
+ return GP_ColorNameToPixel(color_name, context->pixel_type, pixel);
}
/*
-----------------------------------------------------------------------
Summary of changes:
doc/basic_types.txt | 60 ++++++++++++++++++++++++++++++++++++++++++----
doc/filters.txt | 25 -------------------
include/core/GP_Color.h | 8 +++---
3 files changed, 58 insertions(+), 35 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 025f1bba56285d57ebab61325415cd2c07a0073c (commit)
from fa647eaeeb44a5b63a6f2141f3ced35ccf27364a (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/025f1bba56285d57ebab61325415cd2c07a0…
commit 025f1bba56285d57ebab61325415cd2c07a0073c
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sun Nov 6 14:06:42 2011 +0100
doc: added basic documentation for JPG and PNG loaders.
diff --git a/doc/loaders.txt b/doc/loaders.txt
index a086213..73a6b28 100644
--- a/doc/loaders.txt
+++ b/doc/loaders.txt
@@ -1,6 +1,142 @@
Context loaders
---------------
-Loaders are functions GP_Context from various file formats.
+This part of gfxprim library aims to create API to load/save images from/to
+common image fileformats.
+
+Common Loader
+~~~~~~~~~~~~~
+
+[source,c]
+-------------------------------------------------------------------------------
+#include <GP_Loaders.h>
+
+GP_RetCode GP_LoadImage(const char *src_path, GP_Context **res,
+ GP_ProgressCallback *callback);
+-------------------------------------------------------------------------------
+
+Loads image from a file. The image format is now recognized by the file
+filename extension. Format detection using file signature is planned.
+
+The loading process could be aborted by process callback.
+
+PNG
+~~~
+
+Just now, the 'PNG' support is not fully finished, the Alpha channel as well
+as palletes doesn't work well or at all, we are working on that.
+
+[source,c]
+-------------------------------------------------------------------------------
+#include <GP_Loaders.h>
+
+GP_RetCode GP_OpenPNG(const char *src, FILE **f);
+-------------------------------------------------------------------------------
+
+Opens file and checks for 'PNG' signature upon successful return (file could
+be opened, signature matches), the opened file is returned and the file
+possition points right after the end of the 'PNG' signature.
+
+This function is semi-internal, you should rather use functions listed bellow.
+
+[source,c]
+-------------------------------------------------------------------------------
+#include <GP_Loaders.h>
+
+GP_RetCode GP_ReadPNG(FILE *f, GP_Context **res,
+ GP_ProgressCallback *callback);
+-------------------------------------------------------------------------------
+
+Loads 'PNG' file into context the file pointer must point to the start of the
+'PNG' data stream (eg. should point right after the signature). The context,
+to store the image to, is allocated. The loading process could by aborted by a
+callback, in such case all memory is freed and the call returns 'GP_EINTR'.
+
+[source,c]
+-------------------------------------------------------------------------------
+#include <GP_Loaders.h>
+
+GP_RetCode GP_LoadPNG(const char *src_path, GP_Context **res,
+ GP_ProgressCallback *callback);
+-------------------------------------------------------------------------------
+
+Same as abowe but takes path to the file as a parameter and check for the
+signature. Basically this combines both of the calls abowe.
+
+[source,c]
+-------------------------------------------------------------------------------
+#include <GP_Loaders.h>
+
+GP_RetCode GP_SavePNG(const char *dst_path, GP_Context *src,
+ GP_ProgressCallback *callback);
+-------------------------------------------------------------------------------
+
+Writes a Context into a 'PNG' image. If aborted by a callback, the opened file
+is closed and unliked before the call returns 'GP_EINTR'.
+
+Currently only 'RGB888' format is supported, you should convert the GP_Context
+to 'RGB888' before calling this function otherwise 'GP_ENOIMPL' will be
+returned.
+
+JPG
+~~~
+
+The 'JPG' format is supported for both 'G8' as well as 'RGB888' pixel formats.
+
+[source,c]
+-------------------------------------------------------------------------------
+#include <GP_Loaders.h>
+
+GP_RetCode GP_OpenJPG(const char *src, FILE **f);
+-------------------------------------------------------------------------------
+
+Opens file and checks for 'JPG' signature upon successful return (file could
+be opened, signature matches), the opened file is returned and the file
+possition points right after the end of the 'JPG' signature.
+
+This function is semi-internal, you should rather use functions listed bellow.
+
+'TODO:' This is not finished yet, currently this just opens and returns the
+file and the 'GP_ReadJPG()' reads the signature instead.
+
+[source,c]
+-------------------------------------------------------------------------------
+#include <GP_Loaders.h>
+
+GP_RetCode GP_ReadJPG(FILE *f, GP_Context **res,
+ GP_ProgressCallback *callback);
+-------------------------------------------------------------------------------
+
+Loads 'JPG' file into context the file pointer must point to the start of the
+'JPG' data stream (eg. should point right after the signature). The context, to
+store the image to, is allocated. The loading process could by aborted by a
+callback, in such case all memory is freed and the call returns 'GP_EINTR'.
+
+[source,c]
+-------------------------------------------------------------------------------
+#include <GP_Loaders.h>
+
+GP_RetCode GP_LoadJPG(const char *src_path, GP_Context **res,
+ GP_ProgressCallback *callback);
+-------------------------------------------------------------------------------
+
+Same as abowe but takes path to the file as a parameter and check for the
+signature. Basically this combines both of the calls abowe.
+
+[source,c]
+-------------------------------------------------------------------------------
+#include <GP_Loaders.h>
+
+GP_RetCode GP_SaveJPG(const char *dst_path, GP_Context *src,
+ GP_ProgressCallback *callback);
+-------------------------------------------------------------------------------
+
+Writes a Context into a 'JPG' image. If aborted by a callback, the opened file
+is closed and unliked before the call returns 'GP_EINTR'.
+
+The 'JPG' format could store either 'G8' or 'RGB888' pixeltypes and you must
+convert the context into one of them before this fucntions is called.
+
+'TODO:' add parameters to change the encoding settings.
PBM
~~~
-----------------------------------------------------------------------
Summary of changes:
doc/loaders.txt | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 137 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 fa647eaeeb44a5b63a6f2141f3ced35ccf27364a (commit)
from 30a31dc2d764c91837a690112c601e6363db224e (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/fa647eaeeb44a5b63a6f2141f3ced35ccf27…
commit fa647eaeeb44a5b63a6f2141f3ced35ccf27364a
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sun Nov 6 13:17:31 2011 +0100
doc: Update the filter documentation.
diff --git a/doc/filters.txt b/doc/filters.txt
index d806786..c189599 100644
--- a/doc/filters.txt
+++ b/doc/filters.txt
@@ -18,7 +18,7 @@ pointer to store location of user data and percentage.
-------------------------------------------------------------------------------
typdedef struct GP_ProgressCallback {
float percentage;
- void (*callback)(struct GP_ProgressCallback *self);
+ int (*callback)(struct GP_ProgressCallback *self);
void *priv;
} GP_ProgressCallback;
-------------------------------------------------------------------------------
@@ -26,7 +26,12 @@ typdedef struct GP_ProgressCallback {
If non 'NULL' progress callback structure is passed to a filter function, the
callback function is periodically called and the percentage is updated.
-The callback is, if supported, the last parameter of the filter function.
+The return value from callback could abort the filter execution. If non zero
+value is returned the filter is aborted, all memory freed etc. and the filter
+either returns 'NULL' if pointer is returned or 'GP_EINTR' in case filter
+returns 'GP_RetCode'.
+
+The callback, if supported, is the last parameter of the filter function.
Common filter API
~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------
Summary of changes:
doc/filters.txt | 9 +++++++--
1 files changed, 7 insertions(+), 2 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.")