Class: Pdfrb::Content::Shading::Radial

Inherits:
Base
  • Object
show all
Defined in:
lib/pdfrb/content/shading/base.rb

Overview

Radial gradient. ShadingType 3. ISO 32000-2 ยง8.7.4.5.3.

Instance Attribute Summary collapse

Attributes inherited from Base

#color_space

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#register_on, #to_dict

Constructor Details

#initialize(color_space:, center1:, radius1:, center2:, radius2:, function:, extend: nil) ⇒ Radial

Returns a new instance of Radial.



111
112
113
114
115
116
117
118
119
120
# File 'lib/pdfrb/content/shading/base.rb', line 111

def initialize(color_space:, center1:, radius1:, center2:, radius2:,
               function:, extend: nil)
  super(color_space: color_space)
  @center1 = center1
  @radius1 = radius1
  @center2 = center2
  @radius2 = radius2
  @function = function
  @extend = extend
end

Instance Attribute Details

#center1Object (readonly)

Returns the value of attribute center1.



109
110
111
# File 'lib/pdfrb/content/shading/base.rb', line 109

def center1
  @center1
end

#center2Object (readonly)

Returns the value of attribute center2.



109
110
111
# File 'lib/pdfrb/content/shading/base.rb', line 109

def center2
  @center2
end

#extendObject (readonly)

Returns the value of attribute extend.



109
110
111
# File 'lib/pdfrb/content/shading/base.rb', line 109

def extend
  @extend
end

#functionObject (readonly)

Returns the value of attribute function.



109
110
111
# File 'lib/pdfrb/content/shading/base.rb', line 109

def function
  @function
end

#radius1Object (readonly)

Returns the value of attribute radius1.



109
110
111
# File 'lib/pdfrb/content/shading/base.rb', line 109

def radius1
  @radius1
end

#radius2Object (readonly)

Returns the value of attribute radius2.



109
110
111
# File 'lib/pdfrb/content/shading/base.rb', line 109

def radius2
  @radius2
end

Class Method Details

.shading_typeObject



123
# File 'lib/pdfrb/content/shading/base.rb', line 123

def shading_type; 3; end