Package ej.widget.render
Class ImagePainter
- java.lang.Object
-
- ej.widget.render.ImagePainter
-
public class ImagePainter extends java.lang.Object
Provides utility methods to draw images.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
computeOptimalSize(ej.microui.display.Image image, ej.mwt.util.Size size)
Computes the optimal size of an image.static void
drawImageInArea(ej.microui.display.GraphicsContext g, ej.microui.display.Image image, int x, int y, int width, int height, int horizontalAlignment, int verticalAlignment)
Draws an image aligned in a area.
-
-
-
Method Detail
-
computeOptimalSize
public static void computeOptimalSize(ej.microui.display.Image image, ej.mwt.util.Size size)
Computes the optimal size of an image.The given size is modified to set the optimal size.
- Parameters:
image
- the image.size
- the size to modify.
-
drawImageInArea
public static void drawImageInArea(ej.microui.display.GraphicsContext g, ej.microui.display.Image image, int x, int y, int width, int height, int horizontalAlignment, int verticalAlignment)
Draws an image aligned in a area.- Parameters:
g
- the graphics context.image
- the image.x
- the area x coordinate.y
- the area y coordinate.width
- the area width.height
- the area height.horizontalAlignment
- the horizontal alignment.verticalAlignment
- the vertical alignment.
-
-