lib/ray/drawable.rb in ray-0.1.1 vs lib/ray/drawable.rb in ray-0.2.0

- old
+ new

@@ -1,7 +1,11 @@ module Ray class Drawable + include Ray::PP + + # @group Transformations + def y pos.y end def x @@ -29,9 +33,28 @@ end def scale_y=(val) self.scale = [scale_x, val] end + + # @endgroup + + def pretty_print(q, other_attributes = []) + # Note: This doesn't use %w[...] arrays because YARD can't parse them + attributes = [ + "origin", "pos", "z", "scale", "angle", + "matrix", "matrix_proc", + "shader", "shader_attributes", + "vertex_count", "index_count", "changed?", "textured?", + "blend_mode" + ] + + pretty_print_attributes q, attributes + other_attributes + end + + # @return [Hash, nil] Attributes passed to the shader when the object is + # drawn. + attr_accessor :shader_attributes alias zoom scale alias zoom= scale= alias position pos