MeshExplorer.IO.EpsImage.Export C# (CSharp) Метод

Export() публичный Метод

Export the mesh to EPS format.
public Export ( Mesh mesh, string filename, int width ) : void
mesh TriangleNet.Mesh The current mesh.
filename string The EPS filename.
width int The desired width of the image (currently ignored).
Результат void
        public void Export(Mesh mesh, string filename, int width)
        {
            // Check file name
            if (String.IsNullOrWhiteSpace(filename))
            {
                filename = String.Format("mesh-{0}.eps", DateTime.Now.ToString("yyyy-M-d-hh-mm-ss"));
            }

            if (!filename.EndsWith(".eps"))
            {
                filename = Path.ChangeExtension(filename, ".eps");
            }

            UpdateMetrics(mesh.Bounds);

            using (StreamWriter eps = new StreamWriter(filename))
            {
                WriteHeader(filename, eps);

                DrawClip(eps);

                DrawTriangles(eps, mesh, false);

                DrawSegments(eps, mesh);

                DrawPoints(eps, mesh, false);

                WriteTrailer(eps);
            }
        }

Usage Example

Пример #1
0
        private void ExportEps(Mesh mesh, string filename, int width, bool compress)
        {
            var eps = new EpsImage();

            eps.Export(mesh, filename, width);

            if (compress)
            {
                CompressFile(filename, true);
            }
        }
All Usage Examples Of MeshExplorer.IO.EpsImage::Export