Module: Rabbit::Renderer::Pixmap::Base
- Includes:
- Base
- Included in:
- Cairo
- Defined in:
- lib/rabbit/renderer/pixmap/base.rb
Constant Summary
collapse
- @@depth =
nil
Constants included
from DirtyCount
DirtyCount::TOO_DIRTY
Constants included
from GetText
GetText::DOMAIN
Instance Attribute Summary collapse
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 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
Instance Attribute Details
#filename ⇒ Object
Returns the value of attribute filename.
16
17
18
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 16
def filename
@filename
end
|
#height ⇒ Object
Returns the value of attribute height.
14
15
16
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 14
def height
@height
end
|
#pango_context ⇒ Object
Returns the value of attribute pango_context.
14
15
16
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 14
def pango_context
@pango_context
end
|
#width ⇒ Object
Returns the value of attribute width.
14
15
16
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 14
def width
@width
end
|
Instance Method Details
#create_pango_context ⇒ Object
68
69
70
71
72
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 68
def create_pango_context
context = Gtk::Invisible.new.create_pango_context
set_font_resolution(context)
context
end
|
#draw_slide(slide, simulation) ⇒ Object
85
86
87
88
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 85
def draw_slide(slide, simulation)
init_pixmap(slide, simulation)
super
end
|
#index_mode_off ⇒ Object
46
47
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 46
def index_mode_off
end
|
#index_mode_on ⇒ Object
43
44
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 43
def index_mode_on
end
|
#initialize(canvas, width = nil, height = nil) ⇒ Object
18
19
20
21
22
23
24
25
26
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 18
def initialize(canvas, width=nil, height=nil)
super(canvas)
@width = width
@height = height
@filename = nil
init_dummy_pixmap
init_color
@pango_context = nil
end
|
#make_layout(text) ⇒ Object
55
56
57
58
59
60
61
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 55
def make_layout(text)
attrs, text = Pango.parse_markup(text)
layout = Pango::Layout.new(@pango_context || create_pango_context)
layout.text = text
layout.set_attributes(attrs)
layout
end
|
#post_apply_theme ⇒ Object
28
29
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 28
def post_apply_theme
end
|
#post_move(old_index, index) ⇒ Object
31
32
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 31
def post_move(old_index, index)
end
|
#post_move_in_slide(old_index, index) ⇒ Object
34
35
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 34
def post_move_in_slide(old_index, index)
end
|
#post_parse ⇒ Object
40
41
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 40
def post_parse
end
|
#post_to_pixbuf(canceled) ⇒ Object
82
83
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 82
def post_to_pixbuf(canceled)
end
|
#post_toggle_index_mode ⇒ Object
52
53
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 52
def post_toggle_index_mode
end
|
#pre_parse ⇒ Object
37
38
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 37
def pre_parse
end
|
#pre_to_pixbuf(slide_size) ⇒ Object
74
75
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 74
def pre_to_pixbuf(slide_size)
end
|
#pre_toggle_index_mode ⇒ Object
49
50
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 49
def pre_toggle_index_mode
end
|
#to_pixbuf(slide) ⇒ Object
63
64
65
66
|
# File 'lib/rabbit/renderer/pixmap/base.rb', line 63
def to_pixbuf(slide)
slide.draw(@canvas)
Utils.drawable_to_pixbuf(@pixmap)
end
|
#to_pixbufing(i) ⇒ Object