Export() public method

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).
return void
コード例 #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);
            }
        }
コード例 #2
0
ファイル: FormMain.cs プロジェクト: filipkunc/GLGraphics
        private void menuFileExport_Click(object sender, EventArgs e)
        {
            if (mesh != null)
            {
                FormExport export = new FormExport();

                string file = settings.OfdDirectory;

                if (!file.EndsWith("\\"))
                {
                    file += "\\";
                }

                file += settings.CurrentFile;

                export.ImageName = Path.ChangeExtension(file, ".png");

                if (export.ShowDialog() == DialogResult.OK)
                {
                    int format = export.ImageFormat;
                    int size = export.ImageSize;

                    if (format == 1)
                    {
                        EpsImage eps = new EpsImage();
                        eps.Export(this.mesh, export.ImageName, size);
                    }
                    else if (format == 2)
                    {
                        SvgImage svg = new SvgImage();
                        svg.Export(this.mesh, export.ImageName, size);
                    }
                    else
                    {
                        RasterImage img = new RasterImage();
                        img.ColorScheme = ColorManager.LightScheme();
                        img.Export(this.mesh, export.ImageName, size);
                    }
                }
            }
        }