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

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

private drawEndPoint ( Device device, float x, float y, Color colorWithAlpha ) : void
device Device
x float
y float
colorWithAlpha Color
Результат void
        private void drawEndPoint(Device device, float x, float y, Color colorWithAlpha)
        {
            Line line = GraphicViewManager.Instance.ResourceManager.SnapLines[0];
            int midWidth = 5;

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