Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Draw::DrawImageOp optimization bug
Re: Draw::DrawImageOp optimization bug [message #19444 is a reply to message #19443] |
Thu, 04 December 2008 11:07 |
Tom1
Messages: 1212 Registered: March 2007
|
Senior Contributor |
|
|
Quote: |
Uh oh. DrawImage was the reason we have started all this stuff anyway.
Why do you suggest to throw all of that now?
Note that it is at least supposed to fix those line artifacts problem in the first place.
|
I do not wish to throw away the BeginNative/EndNative/Native functions. Definitely not. They are really the key to use the native resolution in printing. That's great and they should stay there.
The problem is that DrawImageOp and DrawDataOp use the BeginNative/EndNative pair and the Native translations as if the coordinates input would be dots in all cases. This makes the coordinate space different for vector objects and the image objects.
Based on your code, I assume, you wanted to put the image to the printer on the native resolution. What happened was that if native mode was already on, the Native() calls did a second re-mapping of coordinates causing error in position and scale.
Basically switching the mode and the Native() calls would have been OK, if a check of the native recursion level was done and the Native() calls were conditional (if(native==1)) after switching. Anyway, the correct mapping of pixels to coordinate space was already achieved with the change that skipped ::SetDIBitsToDevice() call and used some other 'bitmap thing'. So I concluded that those calls are not needed in DrawImageOp and DrawDataOp at all. I removed the calls from there, tested it and it worked. Both in native and in dots mode.
Now, if you do these changes I suggest, I guess the situation will be that we should have a Draw:: for printing that by default is mapped with 600 dpi points and works OK with all printers we have tested so far. Additionally, if BeginNative is called, it will completely switch to printers native dpi mode and provides a consistent printing area at the printers native resolution instead of the 600 dpi.
The changes to GetPagePixels and GetPixelsPerInch support this. They will provide the correct values for the drawing area also after switching to native mode. Those changes will not break dots mode in any way.
Regards,
Tom
|
|
|
|
|
Draw::DrawImageOp optimization bug
By: Tom1 on Thu, 27 November 2008 13:52
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Fri, 28 November 2008 08:56
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Fri, 28 November 2008 10:23
|
|
|
Re: Draw::DrawImageOp optimization bug
By: rylek on Fri, 28 November 2008 13:15
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Fri, 28 November 2008 13:27
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Fri, 28 November 2008 13:29
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Fri, 28 November 2008 13:54
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Fri, 28 November 2008 14:27
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Fri, 28 November 2008 21:02
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Sat, 29 November 2008 12:54
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Mon, 01 December 2008 11:25
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Mon, 01 December 2008 12:12
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Mon, 01 December 2008 12:49
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Mon, 01 December 2008 12:57
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Mon, 01 December 2008 13:50
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Mon, 01 December 2008 14:25
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Mon, 01 December 2008 13:12
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Mon, 01 December 2008 12:41
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Mon, 01 December 2008 13:14
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Mon, 01 December 2008 14:37
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Mon, 01 December 2008 14:52
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Tue, 02 December 2008 19:15
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Tue, 02 December 2008 21:16
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Tue, 02 December 2008 21:46
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Wed, 03 December 2008 12:14
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Wed, 03 December 2008 15:03
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Wed, 03 December 2008 15:21
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Wed, 03 December 2008 15:36
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Wed, 03 December 2008 17:11
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Thu, 04 December 2008 10:22
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Thu, 04 December 2008 11:07
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Thu, 04 December 2008 11:36
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Thu, 04 December 2008 12:09
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Thu, 04 December 2008 12:36
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Thu, 04 December 2008 13:09
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Thu, 04 December 2008 15:53
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Thu, 04 December 2008 16:07
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Thu, 04 December 2008 17:46
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Fri, 05 December 2008 11:05
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Fri, 05 December 2008 11:20
|
|
|
Re: Draw::DrawImageOp optimization bug
By: Tom1 on Fri, 05 December 2008 12:13
|
|
|
Re: Draw::DrawImageOp optimization bug
By: mirek on Thu, 04 December 2008 10:19
|
Goto Forum:
Current Time: Sat May 04 20:06:15 CEST 2024
Total time taken to generate the page: 0.03023 seconds
|