Commit ec4297f1 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

gdi32: Store virtual resolution and size in DC_ATTR.

parent caf5ab5d
......@@ -428,8 +428,8 @@ BOOL CDECL nulldrv_RestoreDC( PHYSDEV dev, INT level )
dc->attr->wnd_ext = dcs->attr->wnd_ext;
dc->attr->vport_org = dcs->attr->vport_org;
dc->attr->vport_ext = dcs->attr->vport_ext;
dc->virtual_res = dcs->virtual_res;
dc->virtual_size = dcs->virtual_size;
dc->attr->virtual_res = dcs->attr->virtual_res;
dc->attr->virtual_size = dcs->attr->virtual_size;
if (dcs->hClipRgn)
{
......@@ -550,8 +550,6 @@ INT WINAPI NtGdiSaveDC( HDC hdc )
newdc->xformWorld2Vport = dc->xformWorld2Vport;
newdc->xformVport2World = dc->xformVport2World;
newdc->vport2WorldValid = dc->vport2WorldValid;
newdc->virtual_res = dc->virtual_res;
newdc->virtual_size = dc->virtual_size;
/* Get/SetDCState() don't change hVisRgn field ("Undoc. Windows" p.559). */
......
......@@ -31,7 +31,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dc);
static SIZE get_dc_virtual_size( DC *dc )
{
SIZE ret = dc->virtual_size;
SIZE ret = dc->attr->virtual_size;
if (!ret.cx)
{
......@@ -43,7 +43,7 @@ static SIZE get_dc_virtual_size( DC *dc )
static SIZE get_dc_virtual_res( DC *dc )
{
SIZE ret = dc->virtual_res;
SIZE ret = dc->attr->virtual_res;
if (!ret.cx)
{
......@@ -630,10 +630,10 @@ BOOL WINAPI NtGdiSetVirtualResolution( HDC hdc, DWORD horz_res, DWORD vert_res,
dc = get_dc_ptr( hdc );
if (!dc) return FALSE;
dc->virtual_res.cx = horz_res;
dc->virtual_res.cy = vert_res;
dc->virtual_size.cx = horz_size;
dc->virtual_size.cy = vert_size;
dc->attr->virtual_res.cx = horz_res;
dc->attr->virtual_res.cy = vert_res;
dc->attr->virtual_size.cx = horz_size;
dc->attr->virtual_size.cy = vert_size;
release_dc_ptr( dc );
return TRUE;
......
......@@ -80,8 +80,6 @@ typedef struct tagDC
BOOL bounds_enabled:1; /* bounds tracking is enabled */
BOOL path_open:1; /* path is currently open (only for saved DCs) */
SIZE virtual_res; /* Initially HORZRES,VERTRES. Changed by SetVirtualResolution */
SIZE virtual_size; /* Initially HORZSIZE,VERTSIZE. Changed by SetVirtualResolution */
RECT device_rect; /* rectangle for the whole device */
int pixel_format; /* pixel format (for memory DCs) */
UINT aa_flags; /* anti-aliasing flags to pass to GetGlyphOutline for current font */
......
......@@ -136,6 +136,8 @@ typedef struct DC_ATTR
SIZE wnd_ext; /* window extent */
POINT vport_org; /* viewport origin */
SIZE vport_ext; /* viewport extent */
SIZE virtual_res;
SIZE virtual_size;
void *emf;
} DC_ATTR;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment