Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/24/13 14:08:17 (11 years ago)
Author:
bburlacu
Message:

#2107: Fixed font scaling issue related to the MetafileFrameUnit when exporting charts in the EMF format.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/ImageExportDialog.cs

    r9946 r10002  
    449449        if (filename.EndsWith("emf")) {
    450450          using (var graphics = Graphics.FromImage(image)) {
    451             var metafile = new Metafile(filename, graphics.GetHdc());
    452             graphics.ReleaseHdc();
    453             using (var g = Graphics.FromImage(metafile)) {
    454               workingChart.Printing.PrintPaint(g, new Rectangle(0, 0, image.Width, image.Height));
     451            var rectangle = new Rectangle(0, 0, image.Width, image.Height);
     452            using (var metafile = new Metafile(filename, graphics.GetHdc(), rectangle, MetafileFrameUnit.Pixel, EmfType.EmfPlusDual)) {
     453              graphics.ReleaseHdc();
     454              using (var g = Graphics.FromImage(metafile)) {
     455                workingChart.Printing.PrintPaint(g, rectangle);
     456              }
    455457            }
    456             metafile.Dispose();
    457458          }
    458459        } else {
Note: See TracChangeset for help on using the changeset viewer.