01-26-2011 02:46 AM
Hello,
I have a form with 5 waveformgraphs. The user has the possibility to print out this form.
This is accomplished by using the Draw method, much like described in the Examples\UI\WindowsForms\Graph\Printing with the following command: WaveformGraph.Draw(New ComponentDrawArgs(g, bounds))
Everything works fine until the graph to be displayed shows an annotation with vertical gradient color:
DirectCast(Me.vGraphX.Annotations.Item(1), XYRangeAnnotation).RangeFillStyle = FillStyle.CreateVerticalGradient(Color.FromArgb(90, Color.FromKnownColor(KnownColor.MidnightBlue)), DirectCast(Me.vGraphX.Annotations.Item(1), XYRangeAnnotation).RangeFillColor)
On the Draw method I get a "A generic error occurred in GDI+"
Any suggestions of how I could solve this problem?
Many thanks for your help in advance.
Regards,
Daniel
01-28-2011 09:28 AM - edited 01-28-2011 09:29 AM
Hi Daniel,
could you post a stripped down example so I can reproduce the error here?
Best Regards,
01-28-2011 11:02 AM
Hi Andreas,
it is sort of tricky, because this behaviour does not happen at all times.
I prepared the Graph printing example with the vertical gradient option.
If I try to sent the graph with the "Print" button directly to the printer, I get the error if I use for example "FinePrint".
If I change "RangeFillStyle" to FillStyle.None or FillStyle.Solid the error disappears.
Any suggestions?
Many thanks in advance.
Best regards
Daniel
02-10-2011 03:28 AM
Hi Daniel,
I could reproduce your problem with a specific printer in our office. It depends on the printer used. FinePrint is just a intermediate layer, so it's not really reproducable with fineprint. Is there also a PDF printer where I can reproduce the issue? This would be really helpful since I can then forward this problem to R&D to reproduce it and create a solution.
Best Regards,