Package org.apache.pivot.wtk.media
Class Picture
- java.lang.Object
-
- org.apache.pivot.wtk.media.Image
-
- org.apache.pivot.wtk.media.Picture
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPicture.InterpolationEnum defining the algorithms to apply when resizing a picture.-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.media.Image
Image.LoadTask
-
-
Field Summary
-
Fields inherited from class org.apache.pivot.wtk.media.Image
imageListeners
-
-
Constructor Summary
Constructors Constructor Description Picture(java.awt.image.BufferedImage bufferedImage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBaseline()Returns the visual's baseline.java.awt.image.BufferedImagegetBufferedImage()intgetHeight()Returns the visual's height.intgetWidth()Returns the visual's width.voidpaint(java.awt.Graphics2D graphics)Paints the visual.voidresample(int size)voidresample(int width, int height)voidresample(int width, int height, Picture.Interpolation interpolation)voidresample(int size, Picture.Interpolation interpolation)voidsetBaseline(int baseline)-
Methods inherited from class org.apache.pivot.wtk.media.Image
getImageListeners, load, load, loadFromCache, toString, update
-
-
-
-
Method Detail
-
getBufferedImage
public java.awt.image.BufferedImage getBufferedImage()
-
getWidth
public int getWidth()
Description copied from interface:VisualReturns the visual's width.- Returns:
- Current width of this visual.
-
getHeight
public int getHeight()
Description copied from interface:VisualReturns the visual's height.- Returns:
- Current height of this visual.
-
resample
public void resample(int size)
-
resample
public void resample(int size, Picture.Interpolation interpolation)
-
resample
public void resample(int width, int height)
-
resample
public void resample(int width, int height, Picture.Interpolation interpolation)
-
getBaseline
public int getBaseline()
Description copied from interface:VisualReturns the visual's baseline.- Specified by:
getBaselinein interfaceVisual- Overrides:
getBaselinein classImage- Returns:
- The baseline relative to the origin of the visual, or
-1if this visual does not have a baseline.
-
setBaseline
public void setBaseline(int baseline)
-
paint
public void paint(java.awt.Graphics2D graphics)
Description copied from interface:VisualPaints the visual.- Parameters:
graphics- The graphics context in which to paint the visual.
-
-