@Role
public interface SVGRasterizer
Modifier and Type | Method and Description |
---|---|
void |
rasterizeToResponse(String content,
int width,
int height)
Rasterize an image as PNG into the current response.
|
File |
rasterizeToTemporaryFile(String content,
int width,
int height)
Rasterize an image as PNG into a temporary file.
|
TemporaryResourceReference |
rasterizeToTemporaryResource(String content,
int width,
int height)
Rasterize an image as PNG into a temporary resource belonging to the current document, accessible through the
"tmp" resource URL handler.
|
TemporaryResourceReference |
rasterizeToTemporaryResource(String content,
int width,
int height,
DocumentReference targetContext)
Rasterize an image as PNG into a temporary resource belonging to the specified document, accessible through the
"tmp" resource URL handler.
|
File rasterizeToTemporaryFile(String content, int width, int height) throws IOException
content
- the SVG imagewidth
- the desired width of the raster image, in pixels; if 0 or a negative number, the image's native size
is usedheight
- the desired height of the raster image, in pixels; if 0 or a negative number, the image's native
size is usedIOException
- if temporary files can't be accessedTemporaryResourceReference rasterizeToTemporaryResource(String content, int width, int height) throws IOException
content
- the SVG imagewidth
- the desired width of the raster image, in pixels; if 0 or a negative number, the image's native size
is usedheight
- the desired height of the raster image, in pixels; if 0 or a negative number, the image's native
size is usedIOException
- if temporary files can't be accessedTemporaryResourceReference rasterizeToTemporaryResource(String content, int width, int height, DocumentReference targetContext) throws IOException
content
- the SVG imagewidth
- the desired width of the raster image, in pixels; if 0 or a negative number, the image's native size
is usedheight
- the desired height of the raster image, in pixels; if 0 or a negative number, the image's native
size is usedtargetContext
- the document which will "own" the new temporary resourceIOException
- if temporary files can't be accessedvoid rasterizeToResponse(String content, int width, int height) throws IOException
content
- the SVG imagewidth
- the desired width of the raster image, in pixels; if 0 or a negative number, the image's native size
is usedheight
- the desired height of the raster image, in pixels; if 0 or a negative number, the image's native
size is usedIOException
- if writing the response failsCopyright © 2004–2022 XWiki. All rights reserved.