RasterImage
class in package klyn.gui.images

    public abstract class RasterImage extends Image:

Image
└ RasterImage

Base class for decoded raster images.

Raster images are decoded natively and cached by filename. The current backend supports BMP directly, uses Windows Imaging Component on Windows, and uses the platform `gdk-pixbuf` runtime on Linux when available for GIF, JPEG and TIFF families.

    image = BmpImage("logo.bmp")
    painter.drawImage(image, 16, 16, 128, 64)

Properties

Modifier and Type | Member | Description
--- | --- | ---
public override readonly property | height `height as Int:` | Decoded image height in pixels.
public override readonly property | width `width as Int:` | Decoded image width in pixels.

Inherited Properties
property Inherited Properties from Image: fileName, height, width
Methods

Modifier and Type | Member | Description
--- | --- | ---
public override | crop `crop(x as Int, y as Int, width as Int, height as Int) as Void:` | Selects a source rectangle and exposes it as the new logical image area.
public override | load `load(fileName as String) as Void:` | Loads another raster file into this image descriptor.
public | render `render(painter as Painter, x as Int, y as Int, width as Int = -1, height as Int = -1, sourceX as Int = 0, sourceY as Int = 0, sourceWidth as Int = -1, sourceHeight as Int = -1) as Void:` | Renders the image into the given painter.
public override | resize `resize(width as Int, height as Int) as Void:` | Stores logical dimensions for subsequent rendering decisions.

Inherited Methods
method Inherited Methods from Image: crop, getImage, load, resize