Class: Google::Apis::SlidesV1::ImageProperties

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

The properties of the Image.

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) ⇒ ImageProperties

Returns a new instance of ImageProperties



2394
2395
2396
# File 'generated/google/apis/slides_v1/classes.rb', line 2394

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

Instance Attribute Details

#brightnessFloat

The brightness effect of the image. The value should be in the interval [-1.0, 1.0], where 0 means no effect. This property is read-only. Corresponds to the JSON property brightness

Returns:

  • (Float)


2385
2386
2387
# File 'generated/google/apis/slides_v1/classes.rb', line 2385

def brightness
  @brightness
end

#contrastFloat

The contrast effect of the image. The value should be in the interval [-1.0, 1.0], where 0 means no effect. This property is read-only. Corresponds to the JSON property contrast

Returns:

  • (Float)


2339
2340
2341
# File 'generated/google/apis/slides_v1/classes.rb', line 2339

def contrast
  @contrast
end

#crop_propertiesGoogle::Apis::SlidesV1::CropProperties

The crop properties of an object enclosed in a container. For example, an Image. The crop properties is represented by the offsets of four edges which define a crop rectangle. The offsets are measured in percentage from the corresponding edges of the object's original bounding rectangle towards inside, relative to the object's original dimensions.

  • If the offset is in the interval (0, 1), the corresponding edge of crop rectangle is positioned inside of the object's original bounding rectangle.
  • If the offset is negative or greater than 1, the corresponding edge of crop rectangle is positioned outside of the object's original bounding rectangle.
  • If the left edge of the crop rectangle is on the right side of its right edge, the object will be flipped horizontally.
  • If the top edge of the crop rectangle is below its bottom edge, the object will be flipped vertically.
  • If all offsets and rotation angle is 0, the object is not cropped. After cropping, the content in the crop rectangle will be stretched to fit its container. Corresponds to the JSON property cropProperties


2365
2366
2367
# File 'generated/google/apis/slides_v1/classes.rb', line 2365

def crop_properties
  @crop_properties
end

A hypertext link. Corresponds to the JSON property link



2344
2345
2346
# File 'generated/google/apis/slides_v1/classes.rb', line 2344

def link
  @link
end

#outlineGoogle::Apis::SlidesV1::Outline

The outline of a PageElement. If these fields are unset, they may be inherited from a parent placeholder if it exists. If there is no parent, the fields will default to the value used for new page elements created in the Slides editor, which may depend on the page element kind. Corresponds to the JSON property outline



2379
2380
2381
# File 'generated/google/apis/slides_v1/classes.rb', line 2379

def outline
  @outline
end

#recolorGoogle::Apis::SlidesV1::Recolor

A recolor effect applied on an image. Corresponds to the JSON property recolor



2370
2371
2372
# File 'generated/google/apis/slides_v1/classes.rb', line 2370

def recolor
  @recolor
end

#shadowGoogle::Apis::SlidesV1::Shadow

The shadow properties of a page element. If these fields are unset, they may be inherited from a parent placeholder if it exists. If there is no parent, the fields will default to the value used for new page elements created in the Slides editor, which may depend on the page element kind. Corresponds to the JSON property shadow



2333
2334
2335
# File 'generated/google/apis/slides_v1/classes.rb', line 2333

def shadow
  @shadow
end

#transparencyFloat

The transparency effect of the image. The value should be in the interval [0.0, 1.0], where 0 means no effect and 1 means completely transparent. This property is read-only. Corresponds to the JSON property transparency

Returns:

  • (Float)


2392
2393
2394
# File 'generated/google/apis/slides_v1/classes.rb', line 2392

def transparency
  @transparency
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
# File 'generated/google/apis/slides_v1/classes.rb', line 2399

def update!(**args)
  @shadow = args[:shadow] if args.key?(:shadow)
  @contrast = args[:contrast] if args.key?(:contrast)
  @link = args[:link] if args.key?(:link)
  @crop_properties = args[:crop_properties] if args.key?(:crop_properties)
  @recolor = args[:recolor] if args.key?(:recolor)
  @outline = args[:outline] if args.key?(:outline)
  @brightness = args[:brightness] if args.key?(:brightness)
  @transparency = args[:transparency] if args.key?(:transparency)
end