use of net.sf.latexdraw.parser.svg.SVGElement in project latexdraw by arnobl.
the class SVGRectangular method initRectangle.
/**
* Initialises the rectangle using an SVGGElement provided by a latexdraw SVG document.
* @param elt The source element.
* @throws IllegalArgumentException If the given element is null or not valid.
*/
void initRectangle(final SVGGElement elt, final boolean withTransformation) {
final SVGElement elt2 = getLaTeXDrawElement(elt, null);
if (elt == null || !(elt2 instanceof SVGRectElement)) {
throw new IllegalArgumentException();
}
setSVGLatexdrawParameters(elt);
setSVGRectParameters((SVGRectElement) elt2);
setSVGShadowParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_SHADOW));
setSVGDbleBordersParameters(getLaTeXDrawElement(elt, LNamespace.XML_TYPE_DBLE_BORDERS));
if (withTransformation) {
applyTransformations(elt);
}
}
use of net.sf.latexdraw.parser.svg.SVGElement in project latexdraw by arnobl.
the class TestSVGBase method produceOutputShapeFrom.
@Override
public T produceOutputShapeFrom(final T sh) {
final SVGElement elt = factory.createSVGElement(sh, doc);
doc.getFirstChild().appendChild(elt);
return (T) factory.createShape(elt);
}
Aggregations