Image

The image base class.

Constructors

this
this()

Construct the image.

Members

Functions

blank
auto blank()

Clears the image of all pixel data and effectively makes it transparent.

destroy
void destroy()

Destroy this image.

embedBase64Data
auto embedBase64Data()

This method embeds the image as a base64 encoded string into the application at compile-time. The path to the image must be passed to the compiler using the -J switch.

getData
string getData()

Get the image data.

getFile
string getFile()

Get the image file.

getFormat
string getFormat()

Get the image format.

getGamma
string getGamma()

Get the current image gamma.

getHeight
string getHeight()

Get the current cropped image height.

getPalette
string getPalette()

Get the current palette.

getWidth
string getWidth()

Get the current cropped image height.

setData
auto setData(string data)

Specifies the contents of the image as a string. The string should contain binary data or, for some formats, base64-encoded data (this is currently guaranteed to be supported for PNG and GIF images). A set file takes precedence over the setting of data.

setFile
auto setFile(string file)

Set the image file.

setFormat
auto setFormat(string format)

Set the image format. Once set the image only accepts files or data in this format.

setGamma
auto setGamma(double gamma)

Set the image gamma.

setHeight
auto setHeight(int height)

Set the image height.

setPalette
auto setPalette(string palette)

Set the image palette. This setting set how many levels of color/gray are used.

setWidth
auto setWidth(int width)

Set the image width.

Inherited Members

From Element

_tk
Tk _tk;
Undocumented in source.
_parent
Element _parent;
Undocumented in source.
_manualIdentifier
string _manualIdentifier;
Undocumented in source.
_elementId
string _elementId;
Undocumented in source.
_hash
string _hash;
Undocumented in source.
id
string id [@property getter]

The unique id of this element.

parent
Element parent [@property getter]

The parent element if any.

overrideGeneratedId
void overrideGeneratedId(string identifier)
Undocumented in source. Be warned that the author may not have intended to support it.
generateHash
string generateHash()
Undocumented in source. Be warned that the author may not have intended to support it.
generateHash
string generateHash(string text, A args)
Undocumented in source. Be warned that the author may not have intended to support it.
getCommandName
string getCommandName(string uniqueData)
Undocumented in source. Be warned that the author may not have intended to support it.
createCommand
string createCommand(CommandCallback callback, string uniqueData)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta