drawUIImage

Script::drawUIImage

Draws an image on the User Interface.

Declaration

void drawUIImage(ImageID imageID, ImageSamplerFilter imageSamplerFilter, AnchorPoint anchorPoint, CoordinateType coordinateType, const Math::vec2& position, float rotation = 0.0f, const Math::vec2& scale = Math::vec2(1.0f, 1.0f), const Math::vec4& color = Math::vec4(1.0f, 1.0f, 1.0f, 1.0f));

Parameters

Name

Type

Description

imageID

ImageID

The image to draw.

imageSamplerFilter

ImageSamplerFilter

The image sampler filter to use for the image.

anchorPoint

AnchorPoint

The anchor point of the image.

coordinateType

CoordinateType

The coordinate type used by position.

position

const Math::vec2&

The position of the image. The origin of the image is as its center.

rotation

float

The angle in radians the image will be rotated with.

scale

const Math::vec2&

The scale of the image.

color

const Math::vec4&

The color and opacity the image will be multiplied with.

Returns

None.

Notes

If a scale’s axis (x or y) is negative, the image will be flipped. For example, if scale is equal to Math::vec2(-1.0f, 1.0f), the image will have its original proportion but will be flipped horizontally.