Author: gschneider
Date: Tue Feb 3 08:33:23 2009
New Revision: 39323
URL:
http://svn.reactos.org/svn/reactos?rev=39323&view=rev
Log:
Forgot to commit this code in r39227, needed for basic clipping.
Modified:
trunk/reactos/subsystems/win32/win32k/dib/dibXXbpp.c
Modified: trunk/reactos/subsystems/win32/win32k/dib/dibXXbpp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/di…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/dib/dibXXbpp.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/dib/dibXXbpp.c [iso-8859-1] Tue Feb 3 08:33:23
2009
@@ -139,27 +139,34 @@
for (DesX=DestRect->left; DesX<DestRect->right; DesX++)
{
- if (UsesSource)
+ /* Check if inside clip region */
+ if (DesX >= OutputRect.left &&
+ DesX < OutputRect.right &&
+ DesY >= OutputRect.top &&
+ DesY < OutputRect.bottom)
{
- Source = XLATEOBJ_iXlate(ColorTranslation,
fnSource_GetPixel(SourceSurf, sx, sy));
- }
+ if (UsesSource)
+ {
+ Source = XLATEOBJ_iXlate(ColorTranslation,
fnSource_GetPixel(SourceSurf, sx, sy));
+ }
- if (UsesPattern)
- {
- /* TBD as soon as BRUSHOBJ is available */
- }
+ if (UsesPattern)
+ {
+ /* TBD as soon as BRUSHOBJ is available */
+ }
- Dest = fnDest_GetPixel(DestSurf, DesX, DesY);
- color = DIB_DoRop(ROP, Dest, Source, Pattern) & xxBPPMask;
+ Dest = fnDest_GetPixel(DestSurf, DesX, DesY);
+ color = DIB_DoRop(ROP, Dest, Source, Pattern) & xxBPPMask;
- fnDest_PutPixel(DestSurf, DesX, DesY, color);
+ fnDest_PutPixel(DestSurf, DesX, DesY, color);
- sx += SrcZoomXHight;
- sx_dec += SrcZoomXLow;
- if (sx_dec >= sx_max)
- {
- sx++;
- sx_dec -= sx_max;
+ sx += SrcZoomXHight;
+ sx_dec += SrcZoomXLow;
+ if (sx_dec >= sx_max)
+ {
+ sx++;
+ sx_dec -= sx_max;
+ }
}
}