diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-08-02 16:01:30 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-08-02 16:01:30 +0000 |
commit | b77b31c48f62191054c57e2b0696aef3f8654d1a (patch) | |
tree | da6ccc042523131144dc176becb267adc6b777d7 | |
parent | 5b08312353b05feebfaa7f8557bec3fdb3a9f6cd (diff) | |
download | pango-b77b31c48f62191054c57e2b0696aef3f8654d1a.tar.gz |
Fix problem with the way extents for the layout lines were summed together
Wed Aug 2 12:00:53 2000 Owen Taylor <otaylor@redhat.com>
* pango/pango-layout.c (pango_layout_get_extents):
Fix problem with the way extents for the layout lines
were summed together in the vertical direction.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-0 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-10 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-2 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-4 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-6 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-1-8 | 6 | ||||
-rw-r--r-- | pango/pango-layout.c | 14 |
8 files changed, 48 insertions, 8 deletions
@@ -1,3 +1,9 @@ +Wed Aug 2 12:00:53 2000 Owen Taylor <otaylor@redhat.com> + + * pango/pango-layout.c (pango_layout_get_extents): + Fix problem with the way extents for the layout lines + were summed together in the vertical direction. + Sat Jul 29 21:26:30 2000 Owen Taylor <otaylor@redhat.com> * examples/viewer-qt.[ch] (ViewerWindow): Remove diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0 index 0d023e6b..884bc8b4 100644 --- a/ChangeLog.pre-1-0 +++ b/ChangeLog.pre-1-0 @@ -1,3 +1,9 @@ +Wed Aug 2 12:00:53 2000 Owen Taylor <otaylor@redhat.com> + + * pango/pango-layout.c (pango_layout_get_extents): + Fix problem with the way extents for the layout lines + were summed together in the vertical direction. + Sat Jul 29 21:26:30 2000 Owen Taylor <otaylor@redhat.com> * examples/viewer-qt.[ch] (ViewerWindow): Remove diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 0d023e6b..884bc8b4 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,9 @@ +Wed Aug 2 12:00:53 2000 Owen Taylor <otaylor@redhat.com> + + * pango/pango-layout.c (pango_layout_get_extents): + Fix problem with the way extents for the layout lines + were summed together in the vertical direction. + Sat Jul 29 21:26:30 2000 Owen Taylor <otaylor@redhat.com> * examples/viewer-qt.[ch] (ViewerWindow): Remove diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index 0d023e6b..884bc8b4 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,9 @@ +Wed Aug 2 12:00:53 2000 Owen Taylor <otaylor@redhat.com> + + * pango/pango-layout.c (pango_layout_get_extents): + Fix problem with the way extents for the layout lines + were summed together in the vertical direction. + Sat Jul 29 21:26:30 2000 Owen Taylor <otaylor@redhat.com> * examples/viewer-qt.[ch] (ViewerWindow): Remove diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index 0d023e6b..884bc8b4 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,9 @@ +Wed Aug 2 12:00:53 2000 Owen Taylor <otaylor@redhat.com> + + * pango/pango-layout.c (pango_layout_get_extents): + Fix problem with the way extents for the layout lines + were summed together in the vertical direction. + Sat Jul 29 21:26:30 2000 Owen Taylor <otaylor@redhat.com> * examples/viewer-qt.[ch] (ViewerWindow): Remove diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index 0d023e6b..884bc8b4 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,9 @@ +Wed Aug 2 12:00:53 2000 Owen Taylor <otaylor@redhat.com> + + * pango/pango-layout.c (pango_layout_get_extents): + Fix problem with the way extents for the layout lines + were summed together in the vertical direction. + Sat Jul 29 21:26:30 2000 Owen Taylor <otaylor@redhat.com> * examples/viewer-qt.[ch] (ViewerWindow): Remove diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index 0d023e6b..884bc8b4 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,9 @@ +Wed Aug 2 12:00:53 2000 Owen Taylor <otaylor@redhat.com> + + * pango/pango-layout.c (pango_layout_get_extents): + Fix problem with the way extents for the layout lines + were summed together in the vertical direction. + Sat Jul 29 21:26:30 2000 Owen Taylor <otaylor@redhat.com> * examples/viewer-qt.[ch] (ViewerWindow): Remove diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 8c5cf403..2c10c41b 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -1389,7 +1389,7 @@ pango_layout_get_extents (PangoLayout *layout, x_offset = (width - line_logical.width) / 2; else x_offset = 0; - + if (ink_rect) { if (line_list == layout->lines) @@ -1406,9 +1406,10 @@ pango_layout_get_extents (PangoLayout *layout, line_ink.x + line_ink.width + x_offset) - new_pos; ink_rect->x = new_pos; - new_pos = MIN (ink_rect->y, line_ink.y + y_offset); + new_pos = MIN (ink_rect->y, + y_offset - line_logical.y + line_ink.y); ink_rect->height = MAX (ink_rect->y + ink_rect->height, - line_ink.y + line_ink.height + y_offset) - new_pos; + y_offset - line_logical.y + line_ink.y + line_ink.height) - new_pos; ink_rect->y = new_pos; } } @@ -1418,7 +1419,7 @@ pango_layout_get_extents (PangoLayout *layout, if (line_list == layout->lines) { logical_rect->x = line_logical.x; - logical_rect->y = line_logical.y; + logical_rect->y = 0; logical_rect->width = line_logical.width; logical_rect->height = line_logical.height; } @@ -1429,10 +1430,7 @@ pango_layout_get_extents (PangoLayout *layout, line_logical.x + line_logical.width) - new_pos; logical_rect->x = new_pos; - new_pos = MIN (logical_rect->y, line_logical.y + y_offset); - logical_rect->height = MAX (logical_rect->y + logical_rect->height, - line_logical.y + line_logical.height + y_offset) - new_pos; - logical_rect->y = new_pos; + logical_rect->height += line_logical.height; } } |