public SVGMorph(Diagram diagram) {
super(diagram.getWidth(), diagram.getHeight());
for (int i=0;i<diagram.getFigureCount();i++) {
Figure figure = diagram.getFigure(i);
Figure copy = new Figure(figure.getType(), new MorphShape(figure.getShape()), figure.getData(), figure.getTransform());
figures.add(copy);
}
}