Re: Wrapping pangocairo.h



> On 5/29/06, Murray Cumming <murrayc murrayc com> wrote:
>> This patch tries to wrap the new Pango+Cairo functions from here:
>> http://cvs.gnome.org/viewcvs/pango/pango/pangocairo.h?view=markup
>>
>> However, these additions are not very object orientated, and my attempt
>> to add them to the appropriate classes also seems a bit awkward. I'd
>> welcome better suggestions.
>
> I agree that it feels slightly awkward, but I really can't think of a
> better way to implement it.
>
> I wonder if this function:
> static Glib::RefPtr<Layout> create_from_cairo_context(const
> Cairo::RefPtr<Cairo::Context>& context);
>
> could be replaced with a simple overloaded create function, e.g.:
> static Glib::RefPtr<Layout> create(const
> Cairo::RefPtr<Cairo::Context>& context);

Yeah, that's probably best.

> I also have a more basic question about this pangocairo stuff.  Is
> this supposed to be an optional backend or is it supposed to be
> available everywhere?

No idea. I'd appreciate it if you managed to figure it out.

Behdad's comment here (another problem that I have to deal with) seems to
suggest that the old and new (cairo-based) stuff will coexist, though I
can't imagine how or why.
http://bugzilla.gnome.org/show_bug.cgi?id=343309

>  I notice that in the Pango documentation, it's
> located under "Rendering with Pango"
> (http://developer.gnome.org/doc/API/2.0/pango/rendering.html) which
> includes functions specific to win32 and Xft as well, but as far as I
> can tell there are no Xft- or win32-specific functions in pangomm.  Is
> the goal to wrap all of this eventually?  Or just the cairo backend
> stuff?

I'm not sure. I guess we'll have to have #ifdefs like in cairomm.

Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]