class AsposeSlidesCloud::TextFrameFormat

Contains the TextFrame’s formatting properties.

Attributes

anchoring_type[RW]

Returns or sets vertical anchor text in a TextFrame.

autofit_type[RW]

Returns or sets text’s auto-fit mode.

center_text[RW]

If True then text should be centered in box horizontally.

column_count[RW]

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.

column_spacing[RW]

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.

default_paragraph_format[RW]

Default portion format.

keep_text_flat[RW]

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

margin_bottom[RW]

Bottom margin.

margin_left[RW]

Left margin. Left margin.

margin_right[RW]

Right margin.

margin_top[RW]

Top margin.

rotation_angle[RW]

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

text_vertical_type[RW]

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

three_d_format[RW]

Represents 3d effect properties for a text.

transform[RW]

Gets or sets text wrapping shape.

wrap_text[RW]

True if text is wrapped at TextFrame’s margins.

Public Class Methods

attribute_map() click to toggle source

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

# 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
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# 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
swagger_types() click to toggle source

Attribute type mapping.

# 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

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# 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
anchoring_type=(anchoring_type) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] anchoring_type Object to be assigned

# File lib/aspose_slides_cloud/models/text_frame_format.rb, line 240
def anchoring_type=(anchoring_type)
  validator = EnumAttributeValidator.new('String', ['Top', 'Center', 'Bottom', 'Justified', 'Distributed', 'NotDefined'])
  unless validator.valid?(anchoring_type)
    fail ArgumentError, 'invalid value for "anchoring_type", must be one of #{validator.allowable_values}.'
  end
  @anchoring_type = anchoring_type
end
autofit_type=(autofit_type) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] autofit_type Object to be assigned

# File lib/aspose_slides_cloud/models/text_frame_format.rb, line 270
def autofit_type=(autofit_type)
  validator = EnumAttributeValidator.new('String', ['None', 'Normal', 'Shape', 'NotDefined'])
  unless validator.valid?(autofit_type)
    fail ArgumentError, 'invalid value for "autofit_type", must be one of #{validator.allowable_values}.'
  end
  @autofit_type = autofit_type
end
center_text=(center_text) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] center_text Object to be assigned

# File lib/aspose_slides_cloud/models/text_frame_format.rb, line 250
def center_text=(center_text)
  validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
  unless validator.valid?(center_text)
    fail ArgumentError, 'invalid value for "center_text", must be one of #{validator.allowable_values}.'
  end
  @center_text = center_text
end
eql?(o) click to toggle source

@see the ‘==` method @param [Object] Object to be compared

# File lib/aspose_slides_cloud/models/text_frame_format.rb, line 303
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# 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_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# File lib/aspose_slides_cloud/models/text_frame_format.rb, line 195
def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end
text_vertical_type=(text_vertical_type) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] text_vertical_type Object to be assigned

# File lib/aspose_slides_cloud/models/text_frame_format.rb, line 260
def text_vertical_type=(text_vertical_type)
  validator = EnumAttributeValidator.new('String', ['Horizontal', 'Vertical', 'Vertical270', 'WordArtVertical', 'EastAsianVertical', 'MongolianVertical', 'WordArtVerticalRightToLeft', 'NotDefined'])
  unless validator.valid?(text_vertical_type)
    fail ArgumentError, 'invalid value for "text_vertical_type", must be one of #{validator.allowable_values}.'
  end
  @text_vertical_type = text_vertical_type
end
transform=(transform) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] transform Object to be assigned

# File lib/aspose_slides_cloud/models/text_frame_format.rb, line 220
def transform=(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'])
  unless validator.valid?(transform)
    fail ArgumentError, 'invalid value for "transform", must be one of #{validator.allowable_values}.'
  end
  @transform = transform
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# 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
wrap_text=(wrap_text) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] wrap_text Object to be assigned

# File lib/aspose_slides_cloud/models/text_frame_format.rb, line 230
def wrap_text=(wrap_text)
  validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
  unless validator.valid?(wrap_text)
    fail ArgumentError, 'invalid value for "wrap_text", must be one of #{validator.allowable_values}.'
  end
  @wrap_text = wrap_text
end