gdi32: Store the total visible rectangle in the DC.
This commit is contained in:
parent
1472f35e82
commit
69c8f0b67d
|
@ -611,6 +611,10 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, HDC hdc )
|
|||
dc->hBitmap = handle;
|
||||
GDI_inc_ref_count( handle );
|
||||
dc->dirty = 0;
|
||||
dc->vis_rect.left = 0;
|
||||
dc->vis_rect.top = 0;
|
||||
dc->vis_rect.right = bitmap->bitmap.bmWidth;
|
||||
dc->vis_rect.bottom = bitmap->bitmap.bmHeight;
|
||||
SetRectRgn( dc->hVisRgn, 0, 0, bitmap->bitmap.bmWidth, bitmap->bitmap.bmHeight);
|
||||
GDI_ReleaseObj( handle );
|
||||
DC_InitDC( dc );
|
||||
|
|
|
@ -171,6 +171,7 @@ void CDECL __wine_set_visible_region( HDC hdc, HRGN hrgn, const RECT *vis_rect )
|
|||
|
||||
DeleteObject( dc->hVisRgn );
|
||||
dc->dirty = 0;
|
||||
dc->vis_rect = *vis_rect;
|
||||
dc->hVisRgn = hrgn;
|
||||
CLIPPING_UpdateGCRegion( dc );
|
||||
release_dc_ptr( dc );
|
||||
|
|
|
@ -666,8 +666,11 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
|
|||
goto error;
|
||||
}
|
||||
|
||||
SetRectRgn( dc->hVisRgn, 0, 0,
|
||||
GetDeviceCaps( hdc, DESKTOPHORZRES ), GetDeviceCaps( hdc, DESKTOPVERTRES ) );
|
||||
dc->vis_rect.left = 0;
|
||||
dc->vis_rect.top = 0;
|
||||
dc->vis_rect.right = GetDeviceCaps( hdc, DESKTOPHORZRES );
|
||||
dc->vis_rect.bottom = GetDeviceCaps( hdc, DESKTOPVERTRES );
|
||||
SetRectRgn(dc->hVisRgn, dc->vis_rect.left, dc->vis_rect.top, dc->vis_rect.right, dc->vis_rect.bottom);
|
||||
|
||||
DC_InitDC( dc );
|
||||
release_dc_ptr( dc );
|
||||
|
@ -768,6 +771,10 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
|
|||
TRACE("(%p): returning %p\n", hdc, dc->hSelf );
|
||||
|
||||
dc->hBitmap = GDI_inc_ref_count( GetStockObject( DEFAULT_BITMAP ));
|
||||
dc->vis_rect.left = 0;
|
||||
dc->vis_rect.top = 0;
|
||||
dc->vis_rect.right = 1;
|
||||
dc->vis_rect.bottom = 1;
|
||||
if (!(dc->hVisRgn = CreateRectRgn( 0, 0, 1, 1 ))) goto error; /* default bitmap is 1x1 */
|
||||
|
||||
/* Copy the driver-specific physical device info into
|
||||
|
@ -860,8 +867,12 @@ HDC WINAPI ResetDCW( HDC hdc, const DEVMODEW *devmode )
|
|||
if (ret) /* reset the visible region */
|
||||
{
|
||||
dc->dirty = 0;
|
||||
SetRectRgn( dc->hVisRgn, 0, 0, GetDeviceCaps( hdc, DESKTOPHORZRES ),
|
||||
GetDeviceCaps( hdc, DESKTOPVERTRES ) );
|
||||
dc->vis_rect.left = 0;
|
||||
dc->vis_rect.top = 0;
|
||||
dc->vis_rect.right = GetDeviceCaps( hdc, DESKTOPHORZRES );
|
||||
dc->vis_rect.bottom = GetDeviceCaps( hdc, DESKTOPVERTRES );
|
||||
SetRectRgn( dc->hVisRgn, dc->vis_rect.left, dc->vis_rect.top,
|
||||
dc->vis_rect.right, dc->vis_rect.bottom );
|
||||
CLIPPING_UpdateGCRegion( dc );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -261,6 +261,7 @@ typedef struct tagDC
|
|||
INT vportExtY;
|
||||
SIZE virtual_res; /* Initially HORZRES,VERTRES. Changed by SetVirtualResolution */
|
||||
SIZE virtual_size; /* Initially HORZSIZE,VERTSIZE. Changed by SetVirtualResolution */
|
||||
RECT vis_rect; /* visible rectangle in screen coords */
|
||||
FLOAT miterLimit;
|
||||
|
||||
int flags;
|
||||
|
|
Loading…
Reference in New Issue