Re: regarding all the possible functions that can be assigned to PangoCairoShapeRendererFunc func



On Sep 6, 2012, at 10:51 PM, Parth Kanungo <kanungoparth gmail com> wrote:

> Thanks John.
>  
> Actually, my purpose of understanding pango_cairo_renderer_draw_shape() is that I should be able to implement pango_ft2_renderer_draw_shape() which does not exist as of now. For that,
>  
> 1. I want to know what any callback function that matches the signature of PangoCairoShapeRendererFunc used in pango_cairo_renderer_draw_shape()  does.
> 2. Can you elaborate on the bigger picture as well ?
>  
> Having understood that, I shall write my own callbacks and also the function pango_ft2_renderer_draw_shape() (which is my intended goal).
> And, Yes, I have some idea of what GObject does. I'll take another look into it.
>  

The ShapeRenderer function draws whatever you like on the supplied cairo context. See pango_attr_shape_new() [1].

I don't think that it makes sense to implement it anywhere except PangoCairo: That's the *destination*; the others (including ft2) are font sources, meaning that they provide the glyph metrics that Pango uses to layout lines of text and to render them onto a cairo surface for display. Is that what you mean by "elaborate on the bigger picture"?

Behdad, am I on the right track here?

Regards,
John Ralls

[1] http://developer.gnome.org/pango/stable/pango-Text-Attributes.html#pango-attr-shape-new 



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