Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Painter.DrawImage bug 
	
		
		
			| Painter.DrawImage bug [message #24492] | 
			Wed, 20 January 2010 14:07   | 
		 
		
			| 
				
	 | 
 
	
		I used ChPaint to paint the image. It works ok when using it diretly in Paint method, but using it through the Painter rasterizer it gives different (wrong) results. 
 
PS: It looks like Painter's DrawImage instead of drawing part of image (like in this line - we should see only a top left img's rectangle of size cx and cy) 
w.DrawImage(0, 0, cx, cy, img, RectC(0, 0, cx, cy));
  
it scales down the whole image to a cx and cy size. 
 
Here's the screenshot and the test case: 
 
		
	- 
	
 
	Attachment: painter.png
	 
	(Size: 3.83KB, Downloaded 1045 times)
 - 
	
 
	Attachment: PainterBug.7z
	 
	(Size: 1.04KB, Downloaded 628 times)
 
 
		
		
 |  
	| 
		
	 | 
 
 
 |  
	| 
		
 |  
	| 
		
 |  
	| 
		
 |  
	
		
		
			| Re: Painter.DrawImage bug [message #24573 is a reply to message #24492] | 
			Sun, 24 January 2010 22:27    | 
		 
		
			
				
				
				  | 
					
						  
						mirek
						 Messages: 14271 Registered: November 2005 
						
					 | 
					Ultimate Member  | 
					 | 
		 
		 
	 | 
 
	
		| unodgs wrote on Wed, 20 January 2010 08:07 |   I used ChPaint to paint the image. It works ok when using it diretly in Paint method, but using it through the Painter rasterizer it gives different (wrong) results. 
 
PS: It looks like Painter's DrawImage instead of drawing part of image (like in this line - we should see only a top left img's rectangle of size cx and cy) 
w.DrawImage(0, 0, cx, cy, img, RectC(0, 0, cx, cy));
  
it scales down the whole image to a cx and cy size. 
 
  |  
  
 
Ah, stupid leftovers... Looks I will have to develop the correct clipping there... 
 
Mirek
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
	| 
		
 |  
	| 
		
 |   
Goto Forum:
 
 Current Time: Tue Nov 04 10:40:16 CET 2025 
 Total time taken to generate the page: 0.03773 seconds 
 |