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
Modifier and TypeClassDescriptionstatic class
Used to provide bitmap data to the abstract image once it's ready.Nested classes/interfaces inherited from class playn.core.Image
Image.BitmapTransformer, Image.Region
Nested classes/interfaces inherited from interface react.Closeable
Closeable.Set, Closeable.Util
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Notifies this image that its implementation bitmap failed to load.int
Returns the height of this image in physical pixels.int
Returns the width of this image in physical pixels.scale()
Returns the scale of resolution independent pixels to actual pixels for this image.void
succeed
(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, width
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:Image
Returns the scale of resolution independent pixels to actual pixels for this image. This will beScale.ONE
unless HiDPI images are being used. -
pixelWidth
public int pixelWidth()Description copied from class:Image
Returns 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:
pixelWidth
in classImage
-
pixelHeight
public int pixelHeight()Description copied from class:Image
Returns 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:
pixelHeight
in classImage
-