Package com._1c.g5.v8.dt.ui.util
Class DtImageDataRenderer
java.lang.Object
com._1c.g5.v8.dt.ui.util.DtImageDataRenderer
Utility for safety render data in
ImageData
Note that renderer can convert SVG data to PNG image for showing in SWT widgets
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetFormatName(ByteArrayInputStream imageStream) Tries to retrieve image format name fromInputStreamstatic org.eclipse.swt.graphics.ImageDatagetImageDataByPicture(Picture picture, IPictureManager pictureManager, IPictureManifestQueryComputer pictureManifestQueryComputer) Processes picture'sInputStreamusing renderer and returns obtainedImageData.static org.eclipse.swt.graphics.ImageDatagetImageDataByPicture(Picture picture, IPictureManager pictureManager, IPictureManifestQueryComputer pictureManifestQueryComputer, boolean isRtl) Processes picture'sInputStreamusing renderer and returns obtainedImageData.static org.eclipse.swt.graphics.ImageDatarender(byte[] imageBuffer) Render specific source inImageDatastatic org.eclipse.swt.graphics.ImageDatarender(ByteArrayInputStream imageBuffer) Render specific source inImageDatastatic org.eclipse.swt.graphics.ImageDataRender specific source inImageDatastatic org.eclipse.swt.graphics.ImageDatarender(InputStream imageStream) Render specific source inImageData
-
Method Details
-
getImageDataByPicture
public static org.eclipse.swt.graphics.ImageData getImageDataByPicture(Picture picture, IPictureManager pictureManager, IPictureManifestQueryComputer pictureManifestQueryComputer, boolean isRtl) Processes picture'sInputStreamusing renderer and returns obtainedImageData.- Parameters:
picture- Picture to be processed, cannot benullpictureManager- service ofIPictureManager, cannot benullpictureManifestQueryComputer- the query computer for gets picture in current enviroment settings, cannot benullisRtl-Boolean.TRUEif RTL-based picture is requested- Returns:
- rendered picture
ImageData, ornullin case if renderer didn't manage to parse input stream for some reason
-
getImageDataByPicture
public static org.eclipse.swt.graphics.ImageData getImageDataByPicture(Picture picture, IPictureManager pictureManager, IPictureManifestQueryComputer pictureManifestQueryComputer) Processes picture'sInputStreamusing renderer and returns obtainedImageData.- Parameters:
picture- Picture to be processed, cannot benull.pictureManager- service ofIPictureManager, cannot benullpictureManifestQueryComputer- the query computer for gets picture in current enviroment settings, cannot benull- Returns:
- rendered picture
ImageData, ornullin case if renderer didn't manage to parse input stream for some reason
-
render
Render specific source inImageData- Parameters:
imageBuffer- the source bytes stream, cannot benull- Returns:
- rendered
ImageData, ornullif specified source inconsistent or cannot be converted to image
-
render
Render specific source inImageData- Parameters:
imageStream- the source image stream, cannot benull- Returns:
- rendered
ImageData, ornullif specified source inconsistent or cannot be converted to image - See Also:
-
render
public static org.eclipse.swt.graphics.ImageData render(byte[] imageBuffer) Render specific source inImageData- Parameters:
imageBuffer- the source byte array, cannot benull- Returns:
- rendered
ImageData, ornullif specified source inconsistent or cannot be converted to image - See Also:
-
render
Render specific source inImageData- Parameters:
file- the source image file, cannot benull- Returns:
- rendered
ImageData, ornullif specified source inconsistent or cannot be converted to image - See Also:
-
getFormatName
Tries to retrieve image format name fromInputStream- Parameters:
imageStream- image input stream, cannot benull- Returns:
- image format name or empty string if not found
- Throws:
IOException
-