Class: AsposeSlidesCloud::CubicBezierToPathSegment

Inherits:
PathSegment show all
Defined in:
lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb

Overview

Cubic Bezier curve segment of the geometry path

Instance Attribute Summary collapse

Attributes inherited from PathSegment

#type

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 = {}) ⇒ CubicBezierToPathSegment

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
# File 'lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb', line 72

def initialize(attributes = {})
  super

  if attributes.has_key?(:'X1')
    self.x1 = attributes[:'X1']
  end

  if attributes.has_key?(:'Y1')
    self.y1 = attributes[:'Y1']
  end

  if attributes.has_key?(:'X2')
    self.x2 = attributes[:'X2']
  end

  if attributes.has_key?(:'Y2')
    self.y2 = attributes[:'Y2']
  end

  if attributes.has_key?(:'X3')
    self.x3 = attributes[:'X3']
  end

  if attributes.has_key?(:'Y3')
    self.y3 = attributes[:'Y3']
  end
  self.type = 'CubicBezierTo'
end

Instance Attribute Details

#x1Object

X coordinate of the first direction point



29
30
31
# File 'lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb', line 29

def x1
  @x1
end

#x2Object

X coordinate of the second direction point



35
36
37
# File 'lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb', line 35

def x2
  @x2
end

#x3Object

X coordinate of end point



41
42
43
# File 'lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb', line 41

def x3
  @x3
end

#y1Object

Y coordinate of the first direction point



32
33
34
# File 'lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb', line 32

def y1
  @y1
end

#y2Object

Y coordinate of the second direction point



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

def y2
  @y2
end

#y3Object

Y coordinate of end point



44
45
46
# File 'lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb', line 44

def y3
  @y3
end

Class Method Details

.attribute_mapObject

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/cubic_bezier_to_path_segment.rb', line 47

def self.attribute_map
  super.merge({
    :'x1' => :'X1',
    :'y1' => :'Y1',
    :'x2' => :'X2',
    :'y2' => :'Y2',
    :'x3' => :'X3',
    :'y3' => :'Y3',
  })
end

.swagger_typesObject

Attribute type mapping.



59
60
61
62
63
64
65
66
67
68
# File 'lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb', line 59

def self.swagger_types
  super.merge({
    :'x1' => :'Float',
    :'y1' => :'Float',
    :'x2' => :'Float',
    :'y2' => :'Float',
    :'x3' => :'Float',
    :'y3' => :'Float',
  })
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



147
148
149
150
151
152
153
154
155
156
157
# File 'lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb', line 147

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      type == o.type &&
      x1 == o.x1 &&
      y1 == o.y1 &&
      x2 == o.x2 &&
      y2 == o.y2 &&
      x3 == o.x3 &&
      y3 == o.y3
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


161
162
163
# File 'lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb', line 161

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



167
168
169
# File 'lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb', line 167

def hash
  [type, x1, y1, x2, y2, x3, y3].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb', line 103

def list_invalid_properties
  invalid_properties = super
  if @x1.nil?
    invalid_properties.push('invalid value for "x1", x1 cannot be nil.')
  end

  if @y1.nil?
    invalid_properties.push('invalid value for "y1", y1 cannot be nil.')
  end

  if @x2.nil?
    invalid_properties.push('invalid value for "x2", x2 cannot be nil.')
  end

  if @y2.nil?
    invalid_properties.push('invalid value for "y2", y2 cannot be nil.')
  end

  if @x3.nil?
    invalid_properties.push('invalid value for "x3", x3 cannot be nil.')
  end

  if @y3.nil?
    invalid_properties.push('invalid value for "y3", y3 cannot be nil.')
  end

  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



134
135
136
137
138
139
140
141
142
143
# File 'lib/aspose_slides_cloud/models/cubic_bezier_to_path_segment.rb', line 134

def valid?
  return false if !super
  return false if @x1.nil?
  return false if @y1.nil?
  return false if @x2.nil?
  return false if @y2.nil?
  return false if @x3.nil?
  return false if @y3.nil?
  true
end