surface.GetTextureSize

From GMod Wiki

Jump to: navigation, search
Function
Syntax surface.GetTextureSize( Integer The texture ID. )
Where is this used?
Description:
Gets the height and width of a texture.
Returns: Integer Width, Integer Height
Part of Library: Surface
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Surface.GetTextureSize]Surface.GetTextureSize [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionOutputs the size of the 1st players spray.
Used onNewerClient.png
Code
 local w, h = surface.GetTextureSize( surface.GetTextureID( "Decals/playerlogo01" ) ) 
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox