Class: AsposeSlidesCloud::GradientFill
- Inherits:
-
FillFormat
- Object
- BaseObject
- FillFormat
- AsposeSlidesCloud::GradientFill
- Defined in:
- lib/aspose_slides_cloud/models/gradient_fill.rb
Overview
Represents gradient fill format
Instance Attribute Summary collapse
-
#direction ⇒ Object
Gradient style.
-
#is_scaled ⇒ Object
True if the gradient is scaled.
-
#linear_angle ⇒ Object
Gradient angle.
-
#shape ⇒ Object
Gradient shape.
-
#stops ⇒ Object
Gradient stops.
-
#tile_flip ⇒ Object
Gradient flipping mode.
Attributes inherited from FillFormat
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ GradientFill
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ GradientFill
Initializes the object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/aspose_slides_cloud/models/gradient_fill.rb', line 72 def initialize(attributes = {}) super if attributes.has_key?(:'Direction') self.direction = attributes[:'Direction'] end if attributes.has_key?(:'Shape') self.shape = attributes[:'Shape'] end if attributes.has_key?(:'Stops') if (value = attributes[:'Stops']).is_a?(Array) self.stops = value end end if attributes.has_key?(:'LinearAngle') self.linear_angle = attributes[:'LinearAngle'] end if attributes.has_key?(:'IsScaled') self.is_scaled = attributes[:'IsScaled'] end if attributes.has_key?(:'TileFlip') self.tile_flip = attributes[:'TileFlip'] end self.type = 'Gradient' end |
Instance Attribute Details
#direction ⇒ Object
Gradient style.
29 30 31 |
# File 'lib/aspose_slides_cloud/models/gradient_fill.rb', line 29 def direction @direction end |
#is_scaled ⇒ Object
True if the gradient is scaled.
41 42 43 |
# File 'lib/aspose_slides_cloud/models/gradient_fill.rb', line 41 def is_scaled @is_scaled end |
#linear_angle ⇒ Object
Gradient angle.
38 39 40 |
# File 'lib/aspose_slides_cloud/models/gradient_fill.rb', line 38 def linear_angle @linear_angle end |
#shape ⇒ Object
Gradient shape.
32 33 34 |
# File 'lib/aspose_slides_cloud/models/gradient_fill.rb', line 32 def shape @shape end |
#stops ⇒ Object
Gradient stops.
35 36 37 |
# File 'lib/aspose_slides_cloud/models/gradient_fill.rb', line 35 def stops @stops end |
#tile_flip ⇒ Object
Gradient flipping mode.
44 45 46 |
# File 'lib/aspose_slides_cloud/models/gradient_fill.rb', line 44 def tile_flip @tile_flip end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/aspose_slides_cloud/models/gradient_fill.rb', line 47 def self.attribute_map super.merge({ :'direction' => :'Direction', :'shape' => :'Shape', :'stops' => :'Stops', :'linear_angle' => :'LinearAngle', :'is_scaled' => :'IsScaled', :'tile_flip' => :'TileFlip', }) end |
.swagger_types ⇒ Object
Attribute type mapping.
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/aspose_slides_cloud/models/gradient_fill.rb', line 59 def self.swagger_types super.merge({ :'direction' => :'String', :'shape' => :'String', :'stops' => :'Array<GradientFillStop>', :'linear_angle' => :'Float', :'is_scaled' => :'BOOLEAN', :'tile_flip' => :'String', }) end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/aspose_slides_cloud/models/gradient_fill.rb', line 155 def ==(o) return true if self.equal?(o) self.class == o.class && type == o.type && direction == o.direction && shape == o.shape && stops == o.stops && linear_angle == o.linear_angle && is_scaled == o.is_scaled && tile_flip == o.tile_flip end |
#eql?(o) ⇒ Boolean
169 170 171 |
# File 'lib/aspose_slides_cloud/models/gradient_fill.rb', line 169 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
175 176 177 |
# File 'lib/aspose_slides_cloud/models/gradient_fill.rb', line 175 def hash [type, direction, shape, stops, linear_angle, is_scaled, tile_flip].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
105 106 107 108 |
# File 'lib/aspose_slides_cloud/models/gradient_fill.rb', line 105 def list_invalid_properties invalid_properties = super invalid_properties end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
112 113 114 115 116 117 118 119 120 121 |
# File 'lib/aspose_slides_cloud/models/gradient_fill.rb', line 112 def valid? return false if !super direction_validator = EnumAttributeValidator.new('String', ['FromCorner1', 'FromCorner2', 'FromCorner3', 'FromCorner4', 'FromCenter', 'NotDefined']) return false unless direction_validator.valid?(@direction) shape_validator = EnumAttributeValidator.new('String', ['Linear', 'Rectangle', 'Radial', 'Path', 'NotDefined']) return false unless shape_validator.valid?(@shape) tile_flip_validator = EnumAttributeValidator.new('String', ['NoFlip', 'FlipX', 'FlipY', 'FlipBoth', 'NotDefined']) return false unless tile_flip_validator.valid?(@tile_flip) true end |