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 3e26bede0b9f2319e6f69367ed84be575112022b (commit)
from e9cc5c1ae7cc5eff7b688fb8659de8ce7d4cc250 (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/3e26bede0b9f2319e6f69367ed84be575112…
commit 3e26bede0b9f2319e6f69367ed84be575112022b
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Mon Oct 31 22:15:20 2011 +0100
Fix typo in previous commit.
diff --git a/gfxprim_config.py b/gfxprim_config.py
index d603e53..d0de8d1 100644
--- a/gfxprim_config.py
+++ b/gfxprim_config.py
@@ -72,7 +72,7 @@ config = GfxPrimConfig(
('G', 6, 6),
('B', 0, 6)]),
- PixelType(name='xRGB4666', pixelsize=PS_32BPP, chanslist=[
+ PixelType(name='xRGB14666', pixelsize=PS_32BPP, chanslist=[
('R', 12, 6),
('G', 6, 6),
('B', 0, 6)]),
-----------------------------------------------------------------------
Summary of changes:
gfxprim_config.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, generate has been updated
via e9cc5c1ae7cc5eff7b688fb8659de8ce7d4cc250 (commit)
from 1ffba0f0fa47f6abe46ab253d786833f512fa79c (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/e9cc5c1ae7cc5eff7b688fb8659de8ce7d4c…
commit e9cc5c1ae7cc5eff7b688fb8659de8ce7d4cc250
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Mon Oct 31 22:07:10 2011 +0100
Add pixel type for voipac.
diff --git a/gfxprim_config.py b/gfxprim_config.py
index 15b06e7..d603e53 100644
--- a/gfxprim_config.py
+++ b/gfxprim_config.py
@@ -46,7 +46,7 @@ config = GfxPrimConfig(
# Standard RGB types
#
- PixelType(name='RGBx8888', pixelsize=PS_32BPP, chanslist=[
+ PixelType(name='xRGB8888', pixelsize=PS_32BPP, chanslist=[
('R', 16, 8),
('G', 8, 8),
('B', 0, 8)]),
@@ -71,10 +71,14 @@ config = GfxPrimConfig(
('R', 12, 6),
('G', 6, 6),
('B', 0, 6)]),
+
+ PixelType(name='xRGB4666', pixelsize=PS_32BPP, chanslist=[
+ ('R', 12, 6),
+ ('G', 6, 6),
+ ('B', 0, 6)]),
#
# Palette types
#
-
PixelType(name='P2', pixelsize=PS_2BPP_LE, chanslist=[
('P', 0, 2)]),
@@ -87,7 +91,6 @@ config = GfxPrimConfig(
#
# Gray-only pixel types
#
-
PixelType(name='G1', pixelsize=PS_1BPP_LE, chanslist=[
('V', 0, 1)]),
-----------------------------------------------------------------------
Summary of changes:
gfxprim_config.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 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, generate has been updated
via 1ffba0f0fa47f6abe46ab253d786833f512fa79c (commit)
from b6c9637eb54c10672ea89dd044cde74a4ddb4afe (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/1ffba0f0fa47f6abe46ab253d786833f512f…
commit 1ffba0f0fa47f6abe46ab253d786833f512fa79c
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Mon Oct 31 21:51:58 2011 +0100
Add SIGSEGV and SIGBUS too.
diff --git a/demos/fbshow/fbshow.c b/demos/fbshow/fbshow.c
index 77e84d1..d15bdbc 100644
--- a/demos/fbshow/fbshow.c
+++ b/demos/fbshow/fbshow.c
@@ -135,6 +135,8 @@ int main(int argc, char *argv[])
}
signal(SIGINT, sighandler);
+ signal(SIGSEGV, sighandler);
+ signal(SIGBUS, sighandler);
fb = GP_FramebufferInit("/dev/fb0");
-----------------------------------------------------------------------
Summary of changes:
demos/fbshow/fbshow.c | 2 ++
1 files changed, 2 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, generate has been updated
via b6c9637eb54c10672ea89dd044cde74a4ddb4afe (commit)
from fad5c36eca3675087d21df061b8994f6865299f8 (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/b6c9637eb54c10672ea89dd044cde74a4ddb…
commit b6c9637eb54c10672ea89dd044cde74a4ddb4afe
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Mon Oct 31 21:34:41 2011 +0100
fbshow: fix the keys.
diff --git a/demos/fbshow/fbshow.c b/demos/fbshow/fbshow.c
index 3b8fb50..77e84d1 100644
--- a/demos/fbshow/fbshow.c
+++ b/demos/fbshow/fbshow.c
@@ -208,13 +208,13 @@ int main(int argc, char *argv[])
continue;
switch (ev.val.key.key) {
+ case GP_KEY_ESC:
case GP_KEY_ENTER:
+ case GP_KEY_Q:
GP_FramebufferExit(fb);
return 0;
break;
- case GP_KEY_ESC:
case GP_KEY_SPACE:
- case GP_KEY_Q:
argn++;
if (argn >= argc)
argn = argf;
-----------------------------------------------------------------------
Summary of changes:
demos/fbshow/fbshow.c | 4 ++--
1 files changed, 2 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.")
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 83ea42ee07c41ffa84e4af2cc12dad89d8eb7096 (commit)
from 9be6758838682bf96a52cf189f94b81f18441e80 (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/83ea42ee07c41ffa84e4af2cc12dad89d8eb…
commit 83ea42ee07c41ffa84e4af2cc12dad89d8eb7096
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Mon Oct 31 16:23:11 2011 +0100
Context docs, yay!
diff --git a/doc/context.txt b/doc/context.txt
index 42c9f8c..89cf55d 100644
--- a/doc/context.txt
+++ b/doc/context.txt
@@ -9,97 +9,130 @@ Data Structure
[source,c]
-------------------------------------------------------------------------------
typedef struct GP_Context {
- uint8_t *pixels; /* Pointer to array of pixels */
- uint8_t bpp; /* Bits per pixel, always be power of two */
- uint32_t bytes_per_row; /* Bytes per row, rows are padded to bytes */
- uint32_t w; /* Width in pixels */
- uint32_t h; /* Height in pixels */
-
- GP_PixelType pixel_type; /* Enum, bitmap pixel type id */
-
- int axes_swap:1; /* Context rotation and mirroring */
- int x_swap:1;
- int y_swap:1;
+ uint8_t *pixels; /* pointer to image pixels */
+ uint8_t bpp; /* pixel length in bits */
+ uint32_t bytes_per_row;
+ uint32_t w; /* width in pixels */
+ uint32_t h; /* height in pixels */
+ /*
+ * Row bit offset. The offset is ignored for byte aligned pixels.
+ * Basically it's used for non aligned pixels with combination
+ * with subcontextes.
+ */
+ uint8_t offset;
+
+ GP_PixelType pixel_type; /* pixel format enum */
+
+ uint8_t axes_swap:1; /* swap axes */
+ uint8_t x_swap:1; /* mirror x */
+ uint8_t y_swap:1; /* mirror y */
+ uint8_t free_pixels:1; /* if set GP_ContextFree() calls free on context->pixels */
} GP_Context;
-------------------------------------------------------------------------------
-The 'GP_Context' holds meta-data needed for bitmaps. The values of pixels
-are stored as bitmap lines (aligned to bytes) in one dimensional array.
-The address of pixel could be determined by GP_PIXEL_ADDRESS(context, x, y)
-which returns byte aligned address for the pixel.
+The 'GP_Context' holds meta-data needed for bitmap drawing. The bitmap is
+stored in one dimensional array in byte-aligned lines.
Rotation
^^^^^^^^
-All gfx functions does honor rotation and mirroring. If you really need drawing
-primitives without it use variants with _Raw suffix.
-So GP_Line() is equal to GP_Line_Raw(), when all axes_swap, x_swap and y_swap
-are set to zero.
+The orientation flags affects the gfx and text drawing functions. If some of
+the flags is changed the origin and direction of the drawing is changed. Note
+that the image pixels are not affected by this at all only the coordinates
+passed to drawing functions are transformed accordingly.
-There are various macros for transforming coordinates and sizes in
-'core/GP_Transform.h'.
+If you don't need this functionality just don't touch these flags the as
+overhead of these transformations is not measurable.
-* *GP_TRANSFORM_POINT(x, y)*
-* *GP_TRANSFORM_RECT(x, y, w, h)*
-* *GP_RETRANSFORM_POINT(x, y)*
+If you really need drawing primitives that do not use the orientation flags,
+you could use variants with _Raw suffix (altghoug this is not recommended).
-Functions
-~~~~~~~~~
+There are various helper macros for transforming coordinates and sizes in
+'core/GP_Transform.h'. And helper functions to "rotate" the context flags
+clock wise and counter clock wise as well as functions to get the context size
+when taking into the accout the widht and height.
[source,c]
-------------------------------------------------------------------------------
-#include <GP.h>
+/* Transforms point user coordinates to bitmap coordinates */
+GP_TRANSFORM_POINT(context, x, y)
-uint32_t GP_ContextW(struct GP_Context *context);
-uint32_t GP_ContextH(struct GP_Context *context);
--------------------------------------------------------------------------------
+/* Transforms rectangular area coordinates and size */
+GP_TRANSFORM_RECT(context, x, y, w, h)
-Functions to get context width and height that do honor rotation flags (swaps
-W and H if axes_swap is set).
+/* Inverse transformation, bitmap coordinates to user coordinates */
+GP_RETRANSFORM_POINT(context, x, y)
+-------------------------------------------------------------------------------
[source,c]
-------------------------------------------------------------------------------
-#include <GP.h>
-
-void GP_ContextFlagsRotateCW(struct GP_Context *context);
-void GP_ContextFlagsRotateCCW(struct GP_Context *context);
+/*
+ * Rotate context flags clock wise.
+ */
+void GP_ContextFlagsRotateCW(GP_Context *context);
+
+/*
+ * Rotate context flags counter clock wise.
+ */
+void GP_ContextFlagsRotateCCW(GP_Context *context);
+
+/*
+ * Returns context W and H taking the rotation flags into the account.
+ */
+GP_Size GP_ContextW(const GP_Context *context);
+GP_Size GP_ContextH(const GP_Context *context);
-------------------------------------------------------------------------------
-Rotate context flags (x_swap, y_swap and axes_swap) clock wise, respectively
-counter clock wise.
+Context base functions
+~~~~~~~~~~~~~~~~~~~~~~
[source,c]
-------------------------------------------------------------------------------
#include <GP.h>
-GP_Context *GP_ContextAlloc(uint32_t w, uint32_t h, GP_PixelType type);
+GP_Context *GP_ContextAlloc(GP_Size w, GP_Size h, GP_PixelType type);
+
+GP_Context *GP_ContextCopy(const GP_Context *src, int flag);
+
+void GP_ContextFree(GP_Context *context);
-------------------------------------------------------------------------------
-Allocates and initializes the 'GP_Context' structure. The size for pixels is
-computed from width, height and pixel type. Moreover the rotation flags are
-set to zero and clipping rectangle is set to whole bitmap.
+The 'GP_ContextAlloc()' allocates context and initalizes the context
+structure. The orientation flags are all set to 0 and the rest of the metadata
+are calculated accordingly to width, height and pixel_type. The bitmap
+(context->pixels) is not initalized.
-The newly allocated context should be later freed with 'GP_ContextFree()'.
+The 'GP_ContextCopy()' allocates and initalizes a copy of the context passed
+as argument. If 'flag' is not zero, the bitmap (context->pixels) is copied
+otherwise it's left uninitalized.
-[source,c]
--------------------------------------------------------------------------------
-#include <GP.h>
+In both cases the resulting context should later be freed with
+'GP_ContextFree()'.
-void GP_ContextFree(GP_Context *context);
--------------------------------------------------------------------------------
+Subcontext
+~~~~~~~~~~
-Free the context allocated memory.
+Given a rectangular area inside of any context subcontext could be created.
+The resulting context could be used for all context operations (including
+subcontext creation). The only difference between allocated context and
+subcontext of such context is that the 'GP_ContextFree()' doesn't call
+'free()' on subcontext pixels (which as a matter of a fact is a pointer that
+points somewhere into to allocated area).
[source,c]
-------------------------------------------------------------------------------
#include <GP.h>
-GP_Context *GP_ContextCopy(GP_Context *context, int flag);
+GP_Context *GP_ContextSubContext(GP_Context *context, GP_Context *subcontext,
+ GP_Coord x, GP_Coord y, GP_Size w, GP_Size h);
-------------------------------------------------------------------------------
-Copy a context. Allocates and initializes a 'GP_Context'. If flag is set to
-GP_CONTEXT_WITH_PIXELS, the actual bitmap is copied from context to newly
-allocated context, otherwise only context meta-data are copied.
+Creates subcontext of a context. The rectangular area must fit into the context.
+
+If subcontext pointer is 'NULL' the context structure is allocated otherwise
+the metadata are filled into the context structure pointed by subcontext
+pointer.
-The newly created context should be later freed with 'GP_ContextFree()'.
+In both cases pointer to subcontext or NULL (in case of 'malloc(2)' failure) is
+returned.
diff --git a/include/core/GP_Context.h b/include/core/GP_Context.h
index ef2940e..d6b0f6a 100644
--- a/include/core/GP_Context.h
+++ b/include/core/GP_Context.h
@@ -133,15 +133,19 @@ void GP_ContextFree(GP_Context *context);
GP_RetCode GP_ContextDump(GP_Context *context, const char *path);
/*
- * Rotates context flags.
+ * Rotates context flags clock wise.
*/
void GP_ContextFlagsRotateCW(GP_Context *context);
+
+/*
+ * Rotates context flags counter clock wise.
+ */
void GP_ContextFlagsRotateCCW(GP_Context *context);
/*
- * Returns context width and height.
+ * Returns context width and height taking the rotation flags into a account.
*/
-static inline uint32_t GP_ContextW(const GP_Context *context)
+static inline GP_Size GP_ContextW(const GP_Context *context)
{
if (context->axes_swap)
return context->h;
@@ -149,7 +153,7 @@ static inline uint32_t GP_ContextW(const GP_Context *context)
return context->w;
}
-static inline uint32_t GP_ContextH(const GP_Context *context)
+static inline GP_Size GP_ContextH(const GP_Context *context)
{
if (context->axes_swap)
return context->w;
-----------------------------------------------------------------------
Summary of changes:
doc/context.txt | 141 ++++++++++++++++++++++++++++-----------------
include/core/GP_Context.h | 12 +++-
2 files changed, 95 insertions(+), 58 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, generate has been updated
via 4061392c7024e648dc2bcfde720ce11e0f70dedb (commit)
via f7f55767a6e8855d5e70a7220a5c9c1511251de5 (commit)
from a47b50d43100a1e3314a818f5bcdf37bf560d8d0 (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/4061392c7024e648dc2bcfde720ce11e0f70…
commit 4061392c7024e648dc2bcfde720ce11e0f70dedb
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Mon Oct 31 13:42:26 2011 +0100
Update filters docs, more to come.
diff --git a/doc/filters.txt b/doc/filters.txt
index d741abb..0f54e7a 100644
--- a/doc/filters.txt
+++ b/doc/filters.txt
@@ -1,44 +1,202 @@
Context filters
---------------
-Pixel filters for 'GP_Context'. The context filter is basially an function that modifies context somehow (may even allocate new context to store result).
+Pixel filters for 'GP_Context'.
-Rotation
-~~~~~~~~
+The context filter is basially an 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.
+
+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;
+ void (*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 callback is, if supported, the last parameter of the filter function.
+
+Common filter API
+~~~~~~~~~~~~~~~~~
+
+The filters have, for your convinience unified API.
+
+* Each filter returns pointer to destination context or 'NULL' on failure
+* The first two arguments are source and destination
+* The last argument is progress callback
+
+Each filter function could be used in two modes.
+
+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)
+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
+as arguments.
+
+When 'NULL' is passed as destination new context for storing the result is
+allocated and returned.
+
+The return value is either pointer to destination context or 'NULL' either
+when malloc(2) has failed or if the filter is not implemented for such
+pixel_type, parameters, etc...
+
+[source,c]
+-------------------------------------------------------------------------------
+/*
+ * Filter common api.
+ */
+GP_Context *GP_FilterFoo(const GP_Context *src, GP_Context *dst,
+ foo params ...,
+ GP_ProgressCallback *callback);
+-------------------------------------------------------------------------------
+
+
+Filters also exists in _Raw variant (that just takes source context,
+destination context, filters parameters and progress callback). These filter
+APIs are used for internal implementation and shouldn't be called by user as
+the destination is expected to be crafted exactly for storing the filter
+result and there are 'NO' sanity checks in place.
+
+'You could use these at your own risk'
+
+[source,c]
+-------------------------------------------------------------------------------
+/*
+ * Raw filter common api.
+ */
+void GP_FilterFoo_Raw(const GP_Context *src, GP_Context *dst,
+ foo params ...,
+ GP_ProgressCallback *callback);
+-------------------------------------------------------------------------------
+
+Rotation and Symmetries
+~~~~~~~~~~~~~~~~~~~~~~~
+
+[source,c]
+-------------------------------------------------------------------------------
+#include <GP_Filters.h>
+
+GP_Context *GP_FilterMirrorH(const GP_Context *src, GP_Context *dst,
+ 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.
[source,c]
-------------------------------------------------------------------------------
#include <GP_Filters.h>
-GP_RetCode GP_MirrorH(GP_Context *context);
+GP_Context *GP_FilterMirrorV(const GP_Context *src, GP_Context *dst,
+ GP_ProgressCallback *callback);
-------------------------------------------------------------------------------
-Mirrors context pixels horizontaly and updates the context metadata.
+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.
[source,c]
-------------------------------------------------------------------------------
#include <GP_Filters.h>
-GP_RetCode GP_MirrorV(GP_Context *context);
+GP_Context *GP_FilterRotate90(const GP_Context *src, GP_Context *dst,
+ GP_ProgressCallback *callback);
-------------------------------------------------------------------------------
-Mirrors context pixels verticaly and updates the context metadata.
+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
+big enough to fit rotated context (eg. W and H are swapped).
[source,c]
-------------------------------------------------------------------------------
#include <GP_Filters.h>
-GP_RetCode GP_RotateCW(GP_Context *context);
+GP_Context *GP_FilterRotate180(const GP_Context *src, GP_Context *dst,
+ GP_ProgressCallback *callback);
-------------------------------------------------------------------------------
-Rotates context clock wise and updates the context metadata.
+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.
[source,c]
-------------------------------------------------------------------------------
#include <GP_Filters.h>
-GP_RetCode GP_RotateCCW(GP_Context *context);
+GP_Context *GP_FilterRotate270(const GP_Context *src, GP_Context *dst,
+ GP_ProgressCallback *callback);
-------------------------------------------------------------------------------
-Rotates context counter clock wise and updates the context metadata.
+Rotate context by 270 degrees.
+
+Doesn't work 'in-place' (yet).
+
+The destinatoin 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]
+-------------------------------------------------------------------------------
+typedef enum GP_FilterSymmetries {
+ GP_ROTATE_90,
+ GP_ROTATE_CW = GP_ROTATE_90,
+ GP_ROTATE_180,
+ GP_ROTATE_270,
+ GP_ROTATE_CCW = GP_ROTATE_270,
+ GP_MIRROR_H,
+ GP_MIRROR_V,
+} GP_FilterSymmetries;
+
+GP_Context *GP_FilterSymmetry(const GP_Context *src, GP_Context *dst,
+ GP_FilterSymmetries symmetry,
+ GP_ProgressCallback *callback);
+-------------------------------------------------------------------------------
+
+Catch all function for symmetry filters.
+
+
+Linear filters
+~~~~~~~~~~~~~~
+
+[source,c]
+-------------------------------------------------------------------------------
+#include <GP_Filters.h>
+
+GP_Context *GP_FilterGaussianBlur(const GP_Context *src, GP_Context *dst,
+ float sigma_x, float sigma_y,
+ GP_ProgressCallback *callback);
+-------------------------------------------------------------------------------
+
+Gaussian blur filter.
+
+Works 'in-place'.
+
+'TODO:' this filter is implemented for RGB888 only.
http://repo.or.cz/w/gfxprim.git/commit/f7f55767a6e8855d5e70a7220a5c9c151125…
commit f7f55767a6e8855d5e70a7220a5c9c1511251de5
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Mon Oct 31 13:41:20 2011 +0100
Remove unused accessor.
diff --git a/include/core/GP_Context.h b/include/core/GP_Context.h
index 00138df..80794d9 100644
--- a/include/core/GP_Context.h
+++ b/include/core/GP_Context.h
@@ -23,8 +23,8 @@
* *
*****************************************************************************/
-#ifndef GP_CONTEXT_H
-#define GP_CONTEXT_H
+#ifndef CORE_GP_CONTEXT_H
+#define CORE_GP_CONTEXT_H
#include <stdint.h>
#include <unistd.h>
@@ -59,12 +59,6 @@ typedef struct GP_Context {
uint8_t free_pixels:1; /* If set pixels are freed on GP_ContextFree */
} GP_Context;
-/* Returns the pixel type used by the context. */
-static inline GP_PixelType GP_GetContextPixelType(const GP_Context *context)
-{
- return context->pixel_type;
-}
-
/* Determines the address of a pixel within the context's image.
* Rows and columns are specified in the image's orientation
* (i.e. they might not be XY if the image is rotated).
@@ -157,4 +151,4 @@ static inline uint32_t GP_ContextH(const GP_Context *context)
return context->h;
}
-#endif /* GP_CONTEXT_H */
+#endif /* CORE_GP_CONTEXT_H */
-----------------------------------------------------------------------
Summary of changes:
doc/filters.txt | 180 ++++++++++++++++++++++++++++++++++++++++++---
include/core/GP_Context.h | 12 +--
2 files changed, 172 insertions(+), 20 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.")