Methods Summary |
---|
public void | addArc(Arc arc)Add an arc.
instructions.add(arc);
|
public void | addEllipse(Ellipse elip)Add an ellipse.
instructions.add(elip);
|
public void | addRectangle(Rectangle rect){@inheritDoc}.
instructions.add(rect);
|
public void | addText(Text text){@inheritDoc}.
instructions.add(text);
|
public javax.media.jai.PlanarImage | executeTransformOperation(javax.media.jai.PlanarImage image){@inheritDoc}.
BufferedImage bi = image.getAsBufferedImage();
Graphics2D graphics = (Graphics2D) bi.getGraphics();
for (int i = 0; i < instructions.size(); i++) {
ImageOperation instr = ((ImageOperation) instructions.elementAt(i));
if (instr instanceof DrawOperation) {
PlanarImage op = ((DrawOperation) instr).executeDrawOperation();
log("\tDrawing to x=" + xloc + " y=" + yloc);
graphics.drawImage(op.getAsBufferedImage(), null, xloc, yloc);
} else if (instr instanceof TransformOperation) {
PlanarImage op
= ((TransformOperation) instr).executeTransformOperation(null);
BufferedImage child = op.getAsBufferedImage();
log("\tDrawing to x=" + xloc + " y=" + yloc);
graphics.drawImage(child, null, xloc, yloc);
PlanarImage.wrapRenderedImage(bi);
}
}
image = PlanarImage.wrapRenderedImage(bi);
return image;
|
public void | setXloc(int x)Set the X location.
// CheckStyle:VisibilityModifier ON
xloc = x;
|
public void | setYloc(int y)Set the Y location.
yloc = y;
|