Class: Plushie::Canvas::Shape::Rotate
- Inherits:
-
Data
- Object
- Data
- Plushie::Canvas::Shape::Rotate
- Defined in:
- lib/plushie/canvas/shape/transform.rb
Overview
Rotates the canvas coordinate system. Stored as degrees internally, matching the wire protocol convention. Use Shape.rotate for the degrees-by-default convenience constructor.
Instance Attribute Summary collapse
-
#angle ⇒ Object
readonly
Returns the value of attribute angle.
Instance Method Summary collapse
-
#initialize(angle:) ⇒ Rotate
constructor
A new instance of Rotate.
-
#to_wire ⇒ Hash
Wire-ready transform map.
Constructor Details
#initialize(angle:) ⇒ Rotate
Returns a new instance of Rotate.
28 29 30 |
# File 'lib/plushie/canvas/shape/transform.rb', line 28 def initialize(angle:) super end |
Instance Attribute Details
#angle ⇒ Object (readonly)
Returns the value of attribute angle
27 28 29 |
# File 'lib/plushie/canvas/shape/transform.rb', line 27 def angle @angle end |
Instance Method Details
#to_wire ⇒ Hash
Returns wire-ready transform map.
33 34 35 |
# File 'lib/plushie/canvas/shape/transform.rb', line 33 def to_wire {type: "rotate", angle: angle} end |