/** Display this shape on the screen. */ private void paint(Graphics2D pen) { if (myVisibilityStatus) { myView.paint(pen, myCenter, mySize, myDirection); } if (highlight) { pen.setColor(Color.RED); pen.drawRect( (int) myCenter.getX() - WIDTH_OF_TURTLE_ICON / 2, (int) myCenter.getY() - HEIGHT_OF_TURTLE_ICON / 2, WIDTH_OF_TURTLE_ICON, HEIGHT_OF_TURTLE_ICON); } for (StraightLine l : myLines) { l.paint(pen); } for (Location l : myStamps) { myView.paint(pen, l, mySize, myDirection); } }
/** Describes how to draw the image on the screen. */ public void paint(Graphics2D pen, Point2D center, Dimension size) { paint(pen, center, size, 0); }