Class: AsposeSlidesCloud::TextFrameFormat

Inherits:
BaseObject
  • Object
show all
Defined in:
lib/aspose_slides_cloud/models/text_frame_format.rb

Overview

Contains the TextFrame’s formatting properties.

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

Initializes the object

Parameters:

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

    Model attributes in the form of hash



122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 122

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?(:'ThreeDFormat')
    self.three_d_format = attributes[:'ThreeDFormat']
  end

  if attributes.has_key?(:'Transform')
    self.transform = attributes[:'Transform']
  end

  if attributes.has_key?(:'MarginLeft')
    self.margin_left = attributes[:'MarginLeft']
  end

  if attributes.has_key?(:'MarginRight')
    self.margin_right = attributes[:'MarginRight']
  end

  if attributes.has_key?(:'MarginTop')
    self.margin_top = attributes[:'MarginTop']
  end

  if attributes.has_key?(:'MarginBottom')
    self.margin_bottom = attributes[:'MarginBottom']
  end

  if attributes.has_key?(:'WrapText')
    self.wrap_text = attributes[:'WrapText']
  end

  if attributes.has_key?(:'AnchoringType')
    self.anchoring_type = attributes[:'AnchoringType']
  end

  if attributes.has_key?(:'CenterText')
    self.center_text = attributes[:'CenterText']
  end

  if attributes.has_key?(:'TextVerticalType')
    self.text_vertical_type = attributes[:'TextVerticalType']
  end

  if attributes.has_key?(:'AutofitType')
    self.autofit_type = attributes[:'AutofitType']
  end

  if attributes.has_key?(:'ColumnCount')
    self.column_count = attributes[:'ColumnCount']
  end

  if attributes.has_key?(:'ColumnSpacing')
    self.column_spacing = attributes[:'ColumnSpacing']
  end

  if attributes.has_key?(:'KeepTextFlat')
    self.keep_text_flat = attributes[:'KeepTextFlat']
  end

  if attributes.has_key?(:'RotationAngle')
    self.rotation_angle = attributes[:'RotationAngle']
  end

  if attributes.has_key?(:'DefaultParagraphFormat')
    self.default_paragraph_format = attributes[:'DefaultParagraphFormat']
  end
end

Instance Attribute Details

#anchoring_typeObject

Returns or sets vertical anchor text in a TextFrame.



50
51
52
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 50

def anchoring_type
  @anchoring_type
end

#autofit_typeObject

Returns or sets text’s auto-fit mode.



59
60
61
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 59

def autofit_type
  @autofit_type
end

#center_textObject

If True then text should be centered in box horizontally.



53
54
55
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 53

def center_text
  @center_text
end

#column_countObject

Returns or sets number of columns in the text area. This value must be a positive number. Otherwise, the value will be set to zero. Value 0 means undefined value.



62
63
64
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 62

def column_count
  @column_count
end

#column_spacingObject

Returns or sets the space between text columns in the text area (in points). This should only apply when there is more than 1 column present. This value must be a positive number. Otherwise, the value will be set to zero.



65
66
67
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 65

def column_spacing
  @column_spacing
end

#default_paragraph_formatObject

Default portion format.



74
75
76
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 74

def default_paragraph_format
  @default_paragraph_format
end

#keep_text_flatObject

Returns or set keeping text out of 3D scene entirely.



68
69
70
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 68

def keep_text_flat
  @keep_text_flat
end

#margin_bottomObject

Bottom margin.



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

def margin_bottom
  @margin_bottom
end

#margin_leftObject

Left margin. Left margin.



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

def margin_left
  @margin_left
end

#margin_rightObject

Right margin.



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

def margin_right
  @margin_right
end

#margin_topObject

Top margin.



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

def margin_top
  @margin_top
end

#rotation_angleObject

Specifies the custom rotation that is being applied to the text within the bounding box.



71
72
73
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 71

def rotation_angle
  @rotation_angle
end

#text_vertical_typeObject

Determines text orientation. The resulted value of visual text rotation summarized from this property and custom angle in property RotationAngle.



56
57
58
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 56

def text_vertical_type
  @text_vertical_type
end

#three_d_formatObject

Represents 3d effect properties for a text.



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

def three_d_format
  @three_d_format
end

#transformObject

Gets or sets text wrapping shape.



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

def transform
  @transform
end

#wrap_textObject

True if text is wrapped at TextFrame’s margins.



47
48
49
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 47

def wrap_text
  @wrap_text
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 77

