Package snap.swing

Class AWTEnv.AWTColorSpace

java.lang.Object
snap.gfx.ColorSpace
snap.swing.AWTEnv.AWTColorSpace
Enclosing class:
AWTEnv

public static class AWTEnv.AWTColorSpace extends ColorSpace
Implementation of snap ColorSpace using java.awt.color.ColorSpace.
  • Method Details

    • isCS_sRGB

      public boolean isCS_sRGB()
      Description copied from class: ColorSpace
      Returns true if the ColorSpace is CS_sRGB.
      Overrides:
      isCS_sRGB in class ColorSpace
    • toRGB

      public float[] toRGB(float[] colorvalue)
      Description copied from class: ColorSpace
      Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.
      Specified by:
      toRGB in class ColorSpace
    • fromRGB

      public float[] fromRGB(float[] rgbvalue)
      Description copied from class: ColorSpace
      Transforms a color value assumed to be in the default CS_sRGB color space into this ColorSpace.
      Specified by:
      fromRGB in class ColorSpace
    • toCIEXYZ

      public float[] toCIEXYZ(float[] colorvalue)
      Description copied from class: ColorSpace
      Transforms a color value assumed to be in this ColorSpace into the CS_CIEXYZ conversion color space.
      Specified by:
      toCIEXYZ in class ColorSpace
    • fromCIEXYZ

      public float[] fromCIEXYZ(float[] colorvalue)
      Description copied from class: ColorSpace
      Transforms a color value assumed to be in the CS_CIEXYZ conversion color space into this ColorSpace.
      Specified by:
      fromCIEXYZ in class ColorSpace
    • getType

      public int getType()
      Description copied from class: ColorSpace
      Returns the color space type of this ColorSpace (for example TYPE_RGB, TYPE_XYZ, ...). The type defines the number of components of the color space and the interpretation, e.g. TYPE_RGB identifies a color space with three components - red, green, and blue. It does not define the particular color characteristics of the space, e.g. the chromaticities of the primaries.
      Overrides:
      getType in class ColorSpace
    • getNumComponents

      public int getNumComponents()
      Description copied from class: ColorSpace
      Returns the number of components of this ColorSpace.
      Overrides:
      getNumComponents in class ColorSpace
    • getName

      public String getName(int idx)
      Description copied from class: ColorSpace
      Returns the name of the component given the component index.
      Overrides:
      getName in class ColorSpace