Class: Dcr::View::Compass
- Inherits:
-
Object
- Object
- Dcr::View::Compass
- Includes:
- Glimmer::UI::CustomShape
- Defined in:
- app/views/dcr/compass.rb
Instance Method Summary collapse
- #angle=(value) ⇒ Object
- #apply_transform ⇒ Object
- #current_transform ⇒ Object
- #location_x=(value) ⇒ Object
- #location_y=(value) ⇒ Object
Instance Method Details
#angle=(value) ⇒ Object
20 21 22 23 |
# File 'app/views/dcr/compass.rb', line 20 def angle=(value) [:angle] = value apply_transform end |
#apply_transform ⇒ Object
39 40 41 42 43 |
# File 'app/views/dcr/compass.rb', line 39 def apply_transform body_root.content { current_transform } end |
#current_transform ⇒ Object
45 46 47 48 49 50 |
# File 'app/views/dcr/compass.rb', line 45 def current_transform transform { translate location_x, location_y rotate(angle - 90) } end |
#location_x=(value) ⇒ Object
10 11 12 13 |
# File 'app/views/dcr/compass.rb', line 10 def location_x=(value) [:location_x] = value apply_transform end |
#location_y=(value) ⇒ Object
15 16 17 18 |
# File 'app/views/dcr/compass.rb', line 15 def location_y=(value) [:location_y] = value apply_transform end |