示例#1
0
 static public Texture2D GetSubTexture(this Texture2D item, int x, int y, int width, int height)
 {
     return(Texture2DExtensions.Create(width, height, item.GetPixels(x, y, width, height)));
 }
示例#2
0
 static public Texture2D CreateTexture2D <T>(this IGrid <T> item, Operation <Color, T> operation)
 {
     return(Texture2DExtensions.Create(item.GetWidth(), item.GetHeight(), item.ConvertToData(operation).ToArray()));
 }