Class PDFImageColorModel.SoftMask
java.lang.Object
com.inductiveautomation.rm.pdf.reader.PDFImageColorModel.SoftMask
- Enclosing class:
- PDFImageColorModel
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
FieldsModifier and TypeFieldDescriptionbyte[]
int
int
float[]
int
-
Constructor Summary
ConstructorsConstructorDescriptionSoftMask
(byte[] alpha, int w, int h, int bps, float[] marray) Create SoftMask. -
Method Summary
Modifier and TypeMethodDescriptionfloat
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)
-
Field Details
-
width
public int width -
height
public int height -
bitspersample
public int bitspersample -
alphabits
public byte[] alphabits -
matte
public float[] matte
-
-
Constructor Details
-
SoftMask
public SoftMask(byte[] alpha, int w, int h, int bps, float[] marray) Create SoftMask.
-
-
Method Details
-
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)
-