/** * Swaps 2 elements in children. * * @param i index of first child * @param j index of second child * @throws com.kitfox.svg.SVGException */ public void swapChildren(int i, int j) throws SVGException { if ((children == null) || (i < 0) || (i >= children.size()) || (j < 0) || (j >= children.size())) { return; } SVGElement temp = children.get(i); children.set(i, children.get(j)); children.set(j, temp); build(); }
/** * Swaps 2 elements in children. * @i index of first * @j index of second * * @return true if successful, false otherwise */ public void swapChildren(int i, int j) throws SVGException { if ((children == null) || (i < 0) || (i >= children.size()) || (j < 0) || (j >= children.size())) { return; } Object temp = children.get(i); children.set(i, children.get(j)); children.set(j, temp); build(); }
/** * Called to indicate that this tag and the tags it contains have been completely * processed, and that it should finish any load processes. */ public void loaderEndElement(SVGLoaderHelper helper) throws SVGParseException { try { build(); } catch (SVGException se) { throw new SVGParseException(se); } }
@Override protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); clipPathUnits = (getPres(sty.setName("clipPathUnits")) && sty.getStringValue().equals("objectBoundingBox")) ? CP_OBJECT_BOUNDING_BOX : CP_USER_SPACE_ON_USE; }
@Override protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); clipPathUnits = (getPres(sty.setName("clipPathUnits")) && sty.getStringValue().equals("objectBoundingBox")) ? CP_OBJECT_BOUNDING_BOX : CP_USER_SPACE_ON_USE; }
protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); clipPathUnits = (getPres(sty.setName("clipPathUnits")) && sty.getStringValue().equals("objectBoundingBox")) ? CP_OBJECT_BOUNDING_BOX : CP_USER_SPACE_ON_USE; }
protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); clipPathUnits = (getPres(sty.setName("clipPathUnits")) && sty.getStringValue().equals("objectBoundingBox")) ? CP_OBJECT_BOUNDING_BOX : CP_USER_SPACE_ON_USE; }
protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); if (getPres(sty.setName("type"))) { type = sty.getStringValue(); } }
@Override protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); if (getPres(sty.setName("type"))) { type = sty.getStringValue(); } }
@Override protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); if (getPres(sty.setName("type"))) { type = sty.getStringValue(); } }
protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); if (getPres(sty.setName("type"))) type = sty.getStringValue(); }
protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); if (getPres(sty.setName("transform"))) { xform = parseTransform(sty.getStringValue()); } }
@Override protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); if (getPres(sty.setName("transform"))) { xform = parseTransform(sty.getStringValue()); } }
@Override protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); if (getPres(sty.setName("transform"))) { xform = parseTransform(sty.getStringValue()); } }
protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); if (getPres(sty.setName("transform"))) { xform = parseTransform(sty.getStringValue()); } }
protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); if (getPres(sty.setName("offset"))) { offset = sty.getFloatValue(); String units = sty.getUnits(); if (units != null && units.equals("%")) offset /= 100f; if (offset > 1) offset = 1; if (offset < 0) offset = 0; } if (getStyle(sty.setName("stop-color"))) color = sty.getColorValue(); if (getStyle(sty.setName("stop-opacity"))) opacity = sty.getRatioValue(); }
protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); //Read glyph spacing info if (getPres(sty.setName("u1"))) u1 = sty.getStringValue(); if (getPres(sty.setName("u2"))) u2 = sty.getStringValue(); if (getPres(sty.setName("k"))) k = sty.getIntValue(); }
protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); //Read glyph spacing info if (getPres(sty.setName("u1"))) { u1 = sty.getStringValue(); } if (getPres(sty.setName("u2"))) { u2 = sty.getStringValue(); } if (getPres(sty.setName("k"))) { k = sty.getIntValue(); } }
protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); if (getPres(sty.setName("horiz-origin-x"))) horizOriginX = sty.getIntValue(); if (getPres(sty.setName("horiz-origin-y"))) horizOriginY = sty.getIntValue(); if (getPres(sty.setName("horiz-adv-x"))) horizAdvX = sty.getIntValue(); if (getPres(sty.setName("vert-origin-x"))) vertOriginX = sty.getIntValue(); if (getPres(sty.setName("vert-origin-y"))) vertOriginY = sty.getIntValue(); if (getPres(sty.setName("vert-adv-y"))) vertAdvY = sty.getIntValue(); }
protected void build() throws SVGException { super.build(); StyleAttribute sty = new StyleAttribute(); if (getPres(sty.setName("font-family"))) fontFamily = sty.getStringValue(); if (getPres(sty.setName("units-per-em"))) unitsPerEm = sty.getIntValue(); if (getPres(sty.setName("ascent"))) ascent = sty.getIntValue(); if (getPres(sty.setName("descent"))) descent = sty.getIntValue(); if (getPres(sty.setName("accent-height"))) accentHeight = sty.getIntValue(); if (getPres(sty.setName("underline-position"))) underlinePosition = sty.getIntValue(); if (getPres(sty.setName("underline-thickness"))) underlineThickness = sty.getIntValue(); if (getPres(sty.setName("strikethrough-position"))) strikethroughPosition = sty.getIntValue(); if (getPres(sty.setName("strikethrough-thickenss"))) strikethroughThickness = sty.getIntValue(); if (getPres(sty.setName("overline-position"))) overlinePosition = sty.getIntValue(); if (getPres(sty.setName("overline-thickness"))) overlineThickness = sty.getIntValue(); }