Class ImageFunctions.DesaturationCompositeContext

java.lang.Object
com.blackrook.rookscript.desktop.functions.ImageFunctions.DesaturationCompositeContext
All Implemented Interfaces:
CompositeContext
Enclosing class:
ImageFunctions

public static class ImageFunctions.DesaturationCompositeContext extends Object
The composite context for ImageFunctions.DesaturationComposites.
Since:
1.10.2.1
Author:
Matthew Tropiano
  • Field Details

    • srcColorModel

      protected ColorModel srcColorModel
    • dstColorModel

      protected ColorModel dstColorModel
    • preAlpha

      protected int preAlpha
  • Constructor Details

    • DesaturationCompositeContext

      protected DesaturationCompositeContext(ColorModel srcColorModel, ColorModel dstColorModel, float 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

      protected static void checkRaster(ColorModel colorModel, Raster raster)
      Checks if a Raster 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 not DataBuffer.TYPE_INT.
    • compose

      public void compose(Raster src, Raster dstIn, WritableRaster dstOut)
      Specified by:
      compose in interface CompositeContext
    • dispose

      public void dispose()
      Specified by:
      dispose in interface CompositeContext