Unit 'InterfaceBase' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#lcl]

TWidgetSet.BitBlt

Copies part of a source DC into a destination DC, using the specified raster operation.

Declaration

Source position: winapih.inc line 39

public function TWidgetSet.BitBlt(

  DestDC: HDC;

  X: Integer;

  Y: Integer;

  Width: Integer;

  Height: Integer;

  SrcDC: HDC;

  XSrc: Integer;

  YSrc: Integer;

  Rop: DWORD

):Boolean; virtual;

Arguments

DestDC

  

The destination Device Context.

X

  

The origin in the destination DC.

Y

  

The origin in the destination DC.

Width

  

The image size.

Height

  

The image size.

SrcDC

  

The source Device Context.

XSrc

  

The origin in the source DC.

YSrc

  

The origin in the source DC.

Rop

  

The raster operation.

Function result

False on failure.

Description

This routine implements the equivalent Windows GDI API of the same name in all platforms supported by Typhon.

It copies a section of a Canvas to another one, without any stretching. It allows one to select the kind of operation which should be performed to draw the pixels into the destination in the parameter ROP. Allowed operations go from simply copying the pixels without change to inverting them and also to executing logical operations involving the source pixels and the previously existing pixels in the destination Canvas.

For normal usage one should only use SRCOPY in the ROP parameter, other operations may not be supported by all widgetsets.

There exist 16 raster operations, according to the possible combinations of two (boolean) values. Excluding the NOP case, that doesn't modify the target area, the possible values for ROP are:

These flags can be added to above ROPs:

CAPTUREBLT
Includes windows which are on top of the specified Canvas. This option is not recommended and is very hard to implement in all supported platforms.
NOMIRRORBITMAP
Prevents the bitmap from being mirrored. (The coordinates are sorted before painting?)


CT Web help

CodeTyphon Studio