Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetDataAsColor< T >() [2/2]

Color[] Microsoft.Xna.Framework.Graphics.Texture2D.GetDataAsColor< T > ( Converter< T, Color > toColor)
inlineprivate
Type Constraints
T :struct 

Definition at line 564 of file Texture2D.cs.

564 : struct
565 {
566 int num = _height * _width;
567 T[] array = new T[num];
568 GetData(array);
569 Color[] array2 = new Color[num];
570 int num2 = 0;
571 if (0 < num)
572 {
573 do
574 {
575 Color color = toColor(array[num2]);
576 array2[num2] = color;
577 num2++;
578 }
579 while (num2 < num);
580 }
581 return array2;
582 }

References Microsoft.Xna.Framework.Graphics.Texture2D._height, Microsoft.Xna.Framework.Graphics.Texture2D._width, and System.array.