class AsposeSlidesCloud::ShapeImageExportOptions
Provides options that control how a shape is saved in thumbnail.
Attributes
Gets export format.
Get or sets scaling ratio by X axis.
Get or sets scaling ratio by Y axis.
Get or sets thumbnail bounds
Public Class Methods
Source
# 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
Attribute mapping from ruby-style variable name to JSON key.
Source
# 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
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Source
# 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
Attribute type mapping.
Public Instance Methods
Source
# 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
Checks equality by comparing each attribute. @param [Object] Object to be compared
Source
# File lib/aspose_slides_cloud/models/shape_image_export_options.rb, line 123 def eql?(o) self == o end
@see the ‘==` method @param [Object] Object to be compared
Source
# File lib/aspose_slides_cloud/models/shape_image_export_options.rb, line 129 def hash [scale_x, scale_y, thumbnail_bounds, format].hash end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
Source
# File lib/aspose_slides_cloud/models/shape_image_export_options.rb, line 87 def list_invalid_properties invalid_properties = Array.new invalid_properties end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
Source
# File lib/aspose_slides_cloud/models/shape_image_export_options.rb, line 102 def thumbnail_bounds=(thumbnail_bounds) validator = EnumAttributeValidator.new('String', ['Slide', 'Shape', 'Appearance']) unless validator.valid?(thumbnail_bounds) fail ArgumentError, 'invalid value for "thumbnail_bounds", must be one of #{validator.allowable_values}.' end @thumbnail_bounds = thumbnail_bounds end
Custom attribute writer method checking allowed values (enum). @param [Object] thumbnail_bounds
Object to be assigned
Source
# 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
Check to see if the all the properties in the model are valid @return true if the model is valid