[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'agraphics' (#aros)


Move a rectangular region of bits in a BitMap.


Source position: agraphics.pas line 2059

function BltBitMap(

  const SrcBitMap: PBitMap;

  xSrc: LongInt;

  ySrc: LongInt;

  DestBitMap: PBitMap;

  xDest: LongInt;

  yDest: LongInt;

  xSize: LongInt;

  ySize: LongInt;

  MinTerm: LongWord;

  Mask: LongWord;

  TempA: TPlanePtr





Copy from this bitmap. as a special case, if a plane pointer in the SrcBitMap is nil, it acts as a pointer to a plane of all zeros, and if the plane pointer is $ffffffff, it acts as a pointer to a plane of all ones.



Top Left corner of the Source rectangle



Valid range is positive signed integer such that the raster word's offset 0..(32767-Size)



Copy to this bitmap. May be the same as srcBitMap.



the x and y coordinates of the upper left corner of the destination for the rectangle.



Valid range is as for Src.



The size of the rectangle to be moved.



Valid range is (X: 1..976; Y: 1..1023 such that final raster word's offset is 0..32767)



See description



the write mask to apply to this operation. Bits set indicate the corresponding planes (if not greater than the minimum plane count) are to participate in the operation. Typically this is set to $ff.



If the copy overlaps exactly to the left or right (i.e. the scan line addresses overlap), and TempA is non-zero, it points to enough chip accessible memory to hold a line of A source for the blit (ie CHIP RAM). BltBitMap will allocate (and free) the needed TempA if none is provided and one is needed. Blit overlap is determined from the relation of the first non-masked planes in the source and destination bit maps.

Function result

The number of planes actually involved in the blit.


Perform non-destructive blits to move a rectangle from one area in a BitMap to another area, which can be on a different BitMap. This blit is assumed to be friendly: no error conditions (e.g. a rectangle outside the BitMap bounds) are tested or reported.

If a special hardware is available, this function will use it.


How to copy. Most useful values are 0x00C0 for a vanilla copy, 0x0030 to invert the source and then copy or 0x0050 to ignore the source and just invert the destination. If you want to calculate other values, then you must know that channel A is set, if you are inside the rectangle, channel B is the source and channel C is the destination of the rectangle.

0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111

So 0x00C0 means: D is set if one is inside the rectangle (A is set) and B (the source) is set and cleared otherwise.

To fill the rectangle, you would want to set D when A is set, so the value is 0x00F0.

See also



Calls BltBitMap() after accounting for windows



Blit from source bitmap to destination rastport.

Documentation generated on: 2017-01-10