public void draw(UShape shape) { if (shape instanceof UText) { final double x = translate.getDx(); final double y = translate.getDy(); drawText(x, y, (UText) shape); } }
public void draw(UShape shape) { final double x = translate.getDx(); final double y = translate.getDy(); if (shape instanceof ULine) { drawLine(x, y, (ULine) shape); } else { getUg().apply(new UTranslate(x, ct(y))).draw(shape); } }
public void draw(UShape shape) { final double x = translate.getDx(); final double y = translate.getDy(); if (shape instanceof URectangle) { drawRectangle(x, y, (URectangle) shape); } else if (shape instanceof UPolygon) { drawPolygon(x, y, (UPolygon) shape); } else if (shape instanceof UEllipse) { drawEllipse(x, y, (UEllipse) shape); } else if (shape instanceof UText) { drawText(x, y, (UText) shape); } else if (shape instanceof UEmpty) { drawEmpty(x, y, (UEmpty) shape); } }