Instance Method インスタンスメソッド

translateBy(x:y:)

Moves subsequent drawing operations by an amount in each dimension.

Declaration 宣言

mutating func translateBy(x: CGFloat, y: CGFloat)

Parameters パラメータ

x

The amount to move in the horizontal direction.

y

The amount to move in the vertical direction.

Discussion 議論

Calling this method is equivalent to updating the context’s transform directly using the given translation amount:


transform = transform.translatedBy(x: x, y: y)

See Also 参照

Applying Transforms