Class: Google::Apis::SlidesV1::AffineTransform

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AffineTransform

Returns a new instance of AffineTransform



1552
1553
1554
# File 'generated/google/apis/slides_v1/classes.rb', line 1552

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#scale_xFloat

The X coordinate scaling element. Corresponds to the JSON property scaleX

Returns:

  • (Float)


1545
1546
1547
# File 'generated/google/apis/slides_v1/classes.rb', line 1545

def scale_x
  @scale_x
end

#scale_yFloat

The Y coordinate scaling element. Corresponds to the JSON property scaleY

Returns:

  • (Float)


1520
1521
1522
# File 'generated/google/apis/slides_v1/classes.rb', line 1520

def scale_y
  @scale_y
end

#shear_xFloat

The X coordinate shearing element. Corresponds to the JSON property shearX

Returns:

  • (Float)


1550
1551
1552
# File 'generated/google/apis/slides_v1/classes.rb', line 1550

def shear_x
  @shear_x
end

#shear_yFloat

The Y coordinate shearing element. Corresponds to the JSON property shearY

Returns:

  • (Float)


1535
1536
1537
# File 'generated/google/apis/slides_v1/classes.rb', line 1535

def shear_y
  @shear_y
end

#translate_xFloat

The X coordinate translation element. Corresponds to the JSON property translateX

Returns:

  • (Float)


1530
1531
1532
# File 'generated/google/apis/slides_v1/classes.rb', line 1530

def translate_x
  @translate_x
end

#translate_yFloat

The Y coordinate translation element. Corresponds to the JSON property translateY

Returns:

  • (Float)


1525
1526
1527
# File 'generated/google/apis/slides_v1/classes.rb', line 1525

def translate_y
  @translate_y
end

#unitString

The units for translate elements. Corresponds to the JSON property unit

Returns:

  • (String)


1540
1541
1542
# File 'generated/google/apis/slides_v1/classes.rb', line 1540

def unit
  @unit
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1557
1558
1559
1560
1561
1562
1563
1564
1565
# File 'generated/google/apis/slides_v1/classes.rb', line 1557

def update!(**args)
  @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)
  @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)
end