def self.attribute_map
  {
    :'three_d_format' => :'ThreeDFormat',
    :'transform' => :'Transform',
    :'margin_left' => :'MarginLeft',
    :'margin_right' => :'MarginRight',
    :'margin_top' => :'MarginTop',
    :'margin_bottom' => :'MarginBottom',
    :'wrap_text' => :'WrapText',
    :'anchoring_type' => :'AnchoringType',
    :'center_text' => :'CenterText',
    :'text_vertical_type' => :'TextVerticalType',
    :'autofit_type' => :'AutofitType',
    :'column_count' => :'ColumnCount',
    :'column_spacing' => :'ColumnSpacing',
    :'keep_text_flat' => :'KeepTextFlat',
    :'rotation_angle' => :'RotationAngle',
    :'default_paragraph_format' => :'DefaultParagraphFormat',
  }
end

.swagger_typesObject

Attribute type mapping.



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 99

def self.swagger_types
  {
    :'three_d_format' => :'ThreeDFormat',
    :'transform' => :'String',
    :'margin_left' => :'Float',
    :'margin_right' => :'Float',
    :'margin_top' => :'Float',
    :'margin_bottom' => :'Float',
    :'wrap_text' => :'String',
    :'anchoring_type' => :'String',
    :'center_text' => :'String',
    :'text_vertical_type' => :'String',
    :'autofit_type' => :'String',
    :'column_count' => :'Integer',
    :'column_spacing' => :'Float',
    :'keep_text_flat' => :'BOOLEAN',
    :'rotation_angle' => :'Float',
    :'default_paragraph_format' => :'ParagraphFormat',
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 280

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      three_d_format == o.three_d_format &&
      transform == o.transform &&
      margin_left == o.margin_left &&
      margin_right == o.margin_right &&
      margin_top == o.margin_top &&
      margin_bottom == o.margin_bottom &&
      wrap_text == o.wrap_text &&
      anchoring_type == o.anchoring_type &&
      center_text == o.center_text &&
      text_vertical_type == o.text_vertical_type &&
      autofit_type == o.autofit_type &&
      column_count == o.column_count &&
      column_spacing == o.column_spacing &&
      keep_text_flat == o.keep_text_flat &&
      rotation_angle == o.rotation_angle &&
      default_paragraph_format == o.default_paragraph_format
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


303
304
305
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 303

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



309
310
311
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 309

def hash
  [three_d_format, transform, margin_left, margin_right, margin_top, margin_bottom, wrap_text, anchoring_type, center_text, text_vertical_type, autofit_type, column_count, column_spacing, keep_text_flat, rotation_angle, default_paragraph_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



195
196
197
198
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 195

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



202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/aspose_slides_cloud/models/text_frame_format.rb', line 202

def valid?
  transform_validator = EnumAttributeValidator.new('String', ['None', 'Plain', 'Stop', 'Triangle', 'TriangleInverted', 'Chevron', 'ChevronInverted', 'RingInside', 'RingOutside', 'ArchUp', 'ArchDown', 'Circle', 'Button', 'ArchUpPour', 'ArchDownPour', 'CirclePour', 'ButtonPour', 'CurveUp', 'CurveDown', 'CanUp', 'CanDown', 'Wave1', 'Wave2', 'DoubleWave1', 'Wave4', 'Inflate', 'Deflate', 'InflateBottom', 'DeflateBottom', 'InflateTop', 'DeflateTop', 'DeflateInflate', 'DeflateInflateDeflate', 'FadeRight', 'FadeLeft', 'FadeUp', 'FadeDown', 'SlantUp', 'SlantDown', 'CascadeUp', 'CascadeDown', 'Custom', 'NotDefined'])
  return false unless transform_validator.valid?(@transform)
  wrap_text_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
  return false unless wrap_text_validator.valid?(@wrap_text)
  anchoring_type_validator = EnumAttributeValidator.new('String', ['Top', 'Center', 'Bottom', 'Justified', 'Distributed', 'NotDefined'])
  return false unless anchoring_type_validator.valid?(@anchoring_type)
  center_text_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
  return false unless center_text_validator.valid?(@center_text)
  text_vertical_type_validator = EnumAttributeValidator.new('String', ['Horizontal', 'Vertical', 'Vertical270', 'WordArtVertical', 'EastAsianVertical', 'MongolianVertical', 'WordArtVerticalRightToLeft', 'NotDefined'])
  return false unless text_vertical_type_validator.valid?(@text_vertical_type)
  autofit_type_validator = EnumAttributeValidator.new('String', ['None', 'Normal', 'Shape', 'NotDefined'])
  return false unless autofit_type_validator.valid?(@autofit_type)
  true
end