View Source Scenic.Primitive.Transform.Translate (Scenic v0.12.0-rc.0)

Apply a translation matrix.

This is used to position primitives on the screen

{x, y} - move the primitive by the given amounts

Example:

graph
  |> text("Scaled!", translate: {10, 20})

Shortcut

Translating is common enough that you can use :t as a shortcut.

Example:

graph
  |> text("Scaled!", t: {10, 20})

Summary

Functions