ImageBackground
A plain (non-9-patch) image background: the whole source image is stretched to fill the widget's bounds, corners included - unlike BGE.UI.NinePatchImage, which keeps its corners unstretched. Assign to Theme.backgroundImage the same as a NinePatchImage; see BGE.UI.loadBackgroundImage(), which picks this or a NinePatchImage automatically from the asset's filename.
Properties
sourceImage(roBitmap)sourceWidth(integer)sourceHeight(integer)
Constructor
new ImageBackground(sourceImage: roBitmap): ImageBackgroundParameters
sourceImage(roBitmap) — the full source image, stretched to fill on draw()
Instance Methods
draw(
renderer: BGE.Renderer,
x: float,
y: float,
width: float,
height: float,
): void
Draws this image at (x, y), scaled to fill width x height.
Parameters
renderer(BGE.Renderer) — the renderer to draw tox(float) — destination xy(float) — destination ywidth(float) — destination widthheight(float) — destination height
Returns
void