[Overview][Constants][Types][Classes][Index] Reference for unit 'ptc' (#ptc)

TPTCCopy.Copy

Copy an area of the source pixel array to an area of the destination pixel array.

Declaration

Source position: copyd.inc line 45

public procedure TPTCCopy.Copy(

  const ASourcePixels: Pointer;

  ASourceX: Integer;

  ASourceY: Integer;

  ASourceWidth: Integer;

  ASourceHeight: Integer;

  ASourcePitch: Integer;

  ADestinationPixels: Pointer;

  ADestinationX: Integer;

  ADestinationY: Integer;

  ADestinationWidth: Integer;

  ADestinationHeight: Integer;

  ADestinationPitch: Integer

);

Arguments

ASourcePixels

  

the source pixel array.

ASourceX

  

the x coordinate of the top-left corner of the source area.

ASourceY

  

the y coordinate of the top-left corner of the source area.

ASourceWidth

  

the width of the source area in pixels.

ASourceHeight

  

the height of the source area in pixels.

ASourcePitch

  

the pitch of the source pixel array in bytes.

ADestinationPixels

  

the destination pixel array.

ADestinationX

  

the x coordinate of the top-left corner of the destination area.

ADestinationY

  

the y coordinate of the top-left corner of the destination area.

ADestinationWidth

  

the width of the destination area in pixels.

ADestinationHeight

  

the height of the destination area in pixels.

ADestinationPitch

  

the pitch of the destination pixel array in bytes.

Description

Copy an area of the source pixel array ASourcePixels to an area of the destination pixel array ADestinationPixels. ASourceWidth, ASourceHeight, ADestinationWidth and ADestinationHeight must all be positive integers. ASourcePitch and ADestinationPitch may be any value, even negative.

Warning: You must first call TPTCCopy.Request to initialize the pixel formats and TPTCCopy.Palette to initialize palettes.