@Override public Graphics create() { return new EscherGraphics(escherGroup, workbook, foreground, font, verticalPointsPerPixel ); }
@Override public void drawPolygon(int xPoints[], int yPoints[], int nPoints) { int right = findBiggest(xPoints); int bottom = findBiggest(yPoints); int left = findSmallest(xPoints); int top = findSmallest(yPoints); HSSFPolygon shape = escherGroup.createPolygon(new HSSFChildAnchor(left,top,right,bottom) ); shape.setPolygonDrawArea(right - left, bottom - top); shape.setPoints(addToAll(xPoints, -left), addToAll(yPoints, -top)); shape.setLineStyleColor(foreground.getRed(), foreground.getGreen(), foreground.getBlue()); shape.setLineWidth(0); shape.setNoFill(true); }
public void dispose() { getEscherGraphics().dispose(); getG2D().dispose(); getImg().flush(); }
@Override public boolean drawImage(Image image, int i, int j, int k, int l, ImageObserver imageobserver) { return drawImage(image, i, j, i + k, j + l, 0, 0, image.getWidth(imageobserver), image.getHeight(imageobserver), imageobserver); }
@Override public void drawLine(int x1, int y1, int x2, int y2) { drawLine(x1,y1,x2,y2,0); }
public void drawString(String string, float x, float y) { getEscherGraphics().drawString(string, (int)x, (int)y); }
public void drawOval(int x, int y, int width, int height) { getEscherGraphics().drawOval(x,y,width,height); // draw(new java.awt.geom.Ellipse2D.Float(x, y, width, height)); }
public void drawPolygon(int xPoints[], int yPoints[], int nPoints) { getEscherGraphics().drawPolygon(xPoints, yPoints, nPoints); }
public void drawRect(int x, int y, int width, int height) { _escherGraphics.drawRect(x,y,width,height); }
public void fillOval(int x, int y, int width, int height) { _escherGraphics.fillOval(x,y,width,height); }
@Override public boolean drawImage(Image image, int i, int j, Color color, ImageObserver imageobserver) { return drawImage(image, i, j, image.getWidth(imageobserver), image.getHeight(imageobserver), color, imageobserver); }
public void drawLine(int x1, int y1, int x2, int y2, int width) { getEscherGraphics().drawLine(x1,y1,x2,y2, width); }
public void drawString(String string, int x, int y) { getEscherGraphics().drawString(string, x, y); }
public void drawOval(int x, int y, int width, int height) { getEscherGraphics().drawOval(x,y,width,height); // draw(new java.awt.geom.Ellipse2D.Float(x, y, width, height)); }
public void drawPolygon(int xPoints[], int yPoints[], int nPoints) { getEscherGraphics().drawPolygon(xPoints, yPoints, nPoints); }
public void drawRect(int x, int y, int width, int height) { _escherGraphics.drawRect(x,y,width,height); }
public void fillOval(int x, int y, int width, int height) { _escherGraphics.fillOval(x,y,width,height); }
int nPoints) int right = findBiggest(xPoints); int bottom = findBiggest(yPoints); int left = findSmallest(xPoints); int top = findSmallest(yPoints); HSSFPolygon shape = escherGroup.createPolygon(new HSSFChildAnchor(left,top,right,bottom) ); shape.setPolygonDrawArea(right - left, bottom - top); shape.setPoints(addToAll(xPoints, -left), addToAll(yPoints, -top)); shape.setLineStyleColor(foreground.getRed(), foreground.getGreen(), foreground.getBlue()); shape.setFillColor(foreground.getRed(), foreground.getGreen(), foreground.getBlue());
@Override public boolean drawImage(Image image, int i, int j, ImageObserver imageobserver) { return drawImage(image, i, j, image.getWidth(imageobserver), image.getHeight(imageobserver), imageobserver); }
public void drawLine(int x1, int y1, int x2, int y2) { int width = 0; if (_stroke != null && _stroke instanceof BasicStroke) { width = (int) ((BasicStroke)_stroke).getLineWidth() * 12700; } getEscherGraphics().drawLine(x1,y1,x2,y2, width); // draw(new GeneralPath(new java.awt.geom.Line2D.Float(x1, y1, x2, y2))); }