GearBlocks
The GearBlocks Lua scripting API
Static Public Member Functions | Properties | List of all members
SmashHammer.Scripting.TextureProxy Struct Reference

A texture. More...

Static Public Member Functions

static TextureProxy Create (int width, int height)
 Create an empty texture.
 
static TextureProxy Load (string path, string fileName)
 Load a texture.
 

Properties

readonly int Width [get]
 The texture's width.
 
readonly int Height [get]
 The texture's height.
 

Detailed Description

A texture.

Static methods available in Lua via the "Texture" global, for example:

local texture = Texture.Load( ScriptPath, 'foo.png' )

Member Function Documentation

◆ Create()

static TextureProxy SmashHammer.Scripting.TextureProxy.Create ( int  width,
int  height 
)
static

Create an empty texture.

Parameters
widthThe texture's width.
heightThe texture's height.
Returns
Created texture.

◆ Load()

static TextureProxy SmashHammer.Scripting.TextureProxy.Load ( string  path,
string  fileName 
)
static

Load a texture.

Parameters
pathDirectory containing the file to load.
fileNameName of file to load texture from.
Returns
Loaded texture.

Property Documentation

◆ Width

readonly int SmashHammer.Scripting.TextureProxy.Width
get

The texture's width.

The width of this texture.

◆ Height

readonly int SmashHammer.Scripting.TextureProxy.Height
get

The texture's height.

The height of this texture.