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.
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.
156 157 158 |
# File 'lib/google/apis/slides_v1/classes.rb', line 156 def initialize(**args) update!(**args) end |
Instance Attribute Details
#autofit_type ⇒ String
The autofit type of the shape. If unspecified, the autofit type is inherited
from a parent placeholder if it exists. The field will be automatically set to
NONE if a request is made that may affect text fitting within its bounding
text box. In this case the font_scale will be applied to the font_size and the
line_spacing_reduction will be applied to the line_spacing. Both properties
would also be reset to default values.
Corresponds to the JSON property autofitType
138 139 140 |
# File 'lib/google/apis/slides_v1/classes.rb', line 138 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 will be the default value of 1. For TEXT_AUTOFIT,
this value multiplied by the font_size will give the font size that is
rendered in the editor. This property is read-only.
Corresponds to the JSON property fontScale
146 147 148 |
# File 'lib/google/apis/slides_v1/classes.rb', line 146 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 will be the default value of 0. For
TEXT_AUTOFIT, this value subtracted from the line_spacing will give the line
spacing that is rendered in the editor. This property is read-only.
Corresponds to the JSON property lineSpacingReduction
154 155 156 |
# File 'lib/google/apis/slides_v1/classes.rb', line 154 def line_spacing_reduction @line_spacing_reduction end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
161 162 163 164 165 |
# File 'lib/google/apis/slides_v1/classes.rb', line 161 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 |