Class: AsposeSlidesCloud::ShapeImageExportOptions
- Inherits:
-
BaseObject
- Object
- BaseObject
- AsposeSlidesCloud::ShapeImageExportOptions
- Defined in:
- lib/aspose_slides_cloud/models/shape_image_export_options.rb
Overview
Provides options that control how a shape is saved in thumbnail.
Instance Attribute Summary collapse
-
#format ⇒ Object
Gets export format.
-
#scale_x ⇒ Object
Get or sets scaling ratio by X axis.
-
#scale_y ⇒ Object
Get or sets scaling ratio by Y axis.
-
#thumbnail_bounds ⇒ Object
Get or sets thumbnail bounds.
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 = {}) ⇒ ShapeImageExportOptions
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 = {}) ⇒ ShapeImageExportOptions
Initializes the object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/aspose_slides_cloud/models/shape_image_export_options.rb', line 62 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'ScaleX') self.scale_x = attributes[:'ScaleX'] end if attributes.has_key?(:'ScaleY') self.scale_y = attributes[:'ScaleY'] end if attributes.has_key?(:'ThumbnailBounds') self.thumbnail_bounds = attributes[:'ThumbnailBounds'] end if attributes.has_key?(:'Format') self.format = attributes[:'Format'] end end |
Instance Attribute Details
#format ⇒ Object
Gets export format.
38 39 40 |
# File 'lib/aspose_slides_cloud/models/shape_image_export_options.rb', line 38 def format @format end |
#scale_x ⇒ Object
Get or sets scaling ratio by X axis.
29 30 31 |
# File 'lib/aspose_slides_cloud/models/shape_image_export_options.rb', line 29 def scale_x @scale_x end |
#scale_y ⇒ Object
Get or sets scaling ratio by Y axis.
32 33 34 |
# File 'lib/aspose_slides_cloud/models/shape_image_export_options.rb', line 32 def scale_y @scale_y end |
#thumbnail_bounds ⇒ Object
Get or sets thumbnail bounds
35 36 37 |
# File 'lib/aspose_slides_cloud/models/shape_image_export_options.rb', line 35 def thumbnail_bounds @thumbnail_bounds end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
41 42 43 44 45 46 47 48 |
# File 'lib/aspose_slides_cloud/models/shape_image_export_options.rb', line 41 def self.attribute_map { :'scale_x' => :'ScaleX', :'scale_y' => :'ScaleY', :'thumbnail_bounds' => :'ThumbnailBounds', :'format' => :'Format', } end |
.swagger_types ⇒ Object
Attribute type mapping.
51 52 53 54 55 56 57 58 |
# File 'lib/aspose_slides_cloud/models/shape_image_export_options.rb', line 51 def self.swagger_types { :'scale_x' => :'Float', :'scale_y' => :'Float', :'thumbnail_bounds' => :'String', :'format' => :'String', } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
112 113 114 115 116 117 118 119 |
# File 'lib/aspose_slides_cloud/models/shape_image_export_options.rb', line 112 def ==(o) return true if self.equal?(o) self.class == o.class && scale_x == o.scale_x && scale_y == o.scale_y && thumbnail_bounds == o.thumbnail_bounds && format == o.format end |
#eql?(o) ⇒ Boolean
123 124 125 |
# File 'lib/aspose_slides_cloud/models/shape_image_export_options.rb', line 123 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
129 130 131 |
# File 'lib/aspose_slides_cloud/models/shape_image_export_options.rb', line 129 def hash [scale_x, scale_y, thumbnail_bounds, format].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
87 88 89 90 |
# File 'lib/aspose_slides_cloud/models/shape_image_export_options.rb', line 87 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
94 95 96 97 98 |
# File 'lib/aspose_slides_cloud/models/shape_image_export_options.rb', line 94 def valid? thumbnail_bounds_validator = EnumAttributeValidator.new('String', ['Slide', 'Shape', 'Appearance']) return false unless thumbnail_bounds_validator.valid?(@thumbnail_bounds) true end |