FFXIVAPP.Hooker.Engine.DXFont.GetCharMaxX C# (CSharp) Method

GetCharMaxX() private method

private GetCharMaxX ( Bitmap charBitmap ) : int
charBitmap System.Drawing.Bitmap
return int
        private int GetCharMaxX(Bitmap charBitmap)
        {
            var width = charBitmap.Width;
            var height = charBitmap.Height;

            for (var x = width - 1; x >= 0; --x)
            {
                for (var y = 0; y < height; ++y)
                {
                    Color color;

                    color = charBitmap.GetPixel(x, y);
                    if (color.A > 0)
                    {
                        return x;
                    }
                }
            }

            return width - 1;
        }