changeset 4296:dc2725737249

RT-31667 Text visual bounds is incorrect when strikeThrough/underline set to true
author Yao Wang <yao.w.wang@oracle.com>
date Mon, 15 Jul 2013 18:35:11 -0700
parents a1f0f26e732e
children 06979c6310cd
files modules/graphics/src/main/java/javafx/scene/text/Text.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/javafx/scene/text/Text.java	Mon Jul 15 17:04:32 2013 -0700
+++ b/modules/graphics/src/main/java/javafx/scene/text/Text.java	Mon Jul 15 18:35:11 2013 -0700
@@ -330,6 +330,9 @@
         TextLayout layout = getTextLayout();
         /* TextLayout has the text shape cached */
         int type = TextLayout.TYPE_TEXT;
+        if (isStrikethrough()) type |= TextLayout.TYPE_STRIKETHROUGH;
+        if (isUnderline()) type |= TextLayout.TYPE_UNDERLINE;
+        
         TextSpan filter = null;
         if (isSpan()) {
             /* Spans are always relative to the top */