sfml3.rb

Module: SFML::Drawable

Defined in:
ext/graphics/drawable.c,
ext/graphics/drawable.c

Overview

A mixin for anything that can be drawn to a render target (RenderWindow, RenderTexture -- both include RenderTarget -- or a legacy Target) via #draw(target, state).

Instance Method Summary collapse

Instance Method Details

#draw(target, state) ⇒ nil

Default no-op implementation; classes that include Drawable (Circle, RectangleShape, ConvexShape, Shape, Sprite, Text, VertexArray, VertexBuffer, ...) override this with the actual drawing call.

Returns:

  • (nil)

Returns:

  • (nil)


28
29
30
31
32
33
34
35
36
# File 'ext/graphics/drawable.c', line 28

static VALUE Drawable_draw(VALUE self, VALUE rb_target, VALUE rb_state) {
    if (!rb_obj_is_kind_of(rb_target, Get_Klass_Target())) {
    }

    if (!rb_obj_is_kind_of(rb_state, Get_Klass_RenderState())) {
    }

    return Qnil;
}