Class: AsposeSlidesCloud::PhantomElement

Inherits:
MathElement show all
Defined in:
lib/aspose_slides_cloud/models/phantom_element.rb

Overview

Specifies an instance of mathematical text that contained within a MathParagraph and starts on its own line.

Instance Attribute Summary collapse

Attributes inherited from MathElement

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

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/phantom_element.rb', line 72

def initialize(attributes = {})
  super

  if attributes.has_key?(:'Base')
    self.base = attributes[:'Base']
  end

  if attributes.has_key?(:'Show')
    self.show = attributes[:'Show']
  end

  if attributes.has_key?(:'ZeroWidth')
    self.zero_width = attributes[:'ZeroWidth']
  end

  if attributes.has_key?(:'ZeroAsc')
    self.zero_asc = attributes[:'ZeroAsc']
  end

  if attributes.has_key?(:'ZeroDesc')
    self.zero_desc = attributes[:'ZeroDesc']
  end

  if attributes.has_key?(:'Transp')
    self.transp = attributes[:'Transp']
  end
  self.type = 'Phantom'
end

Instance Attribute Details

#baseObject

Base element



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

def base
  @base
end

#showObject

true if the base element is displayed.



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

def show
  @show
end

#transpObject

true if operators and symbols inside the phantom still affect mathematical spacing around the phantom (as if visible).



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

def transp
  @transp
end

#zero_ascObject

true if the the ascent (height above baseline) of the base element should be treated as zero.



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

def zero_asc
  @zero_asc
end

#zero_descObject

true if the the descent (depth below baseline) of the base element should be treated as zero.



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

def zero_desc
  @zero_desc
end

#zero_widthObject

true if the the width of the base element should be treated as zero.



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

def zero_width
  @zero_width
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/phantom_element.rb', line 47

def self.attribute_map
  super.merge({
    :'base' => :'Base',
    :'show' => :'Show',
    :'zero_width' => :'ZeroWidth',
    :'zero_asc' => :'ZeroAsc',
    :'zero_desc' => :'ZeroDesc',
    :'transp' => :'Transp',
  })
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  super.merge({
    :'base' => :'MathElement',
    :'show' => :'BOOLEAN',
    :'zero_width' => :'BOOLEAN',
    :'zero_asc' => :'BOOLEAN',
    :'zero_desc' => :'BOOLEAN',
    :'transp' => :'BOOLEAN',
  })
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



117
118
119
120
121
122
123
124
125
126
127
# File 'lib/aspose_slides_cloud/models/phantom_element.rb', line 117

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      type == o.type &&
      base == o.base &&
      show == o.show &&
      zero_width == o.zero_width &&
      zero_asc == o.zero_asc &&
      zero_desc == o.zero_desc &&
      transp == o.transp
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


131
132
133
# File 'lib/aspose_slides_cloud/models/phantom_element.rb', line 131

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



137
138
139
# File 'lib/aspose_slides_cloud/models/phantom_element.rb', line 137

def hash
  [type, base, show, zero_width, zero_asc, zero_desc, transp].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
# File 'lib/aspose_slides_cloud/models/phantom_element.rb', line 103

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

Returns:

  • (Boolean)

    true if the model is valid



110
111
112
113
# File 'lib/aspose_slides_cloud/models/phantom_element.rb', line 110

def valid?
  return false if !super
  true
end