Dwarrowdelf.Client.TileSetLoader.GetVectorGfx C# (CSharp) Метод

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

private GetVectorGfx ( VectorGfxBase gfx ) : System.Windows.Media.Drawing
gfx VectorGfxBase
Результат System.Windows.Media.Drawing
        Drawing GetVectorGfx(VectorGfxBase gfx)
        {
            if (gfx is CharGfx)
            {
                var g = (CharGfx)gfx;
                var drawing = CreateCharDrawing(g);
                return drawing;
            }
            else if (gfx is DrawingGfx)
            {
                var g = (DrawingGfx)gfx;
                var drawing = CreateVectorDrawing(g);
                return drawing;
            }
            else if (gfx is CombinedGfx)
            {
                var g = (CombinedGfx)gfx;

                var dg = new DrawingGroup();
                using (var dc = dg.Open())
                {
                    foreach (var bs in g.Symbols)
                    {
                        var t = GetVectorGfx(bs);
                        dc.DrawDrawing(t);
                    }
                }

                return dg;
            }
            else
            {
                throw new Exception();
            }
        }