AGK for Pascal
ContentsIndexHome
PreviousUpNext
TAgkImage.Mask Method (TAgkImage, TAgkImage, TAgkColorChannel, TAgkColorChannel, Integer, Integer)

Copies a color channel from one image to another.

Syntax
Pascal
class procedure Mask(const SrcImage: TAgkImage; const DstImage: TAgkImage; const SrcChannel: TAgkColorChannel; const DstChannel: TAgkColorChannel; const X: Integer = 0; const Y: Integer = 0); overload; static;
Parameters 
Description 
const SrcImage: TAgkImage 
the image to use as a source. 
const DstImage: TAgkImage 
the image to apply the mask source to. 
const SrcChannel: TAgkColorChannel 
the channel in the source image to use as the mask. 
const DstChannel: TAgkColorChannel 
the channel in the target image to copy the mask to. 
const X: Integer = 0 
(optional) The X offset for the source image on the destination image. 
const Y: Integer = 0 
(optional) The Y offset for the source image on the destination image. 

This is a slow command and should not be called every frame. The X,Y offset values allow you to offset the source image on te destination image so a small source image can be used to mask any part of a large image. Any part of the large image outside the size of the small image will be left unchanged. Negative offset values are supported to shift the source image off the top left of the destination image.

Copyright (c) 2012. All rights reserved.