Class FXRenderer


  • public class FXRenderer
    extends Object
    FXRenderer for the FXCanvas
    Author:
    Kiyut
    • Constructor Detail

      • FXRenderer

        public FXRenderer​(FXCanvas canvas)
    • Method Detail

      • getSourceImage

        public BufferedImage getSourceImage()
        Return the source image
        Returns:
        BufferedImage
      • getRenderedImage

        public BufferedImage getRenderedImage()
        Return the rendered image
        Returns:
        BufferedImage
      • setImageFile

        public void setImageFile​(File file,
                                 boolean open)
        Set the Image file, if the param open is true file will be loaded after the first render call otherwise only set the file only, does not open or loading the image file
        Parameters:
        file - File
        open - true/false, if true file will be loaded after the first render call
        See Also:
        getImageFile()
      • setFilterOp

        public void setFilterOp​(BufferedImageOp filterOp)
        Set the filterOp
        Parameters:
        filterOp - BufferedImageOp
        See Also:
        getFilterOp()
      • apply

        public void apply()
        Apply filter operation which means change the source image into the result of filter
      • discard

        public void discard()
        Discard filter operation
      • crop

        protected void crop​(Area area)
        Crop Source Image
        Parameters:
        area - the specified area for cropping
      • render

        public void render()
        render the image using the applied filter from sourceImage into renderedImage if there are selection Area, the filter will only applied to that area, otherwise the whole image. If the filterOp or source is null, nothing performed
        See Also:
        getSourceImage(), getRenderedImage(), setFilterOp(BufferedImageOp)