translation property

Vector2 translation

The current translation is the difference in canvas units between the actual center of the canvas and the currently specified center. For example, if the actual canvas center is (5, 5) but the current center is (6, 6), the translation is (1, 1).

Implementation

Vector2 get translation => extents - center;
void translation=(Vector2 translation)

Implementation

set translation(Vector2 translation) {
  center.setFrom(extents);
  center.sub(translation);
}