gdi32: Move the ETO_OPAQUE rectangle drawing to the dib driver.
This commit is contained in:
parent
5990091bbf
commit
f284f5970a
|
@ -566,7 +566,7 @@ const struct gdi_dc_funcs dib_driver =
|
||||||
NULL, /* pExtEscape */
|
NULL, /* pExtEscape */
|
||||||
NULL, /* pExtFloodFill */
|
NULL, /* pExtFloodFill */
|
||||||
NULL, /* pExtSelectClipRgn */
|
NULL, /* pExtSelectClipRgn */
|
||||||
NULL, /* pExtTextOut */
|
dibdrv_ExtTextOut, /* pExtTextOut */
|
||||||
NULL, /* pFillPath */
|
NULL, /* pFillPath */
|
||||||
NULL, /* pFillRgn */
|
NULL, /* pFillRgn */
|
||||||
NULL, /* pFlattenPath */
|
NULL, /* pFlattenPath */
|
||||||
|
|
|
@ -110,6 +110,8 @@ extern BOOL dibdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
|
||||||
PHYSDEV src_dev, struct bitblt_coords *src, BLENDFUNCTION blend ) DECLSPEC_HIDDEN;
|
PHYSDEV src_dev, struct bitblt_coords *src, BLENDFUNCTION blend ) DECLSPEC_HIDDEN;
|
||||||
extern DWORD dibdrv_BlendImage( PHYSDEV dev, BITMAPINFO *info, const struct gdi_image_bits *bits,
|
extern DWORD dibdrv_BlendImage( PHYSDEV dev, BITMAPINFO *info, const struct gdi_image_bits *bits,
|
||||||
struct bitblt_coords *src, struct bitblt_coords *dst, BLENDFUNCTION func ) DECLSPEC_HIDDEN;
|
struct bitblt_coords *src, struct bitblt_coords *dst, BLENDFUNCTION func ) DECLSPEC_HIDDEN;
|
||||||
|
extern BOOL dibdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
|
||||||
|
const RECT *rect, LPCWSTR str, UINT count, const INT *dx ) DECLSPEC_HIDDEN;
|
||||||
extern DWORD dibdrv_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info,
|
extern DWORD dibdrv_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info,
|
||||||
struct gdi_image_bits *bits, struct bitblt_coords *src ) DECLSPEC_HIDDEN;
|
struct gdi_image_bits *bits, struct bitblt_coords *src ) DECLSPEC_HIDDEN;
|
||||||
extern COLORREF dibdrv_GetPixel( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
|
extern COLORREF dibdrv_GetPixel( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -56,6 +56,47 @@ static RECT get_device_rect( HDC hdc, int left, int top, int right, int bottom,
|
||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
* get_text_bkgnd_masks
|
||||||
|
*
|
||||||
|
* See the comment above get_pen_bkgnd_masks
|
||||||
|
*/
|
||||||
|
static inline void get_text_bkgnd_masks( const dibdrv_physdev *pdev, rop_mask *mask )
|
||||||
|
{
|
||||||
|
mask->and = 0;
|
||||||
|
|
||||||
|
if (pdev->dib.bit_count != 1)
|
||||||
|
mask->xor = pdev->bkgnd_color;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mask->xor = ~pdev->text_color;
|
||||||
|
if (GetTextColor( pdev->dev.hdc ) == GetBkColor( pdev->dev.hdc ))
|
||||||
|
mask->xor = pdev->text_color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* dibdrv_ExtTextOut
|
||||||
|
*/
|
||||||
|
BOOL dibdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
|
||||||
|
const RECT *rect, LPCWSTR str, UINT count, const INT *dx )
|
||||||
|
{
|
||||||
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pExtTextOut );
|
||||||
|
dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
|
||||||
|
|
||||||
|
if (flags & ETO_OPAQUE)
|
||||||
|
{
|
||||||
|
rop_mask bkgnd_color;
|
||||||
|
get_text_bkgnd_masks( pdev, &bkgnd_color );
|
||||||
|
solid_rects( &pdev->dib, 1, rect, &bkgnd_color, pdev->clip );
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count == 0) return TRUE;
|
||||||
|
|
||||||
|
flags &= ~ETO_OPAQUE;
|
||||||
|
return next->funcs->pExtTextOut( next, x, y, flags, rect, str, count, dx );
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* dibdrv_GetPixel
|
* dibdrv_GetPixel
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue