[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'InterfaceBase' (#lcl)

# TWidgetSet.MaskBlt

Copies part of a source DC into an destination DC, using the specified foreground and background raster operations.

## Declaration

Source position: winapih.inc line 197

`public function TWidgetSet.MaskBlt(`
`DestDC: HDC;`
`X: Integer;`
`Y: Integer;`
`Width: Integer;`
`Height: Integer;`
`SrcDC: HDC;`
`XSrc: Integer;`
`YSrc: Integer;`
`Mask: HBITMAP;`
`XMask: Integer;`
`YMask: Integer;`
`Rop: DWORD`
`):Boolean; virtual; function TWidgetSet.MaskBlt(`
`DestDC: HDC;`
`X: Integer;`
`Y: Integer;`
`Width: Integer;`
`Height: Integer;`
`SrcDC: HDC;`
`XSrc: Integer;`
`YSrc: Integer;`
`Mask: HBITMAP;`
`XMask: Integer;`
`YMask: Integer`
`):Boolean; virtual;`

## Arguments

`DestDC` |  | The destination device context.
`X` |  | The origin of the destination rectangle.
`Y` |  | The origin of the destination rectangle.
`Width` |  | The size of the destination rectangle.
`Height` |  | The size of the destination rectangle.
`SrcDC` |  | The source device context.
`XSrc` |  | The origin of the source rectangle.
`YSrc` |  | The origin of the source rectangle.
`Mask` |  | The monochrome mask bitmap handle, can be zero.
`XMask` |  | The origin of the mask rectangle.
`YMask` |  | The origin of the mask rectangle.
`Rop` |  | The raster operations (optional).

## Function result

False on failure.

## Arguments

`DestDC` |  | The destination device context.
`X` |  | The origin of the destination rectangle.
`Y` |  | The origin of the destination rectangle.
`Width` |  | The size of the destination rectangle.
`Height` |  | The size of the destination rectangle.
`SrcDC` |  | The source device context.
`XSrc` |  | The origin of the source rectangle.
`YSrc` |  | The origin of the source rectangle.
`Mask` |  | The monochrome mask bitmap handle, can be zero.
`XMask` |  | The origin of the mask rectangle.
`YMask` |  | The origin of the mask rectangle.

## Description

MaskBlt behaves like BitBlt when no mask bitmap is specified. It does a SRCOPY operation when also no Rop is specified. See BitBlt for general information about raster operations.

Rop contains both a foreground and a background raster operation (see MakeROP4). When a (monochrome) mask bitmap is present, its bits select either the foreground (1) or background (0) raster operation.

## See also

TWidgetSet.BitBlt |  | Copies part of a source DC into a destination DC, using the specified raster operation.
TWidgetSet.StretchBlt |  | Copies a rectangular region to a device context, shrinking or stretching it as needed.
MakeROP4 |  |