Class: Origami::Destination::RectangleFit

Inherits:
Array
  • Object
show all
Includes:
Origami::Destination
Defined in:
lib/origami/destinations.rb

Overview

Class representing a Destination fitting the view on a rectangle in a Page.

Constant Summary

Constants inherited from Array

Array::TOKENS

Constants included from Object

Object::TOKENS

Instance Attribute Summary

Attributes included from Origami::Destination

#bottom, #left, #right, #top, #zoom

Attributes inherited from Array

#names_cache, #strings_cache, #xref_cache

Attributes included from Object

#file_offset, #generation, #no, #objstm_offset, #parent

Instance Method Summary collapse

Methods inherited from Array

#+, #<<, #[]=, #copy, native_type, parse, #pre_build, #to_a, #to_obfuscated_str, #to_s

Methods included from Object

#<=>, #cast_to, #copy, #export, #indirect_parent, #is_indirect?, #logicalize, #logicalize!, native_type, #native_type, parse, #pdf, #pdf_version_required, #post_build, #pre_build, #reference, #resolve_all_references, #set_indirect, #set_pdf, #size, skip_until_next_obj, #solve, #to_o, #to_s, #type, typeof, #xrefs

Methods inherited from Array

#to_o

Constructor Details

#initialize(pageref, left = 0, bottom = 0, right = 0, top = 0) ⇒ RectangleFit

Creates a new rectangle fit Destination.

pageref

A Reference to a Page.

left, bottom, right, top

The rectangle to fit in.



143
144
145
146
147
148
# File 'lib/origami/destinations.rb', line 143

def initialize(pageref, left = 0, bottom = 0, right = 0, top = 0)
  
  @left, @bottom, @right, @top = left, bottom, right, top
  super([pageref, :FitR, left, bottom, right, top])
  
end