AnimalCrossingQR.PaletteControl.DrawTriangle C# (CSharp) Method

DrawTriangle() private static method

private static DrawTriangle ( Graphics graphics, Brush brush, int x, int y, bool pointLeft ) : void
graphics System.Drawing.Graphics
brush System.Drawing.Brush
x int
y int
pointLeft bool
return void
        private static void DrawTriangle(Graphics graphics, Brush brush, int x, int y, bool pointLeft)
        {
            Point[] trianglePoints = new[]
            {
                new Point(x, y),
                new Point(x + ((LeftBorder / 2) * (pointLeft ? 1 : -1)), y - (LeftBorder / 2)),
                new Point(x + ((LeftBorder / 2) * (pointLeft ? 1 : -1)), y + (LeftBorder / 2)),
            };

            graphics.FillPolygon(brush, trianglePoints);
        }