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

◆ FromGrid()

static Fragment ReLogic.Peripherals.RGB.Fragment.FromGrid ( Rectangle grid)
inlinestatic

Definition at line 38 of file Fragment.cs.

39 {
40 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
41 //IL_0006: Unknown result type (might be due to invalid IL or missing references)
42 //IL_004f: Unknown result type (might be due to invalid IL or missing references)
43 //IL_0042: Unknown result type (might be due to invalid IL or missing references)
44 //IL_0023: Unknown result type (might be due to invalid IL or missing references)
45 //IL_002b: Unknown result type (might be due to invalid IL or missing references)
46 //IL_0033: Unknown result type (might be due to invalid IL or missing references)
47 //IL_0038: Unknown result type (might be due to invalid IL or missing references)
48 Point[] array = (Point[])(object)new Point[grid.Width * grid.Height];
49 int num = 0;
50 for (int i = 0; i < grid.Height; i++)
51 {
52 for (int j = 0; j < grid.Width; j++)
53 {
54 array[num++] = new Point(grid.X + j, grid.Y + i);
55 }
56 }
57 return new Fragment(array);
58 }

References System.array, System.Fragment, Microsoft.Xna.Framework.Rectangle.Height, Microsoft.Xna.Framework.Rectangle.Width, Microsoft.Xna.Framework.Rectangle.X, and Microsoft.Xna.Framework.Rectangle.Y.

Referenced by ReLogic.Peripherals.RGB.Corsair.CorsairMouse.Create(), and ReLogic.Peripherals.RGB.Corsair.CorsairHeadset.Create().