APIdia Launch Partner
Top Description Methods
com.sun.javafx.tk

public Interface PlatformImage

Known Direct Implementers
com.sun.prism.Image
Imports
com.sun.javafx.geom.Rectangle, java.nio.Buffer, .ByteBuffer, .IntBuffer, javafx.scene.image.PixelFormat, .PixelReader, .WritablePixelFormat

Common interface to all toolkit-specific objects used to store image data for a javafx.image.Image object.

Method Summary

Modifier and TypeMethod and Description
public void
public int
getArgb(int
X coordinate of pixel
x
,
int
Y coordinate of pixel
y
)

Returns: the non-premultiplied pixel in integer ARGB component ordering.

public <T extends Buffer> void
getPixels(int x, int y, int w, int h, WritablePixelFormat<T> pixelformat, T pixels, int scanlineElems)

public void
getPixels(int x, int y, int w, int h, WritablePixelFormat<ByteBuffer> pixelformat, byte[] pixels, int offset, int scanlineBytes)

public void
getPixels(int x, int y, int w, int h, WritablePixelFormat<IntBuffer> pixelformat, int[] pixels, int offset, int scanlineInts)

public float

Returns:

the number of actual image pixels per 72DPI virtual pixel
getPixelScale
()

Gets the scale representing how large an area a 72DPI virtual pixel covers in terms of the pixels of this image.

public PixelFormat<T extends Buffer>
getPlatformPixelFormat()

Returns: the PixelFormat to use for the pixel data transfer methods getPixels() and setPixels().

public boolean
public PlatformImage
public void
setArgb(int
X coordinate of pixel
x
,
int
Y coordinate of pixel
y
,
int argb)

public <T extends Buffer> void
setPixels(int x, int y, int w, int h, PixelFormat<T> pixelformat, T pixels, int scanlineBytes)

public void
setPixels(int x, int y, int w, int h, PixelFormat<ByteBuffer> pixelformat, byte[] pixels, int offset, int scanlineBytes)

public void
setPixels(int x, int y, int w, int h, PixelFormat<IntBuffer> pixelformat, int[] pixels, int offset, int scanlineInts)

public void
setPixels(int dstx, int dsty, int w, int h, PixelReader reader, int srcx, int srcy)

Method Detail

bufferDirtyback to summary
public void bufferDirty(Rectangle rect)
getArgbback to summary
public int getArgb(int x, int y)
Parameters
x:int

X coordinate of pixel

y:int

Y coordinate of pixel

Returns:int

the non-premultiplied pixel in integer ARGB component ordering.

getPixelsback to summary
public <T extends Buffer> void getPixels(int x, int y, int w, int h, WritablePixelFormat<T> pixelformat, T pixels, int scanlineElems)
getPixelsback to summary
public void getPixels(int x, int y, int w, int h, WritablePixelFormat<ByteBuffer> pixelformat, byte[] pixels, int offset, int scanlineBytes)
getPixelsback to summary
public void getPixels(int x, int y, int w, int h, WritablePixelFormat<IntBuffer> pixelformat, int[] pixels, int offset, int scanlineInts)
getPixelScaleback to summary
public float getPixelScale()

Gets the scale representing how large an area a 72DPI virtual pixel covers in terms of the pixels of this image. A 72DPI platform image would return 1.0f. A 144DPI platform image would return 2.0f.

Returns:float

the number of actual image pixels per 72DPI virtual pixel

getPlatformPixelFormatback to summary
public PixelFormat<T extends Buffer> getPlatformPixelFormat()
Returns:PixelFormat<T extends Buffer>

the PixelFormat to use for the pixel data transfer methods getPixels() and setPixels().

isWritableback to summary
public boolean isWritable()
promoteToWritableImageback to summary
public PlatformImage promoteToWritableImage()
setArgbback to summary
public void setArgb(int x, int y, int argb)
Parameters
x:int

X coordinate of pixel

y:int

Y coordinate of pixel

setPixelsback to summary
public <T extends Buffer> void setPixels(int x, int y, int w, int h, PixelFormat<T> pixelformat, T pixels, int scanlineBytes)
setPixelsback to summary
public void setPixels(int x, int y, int w, int h, PixelFormat<ByteBuffer> pixelformat, byte[] pixels, int offset, int scanlineBytes)
setPixelsback to summary
public void setPixels(int x, int y, int w, int h, PixelFormat<IntBuffer> pixelformat, int[] pixels, int offset, int scanlineInts)
setPixelsback to summary
public void setPixels(int dstx, int dsty, int w, int h, PixelReader reader, int srcx, int srcy)