Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
import java.awt.image.Raster;
import java.awt.image.SampleModel;
import java.awt.image.WritableRaster;
import java.util.Arrays;

import org.apache.batik.ext.awt.image.GraphicsUtil;

Expand Down Expand Up @@ -86,7 +87,7 @@ public AffineRed(CachableRed src,
// back aliasing effects...
ColorModel cm = fixColorModel(src);

// fix my sample model so it makes sense given my size.
// fix my sample model, so it makes sense given my size.
SampleModel sm = fixSampleModel(src, cm, myBounds);

Point2D pt = new Point2D.Float(src.getTileGridXOffset(),
Expand Down Expand Up @@ -225,8 +226,7 @@ protected static ColorModel fixColorModel(CachableRed src) {
}

int [] bits = new int[b];
for (int i=0; i<b; i++)
bits[i] = 8;
Arrays.fill( bits, 8 );
return new ComponentColorModel(cs, bits, true, true,
Transparency.TRANSLUCENT,
DataBuffer.TYPE_INT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
import java.awt.image.SampleModel;
import java.awt.image.SinglePixelPackedSampleModel;
import java.awt.image.WritableRaster;
import java.util.Arrays;

import org.apache.batik.ext.awt.image.GraphicsUtil;

Expand Down Expand Up @@ -175,8 +176,7 @@ else if (bands != srcCM.getNumComponents())

if (sm instanceof ComponentSampleModel) {
int [] bitsPer = new int[bands];
for (int i=0; i<bands; i++)
bitsPer[i] = bits;
Arrays.fill( bitsPer, bits );

return new ComponentColorModel
(cs, bitsPer, hasAlpha, preMult,
Expand Down
Loading