Dictionary
Add an Annotation to the Page.
# File lib/origami/page.rb, line 479 def add_annot(*annotations) unless annotations.all?{|annot| annot.is_a?(Annotation) or annot.is_a?(Reference)} raise TypeError, "Only Annotation objects must be passed." end self.Annots ||= [] annotations.each do |annot| annot.solve[:P] = self if is_indirect? self.Annots << annot end end
Embed a SWF Flash application in the page.
# File lib/origami/page.rb, line 517 def add_flash_application(swfspec, params = {}) options = { :windowed => false, :transparent => false, :navigation_pane => false, :toolbar => false, :pass_context_click => false, :activation => Annotation::RichMedia::Activation::PAGE_OPEN, :deactivation => Annotation::RichMedia::Deactivation::PAGE_CLOSE, :flash_vars => nil } options.update(params) annot = create_richmedia(:Flash, swfspec, options) add_annot(annot) annot end
Returns the array of Annotation objects of the Page.
# File lib/origami/page.rb, line 507 def annotations annots = self.Annots return [] unless annots.is_a?(Array) annots.map{|annot| annot.solve} end
TODO :nodoc:
# File lib/origami/graphics/xobject.rb, line 458 def draw_image raise NotImplementedError end
# File lib/origami/graphics/xobject.rb, line 463 def draw_line(from, to, attr = {}) last_content_stream.draw_line(from, to, attr); self end
See ContentStream#draw_polygon.
# File lib/origami/graphics/xobject.rb, line 468 def draw_polygon(coords = [], attr = {}) last_content_stream.draw_polygon(coords, attr); self end
See ContentStream#draw_rectangle.
# File lib/origami/graphics/xobject.rb, line 473 def draw_rectangle(x, y, width, height, attr = {}) last_content_stream.draw_rectangle(x, y, width, height, attr); self end
Iterate through each Annotation of the Page.
# File lib/origami/page.rb, line 495 def each_annot(&b) annots = self.Annots return unless annots.is_a?(Array) annots.each do |annot| b.call(annot.solve) end end
Will execute an action when the page is closed.
# File lib/origami/page.rb, line 554 def onClose(action) unless action.is_a?(Action) or action.is_a?(Reference) raise TypeError, "An Action object must be passed." end self.AA ||= PageAdditionalActions.new self.AA.C = action self end
Will execute an action when the page is opened.
# File lib/origami/page.rb, line 540 def onOpen(action) unless action.is_a?(Action) or action.is_a?(Reference) raise TypeError, "An Action object must be passed." end self.AA ||= PageAdditionalActions.new self.AA.O = action self end
TODO :nodoc:
# File lib/origami/graphics/xobject.rb, line 483 def paint_shading(shade) raise NotImplementedError end
# File lib/origami/page.rb, line 470 def pre_build self.Resources = Resources.new.pre_build unless self.has_key?(:Resources) super end
See ContentStream#set_dash_pattern.
# File lib/origami/graphics/xobject.rb, line 538 def set_dash_pattern(pattern) last_content_stream.set_dash_pattern(pattern); self end
See ContentStream#set_fill_color.
# File lib/origami/graphics/xobject.rb, line 528 def set_fill_color(color) last_content_stream.set_fill_color(color); self end
See ContentStream#set_line_cap.
# File lib/origami/graphics/xobject.rb, line 548 def set_line_cap(cap) last_content_stream.set_line_cap(cap); self end
See ContentStream#set_line_join.
# File lib/origami/graphics/xobject.rb, line 553 def set_line_join(join) last_content_stream.set_line_join(join); self end
See ContentStream#set_line_width.
# File lib/origami/graphics/xobject.rb, line 543 def set_line_width(width) last_content_stream.set_line_width(width); self end
See ContentStream#set_stroke_color.
# File lib/origami/graphics/xobject.rb, line 533 def set_stroke_color(color) last_content_stream.set_stroke_color(color); self end
See ContentStream#set_text_char_spacing.
# File lib/origami/graphics/xobject.rb, line 523 def set_text_char_spacing(char_spacing) last_content_stream.set_text_char_spacing(char_spacing); self end
TODO :nodoc:
# File lib/origami/graphics/xobject.rb, line 488 def set_text_font(font, size) raise NotImplementedError end
See ContentStream#set_text_leading.
# File lib/origami/graphics/xobject.rb, line 498 def set_text_leading(leading) last_content_stream.set_text_leading(leading); self end
See ContentStream#set_text_pos.
# File lib/origami/graphics/xobject.rb, line 493 def set_text_pos(tx, ty) last_content_stream.set_text_pos(tx, ty); self end
See ContentStream#set_text_rendering.
# File lib/origami/graphics/xobject.rb, line 503 def set_text_rendering(rendering) last_content_stream.set_text_rendering(rendering); self end
See ContentStream#set_text_rise.
# File lib/origami/graphics/xobject.rb, line 508 def set_text_rise(rise) last_content_stream.set_text_rise(rise); self end
See ContentStream#set_text_scale.
# File lib/origami/graphics/xobject.rb, line 513 def set_text_scale(scaling) last_content_stream.set_text_scale(scaling); self end
See ContentStream#set_text_word_spacing.
# File lib/origami/graphics/xobject.rb, line 518 def set_text_word_spacing(word_spacing) last_content_stream.set_text_word_spacing(word_spacing); self end
See ContentStream#write.
# File lib/origami/graphics/xobject.rb, line 478 def write(text, attr = {}) last_content_stream.write(text, attr); self end
Generated with the Darkfish Rdoc Generator 2.