Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Issues with lanes and exporting (Read 3117 times)
Marco
YaBB Newbies
*
Offline



Posts: 6
Joined: Feb 8th, 2011
Issues with lanes and exporting
Jun 6th, 2011 at 8:06am
Print Post  
We are having some problems with exporting a diagram with lanes.

1) Exporting to WMF with WMFExporter.
The borders and the content of a cell are not shown when the diagram is exported with the WMFExporter.

2) Exporting to PDF with PDFExporter.
The borders are not exported when using a Hashbrush for the border. When a Solidbrush is used the borders are shown fine on the pdf.

I could reproduce both cases in our own code and on the lanes sample that is provided with the installation.

Any suggestions on how to solve this?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Issues with lanes and exporting
Reply #1 - Jun 6th, 2011 at 10:27am
Print Post  
1) Check the PM page for a version that exports lanes to WMF.

2) PDF does not support hatch fills and PdfExporter exports HatchBrushes as bitmap images. However that's not supported yet when the brush is set as path of a Pen. You could temporarily replace the HatchBrush -pen with a dashed one if you need to see non-solid pen in the PDF.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Marco
YaBB Newbies
*
Offline



Posts: 6
Joined: Feb 8th, 2011
Re: Issues with lanes and exporting
Reply #2 - Jun 6th, 2011 at 1:52pm
Print Post  
Stoyan,

The version you gave me exports the lanes to WMF and if a replace the hatch brush with a dashed one then the PDF is also OK.

But in the last case the lanes in the WMF export show as solid lines in stead of dashed.
I am not sure if this is because of the flowchart code or our own code.

I will let you know when I have done some more testing.

Thanks so far for the quick help.

Marco
  
Back to top
 
IP Logged
 
Marco
YaBB Newbies
*
Offline



Posts: 6
Joined: Feb 8th, 2011
Re: Issues with lanes and exporting
Reply #3 - Jun 7th, 2011 at 8:55am
Print Post  
Stoyan,

I looked into the issue with the dashed brush.

1) The following code for the pen works fine for the PDF, but not on the screen and the WMF image.

Pen p = new Pen(new SolidBrush(Color.Black), 0);
p.DashStyle = DashStyle.Dash;

This gives a dashedline on the pdf, but a solid line with dashes through it for the image and the screen.

2) This code works fine for the screen and the image, but not on the pdf.

Pen p = new Pen(new SolidBrush(Color.Blue), 0);
p.DashStyle = DashStyle.Dash;            p.DashPattern = new float[]{3,3};

This gives a solid line on the pdf and dashes on the screen and the image.

Hope you also have a solution for this.

Marco
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Issues with lanes and exporting
Reply #4 - Jun 7th, 2011 at 11:37am
Print Post  
1 looks fine to me, both on screen and in WMF. What do you mean by "solid line with dashes"? For some reason the dashes are smaller when DiagramView.SmoothingMode is enabled (as by default), but it's still a dashed line.
  
Back to top
 
IP Logged
 
Marco
YaBB Newbies
*
Offline



Posts: 6
Joined: Feb 8th, 2011
Re: Issues with lanes and exporting
Reply #5 - Jun 7th, 2011 at 12:57pm
Print Post  
Maybe a better description is that it is a dashed line with a shadow.
In my code for example, the image shows black dashes and the space between the dashes is gray.

I hope that this explanation is better then the first one.

Are you able to reproduce the second point?

Marco
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Issues with lanes and exporting
Reply #6 - Jun 7th, 2011 at 3:12pm
Print Post  
1. I think you are seeing some antialiasing defect. If you are using only rectangular nodes and cascading links as in the Lanes sample, you can disable it since it isn't of much use without diagonal lines:
diagramView.SmoothingMode = SmoothingMode.None;

2. We don't have support for custom dash styles in PDF yet.
  
Back to top
 
IP Logged
 
Marco
YaBB Newbies
*
Offline



Posts: 6
Joined: Feb 8th, 2011
Re: Issues with lanes and exporting
Reply #7 - Jun 8th, 2011 at 5:59am
Print Post  
Setting SmoothingMode.None is a big improvement. I still see some defects if I enlarge the image, but it is OK for our purpose.

Thank you for the help.

Marco
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint