summaryrefslogtreecommitdiffhomepage
path: root/dragon/attr_sprite.rb
diff options
context:
space:
mode:
authorAmir Rajan <[email protected]>2020-07-25 16:46:32 -0500
committerAmir Rajan <[email protected]>2020-07-25 16:46:32 -0500
commit7fb2ac99d77e6f8c7506271f56cfdce766d5b2e3 (patch)
tree0a989bf292764a52da5ab1c888161a46750a31ea /dragon/attr_sprite.rb
parentaac51e8b318920de32fca1c0dd82a0fbc5a1bbfd (diff)
downloaddragonruby-game-toolkit-contrib-7fb2ac99d77e6f8c7506271f56cfdce766d5b2e3.tar.gz
dragonruby-game-toolkit-contrib-7fb2ac99d77e6f8c7506271f56cfdce766d5b2e3.zip
added current docs
Diffstat (limited to 'dragon/attr_sprite.rb')
-rw-r--r--dragon/attr_sprite.rb27
1 files changed, 15 insertions, 12 deletions
diff --git a/dragon/attr_sprite.rb b/dragon/attr_sprite.rb
index e47e051..81701ec 100644
--- a/dragon/attr_sprite.rb
+++ b/dragon/attr_sprite.rb
@@ -3,18 +3,7 @@
# attr_sprite.rb has been released under MIT (*only this file*).
# @private
-module AttrSprite
- include GTK::Geometry
-
- attr_accessor :x, :y, :w, :h, :path, :angle, :a, :r, :g, :b, :tile_x,
- :tile_y, :tile_w, :tile_h, :flip_horizontally,
- :flip_vertically, :angle_anchor_x, :angle_anchor_y, :id,
- :source_x, :source_y, :source_w, :source_h
-
- def primitive_marker
- :sprite
- end
-
+module AttrRect
def left
@x
end
@@ -30,6 +19,20 @@ module AttrSprite
def top
@y + @h
end
+end
+
+module AttrSprite
+ include AttrRect
+ include GTK::Geometry
+
+ attr_accessor :x, :y, :w, :h, :path, :angle, :a, :r, :g, :b, :tile_x,
+ :tile_y, :tile_w, :tile_h, :flip_horizontally,
+ :flip_vertically, :angle_anchor_x, :angle_anchor_y, :id,
+ :source_x, :source_y, :source_w, :source_h
+
+ def primitive_marker
+ :sprite
+ end
def sprite
self