[gegl] text: fix bounding box when wrap-height is specified
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] text: fix bounding box when wrap-height is specified
- Date: Wed, 22 Aug 2018 08:03:13 +0000 (UTC)
commit 525f9ef02d9d93e156a76a291e98bb57ac1acc6d
Author: Ell <ell_se yahoo com>
Date: Wed Aug 22 03:57:53 2018 -0400
text: fix bounding box when wrap-height is specified
Take the "vertical-wrap" and "vertical-alignment" properties into
account when deciding if the bounding box needs to be recalculated.
operations/external/text.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/operations/external/text.c b/operations/external/text.c
index 3a799f80a..2666c1aee 100644
--- a/operations/external/text.c
+++ b/operations/external/text.c
@@ -43,7 +43,7 @@ property_int (wrap, _("Wrap width"), -1)
"Use -1 for no wrapping."))
ui_meta ("unit", "pixel-distance")
value_range (-1, 1000000)
-property_int (vertical_wrap, _("Wrap height"), 0)
+property_int (vertical_wrap, _("Wrap height"), -1)
description (_("Sets the height in pixels according to which the text is "
"vertically justified. "
"Use -1 for no vertical justification."))
@@ -252,7 +252,9 @@ get_bounding_box (GeglOperation *operation)
(extent->font && strcmp (extent->font, o->font)) ||
extent->size != o->size ||
extent->wrap != o->wrap ||
- extent->alignment != o->alignment)
+ extent->vertical_wrap != o->vertical_wrap ||
+ extent->alignment != o->alignment ||
+ extent->vertical_alignment != o->vertical_alignment)
{ /* get extents */
cairo_t *cr;
@@ -269,7 +271,8 @@ get_bounding_box (GeglOperation *operation)
extent->font = g_strdup (o->font);
extent->size = o->size;
extent->wrap = o->wrap;
- extent->alignment = o->alignment;
+ extent->vertical_wrap = o->vertical_wrap;
+ extent->vertical_alignment = o->vertical_alignment;
/* store the measured size for later use */
o->width = extent->defined.width - extent->defined.x;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]