8.17. tsImageFillPattern

Syntax

Pascal

procedure tsImageFillPattern(ImageID: tsImageID; PatternImageID: tsImageID;
  X: tsInt; Y: tsInt; ChannelMask: tsBitmask);

C/C++

void tsImageFillPattern(tsImageID ImageID, tsImageID PatternImageID,
  tsInt X, tsInt Y, tsBitmask ChannelMask);

Description

Fills an image with an second image. The image will be used as pattern and will be repeated. The operation can be affected by the adjusted image modes.

Params

ImageID

The ID of the image which will be filled with the pattern image.

PatternImageID

The image ID which will used for the fill operation.

X

The horizintal position where the pattern image will be placed. If this value is smaller than zero the position is random.

Y

The vertical position where the pattern image will be placed. If this value is smaller than zero the position is random.

ChannelMask

Indicates which channels getting filled. For an list of all available flags look in the table Channelmasks.

Error Codes

TS_NO_ACTIVE_CONTEXT

If there was no context bound.

TS_INVALID_OPERATION

If you try to resize an empty image.

TS_INVALID_VALUE

This will happen if you pass an invalid ImageID to this function.