MonoGdx.Graphics.G2D.NinePatch.Set C# (CSharp) Method

Set() private method

private Set ( int index, float x, float y, float width, float height, Color color ) : void
index int
x float
y float
width float
height float
color Color
return void
        private void Set(int index, float x, float y, float width, float height, Color color)
        {
            float fx2 = x + width;
            float fy2 = y + height;

            _vertices[index + 0].Position = new Vector3(x, y, 0);
            _vertices[index + 0].Color = color;

            _vertices[index + 1].Position = new Vector3(x, fy2, 0);
            _vertices[index + 1].Color = color;

            _vertices[index + 2].Position = new Vector3(fx2, fy2, 0);
            _vertices[index + 2].Color = color;

            _vertices[index + 3].Position = new Vector3(fx2, y, 0);
            _vertices[index + 3].Color = color;
        }