Class: Pdfrb::Model::Type::AppearanceCharacteristics

Inherits:
Cos::Dictionary show all
Defined in:
lib/pdfrb/model/type/appearance_characteristics.rb

Overview

Appearance Characteristics dictionary (s12.5.5). Defines the visual characteristics of a widget annotation: background/caption colors, normal/rollover/down captions, etc. Often stored under the widget's /MK key.

Instance Attribute Summary

Attributes inherited from Object

#document, #gen, #oid, #value

Instance Method Summary collapse

Methods inherited from Cos::Dictionary

#[], #[]=, arlington_available?, arlington_default, arlington_key_to_symbol, arlington_loaded_for?, arlington_mark_loaded, arlington_object, arlington_one_type_to_ruby, arlington_required?, arlington_types_to_ruby, arlington_version, define_field, define_field_from_arlington, #delete, #each, each_field, #each_raw, #empty?, field, #initialize, #key?, #keys, lookup_type, own_fields, #pdf_type, register_type, type_map, #validate

Methods inherited from Object

#==, define_type, #deref, #indirect?, #initialize, #must_be_indirect?, #pdf_type, pdf_type

Constructor Details

This class inherits a constructor from Pdfrb::Model::Cos::Dictionary

Instance Method Details

#alternate_iconObject



18
# File 'lib/pdfrb/model/type/appearance_characteristics.rb', line 18

def alternate_icon; self[:IX]; end

#background_colorObject



11
# File 'lib/pdfrb/model/type/appearance_characteristics.rb', line 11

def background_color; self[:BG]; end

#border_colorObject



16
# File 'lib/pdfrb/model/type/appearance_characteristics.rb', line 16

def border_color; self[:BC]; end

#captionObject



12
# File 'lib/pdfrb/model/type/appearance_characteristics.rb', line 12

def caption; self[:CA]; end

#down_captionObject



14
# File 'lib/pdfrb/model/type/appearance_characteristics.rb', line 14

def down_caption; self[:AC]; end

#has_background?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/pdfrb/model/type/appearance_characteristics.rb', line 26

def has_background?
  !!background_color
end

#has_caption?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/pdfrb/model/type/appearance_characteristics.rb', line 30

def has_caption?
  !!caption
end

#icon_fitObject



19
# File 'lib/pdfrb/model/type/appearance_characteristics.rb', line 19

def icon_fit; self[:IF]; end

#normal_iconObject



17
# File 'lib/pdfrb/model/type/appearance_characteristics.rb', line 17

def normal_icon; self[:IF]; end

#rollover_captionObject



13
# File 'lib/pdfrb/model/type/appearance_characteristics.rb', line 13

def rollover_caption; self[:RC]; end

#rotationObject



15
# File 'lib/pdfrb/model/type/appearance_characteristics.rb', line 15

def rotation; self[:R] || 0; end

#text_positionObject



22
23
24
# File 'lib/pdfrb/model/type/appearance_characteristics.rb', line 22

def text_position
  tp || 0
end

#tpObject



20
# File 'lib/pdfrb/model/type/appearance_characteristics.rb', line 20

def tp; self[:TP]; end