[PATCH] add functional matrix-returning methods to Pycairo

2010-05-04 Thread Lawrence D'Oliveiro
I find the matrix methods in Pycairo to be an annoying hodge-podge of ones that overwrite the Matrix object in-place (init_rotate, invert) versus ones that concatenate additional transformations (rotate, scale, translate) versus ones that return new matrices without modifying the originals

Re: Cross platform TTF font render from Python [was: Load TTF from pycairo under Windows]

2009-09-18 Thread David Boddie
On Friday 18 September 2009 08:54, Laszlo Nagy wrote: > I need to render antialiased PNG images using TTF font files and UTF-8 > text. It needs to be available at least on Linux and Windows. This is > what I have tried: [...] > #4. pygame - documentation looks great, it is cross platform. But th

Re: Cross platform TTF font render from Python [was: Load TTF from pycairo under Windows]

2009-09-18 Thread Robin Becker
Laszlo Nagy wrote: ... > looks impossible to use it for creating raster images. Details here: http://osdir.com/ml/python.reportlab.user/2005-06/msg00015.html OK your error occurs because we need to set up the renderPM canvas with an initial font (for compatibility with the PDF canvas

Re: Cross platform TTF font render from Python [was: Load TTF from pycairo under Windows]

2009-09-18 Thread Laszlo Nagy
... the reportlab graphics renderPM(_renderPM) module does most things with T1 and TTF and works linux/win32. We use freetype2 internally to extract the curves from ttf and then draw them with libart_lgpl which does anti-aliasing. I just tried reportlab and RenderPM. I got the same error

Re: Cross platform TTF font render from Python [was: Load TTF from pycairo under Windows]

2009-09-18 Thread Robin Becker
value for some fonts, and there are some TTF fonts that are rendered incorrectly (UTF-8) #2. pycairo - very sophisticated, nice features, knows and does everything correctly. However, has no native support for libfreetype. I could write an extension in C and use it from Linux. Not available on

Cross platform TTF font render from Python [was: Load TTF from pycairo under Windows]

2009-09-18 Thread Laszlo Nagy
, and there are some TTF fonts that are rendered incorrectly (UTF-8) #2. pycairo - very sophisticated, nice features, knows and does everything correctly. However, has no native support for libfreetype. I could write an extension in C and use it from Linux. Not available on windows. #3

Load TTF from pycairo under Windows

2009-09-17 Thread Laszlo Nagy
Hi All, I have a program that works under Ubuntu. It loads a TTF font into pycairo, using libfreetype. The code snippet I used was taken from here: http://cairographics.org/freetypepython/ Now I need to use the same program from Microsoft Windows. But Windows does not have "libfreety

Handling events using pycairo

2008-07-17 Thread Mr SZ
Hi, I'm trying to create a rectangle when the user presses or releases the mouse over a cairo object.I'm using the eventBox to capture the mouse events. Now the problem is the shapes is beng drawn when I call it from the expose_event event handler and nothing happens when I call the same from t

Re: Re: PyCairo, PIL and StringIO

2008-01-02 Thread Jair Trejo
> > De: Fredrik Lundh <[EMAIL PROTECTED]> > A: python-list@python.org > Fecha: Wed, 02 Jan 2008 15:39:11 +0100 > Asunto: Re: PyCairo, PIL and StringIO > > Jair Trejo wrote: > > > I'm doing some image processing in PIL, and I want > to > > displ

Re: PyCairo, PIL and StringIO

2008-01-02 Thread Fredrik Lundh
Jair Trejo wrote: > I'm doing some image processing in PIL, and I want to > display the results in a GTK window using PyCairo, so > I create a Cairo image surface from the PIL Image like > this: > data > mfile = StringIO.StringIO() > final.save(mfile, f

PyCairo, PIL and StringIO

2008-01-01 Thread Jair Trejo
I'm doing some image processing in PIL, and I want to display the results in a GTK window using PyCairo, so I create a Cairo image surface from the PIL Image like this: mfile = StringIO.StringIO() final.save(mfile, format="PNG") ima = cairo.ImageSurface.

pyCairo

2007-03-18 Thread Jim
I'd like to experiment with pyCairo, but I'm having installation problems. I've downloaded cairo 1.4.0, libpng 1.2.8, zlib 1.2.3, and pycairo 1.4.0, and I've placed the DLLs for cairo, libpng, and zlib in c:\python25\dlls\. However, when I run "setup.py install"

Re: Working with C object of python object (pycairo,ctypes)

2007-02-27 Thread AngelBlaZe
Solved my own problem :-) For future reference here is the solution: class PycairoContext(Structure): _fields_ = [("PyObject_HEAD", c_byte * object.__basicsize__), ("ctx", c_void_p), ("base", c_void_p)] z = PycairoContext.from_address(id(ctx)) print z.ctx whe

Working with C object of python object (pycairo,ctypes)

2007-02-25 Thread AngelBlaZe
Can you access the c object of a python object directly? Can this be done in ctypes or directly throught python functions without reverting to forking the python module? scanario: I have pyctx object that i get in python like this: pyctx = cairo.Context(surface) defined in the python extension t

Re: Subject: ANN: pycairo release 1.2.2 now available

2006-08-20 Thread david_wahler
I'll be out of the office until approximately August 20th. If you have any questions, please email [EMAIL PROTECTED] -- David Wahler -- http://mail.python.org/mailman/listinfo/python-list