Package playn.core
Class ImageImpl
java.lang.Object
playn.core.TileSource
playn.core.Image
playn.core.ImageImpl
- All Implemented Interfaces:
AutoCloseable,Canvas.Drawable,Closeable
An implementation detail. Not part of the public API.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUsed to provide bitmap data to the abstract image once it's ready.Nested classes/interfaces inherited from class playn.core.Image
Image.BitmapTransformer, Image.RegionNested classes/interfaces inherited from interface react.Closeable
Closeable.Set, Closeable.Util -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidNotifies this image that its implementation bitmap failed to load.intReturns the height of this image in physical pixels.intReturns the width of this image in physical pixels.scale()Returns the scale of resolution independent pixels to actual pixels for this image.voidsucceed(ImageImpl.Data data) Notifies this image that its implementation bitmap is available.Methods inherited from class playn.core.Image
close, createPattern, createTexture, getRgb, height, isLoaded, region, setConfig, setRgb, texture, textureAsync, tile, tileAsync, transform, updateTexture, widthMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface playn.core.Canvas.Drawable
draw, draw
-
Method Details
-
succeed
Notifies this image that its implementation bitmap is available. This can be called from any thread. -
fail
Notifies this image that its implementation bitmap failed to load. This can be called from any thread. -
scale
Description copied from class:ImageReturns the scale of resolution independent pixels to actual pixels for this image. This will beScale.ONEunless HiDPI images are being used. -
pixelWidth
public int pixelWidth()Description copied from class:ImageReturns the width of this image in physical pixels. If this image is loaded asynchrously, this will return 0 until loading is complete. SeeImage.state.- Specified by:
pixelWidthin classImage
-
pixelHeight
public int pixelHeight()Description copied from class:ImageReturns the height of this image in physical pixels. If this image is loaded asynchrously, this will return 0 until loading is complete. SeeImage.state.- Specified by:
pixelHeightin classImage
-