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, #poppler_available?, #reflect_context, #restore_context, #rotate_context, #rsvg_available?, #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.



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

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



134
135
136
137
# File 'lib/rabbit/renderer/print/multiple.rb', line 134

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



139
140
141
142
# File 'lib/rabbit/renderer/print/multiple.rb', line 139

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



144
145
146
147
# File 'lib/rabbit/renderer/print/multiple.rb', line 144

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



116
117
118
119
120
# File 'lib/rabbit/renderer/print/multiple.rb', line 116

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



149
150
151
152
# File 'lib/rabbit/renderer/print/multiple.rb', line 149

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



159
160
161
162
# File 'lib/rabbit/renderer/print/multiple.rb', line 159

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



122
123
124
125
# File 'lib/rabbit/renderer/print/multiple.rb', line 122

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



127
128
129
130
131
132
# File 'lib/rabbit/renderer/print/multiple.rb', line 127

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



154
155
156
157
# File 'lib/rabbit/renderer/print/multiple.rb', line 154

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



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

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



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

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

#margin_bottom=(margin) ⇒ Object



88
89
90
91
# File 'lib/rabbit/renderer/print/multiple.rb', line 88

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

#margin_left=(margin) ⇒ Object



73
74
75
76
# File 'lib/rabbit/renderer/print/multiple.rb', line 73

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

#margin_right=(margin) ⇒ Object



78
79
80
81
# File 'lib/rabbit/renderer/print/multiple.rb', line 78

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

#margin_top=(margin) ⇒ Object



83
84
85
86
# File 'lib/rabbit/renderer/print/multiple.rb', line 83

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

#page_margin_bottom=(margin) ⇒ Object



68
69
70
71
# File 'lib/rabbit/renderer/print/multiple.rb', line 68

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

#page_margin_left=(margin) ⇒ Object



53
54
55
56
# File 'lib/rabbit/renderer/print/multiple.rb', line 53

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

#page_margin_right=(margin) ⇒ Object



58
59
60
61
# File 'lib/rabbit/renderer/print/multiple.rb', line 58

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

#page_margin_top=(margin) ⇒ Object



63
64
65
66
# File 'lib/rabbit/renderer/print/multiple.rb', line 63

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

#slides_per_page=(slides) ⇒ Object



111
112
113
114
# File 'lib/rabbit/renderer/print/multiple.rb', line 111

def slides_per_page=(slides)
  super
  update_layout
end

#widthObject



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

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