Skip to main content

Point.translate()

The Point.translate() method returns a new Point with a translate transform applied.

Signature

Point point.translate(float deltaX, float deltaY)

In other words, this will:

  • Add deltaX to the point's X-coordinate
  • Add deltaY to the point's Y-coordinate

Positive values for deltaX will move the point to the right. Positive values for deltaY will move the point downwards.

Example

An example of the Point.translate() method