GuiBitmapCtrl

A gui control that is used to display an image.

Inherit:
GuiControl

Description

The image is stretched to the constraints of the control by default. However, the control can also tile the image as well.

The image itself is stored inside the GuiBitmapCtrl::bitmap field. The boolean value that decides whether the image is stretched or tiled is stored inside the GuiBitmapCtrl::wrap field.

Example:

// Create a tiling GuiBitmapCtrl that displays "myImage.png"
%bitmapCtrl = newGuiBitmapCtrl()
{
   bitmap = "myImage.png";
   wrap = "true";
};

Methods

void GuiBitmapCtrl::setBitmap(String filename, bool resize)

Assign an image to the control. Child controls with resize according to their layout settings.

Parameters:
  • filename – The filename of the image.
  • resize – Optional parameter. If true, the GUI will resize to fit the image.
void GuiBitmapCtrl::setBitmap(String filename)

Assign an image to the control. Child controls will resize according to their layout settings.

Parameters:
  • filename – The filename of the image.
  • resize – A boolean value that decides whether the ctrl refreshes or not.
void GuiBitmapCtrl::setValue(int x, int y)

Set the offset of the bitmap within the control.

Parameters:
  • x – The x-axis offset of the image.
  • y – The y-axis offset of the image.

Fields

filename GuiBitmapCtrl::bitmap

The bitmap file to display in the control.

bool GuiBitmapCtrl::wrap

If true, the bitmap is tiled inside the control rather than stretched to fit.