WritableImage class represents a custom graphical image
that is constructed from pixels supplied by the application, and possibly
from PixelReader objects from any number of sources, including
images read from a file or URL.
| Modifier and Type | Field and Description |
|---|---|
| private PixelBuffer | |
| private ImageLoader | |
| private PixelWriter |
| Access | Constructor and Description |
|---|---|
| public | WritableImage(int
the desired width of the writable image width, int the desired height of the desired image height)Constructs an empty image of the specified dimensions. |
| public | WritableImage(PixelBuffer<? extends Buffer>
the pixelBuffer)PixelBuffer used to construct this imageConstructs a |
| public | WritableImage(PixelReader
the reader, int PixelReader to construct fromthe desired width of the writable image and the
width of the region to be read from the width, int readerthe desired height of the desired image and the
width of the region to be read from the height)readerConstructs an image of the specified dimensions, initialized from
the indicated |
| public | WritableImage(PixelReader
the reader, int PixelReader to construct fromthe X coordinate of the upper left corner of the region to
read from the x, int readerthe Y coordinate of the upper left corner of the region to
read from the y, int readerthe desired width of the writable image and the
width of the region to be read from the width, int readerthe desired height of the desired image and the
width of the region to be read from the height)readerConstructs an image of the specified dimensions, initialized from
the indicated region of the |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public final PixelWriter | Returns: thePixelWriter for writing pixels to the imageThis method returns a |
| private Object | |
| pack-priv boolean | |
| private void | |
| pack-priv boolean | |
| private static PixelBuffer |
| pixelBuffer | back to summary |
|---|---|
| private PixelBuffer<? extends Buffer> pixelBuffer | |
| tkImageLoader | back to summary |
|---|---|
| private ImageLoader tkImageLoader | |
| writer | back to summary |
|---|---|
| private PixelWriter writer | |
| WritableImage | back to summary |
|---|---|
| public WritableImage(int width, int height) Constructs an empty image of the specified dimensions.
The image will initially be filled with transparent pixels.
Images constructed this way will always be readable and writable
so the corresponding getPixelReader() and getPixelWriter() will
always return valid objects.
The dimensions must both be positive numbers
| |
| WritableImage | back to summary |
|---|---|
| public WritableImage(PixelBuffer<? extends Buffer> pixelBuffer) Constructs a
| |
| WritableImage | back to summary |
|---|---|
| public WritableImage(PixelReader reader, int width, int height) Constructs an image of the specified dimensions, initialized from
the indicated
| |
| WritableImage | back to summary |
|---|---|
| public WritableImage(PixelReader reader, int x, int y, int width, int height) Constructs an image of the specified dimensions, initialized from
the indicated region of the
| |
| bufferDirty | back to summary |
|---|---|
| pack-priv void bufferDirty(Rectangle rect) | |
| getPixelWriter | back to summary |
|---|---|
| public final PixelWriter getPixelWriter() This method returns a
| |
| getTkImageLoader | back to summary |
|---|---|
| private Object getTkImageLoader() | |
| isAnimation | back to summary |
|---|---|
| pack-priv boolean isAnimation() Overrides javafx. Doc from javafx. Indicates whether image is animated.
| |
| loadTkImage | back to summary |
|---|---|
| private void loadTkImage(Object loader) | |
| pixelsReadable | back to summary |
|---|---|
| pack-priv boolean pixelsReadable() Overrides javafx.
| |
| validatePixelBuffer | back to summary |
|---|---|
| private static PixelBuffer | |