use of com.kitfox.svg.SVGRoot in project pivot by apache.
the class Drawing method setSize.
public void setSize(int width, int height) {
int previousWidth = getWidth();
int previousHeight = getHeight();
SVGRoot root = diagram.getRoot();
try {
root.setAttribute("width", AnimationElement.AT_XML, Integer.toString(width));
root.setAttribute("height", AnimationElement.AT_XML, Integer.toString(height));
} catch (SVGElementException exception) {
throw new RuntimeException(exception);
}
try {
diagram.updateTime(0.0);
} catch (SVGException exception) {
throw new RuntimeException(exception);
}
imageListeners.sizeChanged(this, previousWidth, previousHeight);
}
Aggregations