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 263af6f5f591eda466248479aade49b8c3b27f29 (commit)
via 22558f86de3b76b3a9262ee5df3f8802b4c38f88 (commit)
via 59c8a325a33dcdbb0afdeb0f08b33e7359246d55 (commit)
from 7f40abdf975259a1285023927c27a9fe4c394bbd (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/263af6f5f591eda466248479aade49b8c3b2…
commit 263af6f5f591eda466248479aade49b8c3b27f29
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sat May 12 00:52:53 2012 +0200
examples: python: Fix image saving usage.
diff --git a/demos/py_simple/loaders_example.py b/demos/py_simple/loaders_example.py
index 3cebc4d..c9db630 100755
--- a/demos/py_simple/loaders_example.py
+++ b/demos/py_simple/loaders_example.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+
import sys
import gfxprim.core as core
@@ -12,7 +13,7 @@ def main():
# Load Image
img = loaders.LoadImage(sys.argv[1], None)
# Save result
- loaders.SavePNG("out.png", img, None)
+ img.Save("out.png");
if __name__ == '__main__':
main()
diff --git a/demos/py_simple/rotate90.py b/demos/py_simple/rotate90.py
index d14022d..d93756b 100755
--- a/demos/py_simple/rotate90.py
+++ b/demos/py_simple/rotate90.py
@@ -18,7 +18,7 @@ def main():
# Rotate by 90 degrees
res = filters.FilterRotate90Alloc(src, None)
# Save Image
- loaders.SaveImage(res, sys.argv[2], None);
+ res.Save(sys.argv[2])
if __name__ == '__main__':
main()
http://repo.or.cz/w/gfxprim.git/commit/22558f86de3b76b3a9262ee5df3f8802b4c3…
commit 22558f86de3b76b3a9262ee5df3f8802b4c38f88
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sat May 12 00:51:30 2012 +0200
pywrap: Fix the loaders extend context after API change.
diff --git a/pylib/gfxprim/loaders/_extend_context.py b/pylib/gfxprim/loaders/_extend_context.py
index 5e0b8c4..e252b4b 100644
--- a/pylib/gfxprim/loaders/_extend_context.py
+++ b/pylib/gfxprim/loaders/_extend_context.py
@@ -15,7 +15,7 @@ def extend_context(_context):
return c
@extend(_context)
- def Save(self, filename, format=None):
+ def Save(self, filename, format=None, callback=None):
"""Save the image in given format (or guess it from the extension)
Currently, JPG, PNG and P[BGP]M are supported, but not for all
@@ -25,15 +25,15 @@ def extend_context(_context):
format = filename.rsplit('.', 1)[-1]
format = format.lower()
if format == 'jpg':
- res = loaders_c.GP_SaveJPG(filename, self, None)
+ res = loaders_c.GP_SaveJPG(self, filename, callback)
elif format == 'png':
- res = loaders_c.GP_SavePNG(filename, self, None)
+ res = loaders_c.GP_SavePNG(self, filename, callback)
elif format == 'pbm':
- res = loaders_c.GP_SavePBM(filename, self, None)
+ res = loaders_c.GP_SavePBM(filename, self, callback)
elif format == 'pgm':
- res = loaders_c.GP_SavePGM(filename, self, None)
+ res = loaders_c.GP_SavePGM(filename, self, callback)
elif format == 'ppm':
- res = loaders_c.GP_SavePPM(filename, self, None)
+ res = loaders_c.GP_SavePPM(filename, self, callback)
else:
raise Exception("Format %r not supported.", format)
if res != 0:
http://repo.or.cz/w/gfxprim.git/commit/59c8a325a33dcdbb0afdeb0f08b33e735924…
commit 59c8a325a33dcdbb0afdeb0f08b33e7359246d55
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Sat May 12 00:41:21 2012 +0200
pywrap: Update _extend_backend.py.
diff --git a/pylib/gfxprim/backends/_extend_backend.py b/pylib/gfxprim/backends/_extend_backend.py
index 2f739fc..31c56ef 100644
--- a/pylib/gfxprim/backends/_extend_backend.py
+++ b/pylib/gfxprim/backends/_extend_backend.py
@@ -28,3 +28,12 @@ def extend_backend(_backend):
"Poll the backend for events."
return backends_c.GP_BackendPoll(self)
+ @extend(_backend)
+ def SetCaption(self, caption):
+ "Set backend window caption (if possible)"
+ return backends_c.GP_BackendSetCaption(self, caption)
+
+ @extend(_backend)
+ def Resize(self, w, h):
+ "Resize backend window (if possible)"
+ return backends_c.GP_BackendResize(self, w, h)
-----------------------------------------------------------------------
Summary of changes:
demos/py_simple/loaders_example.py | 3 ++-
demos/py_simple/rotate90.py | 2 +-
pylib/gfxprim/backends/_extend_backend.py | 9 +++++++++
pylib/gfxprim/loaders/_extend_context.py | 12 ++++++------
4 files changed, 18 insertions(+), 8 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 179ad0f8718479d653783f56c3128ef4cad8d880 (commit)
from e418052b3d66f20cca5780f21f9c493a37f3d5af (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/179ad0f8718479d653783f56c3128ef4cad8…
commit 179ad0f8718479d653783f56c3128ef4cad8d880
Author: Cyril Hrubis <metan(a)ucw.cz>
Date: Wed May 9 01:28:29 2012 +0200
backends: X11 fix off-by-one.
diff --git a/libs/backends/GP_X11.c b/libs/backends/GP_X11.c
index 02137bd..af98a67 100644
--- a/libs/backends/GP_X11.c
+++ b/libs/backends/GP_X11.c
@@ -69,7 +69,7 @@ static void x11_update_rect(GP_Backend *self, GP_Coord x0, GP_Coord y0,
XLockDisplay(x11->dpy);
XPutImage(x11->dpy, x11->win, DefaultGC(x11->dpy, x11->scr),
- x11->img, x0, y0, x0, y0, x1-x0, y1-y0);
+ x11->img, x0, y0, x0, y0, x1-x0+1, y1-y0+1);
XFlush(x11->dpy);
x11->resized_flag = 0;
@@ -117,8 +117,8 @@ static void x11_poll(GP_Backend *self)
break;
x11_update_rect(self, ev.xexpose.x, ev.xexpose.y,
- ev.xexpose.x + ev.xexpose.width,
- ev.xexpose.y + ev.xexpose.height);
+ ev.xexpose.x + ev.xexpose.width - 1,
+ ev.xexpose.y + ev.xexpose.height - 1);
break;
case ConfigureNotify:
if (ev.xconfigure.width == (int)self->context->w &&
-----------------------------------------------------------------------
Summary of changes:
libs/backends/GP_X11.c | 6 +++---
1 files changed, 3 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.")