[cairo] pango.Context from a cairo.ImageSurface ?
dev at ceglarek.eu
Wed Feb 28 09:00:50 PST 2007
On Mon, 2007-02-26 at 15:02 -0500, Behdad Esfahbod wrote:
> On Mon, 2007-02-26 at 14:29 -0500, Tobias Ceglarek wrote:
> > When I call cairo.Context(surface) I get a cairo.Context.
> Then do a pangocairo.CairoContext(cairo_context) to get a
> cr = cairo.Context (surface)
> pcr = pangocairo.CairoContext (cr)
> layout = pcr.create_layout ()
> pcr.show_layout (layout, ...)
> The confusing point here is that pangocairo.CairoContext is a subclass
> of a cairo.Context that adds support for rendering to it using Pango.
> It's not a subclass of pango.Context.
Thank you. Now I have a pango.CairoContext and I can draw text with
layout = pctx.create_layout()
Works fine. It recognize my font description ...
but layout.set_alignment(pango.ALIGN_CENTER) does not work. It has no
Could anyone tell me why?
More information about the cairo