Class: Pdfrb::Model::Type::BoxStyle

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

Overview

Box Style dictionary (s7.7.3.3, Table 396). Describes one box guide: color, dash pattern, visibility.

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

#colorObject



9
# File 'lib/pdfrb/model/type/box_style.rb', line 9

def color; self[:C]; end

#dash_countObject



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

def dash_count; self[:D]; end

#dash_patternObject



10
# File 'lib/pdfrb/model/type/box_style.rb', line 10

def dash_pattern; self[:W]; end

#dash_styleObject



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

def dash_style; self[:S]&.to_sym; end

#dashed?Boolean

Returns:

  • (Boolean)


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

def dashed?; dash_style == :D; end

#solid?Boolean

Returns:

  • (Boolean)


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

def solid?; dash_style.nil? || dash_style == :S; end