module
Crame::Drawable
Overview
The Drawable mixin contains all the common methods for anything that can be drawn in
the window.
Direct including types
Defined in:
crame/drawable.crInstance Method Summary
-
#draw(position : Vector2, angle : Float = 0.0, origin : Vector2 = Vector2.new(0, 0), scale : Vector2 = Vector2.new(1, 1), color : Color = Color.new(1, 1, 1, 1))
Draws
selfinto the window, given itsposition. - #finalize
-
#size : Vector2
Returns the size of
self.
Instance Method Detail
def draw(position : Vector2, angle : Float = 0.0, origin : Vector2 = Vector2.new(0, 0), scale : Vector2 = Vector2.new(1, 1), color : Color = Color.new(1, 1, 1, 1))
#
Draws self into the window, given its position.
By default, the position you pass in this method is relative to the top-left corner
of self, unless origin is set.
Changing the scale parameter doesn't change the internal #size of self.