C# Class TextureScaler, Unity-WinForms

显示文件 Open project: Meragon/Unity-WinForms Class Usage Examples

Public Methods

Method Description
scale ( Texture2D tex, int width, int height, FilterMode mode = FilterMode.Trilinear ) : void

Scales the texture data of the given texture.

scaled ( Texture2D src, int width, int height, FilterMode mode = FilterMode.Trilinear ) : Texture2D

Returns a scaled copy of given texture.

Private Methods

Method Description
_gpu_scale ( Texture2D src, int width, int height, FilterMode fmode ) : void

Method Details

scale() public static method

Scales the texture data of the given texture.
public static scale ( Texture2D tex, int width, int height, FilterMode mode = FilterMode.Trilinear ) : void
tex UnityEngine.Texture2D Texure to scale
width int New width
height int New height
mode FilterMode Filtering mode
return void

scaled() public static method

Returns a scaled copy of given texture.
public static scaled ( Texture2D src, int width, int height, FilterMode mode = FilterMode.Trilinear ) : Texture2D
src UnityEngine.Texture2D
width int Destination texture width
height int Destination texture height
mode FilterMode Filtering mode
return UnityEngine.Texture2D