Class: AsposeSlidesCloud::ShapeImageExportOptions

Inherits:
BaseObject
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ ShapeImageExportOptions

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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

#formatObject

Gets export format.



38
39
40
# File 'lib/aspose_slides_cloud/models/shape_image_export_options.rb', line 38

def format
  @format
end

#scale_xObject

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_yObject

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_boundsObject

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_mapObject

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_typesObject

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.

Parameters:

  • Object (Object)

    to be compared



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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


123
124
125
# File 'lib/aspose_slides_cloud/models/shape_image_export_options.rb', line 123

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



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_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



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

Returns:

  • (Boolean)

    true if the model is 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