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 6d5f5d2abd2ff4494d7c38418e4bdf686acb3f89 (commit)
from 7d194009dcecc9c2d668bdd6f7add3cbf8bdd680 (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/6d5f5d2abd2ff4494d7c38418e4bdf686acb…
commit 6d5f5d2abd2ff4494d7c38418e4bdf686acb3f89
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Thu Aug 18 23:08:11 2011 +0200
Remove the unconsistent check for zero size.
The zero size check in XYW, XYH and XYWH primitives
makes them unconsistent with the rest of the code.
Eg.
GP_HLine(c, x, y, x, p) draws one pixel.
GP_HLineXYW(c, x, y, 0, p) wasn't drawing anything.
diff --git a/libs/gfx/GP_HLine.c b/libs/gfx/GP_HLine.c
index 9154b45..b19a146 100644
--- a/libs/gfx/GP_HLine.c
+++ b/libs/gfx/GP_HLine.c
@@ -34,8 +34,8 @@ DEF_HLINE_BU_FN(GP_HLine_Raw_1BPP_LE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_W
DEF_HLINE_BU_FN(GP_HLine_Raw_1BPP_BE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels1bpp)
DEF_HLINE_BU_FN(GP_HLine_Raw_2BPP_LE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels2bpp)
DEF_HLINE_BU_FN(GP_HLine_Raw_2BPP_BE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels2bpp)
-DEF_HLINE_BU_FN(GP_HLine_Raw_4BPP_LE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels2bpp)
-DEF_HLINE_BU_FN(GP_HLine_Raw_4BPP_BE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels2bpp)
+DEF_HLINE_BU_FN(GP_HLine_Raw_4BPP_LE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels4bpp)
+DEF_HLINE_BU_FN(GP_HLine_Raw_4BPP_BE, GP_Context*, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels4bpp)
DEF_HLINE_FN(GP_HLine_Raw_8BPP, GP_Context *, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels8bpp)
DEF_HLINE_FN(GP_HLine_Raw_16BPP, GP_Context *, GP_Pixel, GP_PIXEL_ADDR, GP_WritePixels16bpp)
@@ -54,11 +54,7 @@ void GP_HLineXXY_Raw(GP_Context *context, GP_Coord x0, GP_Coord x1,
void GP_HLineXYW_Raw(GP_Context *context, GP_Coord x, GP_Coord y, GP_Size w,
GP_Pixel pixel)
{
- /* zero width: do not draw anything */
- if (w == 0)
- return;
-
- GP_HLineXXY_Raw(context, x, x + w - 1, y, pixel);
+ GP_HLineXXY_Raw(context, x, x + w, y, pixel);
}
void GP_HLineXXY(GP_Context *context, GP_Coord x0, GP_Coord x1, GP_Coord y,
@@ -82,9 +78,5 @@ void GP_HLineXXY(GP_Context *context, GP_Coord x0, GP_Coord x1, GP_Coord y,
void GP_HLineXYW(GP_Context *context, GP_Coord x, GP_Coord y, GP_Size w,
GP_Pixel pixel)
{
- /* zero width: do not draw anything */
- if (w == 0)
- return;
-
- GP_HLineXXY(context, x, x + w - 1, y, pixel);
+ GP_HLineXXY(context, x, x + w, y, pixel);
}
diff --git a/libs/gfx/GP_Rect.c b/libs/gfx/GP_Rect.c
index eee96f5..f6a303e 100644
--- a/libs/gfx/GP_Rect.c
+++ b/libs/gfx/GP_Rect.c
@@ -76,11 +76,7 @@ void GP_FillRectXYXY_Raw(GP_Context *context, GP_Coord x0, GP_Coord y0,
void GP_FillRectXYWH_Raw(GP_Context *context, GP_Coord x, GP_Coord y,
GP_Size w, GP_Size h, GP_Pixel pixel)
{
- /* zero width/height: draw nothing */
- if (w == 0 || h == 0)
- return;
-
- GP_FillRectXYXY_Raw(context, x, y, x + w - 1, y + h - 1, pixel);
+ GP_FillRectXYXY_Raw(context, x, y, x + w, y + h, pixel);
}
void GP_FillRectXYXY(GP_Context *context, GP_Coord x0, GP_Coord y0,
@@ -97,9 +93,5 @@ void GP_FillRectXYXY(GP_Context *context, GP_Coord x0, GP_Coord y0,
void GP_FillRectXYWH(GP_Context *context, GP_Coord x, GP_Coord y,
GP_Size w, GP_Size h, GP_Pixel pixel)
{
- /* zero width/height: draw nothing */
- if (w == 0 || h == 0)
- return;
-
- GP_FillRectXYXY(context, x, y, x + w - 1, y + h - 1, pixel);
+ GP_FillRectXYXY(context, x, y, x + w, y + h, pixel);
}
diff --git a/libs/gfx/GP_VLine.c b/libs/gfx/GP_VLine.c
index e6d7f01..2af65f7 100644
--- a/libs/gfx/GP_VLine.c
+++ b/libs/gfx/GP_VLine.c
@@ -43,11 +43,7 @@ void GP_VLineXYY_Raw(GP_Context *context, GP_Coord x, GP_Coord y0,
void GP_VLineXYH_Raw(GP_Context *context, GP_Coord x, GP_Coord y, GP_Size h,
GP_Pixel pixel)
{
- /* zero height: do not draw anything */
- if (h == 0)
- return;
-
- GP_VLineXYY(context, x, y, y + h - 1, pixel);
+ GP_VLineXYY(context, x, y, y + h, pixel);
}
void GP_VLineXYY(GP_Context *context, GP_Coord x, GP_Coord y0,
@@ -71,9 +67,5 @@ void GP_VLineXYY(GP_Context *context, GP_Coord x, GP_Coord y0,
void GP_VLineXYH(GP_Context *context, GP_Coord x, GP_Coord y, GP_Size h,
GP_Pixel pixel)
{
- /* zero height: do not draw anything */
- if (h == 0)
- return;
-
- GP_VLineXYY(context, x, y, y + h - 1, pixel);
+ GP_VLineXYY(context, x, y, y + h, pixel);
}
-----------------------------------------------------------------------
Summary of changes:
libs/gfx/GP_HLine.c | 16 ++++------------
libs/gfx/GP_Rect.c | 12 ++----------
libs/gfx/GP_VLine.c | 12 ++----------
3 files changed, 8 insertions(+), 32 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 7d194009dcecc9c2d668bdd6f7add3cbf8bdd680 (commit)
from 72f38ee0793386a9c792698c6f4b3a4a79ee1352 (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/7d194009dcecc9c2d668bdd6f7add3cbf8bd…
commit 7d194009dcecc9c2d668bdd6f7add3cbf8bdd680
Author: Tomas Gavenciak <gavento(a)ucw.cz>
Date: Wed Aug 17 12:12:09 2011 +0200
Added docs for pixel size and type
diff --git a/doc/pixel_types.txt b/doc/pixel_types.txt
new file mode 100644
index 0000000..bf5acd8
--- /dev/null
+++ b/doc/pixel_types.txt
@@ -0,0 +1,56 @@
+Supported pixel sizes
+---------------------
+
+The default maximum size of a single pixel is 32 bits. The limitations would
+be analoguous for other settings (8, 16 and 64).
+
+Pixel sizes 8, 16 and 32 are supported on all systems and generally very efficient
+(assigment is used for all operations). 24 bpp is supported, but the operations may be
+slightly slower.
+
+Pixel sizes 1, 2 and 4 depend on bit-endian setting and are supported on all systems.
+Subcontext operations and blits may be slower in case of a different subpixel alignment.
+
+Pixel sizes not divisible by 8 and between 9 and 23 depend on the bit endian -
+the endianity of the system must match the bit-endianity. The other combination
+is not supported at all - it would be too complicated and probably very inefficient
+to decode/encode.
+
+Pixel sizes between 25 and 31 are not supported at all, as these pixels might not fit
+into a 32-bit byte-aligned window.
+
+The pixel sizes to be supported must be explicitely listed in the configuration file,
+each including the bit-endian if required (see below).
+
+Supported pixel types
+---------------------
+
+The supported files are declared in the configuration file and must use only the declared
+pixel sizes with bit-endians. RGB, monochrome and palette formats are supported,
+all with optional alpha channel (the alpha support level for palette types is not decided yet).
+
+The pixel type
+
+System endianity
+----------------
+
+The library should work on both little-endian and big-endian systems.
+Other variants than the standard (0123 and 3210) are not supported.
+
+In case of pixel sizes between 9 and 23 (except for 16), the system endianity must match the
+selected bit endianity. It is safe to build the library with the disallowed combination
+format, as long as it is not used (compile-time warning is generated).
+
+Bit-endianity
+-------------
+
+With 1, 2 and 4 bpp formats, there are two possible orders of pixels within a byte,
+both seen in the wild. The two are enumerated in `GP_BIT_ENDIAN`:
+
+`GP_BIT_ENDIAN_LE`::
+ Less significant bits contain pixels with lower indices.
+ Also used for irrelevant bit-endian (8, 15, 24, 32bpp).
+`GP_BIT_ENDIAN_BE`::
+ More significant bits contain pixels with lower indices.
+
+
-----------------------------------------------------------------------
Summary of changes:
doc/pixel_types.txt | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 56 insertions(+), 0 deletions(-)
create mode 100644 doc/pixel_types.txt
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 8880f10fb3be9e8518ae73b26e4c3723a148aba9 (commit)
via d6a28af5ee112a717db36b0e4fa1b1fab3268a05 (commit)
from a76e111f516303a55c27a14782055770637c764a (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/8880f10fb3be9e8518ae73b26e4c3723a148…
commit 8880f10fb3be9e8518ae73b26e4c3723a148aba9
Merge: a76e111 d6a28af
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Tue Aug 16 17:44:16 2011 +0200
Merge /home/metan/gfxprim into generate
http://repo.or.cz/w/gfxprim.git/commit/d6a28af5ee112a717db36b0e4fa1b1fab326…
commit d6a28af5ee112a717db36b0e4fa1b1fab3268a05
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Tue Apr 2 16:59:51 2013 +0200
Fix compatibility with older python and jinja by Tomas.
diff --git a/include/core/GP_Convert.gen.h.t b/include/core/GP_Convert.gen.h.t
index 2b4681a..05a5606 100644
--- a/include/core/GP_Convert.gen.h.t
+++ b/include/core/GP_Convert.gen.h.t
@@ -49,9 +49,9 @@
#include "GP_Context.h"
#include "GP_Pixel.h"
-##
-## Loop around "central" pixel types
-##
+{#
+ # Loop around "central" pixel types
+-#}
%% for pt in [pixeltypes_dict['RGB888'], pixeltypes_dict['RGBA8888']]
%% for i in pixeltypes
%% if not i.is_unknown()
diff --git a/libs/core/GP_Convert.gen.c.t b/libs/core/GP_Convert.gen.c.t
index 8b65a75..2969066 100644
--- a/libs/core/GP_Convert.gen.c.t
+++ b/libs/core/GP_Convert.gen.c.t
@@ -6,9 +6,9 @@
#include "GP_Convert.h"
-##
-## Loop around "central" pixel types
-##
+{#
+ # Loop around pixel types central for the conversion.
+-#}
%% for pt in [pixeltypes_dict['RGB888'], pixeltypes_dict['RGBA8888']]
GP_Pixel GP_{{ pt.name }}ToPixel(GP_Pixel pixel, GP_PixelType type)
@@ -62,9 +62,6 @@ GP_Pixel GP_PixelTo{{ pt.name }}(GP_Pixel pixel, GP_PixelType type)
return p;
}
-##
-## Loop arpund "central" pixel types
-##
%% endfor
%% endblock body
diff --git a/pylib/gfxprim/render_utils.py b/pylib/gfxprim/render_utils.py
index 12e2472..2c71b50 100644
--- a/pylib/gfxprim/render_utils.py
+++ b/pylib/gfxprim/render_utils.py
@@ -14,7 +14,6 @@ def template_error(s, *args):
def create_environment(config, template_dir):
env = jinja2.Environment(
line_statement_prefix = "%%",
- line_comment_prefix = "##",
undefined = jinja2.StrictUndefined,
loader = jinja2.FileSystemLoader(template_dir))
env.globals['undefined'] = jinja2.StrictUndefined()
-----------------------------------------------------------------------
Summary of changes:
include/core/GP_Convert.gen.h.t | 6 +++---
libs/core/GP_Convert.gen.c.t | 9 +++------
pylib/gfxprim/render_utils.py | 1 -
3 files changed, 6 insertions(+), 10 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 a76e111f516303a55c27a14782055770637c764a (commit)
from cc8d797431865afe675e257b7f06513adcb7fac4 (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/a76e111f516303a55c27a14782055770637c…
commit a76e111f516303a55c27a14782055770637c764a
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Tue Aug 16 16:10:06 2011 +0200
Move the key name down.
diff --git a/tests/SDL/input.c b/tests/SDL/input.c
index b956e62..ebc7820 100644
--- a/tests/SDL/input.c
+++ b/tests/SDL/input.c
@@ -66,8 +66,8 @@ void draw_event(GP_Event *ev)
if (ev->type != GP_EV_KEY)
return;
- GP_FillRect(&context, 0, 0, 200, 20, black_pixel);
- GP_Text(&context, NULL, 0, 0, GP_ALIGN_RIGHT|GP_VALIGN_BOTTOM,
+ GP_FillRect(&context, 0, 0, 150, 35, black_pixel);
+ GP_Text(&context, NULL, 20, 20, GP_ALIGN_RIGHT|GP_VALIGN_BOTTOM,
GP_EventKeyName(ev->val.key.key), white_pixel);
SDL_Flip(display);
}
-----------------------------------------------------------------------
Summary of changes:
tests/SDL/input.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.")