Class JFXImage

java.lang.Object
nl.colorize.multimedialib.renderer.jfx.JFXImage
All Implemented Interfaces:
Image

public class JFXImage extends Object implements Image
Image loaded with JavaFX, which does not use the Java2D and ImageIO APIs that are part of the standard library.
  • Constructor Details

    • JFXImage

      protected JFXImage(javafx.scene.image.Image image, Region region)
  • Method Details

    • extractRegion

      public JFXImage extractRegion(Region subRegion)
      Description copied from interface: Image
      Returns a new Image instance that is based on the same source image, but only contains the specified rectangular region within the source image. If this Image is itself a region, the coordinates in the region parameter will be interpreted relative to this image's region.
      Specified by:
      extractRegion in interface Image
    • getColor

      public ColorRGB getColor(int x, int y)
      Description copied from interface: Image
      Returns the RGB color value of a pixel within the image. This does not include the pixel's alpha value even if the image does support transparency. The returned color does not include an alpha channel. The alpha value of transparent or translucent pixels in the image can be obtained using Image.getAlpha(int, int).
      Specified by:
      getColor in interface Image
    • getAlpha

      public int getAlpha(int x, int y)
      Description copied from interface: Image
      Returns the alpha of a pixel within the image. The returned value is between 0 (fully transparent) and 100 (fully opaque).
      Specified by:
      getAlpha in interface Image
    • getImage

      public javafx.scene.image.Image getImage()
    • getRegion

      public Region getRegion()
      Specified by:
      getRegion in interface Image
    • getPixels

      public javafx.scene.image.PixelReader getPixels()