Re: ink_rect and logical_rect; bug or feature?

On 12/19/01 6:38 PM, "Owen Taylor" <otaylor redhat com> wrote:

> The coordinates for pango_layout_get_[pixel]_extents are from
> the upper left of the layout, for both the ink and the logical
> rect. (On the other hand, for layout_line_get_extents, the
> origin is on the baseline.)

But if ink_rect is supposed to be relative to the top left, then I think I
see a bug in get_line_extents_layout_coords, because when line ==
layout->lines->data, it does line_ink_layout->y = line_ink->y, and I can't
see how that can possibly be right.

> These numbers look a little odd, though it's perfectly legitimtae
> for the ink rect to extend beyond the logical rect in some
> circumstances. I'd have to know more details about the text,
> options, font, etc, to know whether they are correct or not.

The text was some file name (all ASCII characters, but this happened for all
the file names), the font was the default one for a widget without any rc
file machinations, width was set to some value wide enough to include the
whole name on one line, alignment was PANGO_ALIGN_CENTER, and spacing was 0.
I can get you some more specific information if that will help you track it
down, but I suspect code inspection of get_line_extents_layout_coords will
take care of it.

    -- Darin

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