Class: Google::Apis::SlidesV1::AffineTransform
- Inherits:
-
Object
- Object
- Google::Apis::SlidesV1::AffineTransform
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/slides_v1/classes.rb,
generated/google/apis/slides_v1/representations.rb,
generated/google/apis/slides_v1/representations.rb
Overview
AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] to transform source coordinates (x,y) into destination coordinates (x', y') according to: x' x = shear_y scale_y translate_y 1 [ 1 ] After transformation, x' = scale_x * x + shear_x * y + translate_x; y' = scale_y * y + shear_y * x + translate_y; This message is therefore composed of these six matrix elements.
Instance Attribute Summary collapse
-
#scale_x ⇒ Float
The X coordinate scaling element.
-
#scale_y ⇒ Float
The Y coordinate scaling element.
-
#shear_x ⇒ Float
The X coordinate shearing element.
-
#shear_y ⇒ Float
The Y coordinate shearing element.
-
#translate_x ⇒ Float
The X coordinate translation element.
-
#translate_y ⇒ Float
The Y coordinate translation element.
-
#unit ⇒ String
The units for translate elements.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AffineTransform
constructor
A new instance of AffineTransform.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ AffineTransform
Returns a new instance of AffineTransform
1394 1395 1396 |
# File 'generated/google/apis/slides_v1/classes.rb', line 1394 def initialize(**args) update!(**args) end |
Instance Attribute Details
#scale_x ⇒ Float
The X coordinate scaling element.
Corresponds to the JSON property scaleX
1367 1368 1369 |
# File 'generated/google/apis/slides_v1/classes.rb', line 1367 def scale_x @scale_x end |
#scale_y ⇒ Float
The Y coordinate scaling element.
Corresponds to the JSON property scaleY
1377 1378 1379 |
# File 'generated/google/apis/slides_v1/classes.rb', line 1377 def scale_y @scale_y end |
#shear_x ⇒ Float
The X coordinate shearing element.
Corresponds to the JSON property shearX
1372 1373 1374 |
# File 'generated/google/apis/slides_v1/classes.rb', line 1372 def shear_x @shear_x end |
#shear_y ⇒ Float
The Y coordinate shearing element.
Corresponds to the JSON property shearY
1392 1393 1394 |
# File 'generated/google/apis/slides_v1/classes.rb', line 1392 def shear_y @shear_y end |
#translate_x ⇒ Float
The X coordinate translation element.
Corresponds to the JSON property translateX
1387 1388 1389 |
# File 'generated/google/apis/slides_v1/classes.rb', line 1387 def translate_x @translate_x end |
#translate_y ⇒ Float
The Y coordinate translation element.
Corresponds to the JSON property translateY
1382 1383 1384 |
# File 'generated/google/apis/slides_v1/classes.rb', line 1382 def translate_y @translate_y end |
#unit ⇒ String
The units for translate elements.
Corresponds to the JSON property unit
1362 1363 1364 |
# File 'generated/google/apis/slides_v1/classes.rb', line 1362 def unit @unit end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1399 1400 1401 1402 1403 1404 1405 1406 1407 |
# File 'generated/google/apis/slides_v1/classes.rb', line 1399 def update!(**args) @unit = args[:unit] if args.key?(:unit) @scale_x = args[:scale_x] if args.key?(:scale_x) @shear_x = args[:shear_x] if args.key?(:shear_x) @scale_y = args[:scale_y] if args.key?(:scale_y) @translate_y = args[:translate_y] if args.key?(:translate_y) @translate_x = args[:translate_x] if args.key?(:translate_x) @shear_y = args[:shear_y] if args.key?(:shear_y) end |