geometrydrawing

How to save Geometry as image?

北城以北 提交于 2019-12-05 01:47:36
问题 How to save Geometry as image? For example i have List<Geometry> . I want it to be as follows: for (int i = 0; i < GeometryList.Count; i++) { Pen TestPen = new Pen(Brushes.Black, 1); GeometryDrawing TestDrawing = new GeometryDrawing(Brushes.Black, TestPen, TestGeometry); Bitmap b = TestDrawing as Bitmap; b.Save(System.AppDomain.CurrentDomain.BaseDirectory + i + ".png", ImageFormat.Png); } Update: The code I wrote a few hours ago: private void CreateFontMap(string PathTofont) { GlyphTypeface

How to save Geometry as image?

痴心易碎 提交于 2019-12-03 16:32:45
How to save Geometry as image? For example i have List<Geometry> . I want it to be as follows: for (int i = 0; i < GeometryList.Count; i++) { Pen TestPen = new Pen(Brushes.Black, 1); GeometryDrawing TestDrawing = new GeometryDrawing(Brushes.Black, TestPen, TestGeometry); Bitmap b = TestDrawing as Bitmap; b.Save(System.AppDomain.CurrentDomain.BaseDirectory + i + ".png", ImageFormat.Png); } Update: The code I wrote a few hours ago: private void CreateFontMap(string PathTofont) { GlyphTypeface font = new GlyphTypeface(new Uri(PathTofont)); List<ushort> fontNum = new List<ushort>(); foreach