Class: Rabbit::Renderer::Widget::DrawingArea
- Inherits:
-
Object
- Object
- Rabbit::Renderer::Widget::DrawingArea
show all
- Includes:
- Engine::Cairo
- Defined in:
- lib/rabbit/renderer/widget/drawing-area.rb
Instance Attribute Summary
#background, #foreground
Instance Method Summary
collapse
#alpha_available?, #background_image=, #create_pango_context, #draw_arc, #draw_arc_by_radius, #draw_background, #draw_layout, #draw_line, #draw_lines, #draw_link, #draw_pixbuf, #draw_polygon, #draw_poppler_page, #draw_rectangle, #draw_rounded_rectangle, #draw_rsvg_handle, #finish_context, #finish_renderer, #init_context, #init_renderer, #make_layout, #reflect_context, #restore_context, #rotate_context, #save_context, #scale_context, #set_font_resolution, #set_source_pixbuf, #shear_context, #to_gdk_rgb, #translate_context
Methods included from Kernel
#draw_background, #draw_circle, #draw_circle_by_radius, #draw_cone, #draw_cube, #draw_dodecahedron, #draw_flag, #draw_flag_layout, #draw_icosahedron, #draw_octahedron, #draw_rectangle_flag, #draw_slide, #draw_sphere, #draw_teapot, #draw_tetrahedron, #draw_torus, #draw_triangle_flag, #flag_size, #gl_call_list, #gl_compile, #gl_supported?, #make_color, #new_list_id, #reflect_context, #restore_context, #rotate_context, #save_context, #scale_context, #shear_context, #translate_context, #z_far, #z_view
Constructor Details
Returns a new instance of DrawingArea.
25
26
27
28
29
30
|
# File 'lib/rabbit/renderer/widget/drawing-area.rb', line 25
def initialize(canvas)
@canvas = canvas
@area = Gtk::DrawingArea.new
clear_compiled_slides
set_draw
end
|
Instance Method Details
#clear_compiled_slide(slide = nil) ⇒ Object
40
41
42
|
# File 'lib/rabbit/renderer/widget/drawing-area.rb', line 40
def clear_compiled_slide(slide=nil)
@compiled_slides.delete(slide || @canvas.current_slide)
end
|
#clear_compiled_slides ⇒ Object
44
45
46
|
# File 'lib/rabbit/renderer/widget/drawing-area.rb', line 44
def clear_compiled_slides
@compiled_slides = {}
end
|
#height ⇒ Object
52
53
54
|
# File 'lib/rabbit/renderer/widget/drawing-area.rb', line 52
def height
@area.allocation.height
end
|
#queue_redraw ⇒ Object
36
37
38
|
# File 'lib/rabbit/renderer/widget/drawing-area.rb', line 36
def queue_redraw
@area.queue_redraw
end
|
#raw ⇒ Object
32
33
34
|
# File 'lib/rabbit/renderer/widget/drawing-area.rb', line 32
def raw
@area
end
|
#width ⇒ Object
48
49
50
|
# File 'lib/rabbit/renderer/widget/drawing-area.rb', line 48
def width
@area.allocation.width
end
|