< prev index next >
src/java.desktop/share/classes/sun/java2d/loops/GeneralRenderer.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -150,11 +150,11 @@
};
GraphicsPrimitiveMgr.register(primitives);
}
static void doDrawPoly(SurfaceData sData, PixelWriter pw,
- int xPoints[], int yPoints[], int off, int nPoints,
+ int[] xPoints, int[] yPoints, int off, int nPoints,
Region clip, int transx, int transy, boolean close)
{
int mx, my, x1, y1;
int[] tmp = null;
@@ -379,11 +379,11 @@
pw.setRaster(dstRast);
int num = gl.getNumGlyphs();
for (int i = 0; i < num; i++) {
gl.setGlyphIndex(i);
- int metrics[] = gl.getMetrics();
+ int[] metrics = gl.getMetrics();
int gx1 = metrics[0];
int gy1 = metrics[1];
int w = metrics[2];
int gx2 = gx1 + w;
int gy2 = gy1 + metrics[3];
@@ -397,11 +397,11 @@
gy1 = cy1;
}
if (gx2 > cx2) gx2 = cx2;
if (gy2 > cy2) gy2 = cy2;
if (gx2 > gx1 && gy2 > gy1) {
- byte alpha[] = gl.getGrayBits();
+ byte[] alpha = gl.getGrayBits();
w -= (gx2 - gx1);
for (int y = gy1; y < gy2; y++) {
for (int x = gx1; x < gx2; x++) {
if (alpha[off++] < 0) {
pw.writePixel(x, y);
@@ -722,11 +722,11 @@
public void FillSpans(SunGraphics2D sg2d, SurfaceData sData,
SpanIterator si)
{
PixelWriter pw = GeneralRenderer.createSolidPixelWriter(sg2d, sData);
- int span[] = new int[4];
+ int[] span = new int[4];
while (si.nextSpan(span)) {
GeneralRenderer.doSetRect(sData, pw,
span[0], span[1], span[2], span[3]);
}
}
@@ -762,12 +762,12 @@
CompositeType.SrcNoEa,
SurfaceType.Any);
}
public void DrawPolygons(SunGraphics2D sg2d, SurfaceData sData,
- int xPoints[], int yPoints[],
- int nPoints[], int numPolys,
+ int[] xPoints, int[] yPoints,
+ int[] nPoints, int numPolys,
int transx, int transy,
boolean close)
{
PixelWriter pw = GeneralRenderer.createSolidPixelWriter(sg2d, sData);
@@ -867,11 +867,11 @@
public void FillSpans(SunGraphics2D sg2d, SurfaceData sData,
SpanIterator si)
{
PixelWriter pw = GeneralRenderer.createXorPixelWriter(sg2d, sData);
- int span[] = new int[4];
+ int[] span = new int[4];
while (si.nextSpan(span)) {
GeneralRenderer.doSetRect(sData, pw,
span[0], span[1], span[2], span[3]);
}
}
@@ -907,12 +907,12 @@
CompositeType.Xor,
SurfaceType.Any);
}
public void DrawPolygons(SunGraphics2D sg2d, SurfaceData sData,
- int xPoints[], int yPoints[],
- int nPoints[], int numPolys,
+ int[] xPoints, int[] yPoints,
+ int[] nPoints, int numPolys,
int transx, int transy,
boolean close)
{
PixelWriter pw = GeneralRenderer.createXorPixelWriter(sg2d, sData);
< prev index next >