Class: Google::Apis::SlidesV1::PageElementProperties

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

Common properties for a page element. Note: When you initially create a PageElement, the API may modify the values of both size and transform, but the visual size will be unchanged.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PageElementProperties

Returns a new instance of PageElementProperties.



2224
2225
2226
# File 'lib/google/apis/slides_v1/classes.rb', line 2224

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

Instance Attribute Details

#page_object_idString

The object ID of the page where the element is located. Corresponds to the JSON property pageObjectId

Returns:

  • (String)


2208
2209
2210
# File 'lib/google/apis/slides_v1/classes.rb', line 2208

def page_object_id
  @page_object_id
end

#sizeGoogle::Apis::SlidesV1::Size

A width and height. Corresponds to the JSON property size



2213
2214
2215
# File 'lib/google/apis/slides_v1/classes.rb', line 2213

def size
  @size
end

#transformGoogle::Apis::SlidesV1::AffineTransform

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. Corresponds to the JSON property transform



2222
2223
2224
# File 'lib/google/apis/slides_v1/classes.rb', line 2222

def transform
  @transform
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2229
2230
2231
2232
2233
# File 'lib/google/apis/slides_v1/classes.rb', line 2229

def update!(**args)
  @page_object_id = args[:page_object_id] if args.key?(:page_object_id)
  @size = args[:size] if args.key?(:size)
  @transform = args[:transform] if args.key?(:transform)
end