View Source Scenic.Primitive.Transform.Translate (Scenic v0.11.2)
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
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
Functions
Callback implementation for Scenic.Primitive.Transform.validate/1
.
Link to this section Functions
Callback implementation for Scenic.Primitive.Transform.validate/1
.