package gui;
import java.awt.geom.Rectangle2D;
import tikzmodel.TikzRectangle;
public class FigureRectangle extends Figure {
public FigureRectangle(TikzRectangle rect) {
super(rect);
}
@Override
public void updateShape() {
TikzRectangle rect = (TikzRectangle) f;
double x = rect.getOrigin().getX().getValue();
double y = rect.getOrigin().getY().getValue();
double width = rect.getSize().getX().getValue()-x;
double height = rect.getSize().getY().getValue()-y;
s = new Rectangle2D.Double(x, y, width, height);
}
}