com.kitfox.svg.app.beans
Modifier and Type | Field and Description |
---|---|
static int |
INTERP_BICUBIC |
static int |
INTERP_BILINEAR |
static int |
INTERP_NEAREST_NEIGHBOR |
static long |
serialVersionUID |
Constructor and Description |
---|
SVGIcon()
Creates a new instance of SVGIcon
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener p) |
boolean |
getAntiAlias() |
int |
getIconHeight() |
int |
getIconWidth() |
int |
getInterpolation() |
Dimension |
getPreferredSize() |
SVGUniverse |
getSvgUniverse() |
URI |
getSvgURI() |
boolean |
getUseAntiAlias()
Deprecated.
|
boolean |
isClipToViewbox()
clipToViewbox will set a clip box equivilant to the SVG's viewbox before
rendering.
|
boolean |
isScaleToFit()
If this SVG document has a viewbox, if scaleToFit is set, will scale the viewbox to match the
preferred size of this icon
|
void |
paintIcon(Component comp,
Graphics gg,
int x,
int y)
Draws the icon to the specified component.
|
void |
removePropertyChangeListener(PropertyChangeListener p) |
void |
setAntiAlias(boolean antiAlias) |
void |
setClipToViewbox(boolean clipToViewbox) |
void |
setInterpolation(int interpolation) |
void |
setPreferredSize(Dimension preferredSize) |
void |
setScaleToFit(boolean scaleToFit) |
void |
setSvgResourcePath(String resourcePath)
Loads an SVG document from the classpath.
|
void |
setSvgUniverse(SVGUniverse svgUniverse) |
void |
setSvgURI(URI svgURI)
Loads an SVG document from a URI.
|
void |
setUseAntiAlias(boolean antiAlias)
Deprecated.
|
public static final long serialVersionUID
public static final int INTERP_NEAREST_NEIGHBOR
public static final int INTERP_BILINEAR
public static final int INTERP_BICUBIC
public void addPropertyChangeListener(PropertyChangeListener p)
public void removePropertyChangeListener(PropertyChangeListener p)
public int getIconHeight()
getIconHeight
in interface Icon
public int getIconWidth()
getIconWidth
in interface Icon
public void paintIcon(Component comp, Graphics gg, int x, int y)
public SVGUniverse getSvgUniverse()
public void setSvgUniverse(SVGUniverse svgUniverse)
public URI getSvgURI()
public void setSvgURI(URI svgURI)
svgURI
- - URI to load document frompublic void setSvgResourcePath(String resourcePath)
resourcePath
- - resource to loadpublic boolean isScaleToFit()
public void setScaleToFit(boolean scaleToFit)
public Dimension getPreferredSize()
public void setPreferredSize(Dimension preferredSize)
public boolean getUseAntiAlias()
public void setUseAntiAlias(boolean antiAlias)
antiAlias
- true to use antiAliasing.public boolean getAntiAlias()
public void setAntiAlias(boolean antiAlias)
antiAlias
- true to use antiAliasing.public int getInterpolation()
public void setInterpolation(int interpolation)
interpolation
- Interpolation value used in rescaling images.
Should be one of
INTERP_NEAREST_NEIGHBOR - Fastest, one pixel resampling, poor quality
INTERP_BILINEAR - four pixel resampling
INTERP_BICUBIC - Slowest, nine pixel resampling, best qualitypublic boolean isClipToViewbox()
public void setClipToViewbox(boolean clipToViewbox)