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