ImageVisual

fun ImageVisual(    path: String,     width: Int = -1,     height: Int = -1,     offsetX: Int = 0,     offsetY: Int = 0)

Loads an ImageVisual from a path.

Parameters

path

Path to image file to show.

width

Width of sub-image. Pass -1 to use full width. Default: -1.

height

Height of sub-image. Pass -1 to use full height. Default: -1.

offsetX

Left bound of sub-image. Gets ignored if width is passed as -1. Default: 0.

offsetY

Top bound of sub-image. Gets ignored if height is passed as -1. Default: 0.


fun ImageVisual(    file: File,     width: Int = -1,     height: Int = -1,     offsetX: Int = 0,     offsetY: Int = 0)

Loads an ImageVisual from a file.

Parameters

file

Image file to show.

width

Width of sub-image. Pass -1 to use full width. Default: -1.

height

Height of sub-image. Pass -1 to use full height. Default: -1.

offsetX

Left bound of sub-image. Gets ignored if width is passed as -1. Default: 0.

offsetY

Top bound of sub-image. Gets ignored if height is passed as -1. Default: 0.


fun ImageVisual(    image: BufferedImage,     width: Int = -1,     height: Int = -1,     offsetX: Int = 0,     offsetY: Int = 0,     path: String = "")

Loads an ImageVisual from a BufferedImage.

Parameters

image

Image to show.

width

Width of sub-image. Pass -1 to use full width. Default: -1.

height

Height of sub-image. Pass -1 to use full height. Default: -1.

offsetX

Left bound of sub-image. Default: 0.

offsetY

Top bound of sub-image. Default: 0.