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 f7ec65e213cd4f5b98add6853202db0d6da72578 (commit) via b660efde6e125ce8a21af032111e5d7a6edf333a (commit) via 4c094f1071eb954f50bbd0cb12679f19aa96c933 (commit) via aef9a4ebb755774df1edc57ab416b4943fd8dd17 (commit) via b22cf524cd809ff41d1efb85e0012b10305ee3a8 (commit) via 6347df8f95d78f9d3b290dca3c7ddff5b9dcb62a (commit) via 0f4d9f51c8594de68df626ff14ce4bad2e429f86 (commit) via bab98282d38d2f0b1526f0259d42ad7b8362e596 (commit) from 85375ef6c62a32f40443803cfba409e0b4e56ae5 (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/f7ec65e213cd4f5b98add6853202db0d6da72...
commit f7ec65e213cd4f5b98add6853202db0d6da72578 Author: Cyril Hrubis metan@ucw.cz Date: Thu Mar 5 17:42:13 2015 +0100
install: Install headers into $INCLUDEDIR/gfxprim/
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/configure b/configure index 57f7174..7d7a3c0 100755 --- a/configure +++ b/configure @@ -300,7 +300,7 @@ def write_gfxprim_config(cfg, libs): # General switches cflags and ldflags f.write('\t--help) echo "$USAGE"; exit 0;;\n') f.write('\t--list-modules) echo "%s"; exit 0;;\n' % ' '.join(modules)) - f.write('\t--cflags) echo -n "-I/usr/include/GP/%s";;\n' % + f.write('\t--cflags) echo -n "-I/usr/include/gfxprim/%s";;\n' % libs.get_cflags('core')) f.write('\t--libs) echo -n "-lgfxprim -lrt -lm %s ";;\n' % libs.get_linker_flags('core'))
diff --git a/install.sh b/install.sh index dbb2ca8..80a8ef3 100755 --- a/install.sh +++ b/install.sh @@ -11,15 +11,15 @@ BIN_LOC="${DESTDIR}/$BINDIR"
# Headers echo "INSTALL headers ($HEADER_LOC)" -install -m 775 -d "${HEADER_LOC}/GP" +install -m 775 -d "${HEADER_LOC}/gfxprim" for i in `ls include/`; do if [ -d "include/$i" ]; then echo " $i" - install -m 775 -d "${HEADER_LOC}/GP/$i" - install -m 664 "include/$i/"*.h "${HEADER_LOC}/GP/$i" + install -m 775 -d "${HEADER_LOC}/gfxprim/$i" + install -m 664 "include/$i/"*.h "${HEADER_LOC}/gfxprim/$i" else if [ "$i" != "Makefile" ]; then - install -m 664 "include/$i" "${HEADER_LOC}/GP/$i" + install -m 664 "include/$i" "${HEADER_LOC}/gfxprim/$i" fi fi done
http://repo.or.cz/w/gfxprim.git/commit/b660efde6e125ce8a21af032111e5d7a6edf3...
commit b660efde6e125ce8a21af032111e5d7a6edf333a Author: Cyril Hrubis metan@ucw.cz Date: Sun Feb 8 21:18:17 2015 +0100
tests: loaders: DataStorage: Add tests for GetByPath
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/tests/loaders/DataStorage.c b/tests/loaders/DataStorage.c index 16ffcae..ba5e6bf 100644 --- a/tests/loaders/DataStorage.c +++ b/tests/loaders/DataStorage.c @@ -200,6 +200,87 @@ static int wrong_type_add(void) return TST_SUCCESS; }
+static int get_by_path(void) +{ + GP_DataStorage *storage; + GP_DataNode *ret, *res; + int fail = 0; + + storage = GP_DataStorageCreate(); + + if (!storage) + return TST_FAILED; + + GP_DataNode data = { + .type = GP_DATA_STRING, + .id = "string", + .value.str = "test string", + }; + + ret = GP_DataStorageAdd(storage, NULL, &data); + + if (!ret) { + tst_msg("DataStorageAdd() failed"); + GP_DataStorageDestroy(storage); + return TST_FAILED; + } + + /* Global path */ + res = GP_DataStorageGetByPath(storage, NULL, "/string"); + + if (res != ret) { + tst_msg("DataStorageGetByPath(storage, NULL, '/string')"); + fail++; + } + + /* Local path */ + res = GP_DataStorageGetByPath(NULL, GP_DataStorageRoot(storage), "string"); + + if (res != ret) { + tst_msg("DataStorageGetByPath(NULL, root, 'string')"); + fail++; + } + + /* Non existing in global path */ + res = GP_DataStorageGetByPath(storage, NULL, "/does-not-exist"); + + if (res) { + tst_msg("DataStorageGetByPath(storage, NULL, '/does-not-exist')"); + fail++; + } + + /* Non existing in local path */ + res = GP_DataStorageGetByPath(NULL, GP_DataStorageRoot(storage), "does-not-exist"); + + if (res) { + tst_msg("DataStorageGetByPath(NULL, root, 'does-not-exist')"); + fail++; + } + + /* Empty dict for local path */ + res = GP_DataStorageGetByPath(NULL, NULL, "does-not-exist"); + + if (res) { + tst_msg("DataStorageGetByPath(NULL, NULL, 'does-not-exist')"); + fail++; + } + + /* Empty storage for global path */ + res = GP_DataStorageGetByPath(NULL, NULL, "/does-not-exist"); + + if (res) { + tst_msg("DataStorageGetByPath(NULL, NULL, '/does-not-exist')"); + fail++; + } + + GP_DataStorageDestroy(storage); + + if (fail) + return TST_FAILED; + + return TST_SUCCESS; +} + const struct tst_suite tst_suite = { .suite_name = "Data Storage", .tests = { @@ -223,6 +304,10 @@ const struct tst_suite tst_suite = { .tst_fn = wrong_type_add, .flags = TST_CHECK_MALLOC},
+ {.name = "GP_DataStorageGetByPath()", + .tst_fn = get_by_path, + .flags = TST_CHECK_MALLOC}, + {.name = NULL}, } };
http://repo.or.cz/w/gfxprim.git/commit/4c094f1071eb954f50bbd0cb12679f19aa96c...
commit 4c094f1071eb954f50bbd0cb12679f19aa96c933 Author: Cyril Hrubis metan@ucw.cz Date: Sun Feb 8 20:34:57 2015 +0100
libs: loaders: DataStorage: Fix duplicate node add
Print warning and return when trying to add a node with duplicate id.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/libs/loaders/GP_DataStorage.c b/libs/loaders/GP_DataStorage.c index b453bea..9210d72 100644 --- a/libs/loaders/GP_DataStorage.c +++ b/libs/loaders/GP_DataStorage.c @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * * Boston, MA 02110-1301 USA * * * - * Copyright (C) 2009-2014 Cyril Hrubis metan@ucw.cz * + * Copyright (C) 2009-2015 Cyril Hrubis metan@ucw.cz * * * *****************************************************************************/
@@ -254,6 +254,7 @@ GP_DataNode *GP_DataStorageAdd(GP_DataStorage *self, GP_DataNode *node, GP_DataNode *data) { struct record *rec; + struct GP_DataNode *dup;
GP_DEBUG(2, "Adding '%s' to storage (%p)", data->id, self);
@@ -263,6 +264,14 @@ GP_DataNode *GP_DataStorageAdd(GP_DataStorage *self, return NULL; }
+ dup = GP_DataStorageGet(self, node, data->id); + + if (dup) { + GP_WARN("Trying to insert allready existing node '%s'", + data->id); + return NULL; + } + rec = new_record(self, data);
if (!rec)
http://repo.or.cz/w/gfxprim.git/commit/aef9a4ebb755774df1edc57ab416b4943fd8d...
commit aef9a4ebb755774df1edc57ab416b4943fd8dd17 Author: Cyril Hrubis metan@ucw.cz Date: Sun Feb 8 20:28:56 2015 +0100
core: Debug: Do not print trace on WARNING for now
The thing is that backtrace() calls __libc_dlopen() that allocates memory, which is then freed at the end of the program.
That causes false possitives memleaks for tests that trigger WARNING.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/libs/core/GP_Debug.c b/libs/core/GP_Debug.c index 011b604..4fbecdc 100644 --- a/libs/core/GP_Debug.c +++ b/libs/core/GP_Debug.c @@ -112,7 +112,6 @@ void GP_DebugPrint(int level, const char *file, const char *function, int line, fprintf(stderr, "*** BUG: %s:%s():%u: ", file, function, line); break; case GP_DEBUG_WARN: - GP_DebugPrintCStack(); fprintf(stderr, "*** WARNING: %s:%s():%u: ", file, function, line); break; case GP_DEBUG_TODO:
http://repo.or.cz/w/gfxprim.git/commit/b22cf524cd809ff41d1efb85e0012b10305ee...
commit b22cf524cd809ff41d1efb85e0012b10305ee3a8 Author: Cyril Hrubis metan@ucw.cz Date: Sun Feb 8 19:32:35 2015 +0100
tests: framework: log2html.py: Fix malloc stats
The number of chunks is just number not Bytes.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/tests/framework/log2html.py b/tests/framework/log2html.py index c1dac38..fd3bd8f 100755 --- a/tests/framework/log2html.py +++ b/tests/framework/log2html.py @@ -94,7 +94,7 @@ class MallocStats:
print(' <td bgcolor="#ffffaa">') print(' <center><small>%s</small></center>' % - bytes_conv(self.total_chunks)) + self.total_chunks) print(' </td>')
print(' <td bgcolor="#ffffaa">') @@ -104,7 +104,7 @@ class MallocStats:
print(' <td bgcolor="#ffffaa">') print(' <center><small>%s</small></center>' % - bytes_conv(self.max_chunks)) + self.max_chunks) print(' </td>')
print(' <td bgcolor="#ffffaa">') @@ -114,7 +114,7 @@ class MallocStats:
print(' <td bgcolor="#ffffaa">') print(' <center><small>%s</small></center>' % - bytes_conv(self.lost_chunks)) + self.lost_chunks) print(' </td>')
print(' </tr>')
http://repo.or.cz/w/gfxprim.git/commit/6347df8f95d78f9d3b290dca3c7ddff5b9dcb...
commit 6347df8f95d78f9d3b290dca3c7ddff5b9dcb62a Author: Cyril Hrubis metan@ucw.cz Date: Sun Feb 8 18:35:24 2015 +0100
demos: py_simple: gfx.py: Handle SYS_RESIZE event
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/demos/py_simple/gfx.py b/demos/py_simple/gfx.py index 81d78b3..c79d879 100755 --- a/demos/py_simple/gfx.py +++ b/demos/py_simple/gfx.py @@ -93,10 +93,10 @@ def polygon(bk):
polygon = [(10, 10), (10, (h-10)//3), ((w-10)//3, (h-10)//2), (10, 2*(h-10)//3), (10, h-10), ((w-10)//3, h-10), - ((w-10)//2, 2*(h-10)//3), (2*(w-10)//3, h-10), + ((w-10)//2, 2*(h-10)//3), (2*(w-10)//3, h-10), (w-10, h-10), (w-10, 2*(h-10)//3), (2*(w-10)//3, (h-10)//2), - (w-10, (h-10)//3), (w-10, 10), (2*(w-10)//3, 10), - ((w-10)//2, (h-10)//3), ((w-10)//3, 10)] + (w-10, (h-10)//3), (w-10, 10), (2*(w-10)//3, 10), + ((w-10)//2, (h-10)//3), ((w-10)//3, 10)]
bk.context.gfx.Polygon(polygon, fg)
@@ -162,6 +162,10 @@ def main(): if (ev.type == input.EV_SYS): if (ev.code == input.EV_SYS_QUIT): sys.exit(0) + elif (ev.code == input.EV_SYS_RESIZE): + bk.ResizeAck() + fill(bk) + bk.Flip()
if __name__ == '__main__': main()
http://repo.or.cz/w/gfxprim.git/commit/0f4d9f51c8594de68df626ff14ce4bad2e429...
commit 0f4d9f51c8594de68df626ff14ce4bad2e429f86 Author: Cyril Hrubis metan@ucw.cz Date: Sun Feb 8 18:28:10 2015 +0100
gfx: Remove FillRect_AA
It never worked anyway.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/build/syms/GFX_symbols.txt b/build/syms/GFX_symbols.txt index c3566ae..3ffccdc 100644 --- a/build/syms/GFX_symbols.txt +++ b/build/syms/GFX_symbols.txt @@ -109,11 +109,6 @@ GP_PutPixelAA_Raw_Clipped GP_ArcSegment GP_ArcSegment_Raw
-GP_FillRectXYXY_AA -GP_FillRectXYXY_AA_Raw -GP_FillRectXYWH_AA -GP_FillRectXYWH_AA_Raw - GP_AngleInRange GP_NormalizeAngle
diff --git a/include/gfx/GP_Gfx.h b/include/gfx/GP_Gfx.h index f0ed470..5b7e286 100644 --- a/include/gfx/GP_Gfx.h +++ b/include/gfx/GP_Gfx.h @@ -55,6 +55,5 @@ #include "GP_VLineAA.h" #include "GP_HLineAA.h" #include "GP_LineAA.h" -#include "GP_RectAA.h"
#endif /* GP_GFX_H */ diff --git a/include/gfx/GP_RectAA.h b/include/gfx/GP_RectAA.h deleted file mode 100644 index fc6d9e9..0000000 --- a/include/gfx/GP_RectAA.h +++ /dev/null @@ -1,56 +0,0 @@ -/***************************************************************************** - * This file is part of gfxprim library. * - * * - * Gfxprim is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Lesser General Public * - * License as published by the Free Software Foundation; either * - * version 2.1 of the License, or (at your option) any later version. * - * * - * Gfxprim is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with gfxprim; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * Copyright (C) 2009-2012 Cyril Hrubis metan@ucw.cz * - * * - *****************************************************************************/ - -#ifndef GFX_GP_RECT_AA_H -#define GFX_GP_RECT_AA_H - -#include "core/GP_Context.h" - -/* Filled Rectangle */ - -void GP_FillRectXYXY_AA(GP_Context *context, GP_Coord x0, GP_Coord y0, - GP_Coord x1, GP_Coord y1, GP_Pixel pixel); - -void GP_FillRectXYXY_AA_Raw(GP_Context *context, GP_Coord x0, GP_Coord y0, - GP_Coord x1, GP_Coord y1, GP_Pixel pixel); - -void GP_FillRectXYWH_AA(GP_Context *context, GP_Coord x, GP_Coord y, - GP_Size w, GP_Size h, GP_Pixel pixel); - -void GP_FillRectXYWH_AA_Raw(GP_Context *context, GP_Coord x, GP_Coord y, - GP_Size w, GP_Size h, GP_Pixel pixel); - -/* The XYXY argument set is the default */ -static inline void GP_FillRect_AA(GP_Context *context, GP_Coord x0, GP_Coord y0, - GP_Coord x1, GP_Coord y1, GP_Pixel pixel) -{ - GP_FillRectXYXY_AA(context, x0, y0, x1, y1, pixel); -} - -static inline void GP_FillRect_AA_Raw(GP_Context *context, - GP_Coord x0, GP_Coord y0, - GP_Coord x1, GP_Coord y1, GP_Pixel pixel) -{ - GP_FillRectXYXY_AA_Raw(context, x0, y0, x1, y1, pixel); -} - -#endif /* GFX_GP_RECT_AA_H */ diff --git a/libs/gfx/GP_RectAA.c b/libs/gfx/GP_RectAA.c deleted file mode 100644 index 6026cad..0000000 --- a/libs/gfx/GP_RectAA.c +++ /dev/null @@ -1,181 +0,0 @@ -/***************************************************************************** - * This file is part of gfxprim library. * - * * - * Gfxprim is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Lesser General Public * - * License as published by the Free Software Foundation; either * - * version 2.1 of the License, or (at your option) any later version. * - * * - * Gfxprim is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * - * Lesser General Public License for more details. * - * * - * You should have received a copy of the GNU Lesser General Public * - * License along with gfxprim; if not, write to the Free Software * - * Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301 USA * - * * - * Copyright (C) 2009-2012 Cyril Hrubis metan@ucw.cz * - * * - *****************************************************************************/ - -#include "core/GP_Transform.h" -#include "core/GP_GetPutPixel.h" -#include "core/GP_MixPixels.h" -#include "core/GP_FixedPoint.h" -#include "core/GP_GammaCorrection.h" -#include "GP_Rect.h" -#include "GP_RectAA.h" - -void GP_FillRectXYXY_AA_Raw(GP_Context *context, GP_Coord x0, GP_Coord y0, - GP_Coord x1, GP_Coord y1, GP_Pixel pixel) -{ - GP_CHECK_CONTEXT(context); - - if (x0 > x1) - GP_SWAP(x0, x1); - - if (y0 > y1) - GP_SWAP(y0, y1); - - /* Outer coordinates */ - GP_Coord out_x0 = GP_FP_FLOOR_TO_INT(x0 + GP_FP_1_2); - GP_Coord out_y0 = GP_FP_FLOOR_TO_INT(y0 + GP_FP_1_2); - GP_Coord out_x1 = GP_FP_CEIL_TO_INT(x1 - GP_FP_1_2); - GP_Coord out_y1 = GP_FP_CEIL_TO_INT(y1 - GP_FP_1_2); - - /* Size */ - GP_Size w = x1 - x0; - GP_Size h = y1 - y0; - - /* Special case, vertical 1px line */ - if (out_x0 == out_x1) { - uint8_t mix = w; - GP_Coord i; - - /* Special case 1px 100% width line */ - if (w == GP_FP_1) - mix = 255; - - for (i = out_y0; i <= out_y1; i++) { - GP_Pixel p = GP_GetPixel_Raw_Clipped(context, out_x0, i); - p = GP_MixPixels(pixel, p, mix, context->pixel_type); - GP_PutPixel_Raw_Clipped(context, out_x0, i, p); - } - - return; - } - - /* Special case, horizontal 1px line */ - if (out_y0 == out_y1) { - uint8_t mix = w; - GP_Coord i; - - /* Special case 1px 100% height line */ - if (h == GP_FP_1) - mix = 255; - - for (i = out_x0; i <= out_x1; i++) { - GP_Pixel p = GP_GetPixel_Raw_Clipped(context, i, out_y0); - p = GP_MixPixels(pixel, p, mix, context->pixel_type); - GP_PutPixel_Raw_Clipped(context, i, out_y0, p); - } - - return; - } - - /* This are integer coordinates of the "inner" rectangle */ - GP_Coord in_x0 = GP_FP_CEIL_TO_INT(x0 + GP_FP_1_2); - GP_Coord in_y0 = GP_FP_CEIL_TO_INT(y0 + GP_FP_1_2); - GP_Coord in_x1 = GP_FP_FLOOR_TO_INT(x1 - GP_FP_1_2); - GP_Coord in_y1 = GP_FP_FLOOR_TO_INT(y1 - GP_FP_1_2); - - /* - * Draw the inner rectanle in 100% intensity. - * - * Note that if out_x0 == in_x1 is 2px wide and both lines has less than - * 100% intensity. The same goes for out_y0 == in_y1. - */ - if (in_x1 >= in_x0 && (out_x0 != in_x1 || out_x1 != in_x0) - && in_y1 >= in_y0 && (out_y0 != in_y1 || out_y1 != in_y0)) - GP_FillRectXYXY_Raw(context, in_x0, in_y0, in_x1, in_y1, pixel); - - /* if the outer and innter coordinates doesn't match, draw blurred edge */ - if (in_y0 != out_y0) { - uint8_t mix = GP_FP_FROM_INT(in_y0) + GP_FP_1_2 - y0; - GP_Coord i; - - for (i = out_x0; i <= out_x1; i++) { - GP_Pixel p = GP_GetPixel_Raw_Clipped(context, i, out_y0); - p = GP_MixPixels(pixel, p, mix, context->pixel_type); - GP_PutPixel_Raw_Clipped(context, i, out_y0, p); - } - } - - if (in_y1 != out_y1) { - uint8_t mix = y1 - GP_FP_FROM_INT(in_y0) - GP_FP_1_2; - GP_Coord i; - - for (i = out_x0; i <= out_x1; i++) { - GP_Pixel p = GP_GetPixel_Raw_Clipped(context, i, out_y1); - p = GP_MixPixels(pixel, p, mix, context->pixel_type); - GP_PutPixel_Raw_Clipped(context, i, out_y1, p); - } - } - - if (in_x0 != out_x0) { - uint8_t mix = GP_FP_FROM_INT(in_x0) + GP_FP_1_2 - x0; - GP_Coord i; - - for (i = out_y0; i <= out_y1; i++) { - GP_Pixel p = GP_GetPixel_Raw_Clipped(context, out_x0, i); - p = GP_MixPixels(pixel, p, mix, context->pixel_type); - GP_PutPixel_Raw_Clipped(context, out_x0, i, p); - } - } - - if (in_x1 != out_x1) { - uint8_t mix = x1 - GP_FP_FROM_INT(in_x1) - GP_FP_1_2; - GP_Coord i; - - for (i = out_y0; i <= out_y1; i++) { - GP_Pixel p = GP_GetPixel_Raw_Clipped(context, out_x1, i); - p = GP_MixPixels(pixel, p, mix, context->pixel_type); - GP_PutPixel_Raw_Clipped(context, out_x1, i, p); - } - } - - //TODO four corner pixels!!! -} - -void GP_FillRectXYWH_AA_Raw(GP_Context *context, GP_Coord x, GP_Coord y, - GP_Size w, GP_Size h, GP_Pixel pixel) -{ - if (w == 0 || h == 0) - return; - - GP_FillRectXYXY_AA_Raw(context, x, y, - x + w - GP_FP_1, y + h - GP_FP_1, pixel); -} - -void GP_FillRectXYXY_AA(GP_Context *context, GP_Coord x0, GP_Coord y0, - GP_Coord x1, GP_Coord y1, GP_Pixel pixel) -{ - GP_CHECK_CONTEXT(context); - - GP_TRANSFORM_POINT_FP(context, x0, y0); - GP_TRANSFORM_POINT_FP(context, x1, y1); - - GP_FillRectXYXY_AA_Raw(context, x0, y0, x1, y1, pixel); -} - -void GP_FillRectXYWH_AA(GP_Context *context, GP_Coord x, GP_Coord y, - GP_Size w, GP_Size h, GP_Pixel pixel) -{ - if (w == 0 || h == 0) - return; - - GP_FillRectXYXY_AA(context, x, y, - x + w - GP_FP_1, y + h - GP_FP_1, pixel); -} diff --git a/pylib/gfxprim/gfx/__init__.py b/pylib/gfxprim/gfx/__init__.py index daf99e1..5c92d66 100644 --- a/pylib/gfxprim/gfx/__init__.py +++ b/pylib/gfxprim/gfx/__init__.py @@ -37,7 +37,7 @@ def _init(module):
for name in [ 'ArcSegment', 'Circle', 'Ellipse', 'FillCircle', 'FillEllipse', - 'FillRect', 'FillRect_AA', 'FillRing', + 'FillRect', 'FillRing', 'FillTetragon', 'FillTriangle', 'HLine', 'HLineAA', 'Line', 'LineAA', 'PutPixelAA', 'Rect', 'Ring', 'Tetragon', 'Triangle', 'VLine', 'VLineAA']: diff --git a/pylib/gfxprim/gfx/gfx.i b/pylib/gfxprim/gfx/gfx.i index e09e633..5e4f447 100644 --- a/pylib/gfxprim/gfx/gfx.i +++ b/pylib/gfxprim/gfx/gfx.i @@ -27,7 +27,6 @@ %include "GP_VLineAA.h" %include "GP_HLineAA.h" %include "GP_LineAA.h" -%include "GP_RectAA.h"
%inline %{ static GP_Coord *GP_Polygon_unpack_coordinates(PyObject *coords) diff --git a/tests/pylib/test_gfx.py b/tests/pylib/test_gfx.py index 292202a..b9314b2 100644 --- a/tests/pylib/test_gfx.py +++ b/tests/pylib/test_gfx.py @@ -30,7 +30,6 @@ gfx_params = { 'FillEllipse': 'IIIIP', 'FillPolygon': ([(0,0),(1,1),(1,0)], 0, {}), 'FillRect': 'IIIIP', - 'FillRect_AA': 'IIIIP', # Fixpoint, originally 'FFFFP' 'FillRing': 'IIIIP', 'FillTetragon': 'IIIIIIIIP', 'FillTriangle': 'IIIIIIP',
http://repo.or.cz/w/gfxprim.git/commit/bab98282d38d2f0b1526f0259d42ad7b8362e...
commit bab98282d38d2f0b1526f0259d42ad7b8362e596 Author: Cyril Hrubis metan@ucw.cz Date: Sun Feb 8 18:11:46 2015 +0100
demos; c_simple: randomshapetest: Fixes
* Remove AA rectangle
* Handle SYS_RESIZE event
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/demos/c_simple/randomshapetest.c b/demos/c_simple/randomshapetest.c index e5f4e5d..6b970f0 100644 --- a/demos/c_simple/randomshapetest.c +++ b/demos/c_simple/randomshapetest.c @@ -44,8 +44,7 @@ static int pause_flag = 0; #define SHAPE_RECTANGLE 4 #define SHAPE_TETRAGON 5 #define SHAPE_POLYGON 6 -#define SHAPE_RECTANGLE_AA 7 -#define SHAPE_LAST 7 +#define SHAPE_LAST 6 static int shape = SHAPE_FIRST;
/* Draw outlines? */ @@ -155,20 +154,6 @@ void draw_random_polygon(GP_Pixel pixel) GP_FillPolygon_Raw(win->context, 5, xy, pixel); }
-void draw_random_rectangle_AA(GP_Pixel pixel) -{ - int x0, y0, x1, y1; - random_point_AA(win->context, &x0, &y0); - random_point_AA(win->context, &x1, &y1); - -// if (fill_flag) - GP_FillRect_AA(win->context, x0, y0, x1, y1, pixel); - -// if (outline_flag) -// GP_Rect(win->context, x0, y0, x1, y1, white); -} - - void clear_screen(void) { GP_Fill(win->context, black); @@ -204,9 +189,6 @@ void redraw_screen(void) case SHAPE_POLYGON: draw_random_polygon(pixel); break; - case SHAPE_RECTANGLE_AA: - draw_random_rectangle_AA(pixel); - break; } }
@@ -252,6 +234,14 @@ void event_loop(void) exit(0); break; } + break; + case GP_EV_SYS: + if (ev.code == GP_EV_SYS_RESIZE) { + GP_BackendResizeAck(win); + clear_screen(); + GP_BackendFlip(win); + } + break; } } }
-----------------------------------------------------------------------
Summary of changes: build/syms/GFX_symbols.txt | 5 - configure | 2 +- demos/c_simple/randomshapetest.c | 28 ++---- demos/py_simple/gfx.py | 10 ++- include/gfx/GP_Gfx.h | 1 - include/gfx/GP_RectAA.h | 56 ------------ install.sh | 8 +- libs/core/GP_Debug.c | 1 - libs/gfx/GP_RectAA.c | 181 -------------------------------------- libs/loaders/GP_DataStorage.c | 11 ++- pylib/gfxprim/gfx/__init__.py | 2 +- pylib/gfxprim/gfx/gfx.i | 1 - tests/framework/log2html.py | 6 +- tests/loaders/DataStorage.c | 85 ++++++++++++++++++ tests/pylib/test_gfx.py | 1 - 15 files changed, 120 insertions(+), 278 deletions(-) delete mode 100644 include/gfx/GP_RectAA.h delete mode 100644 libs/gfx/GP_RectAA.c
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.