|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gmf.runtime.draw2d.ui.render.factory.RenderedImageFactory
public class RenderedImageFactory
Constructor Summary | |
---|---|
RenderedImageFactory()
|
Method Summary | |
---|---|
static RenderInfo |
createInfo(int width,
int height,
boolean maintainAspectRatio,
boolean antialias,
RGB fill,
RGB outline)
createInfo static Utility to create a RenderInfo object. |
static RenderedImage |
getInstance(byte[] buffer)
getInstance static constructor method for retrieving the appropriate instance of the immutable class RenderedImage . |
static RenderedImage |
getInstance(byte[] buffer,
RenderInfo info)
getInstance static constructor method for retrieving the appropriate instance of the immutable class RenderedImage . |
static RenderedImage |
getInstance(byte[] buffer,
RenderInfo info,
java.lang.String url)
getInstance static constructor method for retrieving the appropriate instance of the immutable class RenderedImage . |
static RenderedImage |
getInstance(java.lang.String szFilePath)
getInstance static constructor method for retrieving the appropriate instance of the immutable class RenderedImage . |
static RenderedImage |
getInstance(java.lang.String szFilePath,
RenderInfo info)
getInstance static constructor method for retrieving the appropriate instance of the immutable class RenderedImage . |
static RenderedImage |
getInstance(java.net.URL theURL)
getInstance static constructor method for retrieving the appropriate instance of the immutable class RenderedImage . |
static RenderedImage |
getInstance(java.net.URL theURL,
RenderInfo info)
getInstance static constructor method for retrieving the appropriate instance of the immutable class RenderedImage . |
static RenderedImage |
getRelatedInstance(RenderedImage image,
RenderInfo info)
Returns a related instance of the given RenderedImage that
is based on the same byte stream or file info but instrumented for the
passed in RenderInfo object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RenderedImageFactory()
Method Detail |
---|
public static RenderInfo createInfo(int width, int height, boolean maintainAspectRatio, boolean antialias, RGB fill, RGB outline)
width
- the width of the rendered image to setheight
- the height of the rendered image to setmaintainAspectRatio
- boolean
true
if aspect ratio of
original vector file is maintained, false
otherwiseantialias
- boolean
true
if the image is to
be rendered using anti-aliasing (removing "jaggies" producing
smoother lines), false
otherwisefill
- the RGB
of the fill that could instrumented
into image formats that support dynamic color replacement.
Typically, this would replace colors in the image which are
"white" i.e. RGB(255,255,255)outline
- the RGB
of the outline that could
instrumented into image formats that support dynamic color
replacement. Typically, this would replace colors in the image
which are "black" i.e. RGB(0,0,0)
RenderInfo
object that contains information about
the rendered image.public static RenderedImage getInstance(java.net.URL theURL)
RenderedImage
. This
method is used to read svg images from JARs.
theURL
- URL of the SVG image. Normally in a JAR
RenderedImage
instance with the size dimensions
requested.public static RenderedImage getInstance(java.net.URL theURL, RenderInfo info)
RenderedImage
. This
method is used to read svg images from JARs.
theURL
- URL of the SVG image.info
- object containing information about the size and general data
regarding how the image will be rendered.
RenderedImage
instance with the size dimensions
requested.public static RenderedImage getInstance(byte[] buffer, RenderInfo info, java.lang.String url)
RenderedImage
.
buffer
- byte[] array containing an cached SVG image file.info
- object containing information about the size and general data
regarding how the image will be rendered.url
- the url of the image (filename url - should be there for SVG, since it may have external references)
RenderedImage
instance with the size dimensions
requested.public static RenderedImage getInstance(java.lang.String szFilePath)
RenderedImage
.
szFilePath
- String
file path of svg file
RenderedImage
instance with the size dimensions
requested.public static RenderedImage getInstance(java.lang.String szFilePath, RenderInfo info)
RenderedImage
.
szFilePath
- String
file path of svg fileinfo
- RenderInfo
object containing information about
the size and general data regarding how the image will be
rendered.
RenderedImage
instance with the size dimensions
requested.public static RenderedImage getInstance(byte[] buffer)
RenderedImage
.
buffer
- byte[]
array containing an cached SVG image
file.
RenderedImage
that encapsulates the contents
of the given byte buffer.public static RenderedImage getRelatedInstance(RenderedImage image, RenderInfo info)
RenderedImage
that
is based on the same byte stream or file info but instrumented for the
passed in RenderInfo
object
image
- RenderedImage
that is used as a base to
retrieve the related instance.info
- RenderInfo
object containing information about
the size and general data regarding how the image will be
rendered.
RenderedImage
instance with the size dimensions
requested. May return null
if no related instance
can be found or if the original buffer cannot be retrieved.public static RenderedImage getInstance(byte[] buffer, RenderInfo info)
RenderedImage
.
buffer
- byte[] array containing an cached SVG image file.info
- object containing information about the size and general data
regarding how the image will be rendered.
RenderedImage
instance with the size dimensions
requested.
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.