Canguro.Controller.Snap.SnapPainter.drawMidPoint C# (CSharp) Метод

drawMidPoint() приватный Метод

private drawMidPoint ( Device device, float x, float y, Color colorWithAlpha ) : void
device Device
x float
y float
colorWithAlpha Color
Результат void
        private void drawMidPoint(Device device, float x, float y, Color colorWithAlpha)
        {
            Line line = GraphicViewManager.Instance.ResourceManager.SnapLines[0];
            int length = 10;
            float cos30 = 0.8666f;
            float sin30 = 0.5f;

            line.Begin();
                line.Draw(new Vector2[] { new Vector2(x, y - cos30 * length), new Vector2(x + cos30 * length, y + sin30 * length) }, colorWithAlpha);
                line.Draw(new Vector2[] { new Vector2(x + cos30 * length, y + sin30 * length), new Vector2(x - cos30 * length, y + sin30 * length) }, colorWithAlpha);
                line.Draw(new Vector2[] { new Vector2(x - cos30 * length, y + sin30 * length), new Vector2(x, y - cos30 * length) }, colorWithAlpha);
            line.End();
        }