public class DualGraphics2D extends Graphics2D
All methods that modify the destination are sent to both Graphics2D objects. All methods that only return properties about the Graphics2D objects talk only to the first Graphics2D object.
| Modifier and Type | Field and Description |
|---|---|
Graphics2D |
g1
|
Graphics2D |
g2
|
| Constructor and Description |
|---|
DualGraphics2D(Graphics2D
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRenderingHints(Map
|
void |
clearRect(int x, int y, int width, int height)
|
void |
clip(Shape
|
void |
clipRect(int x, int y, int width, int height)
|
void |
copyArea(int x, int y, int width, int height, int dx, int dy)
|
Graphics |
create()
|
DualGraphics2D |
create(Graphics2D
Creates a binary tree structure of DualGraphics2Ds so every array receives the same drawing instructions.
|
Graphics |
create(int x, int y, int width, int height)
|
void |
dispose()
|
void |
draw(Shape
|
void |
draw3DRect(int x, int y, int width, int height, boolean raised)
|
void |
drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
|
void |
drawBytes(byte[] data, int offset, int length, int x, int y)
|
void |
drawChars(char[] data, int offset, int length, int x, int y)
|
void |
drawGlyphVector(GlyphVector
|
void |
drawImage(BufferedImage
|
boolean |
drawImage(Image
|
boolean |
drawImage(Image
|
boolean |
drawImage(Image
|
boolean |
drawImage(Image
|
boolean |
drawImage(Image
|
boolean |
drawImage(Image
|
boolean |
drawImage(Image
|
void |
drawLine(int x1, int y1, int x2, int y2)
|
void |
drawOval(int x, int y, int width, int height)
|
void |
drawPolygon(int[] points, int[] points2, int points3)
|
void |
drawPolygon(Polygon
|
void |
drawPolyline(int[] points, int[] points2, int points3)
|
void |
drawRect(int x, int y, int width, int height)
|
void |
drawRenderableImage(RenderableImage
|
void |
drawRenderedImage(RenderedImage
|
void |
drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
|
void |
drawString(AttributedCharacterIterator
|
void |
drawString(AttributedCharacterIterator
|
void |
drawString(String
|
void |
drawString(String
|
boolean |
equals(Object
|
void |
fill(Shape
|
void |
fill3DRect(int x, int y, int width, int height, boolean raised)
|
void |
fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
|
void |
fillOval(int x, int y, int width, int height)
|
void |
fillPolygon(int[] points, int[] points2, int points3)
|
void |
fillPolygon(Polygon
|
void |
fillRect(int x, int y, int width, int height)
|
void |
fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
|
void |
finalize()
|
Color |
getBackground()
|
Shape |
getClip()
|
Rectangle |
getClipBounds()
|
Rectangle |
getClipBounds(Rectangle
|
Rectangle |
getClipRect()
|
Color |
getColor()
|
Composite |
getComposite()
|
GraphicsConfiguration |
getDeviceConfiguration()
|
Font |
getFont()
|
FontMetrics |
getFontMetrics()
|
FontMetrics |
getFontMetrics(Font
|
FontRenderContext |
getFontRenderContext()
|
Paint |
getPaint()
|
Object |
getRenderingHint(RenderingHints
|
RenderingHints |
getRenderingHints()
|
Stroke |
getStroke()
|
AffineTransform |
getTransform()
|
int |
hashCode()
|
boolean |
hit(Rectangle
|
boolean |
hitClip(int x, int y, int width, int height)
|
void |
rotate(double theta)
|
void |
rotate(double theta, double x, double y)
|
void |
scale(double sx, double sy)
|
void |
setBackground(Color
|
void |
setClip(int x, int y, int width, int height)
|
void |
setClip(Shape
|
void |
setColor(Color
|
void |
setComposite(Composite
|
void |
setFont(Font
|
void |
setPaint(Paint
|
void |
setPaintMode()
|
void |
setRenderingHint(RenderingHints
|
void |
setRenderingHints(Map
|
void |
setStroke(Stroke
|
void |
setTransform(AffineTransform
|
void |
setXORMode(Color
|
void |
shear(double shx, double shy)
|
String |
toString()
|
void |
transform(AffineTransform
|
void |
translate(double tx, double ty)
|
void |
translate(int x, int y)
|
public final Graphics2Dg1
public final Graphics2Dg2
public DualGraphics2D(Graphics2Dg1, Graphics2D g2)
public DualGraphics2Dcreate(Graphics2D [] array)
array - an array of 2 or more Graphics2D objects.
public void addRenderingHints(Map<? ,?> hints)
public void clearRect(int x,
int y,
int width,
int height)public void clip(Shapes)
public void clipRect(int x,
int y,
int width,
int height)public void copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)public Graphicscreate()
public Graphicscreate(int x, int y, int width, int height)
public void dispose()
public void draw(Shapes)
public void draw3DRect(int x,
int y,
int width,
int height,
boolean raised)public void drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)public void drawBytes(byte[] data,
int offset,
int length,
int x,
int y)public void drawChars(char[] data,
int offset,
int length,
int x,
int y)public void drawGlyphVector(GlyphVectorg, float x, float y)
public void drawImage(BufferedImageimg, BufferedImageOp op, int x, int y)
public boolean drawImage(Imageimg, AffineTransform xform, ImageObserver obs)
public boolean drawImage(Imageimg, int x, int y, Color bgcolor, ImageObserver observer)
public boolean drawImage(Imageimg, int x, int y, ImageObserver observer)
public boolean drawImage(Imageimg, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
public boolean drawImage(Imageimg, int x, int y, int width, int height, ImageObserver observer)
public boolean drawImage(Imageimg, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
public boolean drawImage(Imageimg, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
public void drawLine(int x1,
int y1,
int x2,
int y2)public void drawOval(int x,
int y,
int width,
int height)public void drawPolygon(int[] points,
int[] points2,
int points3)public void drawPolygon(Polygonp)
public void drawPolyline(int[] points,
int[] points2,
int points3)public void drawRect(int x,
int y,
int width,
int height)public void drawRenderableImage(RenderableImageimg, AffineTransform xform)
public void drawRenderedImage(RenderedImageimg, AffineTransform xform)
public void drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)public void drawString(AttributedCharacterIteratoriterator, float x, float y)
public void drawString(AttributedCharacterIteratoriterator, int x, int y)
public void drawString(Strings, float x, float y)
public void drawString(Stringstr, int x, int y)
public boolean equals(Objectobj)
public void fill(Shapes)
public void fill3DRect(int x,
int y,
int width,
int height,
boolean raised)public void fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)public void fillOval(int x,
int y,
int width,
int height)public void fillPolygon(int[] points,
int[] points2,
int points3)public void fillPolygon(Polygonp)
public void fillRect(int x,
int y,
int width,
int height)public void fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)public void finalize()
public ColorgetBackground()
public ShapegetClip()
public RectanglegetClipBounds()
public RectanglegetClipRect()
public ColorgetColor()
public CompositegetComposite()
public GraphicsConfigurationgetDeviceConfiguration()
public FontgetFont()
public FontMetricsgetFontMetrics()
public FontMetricsgetFontMetrics(Font f)
public FontRenderContextgetFontRenderContext()
public PaintgetPaint()
public ObjectgetRenderingHint(RenderingHints .Key hintKey)
public RenderingHintsgetRenderingHints()
public StrokegetStroke()
public AffineTransformgetTransform()
public int hashCode()
public boolean hitClip(int x,
int y,
int width,
int height)public void rotate(double theta,
double x,
double y)public void rotate(double theta)
public void scale(double sx,
double sy)public void setBackground(Colorcolor)
public void setClip(int x,
int y,
int width,
int height)public void setClip(Shapeclip)
public void setColor(Colorc)
public void setComposite(Compositecomp)
public void setFont(Fontfont)
public void setPaint(Paintpaint)
public void setPaintMode()
public void setRenderingHint(RenderingHints.Key hintKey, Object hintValue)
public void setRenderingHints(Map<? ,?> hints)
public void setStroke(Strokes)
public void setTransform(AffineTransformTx)
public void setXORMode(Colorc1)
public void shear(double shx,
double shy)public StringtoString()
public void transform(AffineTransformTx)
public void translate(double tx,
double ty)public void translate(int x,
int y)