Class PictureUtils


  • public class PictureUtils
    extends Object
    Provides picture manipulation helper methods.
    • Method Detail

      • getImageDataByPicture

        public static Optional<org.eclipse.swt.graphics.ImageData> getImageDataByPicture​(Picture picture,
                                                                                         IPictureManager pictureManager,
                                                                                         Function<InputStream,​Optional<org.eclipse.swt.graphics.ImageData>> renderer,
                                                                                         boolean isRtl)
        Processes picture's InputStream using renderer and returns obtained ImageData.
        Parameters:
        picture - Picture to be processed, cannot be null.
        manifest - Picture's IPictureManifest
        renderer - Picture renderer that parses picture's InputStream and returns ImageData, cannot be null
        isRtl - Boolean.TRUE if RTL-based picture is requested, can be null
        Returns:
        Optional ImageData, never null but may return Optional.empty() in case if renderer didn't manage to parse imput stream for some reason
      • getImageDataByPicture

        public static Optional<org.eclipse.swt.graphics.ImageData> getImageDataByPicture​(Picture picture,
                                                                                         IPictureManager pictureManager,
                                                                                         Function<InputStream,​Optional<org.eclipse.swt.graphics.ImageData>> renderer)
        Processes picture's InputStream using renderer and returns obtained ImageData.
        Parameters:
        picture - Picture to be processed, cannot be null.
        manifest - Picture's IPictureManifest
        renderer - Picture renderer that parses picture's InputStream and returns ImageData, cannot be null
        Returns:
        Optional ImageData, never null but may return Optional.empty() in case if renderer didn't manage to parse imput stream for some reason