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 BufferedImagecreateBitmap(int width, int height)Create bitmap with specified size and full colorspace.static BufferedImagecreateDoubleBitmap(int width, int height)Create bitmap with double of specified size and full colorspace.static Graphics2DcreateGraphics(BufferedImage area)Create Graphics2D for specified bitmap with rendering hints.voiddrawToGraphics(Graphics2D gc, int locationX, int locationY, int width, int height)voiddrawToGraphics(Graphics2D gc, int centerX, int centerY, int width, int height, double angleRadians)BufferedImagegetAsBitmapForSize(int width, int height)Get scaled image.BufferedImagegetAsBitmapForSize(int width, int height, double angleRadians)Draw rotated image on double canvas size.abstract booleanisBitmap()protected abstract voidrender(Graphics2D gc, int centerX, int centerY, int width, int height, double angleRadians)Render with scale, at specified position, with possible rotation.protected abstract voidrenderSimple(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.
-
-