Module: EhbGameLib::Math::RectableObject

Included in:
Canvas
Defined in:
lib/ehb_game_lib/math/rectable_object.rb

Defined Under Namespace

Classes: Axis

Constant Summary collapse

H_AXIS =
{ name: :ax, coord: :x, size: :width, floor: :left, mean: :center,
ceil: :right }.freeze
V_AXIS =
{ name: :ay, coord: :y, size: :height, floor: :top, mean: :middle,
ceil: :bottom }.freeze

Instance Method Summary collapse

Instance Method Details

#rectObject



35
36
37
# File 'lib/ehb_game_lib/math/rectable_object.rb', line 35

def rect
  ::Chingu::Rect.new(left, top, width, height)
end