Commit d1f73181 authored by Alexandre Julliard's avatar Alexandre Julliard

Removed a couple of unused fields in the DC structure.

parent d0bc4c26
......@@ -139,14 +139,10 @@ typedef struct tagDC
short brushOrgY;
WORD textAlign; /* Text alignment from SetTextAlign() */
short charExtra; /* Spacing from SetTextCharacterExtra() */
short breakTotalExtra; /* Total extra space for justification */
short breakCount; /* Break char. count */
short breakExtra; /* breakTotalExtra / breakCount */
short breakRem; /* breakTotalExtra % breakCount */
RECT totalExtent;
INT charExtra; /* Spacing from SetTextCharacterExtra() */
INT breakCount; /* Break char. count */
INT breakExtra; /* breakTotalExtra / breakCount */
INT breakRem; /* breakTotalExtra % breakCount */
INT MapMode;
INT GraphicsMode; /* Graphics mode */
ABORTPROC pAbortProc; /* AbortProc for Printing */
......
......@@ -448,11 +448,7 @@ static HGDIOBJ BITMAP_SelectObject( HGDIOBJ handle, void *obj, HDC hdc )
if (handle)
{
dc->hBitmap = handle;
dc->totalExtent.left = 0;
dc->totalExtent.top = 0;
dc->totalExtent.right = bitmap->bitmap.bmWidth;
dc->totalExtent.bottom = bitmap->bitmap.bmHeight;
dc->hBitmap = handle;
dc->flags &= ~DC_DIRTY;
SetRectRgn( dc->hVisRgn, 0, 0, bitmap->bitmap.bmWidth, bitmap->bitmap.bmHeight);
DC_InitDC( dc );
......
......@@ -99,14 +99,9 @@ DC *DC_AllocDC( const DC_FUNCTIONS *funcs, WORD magic )
dc->brushOrgY = 0;
dc->textAlign = TA_LEFT | TA_TOP | TA_NOUPDATECP;
dc->charExtra = 0;
dc->breakTotalExtra = 0;
dc->breakCount = 0;
dc->breakExtra = 0;
dc->breakRem = 0;
dc->totalExtent.left = 0;
dc->totalExtent.top = 0;
dc->totalExtent.right = 0;
dc->totalExtent.bottom = 0;
dc->MapMode = MM_TEXT;
dc->GraphicsMode = GM_COMPATIBLE;
dc->pAbortProc = NULL;
......@@ -295,7 +290,6 @@ HDC WINAPI GetDCState( HDC hdc )
newdc->hBitmap = dc->hBitmap;
newdc->hDevice = dc->hDevice;
newdc->hPalette = dc->hPalette;
newdc->totalExtent = dc->totalExtent;
newdc->ROPmode = dc->ROPmode;
newdc->polyFillMode = dc->polyFillMode;
newdc->stretchBltMode = dc->stretchBltMode;
......@@ -309,7 +303,6 @@ HDC WINAPI GetDCState( HDC hdc )
newdc->brushOrgY = dc->brushOrgY;
newdc->textAlign = dc->textAlign;
newdc->charExtra = dc->charExtra;
newdc->breakTotalExtra = dc->breakTotalExtra;
newdc->breakCount = dc->breakCount;
newdc->breakExtra = dc->breakExtra;
newdc->breakRem = dc->breakRem;
......@@ -385,7 +378,6 @@ void WINAPI SetDCState( HDC hdc, HDC hdcs )
dc->flags = dcs->flags & ~(DC_SAVED | DC_DIRTY);
dc->hDevice = dcs->hDevice;
dc->totalExtent = dcs->totalExtent;
dc->ROPmode = dcs->ROPmode;
dc->polyFillMode = dcs->polyFillMode;
dc->stretchBltMode = dcs->stretchBltMode;
......@@ -399,7 +391,6 @@ void WINAPI SetDCState( HDC hdc, HDC hdcs )
dc->brushOrgY = dcs->brushOrgY;
dc->textAlign = dcs->textAlign;
dc->charExtra = dcs->charExtra;
dc->breakTotalExtra = dcs->breakTotalExtra;
dc->breakCount = dcs->breakCount;
dc->breakExtra = dcs->breakExtra;
dc->breakRem = dcs->breakRem;
......@@ -602,6 +593,7 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
DRIVER_release_driver( funcs );
return 0;
}
hdc = dc->hSelf;
dc->hBitmap = GetStockObject( DEFAULT_BITMAP );
......@@ -617,14 +609,10 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
return 0;
}
dc->totalExtent.left = 0;
dc->totalExtent.top = 0;
dc->totalExtent.right = GetDeviceCaps( dc->hSelf, HORZRES );
dc->totalExtent.bottom = GetDeviceCaps( dc->hSelf, VERTRES );
dc->hVisRgn = CreateRectRgnIndirect( &dc->totalExtent );
dc->hVisRgn = CreateRectRgn( 0, 0, GetDeviceCaps( hdc, HORZRES ),
GetDeviceCaps( hdc, VERTRES ) );
DC_InitDC( dc );
hdc = dc->hSelf;
GDI_ReleaseObj( hdc );
return hdc;
}
......@@ -735,11 +723,7 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
return 0;
}
dc->totalExtent.left = 0;
dc->totalExtent.top = 0;
dc->totalExtent.right = 1; /* default bitmap is 1x1 */
dc->totalExtent.bottom = 1;
dc->hVisRgn = CreateRectRgnIndirect( &dc->totalExtent );
dc->hVisRgn = CreateRectRgn( 0, 0, 1, 1 ); /* default bitmap is 1x1 */
DC_InitDC( dc );
GDI_ReleaseObj( dc->hSelf );
......
......@@ -900,7 +900,6 @@ BOOL WINAPI SetTextJustification( HDC hdc, INT extra, INT breaks )
{
extra = abs((extra * dc->vportExtX + dc->wndExtX / 2) / dc->wndExtX);
if (!extra) breaks = 0;
dc->breakTotalExtra = extra;
dc->breakCount = breaks;
if (breaks)
{
......
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