Class ImageFunctions.SubtractiveCompositeContext
java.lang.Object
com.blackrook.rookscript.desktop.functions.ImageFunctions.SubtractiveCompositeContext
- All Implemented Interfaces:
CompositeContext
- Enclosing class:
- ImageFunctions
public static class ImageFunctions.SubtractiveCompositeContext extends Object
The composite context for
ImageFunctions.SubtractiveComposite
s.-
Field Summary
Fields Modifier and Type Field Description protected ColorModel
dstColorModel
protected int
preAlpha
protected ColorModel
srcColorModel
-
Method Summary
Modifier and Type Method Description protected static void
checkRaster(ColorModel colorModel, Raster raster)
Checks if aRaster
is the correct data format for this compositing operation.void
compose(Raster src, Raster dstIn, WritableRaster dstOut)
protected int
composePixel(int srcARGB, int dstARGB)
Mixes two pixels together.void
dispose()
-
Field Details
-
srcColorModel
-
dstColorModel
-
preAlpha
protected int preAlpha
-
-
Method Details
-
composePixel
protected int composePixel(int srcARGB, int dstARGB)Mixes two pixels together.- Parameters:
srcARGB
- the incoming ARGB 32-bit integer value.dstARGB
- the existing, "source" ARGB 32-bit integer value.- Returns:
- the resultant ARGB value.
-
checkRaster
Checks if aRaster
is the correct data format for this compositing operation.- Parameters:
colorModel
- the color model to check compatibility for.raster
- the Raster to check.- Throws:
UnsupportedOperationException
- if the Raster's data type is notDataBuffer.TYPE_INT
.
-
compose
- Specified by:
compose
in interfaceCompositeContext
-
dispose
public void dispose()- Specified by:
dispose
in interfaceCompositeContext
-