Class: Google::Apis::SlidesV1::ColorStop

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/slides_v1/classes.rb,
generated/google/apis/slides_v1/representations.rb,
generated/google/apis/slides_v1/representations.rb

Overview

A color and position in a gradient band.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ColorStop

Returns a new instance of ColorStop.



1767
1768
1769
# File 'generated/google/apis/slides_v1/classes.rb', line 1767

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#alphaFloat

The alpha value of this color in the gradient band. Defaults to 1.0, fully opaque. Corresponds to the JSON property alpha

Returns:

  • (Float)


1765
1766
1767
# File 'generated/google/apis/slides_v1/classes.rb', line 1765

def alpha
  @alpha
end

#colorGoogle::Apis::SlidesV1::OpaqueColor

A themeable solid color value. Corresponds to the JSON property color



1753
1754
1755
# File 'generated/google/apis/slides_v1/classes.rb', line 1753

def color
  @color
end

#positionFloat

The relative position of the color stop in the gradient band measured in percentage. The value should be in the interval [0.0, 1.0]. Corresponds to the JSON property position

Returns:

  • (Float)


1759
1760
1761
# File 'generated/google/apis/slides_v1/classes.rb', line 1759

def position
  @position
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1772
1773
1774
1775
1776
# File 'generated/google/apis/slides_v1/classes.rb', line 1772

def update!(**args)
  @color = args[:color] if args.key?(:color)
  @position = args[:position] if args.key?(:position)
  @alpha = args[:alpha] if args.key?(:alpha)
end