How to manipulate Canvas elements: Difference between revisions

Jump to navigation Jump to search
Line 274: Line 274:
Let's apply a translation:
Let's apply a translation:
<syntaxhighlight>
<syntaxhighlight>
arrow.setTranslation(80, 150);
arrow.setTranslation(150, 80);
</syntaxhighlight>[[File:Arrow.gif|none]]
</syntaxhighlight>[[File:Translated.png|none|Translated arrow]]
The blue axis and labels are showing the <span style="background: white; color: blue">( '''u, v''' )</span> <big>absolute</big> coodinate system.<br />
Note that the translated arrow has brought with him his intrinsic coordenate system and his BoundingBox remains unchanged.<br />
All points of the element meet the following equations::<br />
<big>'''''u = Tx + x'''''</big>
<big>'''''v = Ty + y'''''</big>
229

edits

Navigation menu