Module: ImageRoles
- Defined in:
- lib/motion_sprites/interactions/roles/image_roles.rb
Instance Method Summary collapse
- #create_image_from_sprite(image_in_rect) ⇒ Object
- #create_image_sprite_with_rectangle_bounds(sprite, rectangle) ⇒ Object
Instance Method Details
#create_image_from_sprite(image_in_rect) ⇒ Object
6 7 8 |
# File 'lib/motion_sprites/interactions/roles/image_roles.rb', line 6 def create_image_from_sprite(image_in_rect) UIImage.imageWithCGImage(image_in_rect) end |
#create_image_sprite_with_rectangle_bounds(sprite, rectangle) ⇒ Object
2 3 4 |
# File 'lib/motion_sprites/interactions/roles/image_roles.rb', line 2 def create_image_sprite_with_rectangle_bounds(sprite, rectangle) CGImageCreateWithImageInRect(sprite.CGImage, rectangle) end |