Difference between revisions of "Render Part C Assignment"
Jump to navigation
Jump to search
(→move) |
(→move) |
||
Line 10: | Line 10: | ||
the move method will accept two parameters: direction and amount. | the move method will accept two parameters: direction and amount. | ||
− | direction can be one of four symbols | + | direction can be one of four [https://ruby-doc.org/core-2.5.0/Symbol.html symbols] |
<nowiki>:left | <nowiki>:left | ||
:right | :right |
Revision as of 17:08, 18 July 2019
In this studio we will evolve our code from Render_Part_B_Assignment to add new methods and a new class.
Continue editing files in the render/assignment directory.
Contents
Code to Implement
Transform
move
the move method will accept two parameters: direction and amount.
direction can be one of four symbols
:left :right :up :down
calculate_bounds
Rectangle
calculate_local_bounds
BezierCurve, Chord, Ellipse, EquilateralTriangle, Image, Text
Imagine what it would be like to define calculate_local_bounds
for each of these classes.