Class PDFImageColorModel.SoftMask
- java.lang.Object
-
- com.inductiveautomation.rm.pdf.reader.PDFImageColorModel.SoftMask
-
- Enclosing class:
- PDFImageColorModel
protected static class PDFImageColorModel.SoftMask extends java.lang.Object
A representation of the alpha channel. The SoftMask maintains a width, height, & bitspersample, since they do not necessarily have to be the same as the source image's. Can also contain a Matte array, which controls premultiplication of source color samples.
-
-
Field Summary
Fields Modifier and Type Field Description byte[]
alphabits
int
bitspersample
int
height
float[]
matte
int
width
-
Constructor Summary
Constructors Constructor Description SoftMask(byte[] alpha, int w, int h, int bps, float[] marray)
Create SoftMask.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getAlpha(int x, int y)
returns the alpha value that would be mapped to the point in the source image.int
getUnnormalizedAlpha(int x, int y)
void
setSourceImageSize(int sw, int sh)
-
-
-
Method Detail
-
setSourceImageSize
public void setSourceImageSize(int sw, int sh)
-
getAlpha
public float getAlpha(int x, int y)
returns the alpha value that would be mapped to the point in the source image. Since the image dimensions may not match the mask dimensions, these routines find the alpha value based on the sizes of the source and destination.
-
getUnnormalizedAlpha
public int getUnnormalizedAlpha(int x, int y)
-
-