class Axlsx::GradientFill

@see Open Office XML Part 1 ยง18.8.24
A GradientFill defines the color and positioning for gradiant cell fill.

def bottom=(v)

Other tags:
    See: bottom -
def bottom=(v)
  validate_format_percentage "GradientFill.bottom", v
  @bottom = v
end

def degree=(v) Axlsx::validate_float v; @degree = v end

Other tags:
    See: degree -
def degree=(v) Axlsx::validate_float v; @degree = v end

def initialize(options = {})

Options Hash: (**options)
  • bottom (Float) --
  • top (Float) --
  • right (Float) --
  • left (Float) --
  • degree (Float) --
  • type (Symbol) --
def initialize(options = {})
  options[:type] ||= :linear
  parse_options options
  @stop = SimpleTypedList.new GradientStop
end

def left=(v)

Other tags:
    See: left -
def left=(v)
  validate_format_percentage "GradientFill.left", v
  @left = v
end

def right=(v)

Other tags:
    See: right -
def right=(v)
  validate_format_percentage "GradientFill.right", v
  @right = v
end

def to_xml_string(str = '')

Returns:
  • (String) -

Parameters:
  • str (String) --
def to_xml_string(str = '')
  str << '<gradientFill '
  serialized_attributes str
  str << '>'
  @stop.each { |s| s.to_xml_string(str) }
  str << '</gradientFill>'
end

def top=(v)

Other tags:
    See: top -
def top=(v)
  validate_format_percentage "GradientFill.top", v
  @top = v
end

def type=(v) Axlsx::validate_gradient_type v; @type = v end

Other tags:
    See: type -
def type=(v) Axlsx::validate_gradient_type v; @type = v end

def validate_format_percentage(name, value)

validates that the value provided is between 0.0 and 1.0
def validate_format_percentage(name, value)
  DataTypeValidator.validate name, Float, value, lambda { |arg| arg >= 0.0 && arg <= 1.0 }
end