Module: Pdfrb::Model::Type::ShadingCommon

Included in:
Shading, ShadingType4, ShadingType5, ShadingType6, ShadingType7
Defined in:
lib/pdfrb/model/type/shading.rb

Overview

Common keys and type predicates shared by dict-based and stream-based shadings (s8.7.4.1).

Instance Method Summary collapse

Instance Method Details

#anti_alias?Boolean

Returns:

  • (Boolean)


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

def anti_alias?; self[:AntiAlias] == true; end

#axial?Boolean

Returns:

  • (Boolean)


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

def axial?; shading_type == 2; end

#backgroundObject



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

def background; self[:Background]; end

#bboxObject



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

def bbox; self[:BBox]; end

#color_spaceObject



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

def color_space; self[:ColorSpace]; end

#coons_patch?Boolean

Returns:

  • (Boolean)


22
# File 'lib/pdfrb/model/type/shading.rb', line 22

def coons_patch?; shading_type == 6; end

#domainObject



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

def domain; self[:Domain]; end

#free_form_gouraud?Boolean

Returns:

  • (Boolean)


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

def free_form_gouraud?; shading_type == 4; end

#functionObject



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

def function; self[:Function]; end

#function_based?Boolean

Returns:

  • (Boolean)


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

def function_based?; shading_type == 1; end

#lattice_gouraud?Boolean

Returns:

  • (Boolean)


21
# File 'lib/pdfrb/model/type/shading.rb', line 21

def lattice_gouraud?; shading_type == 5; end

#radial?Boolean

Returns:

  • (Boolean)


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

def radial?; shading_type == 3; end

#shading_typeObject



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

def shading_type; self[:ShadingType]; end

#tensor_patch?Boolean

Returns:

  • (Boolean)


23
# File 'lib/pdfrb/model/type/shading.rb', line 23

def tensor_patch?; shading_type == 7; end