Scenic.Primitive.Transform.Translate (Scenic v0.11.0-beta.0) View Source

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})

Link to this section Summary

Link to this section Functions