Class: Origami::Annotation

Inherits:
Dictionary show all
Includes:
StandardObject
Defined in:
lib/origami/annotations.rb,
lib/origami/3d.rb,
lib/origami/page.rb

Overview

Class representing an annotation. Annotations are objects which user can interact with.

Defined Under Namespace

Modules: Flags, Markup, Triggerable Classes: AdditionalActions, AppearanceCharacteristics, AppearanceDictionary, AppearanceStream, Artwork3D, BorderEffect, BorderStyle, Circle, FileAttachment, FreeText, Link, Projection, RichMedia, Screen, Shape, Sound, Square, Text, Widget

Constant Summary

Constants included from StandardObject

StandardObject::DEFAULT_ATTRIBUTES

Constants inherited from Dictionary

Dictionary::TOKENS

Constants included from Object

Object::TOKENS

Instance Attribute Summary

Attributes inherited from Dictionary

#names_cache, #strings_cache, #xref_cache

Attributes included from Object

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

Instance Method Summary collapse

Methods included from StandardObject

included, #pre_build, #version_required

Methods inherited from Dictionary

#[], #[]=, add_type_signature, #cast_to, #copy, #delete, guess_type, hint_type, #initialize, #key?, #map!, #merge, parse, #to_h, #to_obfuscated_str, #to_s

Methods included from FieldAccessor

#method_missing, #respond_to_missing?

Methods included from Object

#<=>, #cast_to, #copy, #document, #export, included, #indirect?, #indirect_parent, #initialize, #logicalize, #logicalize!, #native_type, 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

This class inherits a constructor from Origami::Dictionary

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Origami::FieldAccessor

Instance Method Details

#set_down_appearance(apstm) ⇒ Object



99
100
101
102
103
104
# File 'lib/origami/annotations.rb', line 99

def set_down_appearance(apstm)
    self.AP ||= AppearanceStream.new
    self.AP[:D] = apstm

    self
end

#set_normal_appearance(apstm) ⇒ Object



85
86
87
88
89
90
# File 'lib/origami/annotations.rb', line 85

def set_normal_appearance(apstm)
    self.AP ||= AppearanceDictionary.new
    self.AP[:N] = apstm

    self
end

#set_rollover_appearance(apstm) ⇒ Object



92
93
94
95
96
97
# File 'lib/origami/annotations.rb', line 92

def set_rollover_appearance(apstm)
    self.AP ||= AppearanceDictionary.new
    self.AP[:R] = apstm

    self
end