This documents another sad chapter in Sun's java implementation. The tree cell renderer
does not check the clipping of the painted graphics correctly.
This bug seems to be related to the TreeCellRenderer's unability to display the defined
(and drawn) background of the CellRenderers render component.
| Method from org.jfree.report.modules.gui.config.BugFixProxyGraphics2D Detail: |
public void addRenderingHints(Map hints) {
parent.addRenderingHints(hints);
}
Forwards the call to the parent. |
public void clearRect(int x,
int y,
int width,
int height) {
parent.clearRect(x, y, width, height);
}
Clears the specified rectangle by filling it with the background color of the current
drawing surface. This operation does not use the current paint mode.
Beginning with Java 1.1, the background color of offscreen images may be system
dependent. Applications should use setColor followed by
fillRect to ensure that an offscreen image is cleared to a specific
color. |
public void clip(Shape s) {
parent.clip(s);
}
Intersects the current Clip with the interior of the specified
Shape and sets the Clip to the resulting intersection. The
specified Shape is transformed with the current Graphics2D
Transform before being intersected with the current Clip.
This method is used to make the current Clip smaller. To make the
Clip larger, use setClip. The user clip modified by
this method is independent of the clipping associated with device bounds and
visibility. If no clip has previously been set, or if the clip has been cleared
using setClip with a null argument, the
specified Shape becomes the new user clip. |
public void clipRect(int x,
int y,
int width,
int height) {
// fix a bug in the tree renderer ...
parent.clip(new Rectangle(x, y, width, height));
}
Intersects the current clip with the specified rectangle. The resulting clipping area
is the intersection of the current clipping area and the specified rectangle. If
there is no current clipping area, either because the clip has never been set, or the
clip has been cleared using setClip(null), the specified rectangle
becomes the new clip. This method sets the user clip, which is independent of the
clipping associated with device bounds and window visibility. This method can only be
used to make the current clip smaller. To set the current clip larger, use any of the
setClip methods. Rendering operations have no effect outside of the clipping area. |
public void copyArea(int x,
int y,
int width,
int height,
int dx,
int dy) {
parent.copyArea(x, y, width, height, dx, dy);
}
Copies an area of the component by a distance specified by dx and
dy. From the point specified by x and y, this
method copies downwards and to the right. To copy an area of the component to the
left or upwards, specify a negative value for dx or dy. If
a portion of the source rectangle lies outside the bounds of the component, or is
obscured by another window or component, copyArea will be unable to copy
the associated pixels. The area that is omitted can be refreshed by calling the
component's paint method. |
public Graphics create() {
return new BugFixProxyGraphics2D((Graphics2D) parent.create());
}
Creates a new Graphics object that is a copy of this
Graphics object. |
public void dispose() {
parent.dispose();
}
Disposes of this graphics context and releases any system resources that it is using.
A Graphics object cannot be used after disposehas been
called.
When a Java program runs, a large number of Graphics objects can be
created within a short time frame. Although the finalization process of the garbage
collector also disposes of the same system resources, it is preferable to manually
free the associated resources by calling this method rather than to rely on a
finalization process which may not run to completion for a long period of time.
Graphics objects which are provided as arguments to the paint and
update methods of components are automatically released by the system
when those methods return. For efficiency, programmers should call
dispose when finished using a Graphics object only if it
was created directly from a component or another Graphics object. |
public void draw(Shape s) {
parent.draw(s);
}
Forwards the call to the parent. |
public void drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle) {
parent.fill(new Arc2D.Float(x, y, width, height, startAngle, arcAngle, Arc2D.PIE));
}
Draws the outline of a circular or elliptical arc covering the specified rectangle.
The resulting arc begins at startAngle and extends for
arcAngle degrees, using the current color. Angles are interpreted such
that 0 degrees is at the 3 o'clock position. A positive value indicates a
counter-clockwise rotation while a negative value indicates a clockwise rotation.
The center of the arc is the center of the rectangle whose origin is
(x, y) and whose size is specified by the width and
height arguments.
The resulting arc covers an area width + 1 pixels wide by
height + 1 pixels tall.
The angles are specified relative to the non-square extents of the bounding rectangle
such that 45 degrees always falls on the line from the center of the ellipse to the
upper right corner of the bounding rectangle. As a result, if the bounding rectangle
is noticeably longer in one axis than the other, the angles to the start and end of
the arc segment will be skewed farther along the longer axis of the bounds. |
public void drawGlyphVector(GlyphVector g,
float x,
float y) {
parent.drawGlyphVector(g, x, y);
}
Forwards the call to the parent. |
public boolean drawImage(Image img,
AffineTransform xform,
ImageObserver obs) {
return parent.drawImage(img, xform, obs);
}
Forwards the call to the parent. |
public void drawImage(BufferedImage img,
BufferedImageOp op,
int x,
int y) {
parent.drawImage(img, op, x, y);
}
Renders a BufferedImage that is filtered with a BufferedImageOp .
The rendering attributes applied include the Clip,
Transform and Composite attributes. This is equivalent
to:
img1 = op.filter(img, null);
drawImage(img1, new AffineTransform(1f,0f,0f,1f,x,y), null);
|
public boolean drawImage(Image img,
int x,
int y,
ImageObserver observer) {
return parent.drawImage(img, x, y, observer);
}
Draws as much of the specified image as is currently available. The image is drawn
with its top-left corner at (x, y) in this graphics context's
coordinate space. Transparent pixels in the image do not affect whatever pixels are
already there.
This method returns immediately in all cases, even if the complete image has not yet
been loaded, and it has not been dithered and converted for the current output
device.
If the image has not yet been completely loaded, then drawImage returns
false. As more of the image becomes available, the process that draws
the image notifies the specified image observer. |
public boolean drawImage(Image img,
int x,
int y,
Color bgcolor,
ImageObserver observer) {
return parent.drawImage(img, x, y, bgcolor, observer);
}
Draws as much of the specified image as is currently available. The image is drawn
with its top-left corner at (x, y) in this graphics context's
coordinate space. Transparent pixels are drawn in the specified background color.
This operation is equivalent to filling a rectangle of the width and height of the
specified image with the given color and then drawing the image on top of it, but
possibly more efficient.
This method returns immediately in all cases, even if the complete image has not yet
been loaded, and it has not been dithered and converted for the current output
device.
If the image has not yet been completely loaded, then drawImage returns
false. As more of the image becomes available, the process that draws
the image notifies the specified image observer. |
public boolean drawImage(Image img,
int x,
int y,
int width,
int height,
ImageObserver observer) {
return parent.drawImage(img, x, y, width, height, observer);
}
Draws as much of the specified image as has already been scaled to fit inside the
specified rectangle.
The image is drawn inside the specified rectangle of this graphics context's
coordinate space, and is scaled if necessary. Transparent pixels do not affect
whatever pixels are already there.
This method returns immediately in all cases, even if the entire image has not yet
been scaled, dithered, and converted for the current output device. If the current
output representation is not yet complete, then drawImage returns
false. As more of the image becomes available, the process that draws
the image notifies the image observer by calling its imageUpdate
method.
A scaled version of an image will not necessarily be available immediately just
because an unscaled version of the image has been constructed for this output device.
Each size of the image may be cached separately and generated from the original data
in a separate image production sequence. |
public boolean drawImage(Image img,
int x,
int y,
int width,
int height,
Color bgcolor,
ImageObserver observer) {
return parent.drawImage(img, x, y, width, height, bgcolor, observer);
}
Draws as much of the specified image as has already been scaled to fit inside the
specified rectangle.
The image is drawn inside the specified rectangle of this graphics context's
coordinate space, and is scaled if necessary. Transparent pixels are drawn in the
specified background color. This operation is equivalent to filling a rectangle of
the width and height of the specified image with the given color and then drawing the
image on top of it, but possibly more efficient.
This method returns immediately in all cases, even if the entire image has not yet
been scaled, dithered, and converted for the current output device. If the current
output representation is not yet complete then drawImage returns
false. As more of the image becomes available, the process that draws
the image notifies the specified image observer.
A scaled version of an image will not necessarily be available immediately just
because an unscaled version of the image has been constructed for this output device.
Each size of the image may be cached separately and generated from the original data
in a separate image production sequence. |
public boolean drawImage(Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
ImageObserver observer) {
return parent.drawImage(img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer);
}
Draws as much of the specified area of the specified image as is currently available,
scaling it on the fly to fit inside the specified area of the destination drawable
surface. Transparent pixels do not affect whatever pixels are already there.
This method returns immediately in all cases, even if the image area to be drawn has
not yet been scaled, dithered, and converted for the current output device. If the
current output representation is not yet complete then drawImage returns
false. As more of the image becomes available, the process that draws
the image notifies the specified image observer.
This method always uses the unscaled version of the image to render the scaled
rectangle and performs the required scaling on the fly. It does not use a cached,
scaled version of the image for this operation. Scaling of the image from source to
destination is performed such that the first coordinate of the source rectangle is
mapped to the first coordinate of the destination rectangle, and the second source
coordinate is mapped to the second destination coordinate. The subimage is scaled and
flipped as needed to preserve those mappings. |
public boolean drawImage(Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
Color bgcolor,
ImageObserver observer) {
return parent.drawImage(img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, bgcolor, observer);
}
Draws as much of the specified area of the specified image as is currently available,
scaling it on the fly to fit inside the specified area of the destination drawable
surface.
Transparent pixels are drawn in the specified background color. This operation is
equivalent to filling a rectangle of the width and height of the specified image with
the given color and then drawing the image on top of it, but possibly more
efficient.
This method returns immediately in all cases, even if the image area to be drawn has
not yet been scaled, dithered, and converted for the current output device. If the
current output representation is not yet complete then drawImage returns
false. As more of the image becomes available, the process that draws
the image notifies the specified image observer.
This method always uses the unscaled version of the image to render the scaled
rectangle and performs the required scaling on the fly. It does not use a cached,
scaled version of the image for this operation. Scaling of the image from source to
destination is performed such that the first coordinate of the source rectangle is
mapped to the first coordinate of the destination rectangle, and the second source
coordinate is mapped to the second destination coordinate. The subimage is scaled and
flipped as needed to preserve those mappings. |
public void drawLine(int x1,
int y1,
int x2,
int y2) {
parent.draw(new Line2D.Float(x1, y1, x2, y2));
}
Draws a line, using the current color, between the points (x1, y1)
and (x2, y2) in this graphics context's coordinate system. |
public void drawOval(int x,
int y,
int width,
int height) {
parent.draw(new Ellipse2D.Float(x, y, width, height));
}
Draws the outline of an oval. The result is a circle or ellipse that fits within the
rectangle specified by the x, y, width, and
height arguments.
The oval covers an area that is width + 1 pixels wide and
height + 1 pixels tall. |
public void drawPolygon(Polygon p) {
parent.draw(p);
}
Draws the outline of a polygon defined by the specified Polygon object. |
public void drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints) {
parent.draw(new Polygon(xPoints, yPoints, nPoints));
}
Draws a closed polygon defined by arrays of x and y coordinates. Each
pair of (x, y) coordinates defines a point.
This method draws the polygon defined by nPoint line segments, where the
first nPoint - 1 line segments are line segments from
(xPoints[i - 1], yPoints[i - 1]) to
(xPoints[i], yPoints[i]), for 1 ≤ i ≤ nPoints.
The figure is automatically closed by drawing a line connecting the final point to
the first point, if those points are different. |
public void drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints) {
parent.drawPolyline(xPoints, yPoints, nPoints);
}
Draws a sequence of connected lines defined by arrays of x and y
coordinates. Each pair of (x, y) coordinates defines a point. The
figure is not closed if the first point differs from the last point. |
public void drawRect(int x,
int y,
int width,
int height) {
final Rectangle rect = new Rectangle(x, y, width, height);
if (parent.getClip().intersects(rect))
{
parent.draw(rect);
}
}
Draws the outline of the specified rectangle. The left and right edges of the
rectangle are at x and x + width. The top and
bottom edges are at y and y + height. The
rectangle is drawn using the graphics context's current color. |
public void drawRenderableImage(RenderableImage img,
AffineTransform xform) {
parent.drawRenderableImage(img, xform);
}
Forwards the call to the parent. |
public void drawRenderedImage(RenderedImage img,
AffineTransform xform) {
parent.drawRenderedImage(img, xform);
}
Forwards the call to the parent. |
public void drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight) {
parent.draw(new RoundRectangle2D.Float(x, y, width, height, arcWidth, arcHeight));
}
Draws an outlined round-cornered rectangle using this graphics context's current
color. The left and right edges of the rectangle are at x and
x + width, respectively. The top and bottom edges of the
rectangle are at y and y + height. |
public void drawString(String str,
int x,
int y) {
parent.drawString(str, x, y);
}
Forwards the call to the parent. |
public void drawString(String s,
float x,
float y) {
parent.drawString(s, x, y);
}
Forwards the call to the parent. |
public void drawString(AttributedCharacterIterator iterator,
int x,
int y) {
parent.drawString(iterator, x, y);
}
Forwards the call to the parent. |
public void drawString(AttributedCharacterIterator iterator,
float x,
float y) {
parent.drawString(iterator, x, y);
}
Forwards the call to the parent. |
public void fill(Shape s) {
parent.fill(s);
}
Forwards the call to the parent. |
public void fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle) {
parent.fill(new Arc2D.Float(x, y, width, height, startAngle, arcAngle, Arc2D.PIE));
}
Fills a circular or elliptical arc covering the specified rectangle.
The resulting arc begins at startAngle and extends for
arcAngle degrees. Angles are interpreted such that 0 degrees is at
the 3 o'clock position. A positive value indicates a counter-clockwise rotation
while a negative value indicates a clockwise rotation.
The center of the arc is the center of the rectangle whose origin is
(x, y) and whose size is specified by the width and
height arguments.
The resulting arc covers an area width + 1 pixels wide by
height + 1 pixels tall.
The angles are specified relative to the non-square extents of the bounding rectangle
such that 45 degrees always falls on the line from the center of the ellipse to the
upper right corner of the bounding rectangle. As a result, if the bounding rectangle
is noticeably longer in one axis than the other, the angles to the start and end of
the arc segment will be skewed farther along the longer axis of the bounds. |
public void fillOval(int x,
int y,
int width,
int height) {
parent.fill(new Ellipse2D.Float(x, y, width, height));
}
Fills an oval bounded by the specified rectangle with the current color. |
public void fillPolygon(Polygon p) {
parent.fill(p);
}
Fills the polygon defined by the specified Polygon object with the graphics context's
current color.
The area inside the polygon is defined using an even-odd fill rule, also known as the
alternating rule. |
public void fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints) {
parent.fill(new Polygon(xPoints, yPoints, nPoints));
}
Fills a closed polygon defined by arrays of x and y coordinates.
This method draws the polygon defined by nPoint line segments, where the
first nPoint - 1 line segments are line segments from
(xPoints[i - 1], yPoints[i - 1]) to
(xPoints[i], yPoints[i]), for 1 ≤ i ≤ nPoints.
The figure is automatically closed by drawing a line connecting the final point to
the first point, if those points are different.
The area inside the polygon is defined using an even-odd fill rule, also known as the
alternating rule. |
public void fillRect(int x,
int y,
int width,
int height) {
parent.fill(new Rectangle(x, y, width, height));
}
Fills the specified rectangle. The left and right edges of the rectangle are at
x and x + width - 1. The top and bottom
edges are at y and y + height - 1. The
resulting rectangle covers an area width pixels wide by
height pixels tall. The rectangle is filled using the graphics context's
current color. |
public void fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight) {
parent.fill(new RoundRectangle2D.Float(x, y, width, height, arcWidth, arcHeight));
}
Fills the specified rounded corner rectangle with the current color. The left and
right edges of the rectangle are at x and x + width - 1,
respectively. The top and bottom edges of the rectangle are at y and
y + height - 1. |
public Color getBackground() {
return parent.getBackground();
}
Returns the background color used for clearing a region. |
public Shape getClip() {
return parent.getClip();
}
Gets the current clipping area. This method returns the user clip, which is
independent of the clipping associated with device bounds and window visibility. If
no clip has previously been set, or if the clip has been cleared using
setClip(null), this method returns null. |
public Rectangle getClipBounds() {
return parent.getClipBounds();
}
Returns the bounding rectangle of the current clipping area. This method refers to
the user clip, which is independent of the clipping associated with device bounds and
window visibility. If no clip has previously been set, or if the clip has been
cleared using setClip(null), this method returns null. The
coordinates in the rectangle are relative to the coordinate system origin of this
graphics context. |
public Color getColor() {
return parent.getColor();
}
Gets this graphics context's current color. |
public Composite getComposite() {
return parent.getComposite();
}
Returns the current Composite in the Graphics2D context. |
public GraphicsConfiguration getDeviceConfiguration() {
return parent.getDeviceConfiguration();
}
Returns the device configuration associated with this Graphics2D. |
public Font getFont() {
return parent.getFont();
}
|
public FontMetrics getFontMetrics(Font f) {
return parent.getFontMetrics(f);
}
Gets the font metrics for the specified font. |
public FontRenderContext getFontRenderContext() {
return parent.getFontRenderContext();
}
Get the rendering context of the Font within this
Graphics2D context. The FontRenderContext encapsulates
application hints such as anti-aliasing and fractional metrics, as well as target
device specific information such as dots-per-inch. This information should be
provided by the application when using objects that perform typographical formatting,
such as Font and TextLayout. This information should also
be provided by applications that perform their own layout and need accurate
measurements of various characteristics of glyphs such as advance and line height
when various rendering hints have been applied to the text rendering. |
public Paint getPaint() {
return parent.getPaint();
}
Returns the current Paint of the Graphics2D context. |
public Object getRenderingHint(RenderingHints.Key hintKey) {
return parent.getRenderingHint(hintKey);
}
Forwards the call to the parent. |
public RenderingHints getRenderingHints() {
return parent.getRenderingHints();
}
Forwards the call to the parent. |
public Stroke getStroke() {
return parent.getStroke();
}
Returns the current Stroke in the Graphics2D context. |
public AffineTransform getTransform() {
return parent.getTransform();
}
Returns a copy of the current Transform in the Graphics2D
context. |
public boolean hit(Rectangle rect,
Shape s,
boolean onStroke) {
return parent.hit(rect, s, onStroke);
}
Forwards the call to the parent. |
public void rotate(double theta) {
parent.rotate(theta);
}
Concatenates the current Graphics2D Transform with a
rotation transform. Subsequent rendering is rotated by the specified radians relative
to the previous origin. This is equivalent to calling transform(R),
where R is an AffineTransform represented by the following matrix:
[ cos(theta) -sin(theta) 0 ]
[ sin(theta) cos(theta) 0 ]
[ 0 0 1 ]
Rotating with a positive angle theta rotates points on the positive x axis toward the
positive y axis. |
public void rotate(double theta,
double x,
double y) {
parent.rotate(theta, x, y);
}
Concatenates the current Graphics2D Transform with a
translated rotation transform. Subsequent rendering is transformed by a transform
which is constructed by translating to the specified location, rotating by the
specified radians, and translating back by the same amount as the original
translation. This is equivalent to the following sequence of calls:
translate(x, y);
rotate(theta);
translate(-x, -y);
Rotating with a positive angle theta rotates points on the positive x axis toward the
positive y axis. |
public void scale(double sx,
double sy) {
parent.scale(sx, sy);
}
Concatenates the current Graphics2D Transform with a
scaling transformation Subsequent rendering is resized according to the specified
scaling factors relative to the previous scaling. This is equivalent to calling
transform(S), where S is an AffineTransform represented by
the following matrix:
[ sx 0 0 ]
[ 0 sy 0 ]
[ 0 0 1 ]
|
public void setBackground(Color color) {
parent.setBackground(color);
}
Sets the background color for the Graphics2D context. The background
color is used for clearing a region. When a Graphics2D is constructed
for a Component, the background color is inherited from the
Component. Setting the background color in the Graphics2D
context only affects the subsequent clearRect calls and not the
background color of the Component. To change the background of the
Component, use appropriate methods of the Component. |
public void setClip(Shape clip) {
parent.setClip(clip);
}
Sets the current clipping area to an arbitrary clip shape. Not all objects that
implement the Shape interface can be used to set the clip. The only
Shape objects that are guaranteed to be supported are Shape
objects that are obtained via the getClip method and via
Rectangle objects. This method sets the user clip, which is independent
of the clipping associated with device bounds and window visibility. |
public void setClip(int x,
int y,
int width,
int height) {
parent.setClip(new Rectangle(x, y, width, height));
}
Sets the current clip to the rectangle specified by the given coordinates. This
method sets the user clip, which is independent of the clipping associated with
device bounds and window visibility. Rendering operations have no effect outside of
the clipping area. |
public void setColor(Color c) {
parent.setColor(c);
}
Sets this graphics context's current color to the specified color. All subsequent
graphics operations using this graphics context use this specified color. |
public void setComposite(Composite comp) {
parent.setComposite(comp);
}
Forwards the call to the parent. |
public void setFont(Font font) {
parent.setFont(font);
}
Sets this graphics context's font to the specified font. All subsequent text
operations using this graphics context use this font. |
public void setPaint(Paint paint) {
parent.setPaint(paint);
}
Forwards the call to the parent. |
public void setPaintMode() {
parent.setPaintMode();
}
Sets the paint mode of this graphics context to overwrite the destination with this
graphics context's current color. This sets the logical pixel operation function to
the paint or overwrite mode. All subsequent rendering operations will overwrite the
destination with the current color. |
public void setRenderingHint(RenderingHints.Key hintKey,
Object hintValue) {
parent.setRenderingHint(hintKey, hintValue);
}
Forwards the call to the parent. |
public void setRenderingHints(Map hints) {
parent.setRenderingHints(hints);
}
Forwards the call to the parent. |
public void setStroke(Stroke s) {
parent.setStroke(s);
}
Sets the Stroke for the Graphics2D context. |
public void setTransform(AffineTransform tx) {
parent.setTransform(tx);
}
Overwrites the Transform in the Graphics2D context. WARNING: This method
should never be used to apply a new coordinate transform on top of an existing
transform because the Graphics2D might already have a transform that is
needed for other purposes, such as rendering Swing components or applying a scaling
transformation to adjust for the resolution of a printer. To add a coordinate
transform, use the transform, rotate, scale,
or shear methods. The setTransform method is intended only
for restoring the original Graphics2D transform after rendering, as
shown in this example:
// Get the current transform
AffineTransform saveAT = g2.getTransform();
// Perform transformation
g2d.transform(...);
// Render
g2d.draw(...);
// Restore original transform
g2d.setTransform(saveAT);
|
public void setXORMode(Color c1) {
parent.setXORMode(c1);
}
Sets the paint mode of this graphics context to alternate between this graphics
context's current color and the new specified color. This specifies that logical
pixel operations are performed in the XOR mode, which alternates pixels between the
current color and a specified XOR color.
When drawing operations are performed, pixels which are the current color are changed
to the specified color, and vice versa.
Pixels that are of colors other than those two colors are changed in an unpredictable
but reversible manner; if the same figure is drawn twice, then all pixels are
restored to their original values. |
public void shear(double shx,
double shy) {
parent.shear(shx, shy);
}
Concatenates the current Graphics2D Transform with a
shearing transform. Subsequent renderings are sheared by the specified multiplier
relative to the previous position. This is equivalent to calling
transform(SH), where SH is an AffineTransform represented
by the following matrix:
[ 1 shx 0 ]
[ shy 1 0 ]
[ 0 0 1 ]
|
public void transform(AffineTransform tx) {
parent.transform(tx);
}
Composes an AffineTransform object with the Transform in
this Graphics2D according to the rule last-specified-first-applied. If
the current Transform is Cx, the result of composition with Tx is a new
Transform Cx'. Cx' becomes the current Transform for this
Graphics2D. Transforming a point p by the updated Transform
Cx' is equivalent to first transforming p by Tx and then transforming the result by
the original Transform Cx. In other words, Cx'(p) = Cx(Tx(p)). A copy
of the Tx is made, if necessary, so further modifications to Tx do not affect
rendering. |
public void translate(int x,
int y) {
parent.translate(x, y);
}
Forwards the call to the parent. |
public void translate(double tx,
double ty) {
parent.translate(tx, ty);
}
Concatenates the current Graphics2D Transform with a
translation transform. Subsequent rendering is translated by the specified distance
relative to the previous position. This is equivalent to calling transform(T), where
T is an AffineTransform represented by the following matrix:
[ 1 0 tx ]
[ 0 1 ty ]
[ 0 0 1 ]
|