Package org.pentaho.di.core
Class SwingUniversalImage
- java.lang.Object
-
- org.pentaho.di.core.SwingUniversalImage
-
- Direct Known Subclasses:
SwingUniversalImageBitmap
,SwingUniversalImageSvg
public abstract class SwingUniversalImage extends Object
Universal image storage for Swing processing. It contains SVG or bitmap image depends on file and settings.
-
-
Constructor Summary
Constructors Constructor Description SwingUniversalImage()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static BufferedImage
createBitmap(int width, int height)
Create bitmap with specified size and full colorspace.static BufferedImage
createDoubleBitmap(int width, int height)
Create bitmap with double of specified size and full colorspace.static Graphics2D
createGraphics(BufferedImage area)
Create Graphics2D for specified bitmap with rendering hints.void
drawToGraphics(Graphics2D gc, int locationX, int locationY, int width, int height)
void
drawToGraphics(Graphics2D gc, int centerX, int centerY, int width, int height, double angleRadians)
BufferedImage
getAsBitmapForSize(int width, int height)
Get scaled image.BufferedImage
getAsBitmapForSize(int width, int height, double angleRadians)
Draw rotated image on double canvas size.abstract boolean
isBitmap()
protected abstract void
render(Graphics2D gc, int centerX, int centerY, int width, int height, double angleRadians)
Render with scale, at specified position, with possible rotation.protected abstract void
renderSimple(BufferedImage area)
Just scale for area's size.
-
-
-
Method Detail
-
isBitmap
public abstract boolean isBitmap()
-
renderSimple
protected abstract void renderSimple(BufferedImage area)
Just scale for area's size.
-
render
protected abstract void render(Graphics2D gc, int centerX, int centerY, int width, int height, double angleRadians)
Render with scale, at specified position, with possible rotation.
-
getAsBitmapForSize
public BufferedImage getAsBitmapForSize(int width, int height)
Get scaled image.
-
getAsBitmapForSize
public BufferedImage getAsBitmapForSize(int width, int height, double angleRadians)
Draw rotated image on double canvas size. It required against lost corners on rotate.
-
drawToGraphics
public void drawToGraphics(Graphics2D gc, int locationX, int locationY, int width, int height)
-
drawToGraphics
public void drawToGraphics(Graphics2D gc, int centerX, int centerY, int width, int height, double angleRadians)
-
createBitmap
public static BufferedImage createBitmap(int width, int height)
Create bitmap with specified size and full colorspace.
-
createDoubleBitmap
public static BufferedImage createDoubleBitmap(int width, int height)
Create bitmap with double of specified size and full colorspace. Used for rotated images.
-
createGraphics
public static Graphics2D createGraphics(BufferedImage area)
Create Graphics2D for specified bitmap with rendering hints.
-
-