Garry's Mod Wiki

GWEN

GWEN is a system that allows you to load a spritesheet and generate a skin out of it.

Methods

function GWEN.CreateTextureBorder( number x, number y, number w, number h, number left, number top, number right, number bottom, IMaterial material = nil )
This is a utility function that generates a specialized drawing function to render scalable textured borders. This is done with 9-slice scaling. This is used in derma skins to create a bordered rectangle drawing function from an image. The texture is taken from SKIN. GwenTexture when the material argument is not supplied.
Used in derma skins to create a fixed scale rectangle drawing function from an image. it will be drawn in the center of the box. The texture is taken from SKIN. GwenTexture when the material is not supplied.
function GWEN.CreateTextureNormal( number x, number y, number w, number h, IMaterial material = nil )
Helper function that returns a specialized drawing function for rendering a texture that scales freely to fit the given area. The texture is taken from SKIN. GwenTexture when the material is not supplied.
Retrieves the color from a materials texture at the provided UV coordinates