Class: Origami::Destination::Zoom
- Inherits:
-
Origami::Destination
- Object
- Array
- Array
- Origami::Destination
- Origami::Destination::Zoom
- Defined in:
- lib/origami/destinations.rb
Overview
Class representing a Destination zooming on a part of a document.
Constant Summary
Constants inherited from Array
Constants included from Object
Instance Attribute Summary
Attributes inherited from Origami::Destination
#bottom, #left, #page, #right, #top, #zoom
Attributes included from ObjectCache
#names_cache, #strings_cache, #xref_cache
Attributes included from Object
#file_offset, #generation, #no, #objstm_offset, #parent
Class Method Summary collapse
-
.[](page, left: 0, top: 0, zoom: 0) ⇒ Object
Creates a new zoom Destination.
Instance Method Summary collapse
-
#initialize(array) ⇒ Zoom
constructor
A new instance of Zoom.
Methods inherited from Origami::Destination
GlobalBoundingBoxFit, GlobalFit, HorizontalBoudingBoxFit, HorizontalFit, RectangleFit, VerticalBoundingBoxFit, VerticalFit, Zoom
Methods inherited from Array
#+, #<<, #[]=, #concat, #insert, of, parse, #pre_build, #push, #to_a, #to_obfuscated_str, #to_s
Methods included from CompoundObject
#copy, #delete, #include?, #update_values, #update_values!
Methods included from ObjectCache
Methods included from Object
#cast_to, #copy, #document, #export, included, #indirect?, #indirect_parent, #logicalize, #logicalize!, #native_type, #numbered?, parse, #post_build, #pre_build, #reference, #set_document, #set_indirect, skip_until_next_obj, #solve, #to_o, #to_s, #type, typeof, #version_required, #xrefs
Constructor Details
#initialize(array) ⇒ Zoom
Returns a new instance of Zoom.
50 51 52 53 54 |
# File 'lib/origami/destinations.rb', line 50 def initialize(array) super(array) @page, _, @left, @top, @zoom = array end |
Class Method Details
.[](page, left: 0, top: 0, zoom: 0) ⇒ Object
Creates a new zoom Destination.
- page
-
The destination Page.
- left, top
-
Coords in the Page.
- zoom
-
Zoom factor.
62 63 64 |
# File 'lib/origami/destinations.rb', line 62 def self.[](page, left: 0, top: 0, zoom: 0) self.new([page, :XYZ, left, top, zoom]) end |