From 86ece1cb42537370a924c96591b8f76d6cac1d61 Mon Sep 17 00:00:00 2001 From: kitfox Date: Sat, 8 Jun 2013 15:58:48 +0000 Subject: Tspan should now handle setting the x without the y also being specified. git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@157 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b --- src/main/java/com/kitfox/svg/Tspan.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/kitfox/svg/Tspan.java') diff --git a/src/main/java/com/kitfox/svg/Tspan.java b/src/main/java/com/kitfox/svg/Tspan.java index 1dbc734..ef017ec 100644 --- a/src/main/java/com/kitfox/svg/Tspan.java +++ b/src/main/java/com/kitfox/svg/Tspan.java @@ -51,8 +51,8 @@ import java.awt.geom.Rectangle2D; */ public class Tspan extends ShapeElement { + public static final String TAG_NAME = "tspan"; - float[] x = null; float[] y = null; float[] dx = null; @@ -169,10 +169,16 @@ public class Tspan extends ShapeElement if (x != null) { cursorX = x[0]; - cursorY = y[0]; } else if (dx != null) { cursorX += dx[0]; + } + + if (y != null) + { + cursorY = y[0]; + } else if (dy != null) + { cursorY += dy[0]; } -- cgit v1.2.3-55-g7522