Hi, I'm using Graphics.DrawLines (Pen, PointF[]) to draw a long curve with thousands of points - works perfectly on printers. Now I have found, that the preview functionality seems to have problems, if I pass more than 6000 or 7000 points. Now I'm a bit concerned, that there are different limits for different printers, Windows versions, ... Unfortunately I haven't found any hint, that there is a limit for the number of points. Has anyone found similar problems or has anyone a hint for that limit or has anyone a hint, how to ask the graphics engine, how many points could be processed.
[quoted text, click to view] Peter Klinge wrote: > Hi, > > I'm using Graphics.DrawLines (Pen, PointF[]) to draw a long curve with > thousands of points - works perfectly on printers. > Now I have found, that the preview functionality seems to have problems,
What kind of problems? [quoted text, click to view] > if I pass more than 6000 or 7000 points. Now I'm a bit concerned, that > there are different limits for different printers, Windows versions, ... > Unfortunately I haven't found any hint, that there is a limit for the > number of points. > Has anyone found similar problems or has anyone a hint for that limit or > has anyone a hint, how to ask the graphics engine, how many points could > be processed. >
Göran Andersson schrieb: [quoted text, click to view] > Peter Klinge wrote: >> Hi, >> >> I'm using Graphics.DrawLines (Pen, PointF[]) to draw a long curve with >> thousands of points - works perfectly on printers. >> Now I have found, that the preview functionality seems to have problems, > > What kind of problems? > >> if I pass more than 6000 or 7000 points. Now I'm a bit concerned, that >> there are different limits for different printers, Windows versions, >> ... Unfortunately I haven't found any hint, that there is a limit for >> the number of points. >> Has anyone found similar problems or has anyone a hint for that limit >> or has anyone a hint, how to ask the graphics engine, how many points >> could be processed. >> >> Peter
If I pass more than 6000 or 7000 points, the curve will not been drawn. Also it seems, that the graphics object is destroyed (or what ever) - no further drawing operations in the same print job (the same page) will be done. As the result I see an incomplete page, where all graphic elements are visible, I have drawn before that operation, but all elements after that operation aren't visible.
Is any exception thrown or does the operation just seem to stop? -- Bob Powell [MVP] Visual C#, System.Drawing Ramuseco Limited .NET consulting http://www.ramuseco.com Find great Windows Forms articles in Windows Forms Tips and Tricks http://www.bobpowell.net/tipstricks.htm Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/faqmain.htm All new articles provide code in C# and VB.NET. Subscribe to the RSS feeds provided and never miss a new article. [quoted text, click to view] "Peter Klinge" <i@i.i> wrote in message news:ucJHUAXhGHA.1324@TK2MSFTNGP04.phx.gbl... > Göran Andersson schrieb: >> Peter Klinge wrote: >>> Hi, >>> >>> I'm using Graphics.DrawLines (Pen, PointF[]) to draw a long curve with >>> thousands of points - works perfectly on printers. >>> Now I have found, that the preview functionality seems to have problems, >> >> What kind of problems? >> >>> if I pass more than 6000 or 7000 points. Now I'm a bit concerned, that >>> there are different limits for different printers, Windows versions, ... >>> Unfortunately I haven't found any hint, that there is a limit for the >>> number of points. >>> Has anyone found similar problems or has anyone a hint for that limit or >>> has anyone a hint, how to ask the graphics engine, how many points could >>> be processed. >>> >>> Peter > > If I pass more than 6000 or 7000 points, the curve will not been drawn. > Also it seems, that the graphics object is destroyed (or what ever) - no > further drawing operations in the same print job (the same page) will be > done. > As the result I see an incomplete page, where all graphic elements are > visible, I have drawn before that operation, but all elements after that > operation aren't visible. > > Peter
Hi Peter, Well its been a while and I can't remember the details but I have definitely have had issues where adjacent points were the same or mapped to the same device point under a transform. Otherwise it would be easy enough to split your long curves up into smaller sections to test the length limit theory. Cheers Doug Forster
Bob Powell [MVP] schrieb: [quoted text, click to view] > Is any exception thrown or does the operation just seem to stop? >
No, there isn't any exception. The operation of printing one page stops at the point of calling DrawLines with more than appr. 7000 points. The result is a incomplete printed page.
Doug Forster schrieb: [quoted text, click to view] > Hi Peter, > > Well its been a while and I can't remember the details but I have definitely > have had issues where adjacent points were the same or mapped to the same > device point under a transform. Otherwise it would be easy enough to split > your long curves up into smaller sections to test the length limit theory. > > Cheers > Doug Forster > >
Hi Doug, in general it's not a problem to find this limit on my PC. But I don't know, if the limit is depending from environment. And so I don't know, if the limit found on my PC is a general limit for all PC's at customers, where our program will be used. That's why this isn't a point for me. Ciao,
I think this would be a problem with the printer driver. I need to run some tests to see if anything like this happens on screen. Have you tried it on several printers? -- Bob Powell [MVP] Visual C#, System.Drawing Ramuseco Limited .NET consulting http://www.ramuseco.com Find great Windows Forms articles in Windows Forms Tips and Tricks http://www.bobpowell.net/tipstricks.htm Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/faqmain.htm All new articles provide code in C# and VB.NET. Subscribe to the RSS feeds provided and never miss a new article. [quoted text, click to view] "Peter Klinge" <i@i.i> wrote in message news:eKtw5eihGHA.4304@TK2MSFTNGP05.phx.gbl... > Bob Powell [MVP] schrieb: >> Is any exception thrown or does the operation just seem to stop? >> > > No, there isn't any exception. The operation of printing one page stops at > the point of calling DrawLines with more than appr. 7000 points. The > result is a incomplete printed page. > > Peter
Hi Peter, [quoted text, click to view] > know, if the limit is depending from environment. And so I don't know, if > the limit found on my PC is a general limit for all PC's at customers, > where our program will be used. That's why this isn't a point for me.
Yes I can understand that, but have you actually determined that the problem -is- actually a point limit (even if only valid in your own environment)? In other words do you have a set of points that fails to draw in one hit but which will draw when split into two parts using exactly the same set of points. I was trying to make the point there -may- be other factors at play. Cheers Doug Forster
Bob Powell [MVP] schrieb: [quoted text, click to view] > I think this would be a problem with the printer driver. I need to run some > tests to see if anything like this happens on screen. > > Have you tried it on several printers? >
Sorry, that I answer only today. Yes, I have tried with several printers. It seems, that it works with all that printers, but it doesn't work with preview. I don't know, if the preview functionality is using the printer driver of the default printer, but my line draw works with all printers installed in my system (FinePrint, pdfFactory, some HP printers, some Kyocera printers and one OKI printer) and the default printer too.
Doug Forster schrieb: [quoted text, click to view] > Hi Peter, > >> know, if the limit is depending from environment. And so I don't know, if >> the limit found on my PC is a general limit for all PC's at customers, >> where our program will be used. That's why this isn't a point for me. > > Yes I can understand that, but have you actually determined that the > problem -is- actually a point limit (even if only valid in your own > environment)? In other words do you have a set of points that fails to draw > in one hit but which will draw when split into two parts using exactly the > same set of points. I was trying to make the point there -may- be other > factors at play. > > Cheers > Doug Forster > > > >
Hi Doug, sorry, that I answer today only. Yes, I have tested with exactly the same source code (and of course with the same data). The only difference is the limit. If I set the limit to 5000 points, all works OK, if I set the limit to 9000, it will not work. The point field is a dynamically allocated field (C# array list), and as said before, the only difference is the limit of 5000 or 9000. Also it works with all printers installed on my system, but not in preview.
Hi Everybody, I have been experiencing the same problem since almost one year, the limit on my PC is 8000, I have had to make the array in pieces less than 8000. The problem is just on print preview, the printer works fine. Any resolution/suggestion, I would welcome too? Thanks, Faroukh
Don't see what you're looking for? Try a search.
|