https://bugs.winehq.org/show_bug.cgi?id=55927
Bug ID: 55927 Summary: RestoreDC appears to fail with printers Product: Wine Version: 8.19 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: kadlecf@fzu.cz Distribution: ---
My wine is packed within the OpenSuse Tumbleweed distribution. Since recently, I experience problems with printing from a custom application which worked in earlier wine versions. Its graphical output (mostly data represented as lines and text) is normally shown on the screen where I encounter no problems. However, currently, when the data is sent to a printer - either one with paper or the CUPS pdf printer -, it is clipped to a rectangle defined by the SaveDC function. This would be OK except that the function RestoreDC
BOOL RestoreDC ( [in] HDC hdc, [in] int nSavedDC ) ;
does not work properly with the device context hdc connected to a printer device.
In brief, the sequence
SaveDC
(functions involving clipping of the output region)
RestoreDC
does not restore the clipping region to the original one for the printer (however, it does for the screen device context).