Interface SVGRasterizer
public interface SVGRasterizer
Defines the interface for an SVG rasterizer, responsible for converting SVG
data into rasterized images.
-
Method Summary
Modifier and TypeMethodDescriptionrasterizeSVG(InputStream stream, int zoom) Rasterizes an SVG image from the providedInputStreamusing the specified zoom.rasterizeSVG(InputStream stream, int width, int height) Rasterizes an SVG image from the providedInputStreaminto a raster image of the specified width and height.
-
Method Details
-
rasterizeSVG
Rasterizes an SVG image from the providedInputStreamusing the specified zoom.- Parameters:
stream- the SVG image as anInputStream.zoom- the scaling percentage (e.g., 100 = original size, 200 = double size). This value must be greater zero.- Returns:
- the
ImageDatafor the rasterized image. - Throws:
SWTException-- ERROR_INVALID_IMAGE - if the SVG cannot be loaded
IllegalArgumentException-- ERROR_INVALID_ARGUMENT - if the zoom is less than zero
-
rasterizeSVG
Rasterizes an SVG image from the providedInputStreaminto a raster image of the specified width and height.- Parameters:
stream- the SVG image as anInputStream.width- the width of the rasterized image in pixels (must be positive).height- the height of the rasterized image in pixels (must be positive).- Returns:
- the
ImageDatafor the rasterized image. - Throws:
SWTException-- ERROR_INVALID_IMAGE - if the SVG cannot be loaded
IllegalArgumentException-- ERROR_INVALID_ARGUMENT - if the width or height is less than zero
-