* <p>
* Not all methods are implemented yet. Those that are not are clearly labelled.
* <p>
- * Copyright Paul Mutton, <a
- * href="http://www.jibble.org/">http://www.jibble.org/</a>
+ * Copyright Paul Mutton,
+ * <a href="http://www.jibble.org/">http://www.jibble.org/</a>
*
*/
public class EpsGraphics2D extends java.awt.Graphics2D
int minY, int maxX, int maxY) throws IOException
{
this(title);
- _document = new EpsDocument(title, outputStream, minX, minY, maxX, maxY);
+ _document = new EpsDocument(title, outputStream, minX, minY, maxX,
+ maxY);
}
/**
private void methodNotSupported()
{
EpsException e = new EpsException(MessageManager.formatMessage(
- "exception.eps_method_not_supported", new String[] { VERSION }));
+ "exception.eps_method_not_supported", new String[]
+ { VERSION }));
e.printStackTrace(System.err);
}
* the top left.
*/
@Override
- public void draw3DRect(int x, int y, int width, int height, boolean raised)
+ public void draw3DRect(int x, int y, int width, int height,
+ boolean raised)
{
Color originalColor = getColor();
Stroke originalStroke = getStroke();
* come from the top left.
*/
@Override
- public void fill3DRect(int x, int y, int width, int height, boolean raised)
+ public void fill3DRect(int x, int y, int width, int height,
+ boolean raised)
{
Color originalColor = getColor();
WritableRaster wr = img.copyData(null);
BufferedImage img1 = new BufferedImage(cm, wr,
cm.isAlphaPremultiplied(), properties);
- AffineTransform at = AffineTransform.getTranslateInstance(
- img.getMinX(), img.getMinY());
+ AffineTransform at = AffineTransform.getTranslateInstance(img.getMinX(),
+ img.getMinY());
at.preConcatenate(xform);
drawImage(img1, at, null);
}
* Draws a RenderableImage by invoking its createDefaultRendering method.
*/
@Override
- public void drawRenderableImage(RenderableImage img, AffineTransform xform)
+ public void drawRenderableImage(RenderableImage img,
+ AffineTransform xform)
{
drawRenderedImage(img.createDefaultRendering(), xform);
}
if (getAccurateTextMode())
{
TextLayout layout = new TextLayout(iterator, getFontRenderContext());
- Shape shape = layout.getOutline(AffineTransform.getTranslateInstance(
- x, y));
+ Shape shape = layout
+ .getOutline(AffineTransform.getTranslateInstance(x, y));
draw(shape, "fill");
}
else
Point2D location = transform(x, y);
append(location.getX() + " " + location.getY() + " moveto");
StringBuffer buffer = new StringBuffer();
- for (char ch = iterator.first(); ch != CharacterIterator.DONE; ch = iterator
- .next())
+ for (char ch = iterator
+ .first(); ch != CharacterIterator.DONE; ch = iterator.next())
{
if (ch == '(' || ch == ')')
{
} catch (Exception e)
{
throw new EpsException(MessageManager.formatMessage(
- "exception.eps_unable_to_get_inverse_matrix",
- new String[] { _transform.toString() }));
+ "exception.eps_unable_to_get_inverse_matrix", new String[]
+ { _transform.toString() }));
}
}
}
public void drawArc(int x, int y, int width, int height, int startAngle,
int arcAngle)
{
- Shape shape = new Arc2D.Float(x, y, width, height, startAngle,
- arcAngle, Arc2D.OPEN);
+ Shape shape = new Arc2D.Float(x, y, width, height, startAngle, arcAngle,
+ Arc2D.OPEN);
draw(shape);
}
public void fillArc(int x, int y, int width, int height, int startAngle,
int arcAngle)
{
- Shape shape = new Arc2D.Float(x, y, width, height, startAngle,
- arcAngle, Arc2D.PIE);
+ Shape shape = new Arc2D.Float(x, y, width, height, startAngle, arcAngle,
+ Arc2D.PIE);
draw(shape, "fill");
}
} catch (Exception e)
{
throw new EpsException(MessageManager.formatMessage(
- "exception.eps_unable_to_get_inverse_matrix",
- new String[] { matrix.toString() }));
+ "exception.eps_unable_to_get_inverse_matrix", new String[]
+ { matrix.toString() }));
}
matrix.scale(1, -1);
matrix.getMatrix(m);
for (int x = 0; x < width; x++)
{
Color color = new Color(pixels[x + width * y]);
- line.append(toHexString(color.getRed())
- + toHexString(color.getGreen())
- + toHexString(color.getBlue()));
+ line.append(
+ toHexString(color.getRed()) + toHexString(color.getGreen())
+ + toHexString(color.getBlue()));
if (line.length() > 64)
{
append(line.toString());