summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/gnu/java/awt/java2d
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/gnu/java/awt/java2d')
-rw-r--r--libjava/classpath/gnu/java/awt/java2d/AbstractGraphics2D.java52
-rw-r--r--libjava/classpath/gnu/java/awt/java2d/AlphaCompositeContext.java6
-rw-r--r--libjava/classpath/gnu/java/awt/java2d/CubicSegment.java12
-rw-r--r--libjava/classpath/gnu/java/awt/java2d/LineSegment.java8
-rw-r--r--libjava/classpath/gnu/java/awt/java2d/PixelCoverage.java2
-rw-r--r--libjava/classpath/gnu/java/awt/java2d/QuadSegment.java28
-rw-r--r--libjava/classpath/gnu/java/awt/java2d/RasterGraphics.java4
-rw-r--r--libjava/classpath/gnu/java/awt/java2d/ScanlineConverter.java4
-rw-r--r--libjava/classpath/gnu/java/awt/java2d/ScanlineCoverage.java6
-rw-r--r--libjava/classpath/gnu/java/awt/java2d/Segment.java8
-rw-r--r--libjava/classpath/gnu/java/awt/java2d/TexturePaintContext.java6
11 files changed, 68 insertions, 68 deletions
diff --git a/libjava/classpath/gnu/java/awt/java2d/AbstractGraphics2D.java b/libjava/classpath/gnu/java/awt/java2d/AbstractGraphics2D.java
index 8504659388c..1334866f270 100644
--- a/libjava/classpath/gnu/java/awt/java2d/AbstractGraphics2D.java
+++ b/libjava/classpath/gnu/java/awt/java2d/AbstractGraphics2D.java
@@ -166,7 +166,7 @@ public abstract class AbstractGraphics2D
*/
protected static final WeakHashMap<Image, HashMap<Dimension,Image>> imageCache =
new WeakHashMap<Image, HashMap<Dimension, Image>>();
-
+
/**
* Wether we use anti aliasing for rendering text by default or not.
*/
@@ -234,7 +234,7 @@ public abstract class AbstractGraphics2D
*/
private Color foreground = Color.BLACK;
private boolean isForegroundColorNull = true;
-
+
/**
* The current font.
*/
@@ -287,16 +287,16 @@ public abstract class AbstractGraphics2D
private static final HashMap<Key, Object> STANDARD_HINTS;
static
{
-
+
HashMap<Key, Object> hints = new HashMap<Key, Object>();
hints.put(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);
hints.put(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_DEFAULT);
-
+
STANDARD_HINTS = hints;
}
-
+
/**
* Creates a new AbstractGraphics2D instance.
*/
@@ -398,8 +398,8 @@ public abstract class AbstractGraphics2D
*
* @param image the source buffered image
* @param op the filter to apply to the buffered image before rendering
- * @param x the x coordinate to render the image to
- * @param y the y coordinate to render the image to
+ * @param x the x coordinate to render the image to
+ * @param y the y coordinate to render the image to
*/
public void drawImage(BufferedImage image, BufferedImageOp op, int x, int y)
{
@@ -415,7 +415,7 @@ public abstract class AbstractGraphics2D
* transform is used to convert the image into user space. The transform
* of this AbstractGraphics2D object is used to transform from user space
* to device space.
- *
+ *
* The rendering is performed using the scanline algorithm that performs the
* rendering of other shapes and a custom Paint implementation, that supplies
* the pixel values of the rendered image.
@@ -438,7 +438,7 @@ public abstract class AbstractGraphics2D
* of this AbstractGraphics2D object is used to transform from user space
* to device space. Only the area specified by <code>areaOfInterest</code>
* is finally rendered to the target.
- *
+ *
* The rendering is performed using the scanline algorithm that performs the
* rendering of other shapes and a custom Paint implementation, that supplies
* the pixel values of the rendered image.
@@ -504,7 +504,7 @@ public abstract class AbstractGraphics2D
(int) image.getWidth(),
(int) image.getHeight());
drawRenderableImageImpl(image, xform, areaOfInterest);
-
+
}
/**
@@ -648,7 +648,7 @@ public abstract class AbstractGraphics2D
if (p != null)
{
paint = p;
-
+
if (! (paint instanceof Color))
{
isOptimized = false;
@@ -665,11 +665,11 @@ public abstract class AbstractGraphics2D
this.foreground = Color.BLACK;
isForegroundColorNull = true;
}
-
+
// free resources if needed, then put the paint context to null
if (this.paintContext != null)
this.paintContext.dispose();
-
+
this.paintContext = null;
}
@@ -745,7 +745,7 @@ public abstract class AbstractGraphics2D
* Translates the coordinate system by (x, y).
*
* @param x the translation X coordinate
- * @param y the translation Y coordinate
+ * @param y the translation Y coordinate
*/
public void translate(int x, int y)
{
@@ -775,7 +775,7 @@ public abstract class AbstractGraphics2D
* Translates the coordinate system by (tx, ty).
*
* @param tx the translation X coordinate
- * @param ty the translation Y coordinate
+ * @param ty the translation Y coordinate
*/
public void translate(double tx, double ty)
{
@@ -992,7 +992,7 @@ public abstract class AbstractGraphics2D
if (clip == null)
setClip(s);
- // This is so common, let's optimize this.
+ // This is so common, let's optimize this.
else if (clip instanceof Rectangle && s instanceof Rectangle)
{
Rectangle clipRect = (Rectangle) clip;
@@ -1076,8 +1076,8 @@ public abstract class AbstractGraphics2D
else
copy.clip = null;
- copy.renderingHints = new RenderingHints(null);
- copy.renderingHints.putAll(renderingHints);
+ copy.renderingHints = new RenderingHints(null);
+ copy.renderingHints.putAll(renderingHints);
copy.transform = new AffineTransform(transform);
// The remaining state is inmmutable and doesn't need to be copied.
return copy;
@@ -1097,7 +1097,7 @@ public abstract class AbstractGraphics2D
{
if (isForegroundColorNull)
return null;
-
+
return this.foreground;
}
@@ -1107,7 +1107,7 @@ public abstract class AbstractGraphics2D
* @param color the foreground to set
*/
public void setColor(Color color)
- {
+ {
this.setPaint(color);
}
@@ -1298,7 +1298,7 @@ public abstract class AbstractGraphics2D
/**
* Fills a rectangle with the current background color.
*
- * This implementation temporarily sets the foreground color to the
+ * This implementation temporarily sets the foreground color to the
* background and forwards the call to {@link #fillRect(int, int, int, int)}.
*
* @param x the upper left corner, X coordinate
@@ -1590,7 +1590,7 @@ public abstract class AbstractGraphics2D
int dy = Math.min(dy1, dy2);
int dw = Math.abs(dx1 - dx2);
int dh = Math.abs(dy1 - dy2);
-
+
AffineTransform t = new AffineTransform();
t.translate(sx - dx, sy - dy);
double scaleX = (double) sw / (double) dw;
@@ -1693,7 +1693,7 @@ public abstract class AbstractGraphics2D
*
* @param x0 the starting point, X coordinate
* @param y0 the starting point, Y coordinate
- * @param x1 the end point, X coordinate
+ * @param x1 the end point, X coordinate
* @param y1 the end point, Y coordinate
*/
protected void rawDrawLine(int x0, int y0, int x1, int y1)
@@ -1806,7 +1806,7 @@ public abstract class AbstractGraphics2D
public void renderScanline(int y, ScanlineCoverage c)
{
PaintContext pCtx = getPaintContext();
-
+
int x0 = c.getMinX();
int x1 = c.getMaxX();
Raster paintRaster = pCtx.getRaster(x0, y, x1 - x0, 1);
@@ -1842,7 +1842,7 @@ public abstract class AbstractGraphics2D
renderingHints);
WritableRaster raster = getDestinationRaster();
WritableRaster targetChild = raster.createWritableTranslatedChild(-x0, -y);
-
+
cCtx.compose(paintRaster, targetChild, targetChild);
updateRaster(raster, x0, y, x1 - x0, 1);
cCtx.dispose();
@@ -2042,7 +2042,7 @@ public abstract class AbstractGraphics2D
getTransform(),
getRenderingHints());
}
-
+
return this.paintContext;
}
diff --git a/libjava/classpath/gnu/java/awt/java2d/AlphaCompositeContext.java b/libjava/classpath/gnu/java/awt/java2d/AlphaCompositeContext.java
index 2e3690d8348..f1f082abe06 100644
--- a/libjava/classpath/gnu/java/awt/java2d/AlphaCompositeContext.java
+++ b/libjava/classpath/gnu/java/awt/java2d/AlphaCompositeContext.java
@@ -82,7 +82,7 @@ public class AlphaCompositeContext
/**
* Creates a new AlphaCompositeContext.
*
- * @param aComp the AlphaComposite object
+ * @param aComp the AlphaComposite object
* @param srcCM the source color model
* @param dstCM the destination color model
*/
@@ -93,7 +93,7 @@ public class AlphaCompositeContext
srcColorModel = srcCM;
dstColorModel = dstCM;
-
+
// Determine the blending factors according to the rule in the
// AlphaComposite. For some rules the factors must be determined
// dynamically because they depend on the actual pixel value.
@@ -301,7 +301,7 @@ public class AlphaCompositeContext
{
for (int i = 0; i < dstComponentsLength - 1; i++)
{
- dstComponents[i] = dstComponents[i] / dstAlpha;
+ dstComponents[i] = dstComponents[i] / dstAlpha;
}
}
diff --git a/libjava/classpath/gnu/java/awt/java2d/CubicSegment.java b/libjava/classpath/gnu/java/awt/java2d/CubicSegment.java
index bf66be870c0..8197c94c5c6 100644
--- a/libjava/classpath/gnu/java/awt/java2d/CubicSegment.java
+++ b/libjava/classpath/gnu/java/awt/java2d/CubicSegment.java
@@ -80,11 +80,11 @@ public class CubicSegment extends Segment
public Object clone()
{
CubicSegment segment = null;
-
+
try
{
segment = (CubicSegment) super.clone();
-
+
segment.P1 = (Point2D) P1.clone();
segment.P2 = (Point2D) P2.clone();
segment.cp1 = (Point2D) cp1.clone();
@@ -96,7 +96,7 @@ public class CubicSegment extends Segment
ie.initCause(cnse);
throw ie;
}
-
+
return segment;
}
@@ -161,7 +161,7 @@ public class CubicSegment extends Segment
return new Segment[] { segmentTop, segmentBottom };
}
-
+
public void reverse()
{
Point2D temp = P1;
@@ -174,11 +174,11 @@ public class CubicSegment extends Segment
public double[] cp1()
{
- return new double[]{cp1.getX(), cp1.getY()};
+ return new double[]{cp1.getX(), cp1.getY()};
}
public double[] cp2()
{
- return new double[]{cp2.getX(), cp2.getY()};
+ return new double[]{cp2.getX(), cp2.getY()};
}
} // class CubicSegment
diff --git a/libjava/classpath/gnu/java/awt/java2d/LineSegment.java b/libjava/classpath/gnu/java/awt/java2d/LineSegment.java
index 0395fd0af7b..904037989c0 100644
--- a/libjava/classpath/gnu/java/awt/java2d/LineSegment.java
+++ b/libjava/classpath/gnu/java/awt/java2d/LineSegment.java
@@ -63,7 +63,7 @@ public class LineSegment extends Segment
public Object clone()
{
LineSegment segment = null;
-
+
try
{
segment = (LineSegment) super.clone();
@@ -76,7 +76,7 @@ public class LineSegment extends Segment
ie.initCause(cnse);
throw ie;
}
-
+
return segment;
}
@@ -108,11 +108,11 @@ public class LineSegment extends Segment
public double[] cp1()
{
- return new double[]{P2.getX(), P2.getY()};
+ return new double[]{P2.getX(), P2.getY()};
}
public double[] cp2()
{
- return new double[]{P1.getX(), P1.getY()};
+ return new double[]{P1.getX(), P1.getY()};
}
} // class LineSegment
diff --git a/libjava/classpath/gnu/java/awt/java2d/PixelCoverage.java b/libjava/classpath/gnu/java/awt/java2d/PixelCoverage.java
index c83ad1fff8f..356021b3d16 100644
--- a/libjava/classpath/gnu/java/awt/java2d/PixelCoverage.java
+++ b/libjava/classpath/gnu/java/awt/java2d/PixelCoverage.java
@@ -124,7 +124,7 @@ final class PixelCoverage
Bucket match = current;
while (match != null && match.xPos != x)
{
-
+
}
return match;
diff --git a/libjava/classpath/gnu/java/awt/java2d/QuadSegment.java b/libjava/classpath/gnu/java/awt/java2d/QuadSegment.java
index 97a5372f6bd..b8d0ff52e3a 100644
--- a/libjava/classpath/gnu/java/awt/java2d/QuadSegment.java
+++ b/libjava/classpath/gnu/java/awt/java2d/QuadSegment.java
@@ -89,7 +89,7 @@ public class QuadSegment extends Segment
public Object clone()
{
QuadSegment segment = null;
-
+
try
{
segment = (QuadSegment) super.clone();
@@ -104,7 +104,7 @@ public class QuadSegment extends Segment
ie.initCause(cnse);
throw ie;
}
-
+
return segment;
}
@@ -135,10 +135,10 @@ public class QuadSegment extends Segment
return new Segment[]{s1, s2};
}
-
+
private QuadSegment offsetSubdivided(QuadCurve2D curve, boolean plus)
{
- double[] n1 = normal(curve.getX1(), curve.getY1(),
+ double[] n1 = normal(curve.getX1(), curve.getY1(),
curve.getCtrlX(), curve.getCtrlY());
double[] n2 = normal(curve.getCtrlX(), curve.getCtrlY(),
curve.getX2(), curve.getY2());
@@ -152,7 +152,7 @@ public class QuadSegment extends Segment
n2[0] = -n2[0];
n2[1] = -n2[1];
}
-
+
// Handle special cases where the control point is equal to an end point
// or end points are equal (ie, straight lines)
if (curve.getP1().equals(curve.getCtrlPt()))
@@ -179,7 +179,7 @@ public class QuadSegment extends Segment
double ratio = radius / length;
deltaX *= ratio;
deltaY *= ratio;
-
+
if (plus)
cp.setLocation(cp.getX() + deltaX, cp.getY() + deltaY);
else
@@ -192,16 +192,16 @@ public class QuadSegment extends Segment
}
else
{
- cp = lineIntersection(curve.getX1() + n1[0],
+ cp = lineIntersection(curve.getX1() + n1[0],
curve.getY1() + n1[1],
curve.getCtrlX() + n1[0],
curve.getCtrlY() + n1[1],
curve.getCtrlX() + n2[0],
curve.getCtrlY() + n2[1],
- curve.getX2() + n2[0],
+ curve.getX2() + n2[0],
curve.getY2() + n2[1], true);
}
-
+
s = new QuadSegment(curve.getX1() + n1[0], curve.getY1() + n1[1],
cp.getX(), cp.getY(),
curve.getX2() + n2[0], curve.getY2() + n2[1]);
@@ -209,9 +209,9 @@ public class QuadSegment extends Segment
return s;
}
- private Point2D lineIntersection(double X1, double Y1,
- double X2, double Y2,
- double X3, double Y3,
+ private Point2D lineIntersection(double X1, double Y1,
+ double X2, double Y2,
+ double X3, double Y3,
double X4, double Y4,
boolean infinite)
{
@@ -250,11 +250,11 @@ public class QuadSegment extends Segment
public double[] cp1()
{
- return new double[]{cp.getX(), cp.getY()};
+ return new double[]{cp.getX(), cp.getY()};
}
public double[] cp2()
{
- return new double[]{cp.getX(), cp.getY()};
+ return new double[]{cp.getX(), cp.getY()};
}
}
diff --git a/libjava/classpath/gnu/java/awt/java2d/RasterGraphics.java b/libjava/classpath/gnu/java/awt/java2d/RasterGraphics.java
index 04eb55eb8d8..193ea4c7c28 100644
--- a/libjava/classpath/gnu/java/awt/java2d/RasterGraphics.java
+++ b/libjava/classpath/gnu/java/awt/java2d/RasterGraphics.java
@@ -77,10 +77,10 @@ public class RasterGraphics
{
if (y >= getDeviceBounds().width)
return;
-
+
super.renderScanline(y, c);
}
-
+
/**
* Returns the color model of this Graphics object.
*
diff --git a/libjava/classpath/gnu/java/awt/java2d/ScanlineConverter.java b/libjava/classpath/gnu/java/awt/java2d/ScanlineConverter.java
index b00a15c16ac..2c3481b6c10 100644
--- a/libjava/classpath/gnu/java/awt/java2d/ScanlineConverter.java
+++ b/libjava/classpath/gnu/java/awt/java2d/ScanlineConverter.java
@@ -206,7 +206,7 @@ public final class ScanlineConverter
// Ok, now we can perform the actual scanlining.
int realY = Fixed.intValue(FIXED_DIGITS, y + resolution);
boolean push = lastRealY != realY;
-
+
doScanline(p, y, push, haveClip);
// Remove obsolete active edges.
@@ -299,7 +299,7 @@ public final class ScanlineConverter
p.renderScanline(Fixed.intValue(FIXED_DIGITS, y), scanlineCoverage);
scanlineCoverage.clear();
}
- }
+ }
/**
diff --git a/libjava/classpath/gnu/java/awt/java2d/ScanlineCoverage.java b/libjava/classpath/gnu/java/awt/java2d/ScanlineCoverage.java
index deb603bcb51..9ffb63e1ddf 100644
--- a/libjava/classpath/gnu/java/awt/java2d/ScanlineCoverage.java
+++ b/libjava/classpath/gnu/java/awt/java2d/ScanlineCoverage.java
@@ -199,7 +199,7 @@ public final class ScanlineCoverage
/**
* Returns the X start position (left) on the scanline. This value
* is considered to be in pixels and device space.
- *
+ *
* @return the X position on the scanline
*/
public int getXPos()
@@ -445,7 +445,7 @@ public final class ScanlineCoverage
* Returns the maximum coverage value for the scanline.
*
* @return the maximum coverage value for the scanline
- */
+ */
public int getMaxCoverage()
{
return maxCoverage;
@@ -574,7 +574,7 @@ public final class ScanlineCoverage
// Testpoint 6.
cov = new Coverage();
}
-
+
cov.xPos = x;
cov.covDelta = 0;
cov.pixelCoverage = 0;
diff --git a/libjava/classpath/gnu/java/awt/java2d/Segment.java b/libjava/classpath/gnu/java/awt/java2d/Segment.java
index df1f67605d0..1d9a5700125 100644
--- a/libjava/classpath/gnu/java/awt/java2d/Segment.java
+++ b/libjava/classpath/gnu/java/awt/java2d/Segment.java
@@ -45,12 +45,12 @@ public abstract class Segment implements Cloneable
// Start and end points of THIS segment
public Point2D P1;
public Point2D P2;
-
+
// Segments can be linked together internally as a linked list
public Segment first;
public Segment next;
public Segment last;
-
+
// Half the stroke width
protected double radius;
@@ -116,7 +116,7 @@ public abstract class Segment implements Cloneable
{
dy = radius * ((dx > 0)?1:-1);
dx = 0;
- }
+ }
else if( dx == 0 )
{
dx = radius * ((dy > 0)?-1:1);
@@ -148,7 +148,7 @@ public abstract class Segment implements Cloneable
* for a line segment.
*/
public abstract double[] cp1();
-
+
/**
* Returns the coordinates of the second control point, or the end point
* for a line segment.
diff --git a/libjava/classpath/gnu/java/awt/java2d/TexturePaintContext.java b/libjava/classpath/gnu/java/awt/java2d/TexturePaintContext.java
index db0a2e65804..2523d23110d 100644
--- a/libjava/classpath/gnu/java/awt/java2d/TexturePaintContext.java
+++ b/libjava/classpath/gnu/java/awt/java2d/TexturePaintContext.java
@@ -148,7 +148,7 @@ public class TexturePaintContext
* @param h the height
*
* @return the Raster that is used for painting
- *
+ *
*/
public Raster getRaster(int x1, int y1, int w, int h)
{
@@ -175,9 +175,9 @@ public class TexturePaintContext
int dy = (int) dest[1];
// The modulo operation gives us the replication effect.
- dx = ((dx - minX) % width) + minX;
+ dx = ((dx - minX) % width) + minX;
dy = ((dy - minY) % height) + minY;
-
+
// Handle possible negative values (replicating above the top-left)
if (dx < 0)
dx += width;
OpenPOWER on IntegriCloud