Class: Rabbit::Renderer::Print::Cairo
- Inherits:
-
Object
- Object
- Rabbit::Renderer::Print::Cairo
show all
- Includes:
- Engine::Cairo, Base
- Defined in:
- lib/rabbit/renderer/print/cairo.rb
Constant Summary
Constants included
from DirtyCount
DirtyCount::TOO_DIRTY
Constants included
from GetText
GetText::DOMAIN
Instance Attribute Summary
Attributes included from Base
#filename, #show_page
Attributes included from Base
#adjustment_x, #adjustment_y, #draw_scaled_image, #gl_quaternion, #gl_scale, #graffiti_color, #graffiti_line_width, #margin_bottom, #margin_left, #margin_right, #margin_top, #page_margin_bottom, #page_margin_left, #page_margin_right, #page_margin_top, #paper_height, #paper_width, #progress_background, #progress_foreground, #slides_per_page, #x_dpi, #y_dpi
#background, #foreground
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Base
#draw_slide, #height, #page_height, #page_width, #paper_height=, #paper_width=, #printable?, #width
Methods included from Base
#add_gesture_action, #blackouting?, #can_undo_graffiti?, #change_graffiti_color, #clean, #clean_if_dirty, #clear_slide, #clear_theme, #confirm, #connect_key, #disconnect_key, #display?, #each_slide_pixbuf, #expand_hole, #font_families, #gl_available?, #graffiti_mode?, #have_graffiti?, #hiding?, #narrow_hole, #off_screen_canvas, #post_init_gui, #print, #printable?, #redraw, #reset_adjustment, #search_slide, #searching?, #setup_event, #stop_slide_search, #to_attrs, #toggle_blackout, #toggle_info_window, #toggle_spotlight, #toggle_whiteout, #whiteouting?
Methods included from DirtyCount
#bit_dirty, #dirty, #dirty?, #dirty_count_clean, #very_dirty
Methods included from GetText
included
#alpha_available?, available_with_gdk?, available_with_gdk_pixbuf?, available_with_pango?, #background_image=, #draw_arc, #draw_arc_by_radius, #draw_background, #draw_layout, #draw_line, #draw_lines, #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, #prepare_renderer, #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
#initialize(canvas) ⇒ Cairo
Returns a new instance of Cairo.
32
33
34
35
36
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 32
def initialize(canvas)
super
init_paper
init_color
end
|
Class Method Details
.priority ⇒ Object
23
24
25
26
27
28
29
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 23
def priority
if (::Cairo::VERSION <=> [1, 2, 0]) >= 0
100
else
-100
end
end
|
Instance Method Details
#cairo_poppler_available? ⇒ Object
19
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 19
alias_method :cairo_poppler_available?, :poppler_available?
|
#cairo_rsvg_available? ⇒ Object
18
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 18
alias_method :cairo_rsvg_available?, :rsvg_available?
|
#internal_clip_slide(x = 0, y = 0, w = width, h = height) ⇒ Object
68
69
70
71
72
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 68
def internal_clip_slide(x=0, y=0, w=width, h=height)
x, y = from_screen(x, y)
@context.rectangle(x, y, w, h)
@context.clip
end
|
#internal_draw_background(x = 0, y = 0, w = width, h = height) ⇒ Object
74
75
76
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 74
def internal_draw_background(x=0, y=0, w=width, h=height)
draw_rectangle(true, x, y, w, h, @background)
end
|
#internal_draw_slide(slide, simulation) ⇒ Object
63
64
65
66
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 63
def internal_draw_slide(slide, simulation)
yield
@context.show_page if !simulation and @show_page
end
|
#poppler_available? ⇒ Boolean
82
83
84
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 82
def poppler_available?
cairo_poppler_available?
end
|
#post_apply_theme ⇒ Object
54
55
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 54
def post_apply_theme
end
|
#post_move(old_index, index) ⇒ Object
57
58
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 57
def post_move(old_index, index)
end
|
#post_move_in_slide(old_index, index) ⇒ Object
60
61
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 60
def post_move_in_slide(old_index, index)
end
|
#post_parse ⇒ Object
51
52
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 51
def post_parse
end
|
#post_print(canceled) ⇒ Object
43
44
45
46
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 43
def post_print(canceled)
return if canceled
@context.target.finish
end
|
#pre_parse ⇒ Object
48
49
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 48
def pre_parse
end
|
#pre_print(slide_size) ⇒ Object
38
39
40
41
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 38
def pre_print(slide_size)
super
init_context(create_context)
end
|
#rsvg_available? ⇒ Boolean
78
79
80
|
# File 'lib/rabbit/renderer/print/cairo.rb', line 78
def rsvg_available?
cairo_rsvg_available?
end
|