Class: Pdfrb::Content::Shading::Axial

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

Overview

Axial (linear) gradient. ShadingType 2. ISO 32000-2 ยง8.7.4.5.4.

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:, start_point:, end_point:, function:, extend: nil) ⇒ Axial

Returns a new instance of Axial.



81
82
83
84
85
86
87
88
# File 'lib/pdfrb/content/shading/base.rb', line 81

def initialize(color_space:, start_point:, end_point:,
               function:, extend: nil)
  super(color_space: color_space)
  @start_point = start_point
  @end_point = end_point
  @function = function
  @extend = extend
end

Instance Attribute Details

#end_pointObject (readonly)

Returns the value of attribute end_point.



79
80
81
# File 'lib/pdfrb/content/shading/base.rb', line 79

def end_point
  @end_point
end

#extendObject (readonly)

Returns the value of attribute extend.



79
80
81
# File 'lib/pdfrb/content/shading/base.rb', line 79

def extend
  @extend
end

#functionObject (readonly)

Returns the value of attribute function.



79
80
81
# File 'lib/pdfrb/content/shading/base.rb', line 79

def function
  @function
end

#start_pointObject (readonly)

Returns the value of attribute start_point.



79
80
81
# File 'lib/pdfrb/content/shading/base.rb', line 79

def start_point
  @start_point
end

Class Method Details

.shading_typeObject



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

def shading_type; 2; end