Class: HexaPDF::Type::Annotation::AppearanceDictionary
- Inherits:
-
Dictionary
- Object
- Object
- Dictionary
- HexaPDF::Type::Annotation::AppearanceDictionary
- Defined in:
- lib/hexapdf/type/annotation.rb
Overview
The appearance dictionary references appearance streams for various use cases.
Each appearance can either be an XObject or a dictionary mapping names to XObjects. The latter is used when the appearance depends on the state of the annotation, e.g. a check box widget that can be checked or unchecked.
See: PDF1.7 s12.5.5
Constant Summary
Constants included from DictionaryFields
DictionaryFields::Boolean, DictionaryFields::PDFByteString, DictionaryFields::PDFDate
Instance Attribute Summary
Attributes inherited from Object
#data, #document, #must_be_indirect
Instance Method Summary collapse
-
#down_appearance ⇒ Object
The down appearance which should be used when the mouse button is pressed or held down inside the active area of the annotation.
-
#normal_appearance ⇒ Object
The annotation’s normal appearance.
-
#rollover_appearance ⇒ Object
The rollover appearance which should be used when the cursor is moved into the active area of the annotation without pressing a button.
Methods inherited from Dictionary
#[], #[]=, define_field, define_type, #delete, #each, each_field, #empty?, field, #key?, #to_h, type, #type
Methods inherited from Object
#<=>, #==, #cache, #cached?, #clear_cache, deep_copy, #deep_copy, #document?, #eql?, #gen, #gen=, #hash, #indirect?, #initialize, #inspect, #must_be_indirect?, #null?, #oid, #oid=, #type, #validate, #value, #value=
Constructor Details
This class inherits a constructor from HexaPDF::Object
Instance Method Details
#down_appearance ⇒ Object
The down appearance which should be used when the mouse button is pressed or held down inside the active area of the annotation.
77 78 79 |
# File 'lib/hexapdf/type/annotation.rb', line 77 def down_appearance self[:D] || self[:N] end |
#normal_appearance ⇒ Object
The annotation’s normal appearance.
65 66 67 |
# File 'lib/hexapdf/type/annotation.rb', line 65 def normal_appearance self[:N] end |
#rollover_appearance ⇒ Object
The rollover appearance which should be used when the cursor is moved into the active area of the annotation without pressing a button.
71 72 73 |
# File 'lib/hexapdf/type/annotation.rb', line 71 def rollover_appearance self[:R] || self[:N] end |