PatternMakeTranslatedBy

Typeoperator
DictionaryLCB
LibraryLiveCode Builder
Syntax
pattern with <mImage> translated by <mTranslation>
Associationscom.livecode.canvas
Summary

Creates a new translated pattern paint.

Parameters
NameTypeDescription
mImage

An expression which evaluates to an image.

mTranslation

An expression which evaluates to a list of 2 numbers, the x and y offsets of the translation.

Example
// Load the pattern image.
variable tImage
put image from file "images/backgroundpattern.png" into tImage

// Create a new pattern paint, offsetting the image to the top-left of tRect
variable tPaint
variable tRect
put rectangle [20, 50, 120, 100] into tRect
put pattern with tImage translated by [the left of tRect, the top of tRect] into tPaint
Values
NameTypeDescription
return

A new pattern paint based on mImage with the specified translation applied.

Description

Creates a new translated pattern paint.

Tagscanvas