IMAGE (ICON)

The image namespace contains functions that return an icon and are only assigned to the image property

image.glyph

Return font icon with color and size option.

Syntax

image.glyph(0xE00B)
image.glyph(\uE00B)
image.glyph("\uE00B")
image.glyph("\xE00B")

image.glyph(0xE00B, #0000ff)
image.glyph(0xE00B, #0000ff, 10)
image.glyph(0xE00B, #0000ff, 12, "Segoe MDL2 Assets")
image.res

Returns an icon through a path or through resources.

Syntax

image.res(path)
image.res(path, index)
image.res(path, -id)

image(path)
image(path, index)
image(path, -id)
image.svg, image.svgf

Returns an svg image via a string or from a file path.

Syntax

image.svg('<svg viewBox="0 0 100 100"><path fill="red" d="M0 0 L 100 0 L50 100 Z"/></svg>')
image.svgf(path)
image.rect

Returns a colored rectangle icon of an optional size.

Syntax

image.rect(#0000ff)
image.rect(#0000ff, 10)