Bug 508002 – change pango_layout_pixel_extents() to round logical rect
authorBehdad Esfahbod <behdad@gnome.org>
Tue, 22 Jan 2008 02:08:36 +0000 (02:08 +0000)
committerBehdad Esfahbod <behdad@src.gnome.org>
Tue, 22 Jan 2008 02:08:36 +0000 (02:08 +0000)
commit792cb2621ea727020f361675f7637ce1207734c9
treedd9fcd088ee4b6451939b385eae1899268cba0ca
parent8eb3f4c814f512aaae70b080ec7d9acff1495f5b
Bug 508002 – change pango_layout_pixel_extents() to round logical rect

2008-01-21  Behdad Esfahbod  <behdad@gnome.org>

        Bug 508002 – change pango_layout_pixel_extents() to round logical rect
        to be inclusive

        * pango/pango-layout.c (pango_layout_get_pixel_extents),
        (pango_layout_line_get_pixel_extents): Round extents to pixels
        inclusively.  That is, pass both ink_rect and logical_rect as first
        argument to pango_extents_to_pixels().

        * pango/pango-matrix.c (pango_matrix_transform_pixel_rectangle):
        Fix rounding.

        * pango/pango-types.h:
        * docs/tmpl/glyphs.sgml:
        * pango/pango-utils.c (pango_extents_to_pixels):
        Rename pango_extents_to_pixels() function arguments from @ink_rect and
        @logical_rect to @inclusive and @nearest.  Given that this API is a
        fairly new addition and not commonly used, language bindings are
        encouraged to update their argument names accordingly.  Moreover, they
        are encouraged to wrap this function as two different calls:
        extents_to_pixels_inclusive() and extents_to_pixels_nearest(), or
        similar conventions that best reflect their native language.

svn path=/trunk/; revision=2548
ChangeLog
docs/tmpl/glyphs.sgml
pango/pango-layout.c
pango/pango-matrix.c
pango/pango-types.h
pango/pango-utils.c