R: wrong get_extents results



Hi Oscar,

thanks a lot for you tips.
I've the same problem (I'm using you same release of cairo and pango)

Regards,

Andrea

-----Messaggio originale-----
Da: gtk-i18n-list-bounces gnome org [mailto:gtk-i18n-list-bounces gnome org] Per conto di Oscar Lazzarino
Inviato: lunedì 31 maggio 2010 15.14
A: gtk-i18n-list gnome org
Oggetto: Re: wrong get_extents results

On 05/31/2010 02:40 PM, Oscar Lazzarino wrote:
> Hi
>
> I'm having a problem with pango_layout_get_extents. It seems to me that
> the results are wrong when used on a layout with center or right
> alignment, while pango_layout_iter_get_line_extents returns the correct
> rectangle for every line.
>
> In attachment I'm sending a small test program, and also the resulting
> png image (done with cairo).
>
> Compiled with
>
> gcc -o testPangoLayouts `pkg-config --cflags --libs pangocairo`
> testPangoLayouts.c
>
> Am I missing something? Or is this a bug?
>
> I'm using pango 1.20.1 and cairo 1.6.0.
>

OK, I found the problem.

Looks like the results of pango_layout_get_extents and 
pango_layout_iter_get_line_extents have different meanings

This image should clarify it.

I wonder if this behaviour was intended...

The updated code is attached, also, if someone is curious...

O.


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