Image

Inherited: Widget

Description

Public Methods

Vector4

color () const

int

drawMode () const

std::string

item () const

Material *

material () const

void

setColor (const Vector4 color)

void

setDrawMode (int mode)

void

setItem (const std::string item)

void

setMaterial (Material * material)

void

setSprite (Sprite * sprite)

void

setTexture (Texture * image)

Sprite *

sprite () const

Static Methods

None

Methods Description

Vector4 Image::color () const

Returns the color of the image to be drawn.

See also setColor().


int Image::drawMode () const

Returns a draw mode for the image. Please check Image::DrawMode for more details.

See also setDrawMode().


std::string Image::item () const

Returns the current item name of sprite from the sprite sheet.

See also setItem().


:ref:`Material<api_Material>`* Image::material () const

Returns an instantiated Material assigned to Image.

See also setMaterial().


void Image::setColor (Vector4 color)

Changes the color of the image to be drawn.

See also *color*().


void Image::setDrawMode (int mode)

Sets a draw mode for the image. Please check Image::DrawMode for more details.

See also drawMode().


void Image::setItem (std::string item)

Sets the current sub item name of sprite from the sprite sheet.

See also *item*().


void Image::setMaterial (Material * material)

Creates a new instance of material and assigns it.

See also *material*().


void Image::setSprite (Sprite * sprite)

Replaces the current sprite with a new one.

See also *sprite*().


void Image::setTexture (Texture * image)

Replaces the current image with a new one.


:ref:`Sprite<api_Sprite>`* Image::sprite () const

Returns the sprite assigned to the Image.

See also setSprite().