RadialShadingContext.java (pdfbox-2.0.23-src) | : | RadialShadingContext.java (pdfbox-2.0.24-src) | ||
---|---|---|---|---|
skipping to change at line 185 | skipping to change at line 185 | |||
} | } | |||
@Override | @Override | |||
public Raster getRaster(int x, int y, int w, int h) | public Raster getRaster(int x, int y, int w, int h) | |||
{ | { | |||
// create writable raster | // create writable raster | |||
WritableRaster raster = getColorModel().createCompatibleWritableRaster(w , h); | WritableRaster raster = getColorModel().createCompatibleWritableRaster(w , h); | |||
float inputValue = -1; | float inputValue = -1; | |||
boolean useBackground; | boolean useBackground; | |||
int[] data = new int[w * h * 4]; | int[] data = new int[w * h * 4]; | |||
float[] values = new float[2]; | ||||
for (int j = 0; j < h; j++) | for (int j = 0; j < h; j++) | |||
{ | { | |||
for (int i = 0; i < w; i++) | for (int i = 0; i < w; i++) | |||
{ | { | |||
float[] values = new float[] { x + i, y + j }; | values[0] = x + i; | |||
values[1] = y + j; | ||||
rat.transform(values, 0, values, 0, 1); | rat.transform(values, 0, values, 0, 1); | |||
useBackground = false; | useBackground = false; | |||
float[] inputValues = calculateInputValues(values[0], values[1]) ; | float[] inputValues = calculateInputValues(values[0], values[1]) ; | |||
if (Float.isNaN(inputValues[0]) && Float.isNaN(inputValues[1])) | if (Float.isNaN(inputValues[0]) && Float.isNaN(inputValues[1])) | |||
{ | { | |||
if (getBackground() == null) | if (getBackground() == null) | |||
{ | { | |||
continue; | continue; | |||
} | } | |||
useBackground = true; | useBackground = true; | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 3 lines changed or added |