public class PhysicalSizeImageConverter
extends java.lang.Object
This class will only provide useful output if the graphics configuration is able to provide correct physical size information.
Constructor and Description |
---|
PhysicalSizeImageConverter(java.awt.GraphicsConfiguration graphicsConfig)
Constructor.
|
PhysicalSizeImageConverter(java.awt.GraphicsDevice graphicsDevice)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
javax.swing.Icon |
getIcon(VectorImage image,
double pointSize)
Get a square icon with the given physical size.
|
javax.swing.Icon |
getIcon(VectorImage image,
double pointWidth,
double pointHeight)
Get an icon with the given physical width and height.
|
java.awt.Image |
getImage(VectorImage icon,
double pointSize)
Get a square image with the given physical size.
|
java.awt.Image |
getImage(VectorImage icon,
double pointWidth,
double pointHeight)
Get an image for the given point width and height.
|
public PhysicalSizeImageConverter(@NotNull java.awt.GraphicsConfiguration graphicsConfig)
graphicsConfig
- graphics config for which physically correctly sized images are requestedpublic PhysicalSizeImageConverter(@NotNull java.awt.GraphicsDevice graphicsDevice)
graphicsDevice
- graphics device for which's default configuration physically correctly sized images are requested@NotNull public java.awt.Image getImage(@NotNull VectorImage icon, double pointSize)
icon
- vector imagepointSize
- size of target image in points (i.e. 1/72 inch)@NotNull public java.awt.Image getImage(@NotNull VectorImage icon, double pointWidth, double pointHeight)
icon
- vector imagepointWidth
- width of target image in points (1/72 inch)pointHeight
- height of target image in points (1/72 inch)public javax.swing.Icon getIcon(@NotNull VectorImage image, double pointSize)
image
- vector imagepointSize
- size of target icon in points (i.e. 1/72 inch)@NotNull public javax.swing.Icon getIcon(@NotNull VectorImage image, double pointWidth, double pointHeight)
image
- vector imagepointWidth
- width of target image in points (1/72 inch)pointHeight
- height of target image in points (1/72 inch)