Better implementation of EMF record EMR_EXTSELECTCLIPRGN.

This commit is contained in:
Dmitry Timoshkov 2001-02-20 00:48:13 +00:00 committed by Alexandre Julliard
parent 0385d9e755
commit 651332ee84
1 changed files with 4 additions and 11 deletions

View File

@ -704,17 +704,10 @@ BOOL WINAPI PlayEnhMetaFileRecord(
case EMR_EXTSELECTCLIPRGN:
{
PEMREXTSELECTCLIPRGN lpRgn = (PEMREXTSELECTCLIPRGN)mr;
if ((lpRgn->cbRgnData == 0) && (lpRgn->iMode == RGN_COPY)) {
ExtSelectClipRgn( hdc, 0, RGN_COPY );
} else {
FIXME("EMR_EXTSELECTCLIPRGN cbRgnData %lu\n", lpRgn->cbRgnData);
/* Need to make a region out of the RGNDATA we have */
/* ExtCreateRegion(....); */
/* ExtSelectClipRgn( hdc, ..., (INT)(lpRgn->iMode) ); */
}
HRGN hRgn = ExtCreateRegion(NULL, lpRgn->cbRgnData, (RGNDATA *)lpRgn->RgnData);
ExtSelectClipRgn(hdc, hRgn, (INT)(lpRgn->iMode));
/* ExtSelectClipRgn created a copy of the region */
DeleteObject(hRgn);
break;
}