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

            svg.Export(mesh, filename, width);

            if (compress)
            {
                CompressFile(filename, true);
            }
        }
Пример #2
0
        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);
                    }
                }
            }
        }