Class: Rabbit::Renderer::Print::Multiple

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Kernel, Base
Defined in:
lib/rabbit/renderer/print/multiple.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

Instance Method Summary collapse

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_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

Methods included from Base

#page_height, #page_width, #paper_height=, #paper_width=, #pre_print, #printable?

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, #create_pango_context, #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

Constructor Details

#initialize(canvas) ⇒ Multiple

Returns a new instance of Multiple.



37
38
39
40
# File 'lib/rabbit/renderer/print/multiple.rb', line 37

def initialize(canvas)
  @print = Print.new(canvas)
  super
end

Instance Method Details

#draw_arc(filled, x, y, w, h, a1, a2, color = nil, params = {}) ⇒ Object



131
132
133
134
# File 'lib/rabbit/renderer/print/multiple.rb', line 131

def draw_arc(filled, x, y, w, h, a1, a2, color=nil, params={})
  x, y = normalize(x, y)
  @print.draw_arc(filled, x, y, w, h, a1, a2, color, params)
end

#draw_arc_by_radius(filled, x, y, r, a1, a2, color = nil, params = {}) ⇒ Object



136
137
138
139
# File 'lib/rabbit/renderer/print/multiple.rb', line 136

def draw_arc_by_radius(filled, x, y, r, a1, a2, color=nil, params={})
  x, y = normalize(x, y)
  @print.draw_arc_by_radius(filled, x, y, r, a1, a2, color, params)
end

#draw_layout(layout, x, y, color = nil, params = {}) ⇒ Object



141
142
143
144
# File 'lib/rabbit/renderer/print/multiple.rb', line 141

def draw_layout(layout, x, y, color=nil, params={})
  x, y = normalize(x, y)
  @print.draw_layout(layout, x, y, color, params)
end

#draw_line(x1, y1, x2, y2, color = nil, params = {}) ⇒ Object



113
114
115
116
117
# File 'lib/rabbit/renderer/print/multiple.rb', line 113

def draw_line(x1, y1, x2, y2, color=nil, params={})
  x1, y1 = normalize(x1, y1)
  x2, y2 = normalize(x2, y2)
  @print.draw_line(x1, y1, x2, y2, color, params)
end

#draw_pixbuf(pixbuf, x, y, params = {}) ⇒ Object



146
147
148
149
# File 'lib/rabbit/renderer/print/multiple.rb', line 146

def draw_pixbuf(pixbuf, x, y, params={})
  x, y = normalize(x, y)
  @print.draw_pixbuf(pixbuf, x, y, params)
end

#draw_poppler_page(handle, x, y, params = {}) ⇒ Object



156
157
158
159
# File 'lib/rabbit/renderer/print/multiple.rb', line 156

def draw_poppler_page(handle, x, y, params={})
  x, y = normalize(x, y)
  @print.draw_poppler_page(handle, x, y, params)
end

#draw_rectangle(filled, x, y, w, h, color = nil, params = {}) ⇒ Object



119
120
121
122
# File 'lib/rabbit/renderer/print/multiple.rb', line 119

def draw_rectangle(filled, x, y, w, h, color=nil, params={})
  x, y = normalize(x, y)
  @print.draw_rectangle(filled, x, y, w, h, color, params)
end

#draw_rounded_rectangle(filled, x, y, w, h, radius, color = nil, params = {}) ⇒ Object



124
125
126
127
128
129
# File 'lib/rabbit/renderer/print/multiple.rb', line 124

def draw_rounded_rectangle(filled, x, y, w, h, radius, color=nil,
                           params={})
  x, y = normalize(x, y)
  @print.draw_rounded_rectangle(filled, x, y, w, h, radius,
                                color, params)
end

#draw_rsvg_handle(handle, x, y, params = {}) ⇒ Object



151
152
153
154
# File 'lib/rabbit/renderer/print/multiple.rb', line 151

def draw_rsvg_handle(handle, x, y, params={})
  x, y = normalize(x, y)
  @print.draw_rsvg_handle(handle, x, y, params)
end

#draw_slide(slide, simulation) ⇒ Object



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/rabbit/renderer/print/multiple.rb', line 91

def draw_slide(slide, simulation)
  @print.show_page = need_show_page?
  @print.internal_draw_slide(slide, simulation) do
    if simulation
      yield
    else
      @print.save_context do
        x, y = normalize(0, 0)
        @print.internal_clip_slide(x, y, width, height)
        @print.internal_draw_background(x, y, width, height)
        yield
        draw_rectangle(false, 0, 0, width, height, @black)
      end
    end
  end
end

#heightObject



46
47
48
# File 'lib/rabbit/renderer/print/multiple.rb', line 46

def height
  @slide_height ||= @layout.slide_height
end

#margin_bottom=(margin) ⇒ Object



85
86
87
88
# File 'lib/rabbit/renderer/print/multiple.rb', line 85

def margin_bottom=(margin)
  super
  @print.margin_bottom = margin
end

#margin_left=(margin) ⇒ Object



70
71
72
73
# File 'lib/rabbit/renderer/print/multiple.rb', line 70

def margin_left=(margin)
  super
  @print.margin_left = margin
end

#margin_right=(margin) ⇒ Object



75
76
77
78
# File 'lib/rabbit/renderer/print/multiple.rb', line 75

def margin_right=(margin)
  super
  @print.margin_right = margin
end

#margin_top=(margin) ⇒ Object



80
81
82
83
# File 'lib/rabbit/renderer/print/multiple.rb', line 80

def margin_top=(margin)
  super
  @print.margin_top = margin
end

#page_margin_bottom=(margin) ⇒ Object



65
66
67
68
# File 'lib/rabbit/renderer/print/multiple.rb', line 65

def page_margin_bottom=(margin)
  super
  @print.page_margin_bottom = margin
end

#page_margin_left=(margin) ⇒ Object



50
51
52
53
# File 'lib/rabbit/renderer/print/multiple.rb', line 50

def page_margin_left=(margin)
  super
  @print.page_margin_left = margin
end

#page_margin_right=(margin) ⇒ Object



55
56
57
58
# File 'lib/rabbit/renderer/print/multiple.rb', line 55

def page_margin_right=(margin)
  super
  @print.page_margin_right = margin
end

#page_margin_top=(margin) ⇒ Object



60
61
62
63
# File 'lib/rabbit/renderer/print/multiple.rb', line 60

def page_margin_top=(margin)
  super
  @print.page_margin_top = margin
end

#slides_per_page=(slides) ⇒ Object



108
109
110
111
# File 'lib/rabbit/renderer/print/multiple.rb', line 108

def slides_per_page=(slides)
  super
  update_layout
end

#widthObject



42
43
44
# File 'lib/rabbit/renderer/print/multiple.rb', line 42

def width
  @slide_width ||= @layout.slide_width
end