Class TeaImage
- java.lang.Object
-
- nl.colorize.multimedialib.renderer.teavm.TeaImage
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTeaImage(java.lang.String id, FilePointer origin, Rect region)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TeaImageextractRegion(Rect region)Returns a newImageinstance that is based on the same source image, but only contains the specified rectangular region within the source image.intgetAlpha(int x, int y)Returns the alpha of a pixel within the image.ColorRGBgetColor(int x, int y)Returns the RGB color value of a pixel within the image.intgetHeight()java.lang.StringgetId()FilePointergetOrigin()RectgetRegion()intgetWidth()java.lang.StringtoString()
-
-
-
Constructor Detail
-
TeaImage
protected TeaImage(java.lang.String id, FilePointer origin, Rect region)
-
-
Method Detail
-
getId
public java.lang.String getId()
-
getOrigin
public FilePointer getOrigin()
-
extractRegion
public TeaImage extractRegion(Rect region)
Description copied from interface:ImageReturns a newImageinstance that is based on the same source image, but only contains the specified rectangular region within the source image.- Specified by:
extractRegionin interfaceImage
-
getColor
public ColorRGB getColor(int x, int y)
Description copied from interface:ImageReturns the RGB color value of a pixel within the image. This does not include the pixel's alpha value even if the image does support transparency. The alpha value can be retrieved separately usingImage.getAlpha(int, int).
-
getAlpha
public int getAlpha(int x, int y)Description copied from interface:ImageReturns the alpha of a pixel within the image. The returned value is between 0 (fully transparent) and 100 (fully opaque).
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-