I need to export diagram image at 100% size.
Diagram.CreateImage uses ZoomFactor from DiagramView and resizes all layers in diagram in the exported image.
Reset ZoomFactor to 100 before exporting works only on small diagrams that fit in the View. Large diagrams are blurred during export.
Is there a way to get a clear diagram image in 100% size?
In addition it would be great if there is the way to export any Rect to image, i.e. Diagram.GetContentBounds() in default.
Added export button to Demo project
<Menu Height="22" Margin="0,0,0,0" Name="mainMenu" VerticalAlignment="Top" HorizontalAlignment="Stretch">
<MenuItem Name="mFile" Header="_File">
...
<MenuItem Name="mPrintPreview" Header="Print Pre_view..." Click="mPreview_Click" />
<MenuItem Name="mExportToImage" Header="Export to image..." Click="mExportToImage_Click" />
...
</MenuItem>
private void mExportToImage_Click(object sender, RoutedEventArgs e)
{
diagram.ZoomFactor = 100.0;
var image = diagram.CreateImage();
var tempFileName = "D:\\Temp\\123.png";
Utilities.SaveImage(image, tempFileName);
Process.Start(tempFileName);
}