All pastes #243369 Raw Edit

MyCode

public text v1 · immutable
·published 2006-11-08 11:55 UTC
rendered paste body
Index: NLFamily/Newleaf/Production/NP_GDICanvas.cpp
===================================================================
RCS file: /home/cvsrootmuc/munich_src/NLFamily/Newleaf/Production/NP_GDICanvas.cpp,v
retrieving revision 1.37
diff -u -r1.37 NP_GDICanvas.cpp
--- NLFamily/Newleaf/Production/NP_GDICanvas.cpp	24 Nov 2005 12:49:21 -0000	1.37
+++ NLFamily/Newleaf/Production/NP_GDICanvas.cpp	8 Nov 2006 09:47:37 -0000
@@ -578,8 +578,8 @@
 		if (coords.t>0) TRACE0("Fill rect passed +ve y coordinate, alignment will be wrong !\n");
 	#endif
 		COLORREF old_col = m_pCDC->SetBkColor(cmyk? Raster::CMYK2RGB(col):col);
-		int width  = CoordToLogicalW(coords.r-coords.l);
-		int height = CoordToLogicalH(coords.t-coords.b);
+		int width  = CoordToLogicalX(coords.r) - CoordToLogicalX(coords.l);
+		int height = CoordToLogicalY(coords.b) - CoordToLogicalY(coords.t); // b - t because CoordToLogicalY inverts coord
 
 		// does the same as ensure region visible above
 		if(width<1)  width = 1;