Class: Google::Apis::SlidesV1::Autofit
- Inherits:
-
Object
- Object
- Google::Apis::SlidesV1::Autofit
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/slides_v1/classes.rb,
lib/google/apis/slides_v1/representations.rb,
lib/google/apis/slides_v1/representations.rb
Overview
The autofit properties of a Shape. This property is only set for shapes that allow text.
Instance Attribute Summary collapse
-
#autofit_type ⇒ String
The autofit type of the shape.
-
#font_scale ⇒ Float
The font scale applied to the shape.
-
#line_spacing_reduction ⇒ Float
The line spacing reduction applied to the shape.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Autofit
constructor
A new instance of Autofit.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Autofit
Returns a new instance of Autofit.
157 158 159 |
# File 'lib/google/apis/slides_v1/classes.rb', line 157 def initialize(**args) update!(**args) end |
Instance Attribute Details
#autofit_type ⇒ String
The autofit type of the shape. If the autofit type is AUTOFIT_TYPE_UNSPECIFIED,
the autofit type is inherited from a parent placeholder if it exists. The
field is automatically set to NONE if a request is made that might affect text
fitting within its bounding text box. In this case, the font_scale is applied
to the font_size and the line_spacing_reduction is applied to the line_spacing.
Both properties are also reset to default values.
Corresponds to the JSON property autofitType
139 140 141 |
# File 'lib/google/apis/slides_v1/classes.rb', line 139 def autofit_type @autofit_type end |
#font_scale ⇒ Float
The font scale applied to the shape. For shapes with autofit_type NONE or
SHAPE_AUTOFIT, this value is the default value of 1. For TEXT_AUTOFIT, this
value multiplied by the font_size gives the font size that's rendered in the
editor. This property is read-only.
Corresponds to the JSON property fontScale
147 148 149 |
# File 'lib/google/apis/slides_v1/classes.rb', line 147 def font_scale @font_scale end |
#line_spacing_reduction ⇒ Float
The line spacing reduction applied to the shape. For shapes with autofit_type
NONE or SHAPE_AUTOFIT, this value is the default value of 0. For TEXT_AUTOFIT,
this value subtracted from the line_spacing gives the line spacing that's
rendered in the editor. This property is read-only.
Corresponds to the JSON property lineSpacingReduction
155 156 157 |
# File 'lib/google/apis/slides_v1/classes.rb', line 155 def line_spacing_reduction @line_spacing_reduction end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
162 163 164 165 166 |
# File 'lib/google/apis/slides_v1/classes.rb', line 162 def update!(**args) @autofit_type = args[:autofit_type] if args.key?(:autofit_type) @font_scale = args[:font_scale] if args.key?(:font_scale) @line_spacing_reduction = args[:line_spacing_reduction] if args.key?(:line_spacing_reduction) end |