abstract rtconst class vaseGraphics::Image

sys::Obj
  vaseGraphics::Image

@Js

Image represents a graphical image.

createGraphics

protected abstract Graphics createGraphics()

dispose

abstract Void dispose()

Free any operating system resources used by this instance.

fromStream

static Image fromStream(InStream in)

make form input stream

fromUri

static Image fromUri(Uri uri, Map<Str,Obj>? options := null, Func<Void,This>? onLoad := null)

make form uri

getPixel

abstract Int getPixel(Int x, Int y)

Returns the pixel value at x,y

height

abstract Int height()

isImmutable

virtual override Bool isImmutable()

isReady

abstract Bool isReady()

is loaded in javascript

make

static Image make(Size size)

make an empty image

makeSize

static Image makeSize(Int w, Int h)

paint

This paint(Func<Void,Graphics> f)

create graphics context from image and paint by the given function.

privateMake

new privateMake()

save

abstract Void save(OutStream out, Str format := "png")

Save image to outStream. default format is png. Currently supported image formats are:

  • BMP (Windows or OS/2 Bitmap)
  • ICO (Windows Icon)
  • JPEG
  • GIF
  • PNG
  • TIFF
setPixel

abstract Void setPixel(Int x, Int y, Int value)

Set the pixel value at x,y

toImmutable

virtual override Obj toImmutable()

width

abstract Int width()