Class: Google::Apis::DocsV1::ImageProperties
- Inherits:
-
Object
- Object
- Google::Apis::DocsV1::ImageProperties
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/docs_v1/classes.rb,
generated/google/apis/docs_v1/representations.rb,
generated/google/apis/docs_v1/representations.rb
Overview
The properties of an image.
Instance Attribute Summary collapse
-
#angle ⇒ Float
The clockwise rotation angle of the image, in radians.
-
#brightness ⇒ Float
The brightness effect of the image.
-
#content_uri ⇒ String
A URI to the image with a default lifetime of 30 minutes.
-
#contrast ⇒ Float
The contrast effect of the image.
-
#crop_properties ⇒ Google::Apis::DocsV1::CropProperties
The crop properties of an image.
-
#source_uri ⇒ String
The source URI is the URI used to insert the image.
-
#transparency ⇒ Float
The transparency effect of the image.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ImageProperties
constructor
A new instance of ImageProperties.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ ImageProperties
Returns a new instance of ImageProperties.
1905 1906 1907 |
# File 'generated/google/apis/docs_v1/classes.rb', line 1905 def initialize(**args) update!(**args) end |
Instance Attribute Details
#angle ⇒ Float
The clockwise rotation angle of the image, in radians.
Corresponds to the JSON property angle
1859 1860 1861 |
# File 'generated/google/apis/docs_v1/classes.rb', line 1859 def angle @angle end |
#brightness ⇒ Float
The brightness effect of the image. The value should be in the interval
[-1.0, 1.0], where 0 means no effect.
Corresponds to the JSON property brightness
1865 1866 1867 |
# File 'generated/google/apis/docs_v1/classes.rb', line 1865 def brightness @brightness end |
#content_uri ⇒ String
A URI to the image with a default lifetime of 30 minutes.
This URI is tagged with the account of the requester. Anyone with the URI
effectively accesses the image as the original requester. Access to the
image may be lost if the document's sharing settings change.
Corresponds to the JSON property contentUri
1873 1874 1875 |
# File 'generated/google/apis/docs_v1/classes.rb', line 1873 def content_uri @content_uri end |
#contrast ⇒ Float
The contrast effect of the image. The value should be in the interval
[-1.0, 1.0], where 0 means no effect.
Corresponds to the JSON property contrast
1879 1880 1881 |
# File 'generated/google/apis/docs_v1/classes.rb', line 1879 def contrast @contrast end |
#crop_properties ⇒ Google::Apis::DocsV1::CropProperties
The crop properties of an image. The crop rectangle is represented using fractional offsets from the original content's four edges.
- If the offset is in the interval (0, 1), the corresponding edge of crop rectangle is positioned inside of the image's original bounding rectangle.
- If the offset is negative or greater than 1, the corresponding edge of crop rectangle is positioned outside of the image's original bounding rectangle.
- If all offsets and rotation angle are 0, the image is not cropped.
Corresponds to the JSON property
cropProperties
1891 1892 1893 |
# File 'generated/google/apis/docs_v1/classes.rb', line 1891 def crop_properties @crop_properties end |
#source_uri ⇒ String
The source URI is the URI used to insert the image. The source URI can be
empty.
Corresponds to the JSON property sourceUri
1897 1898 1899 |
# File 'generated/google/apis/docs_v1/classes.rb', line 1897 def source_uri @source_uri end |
#transparency ⇒ Float
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.
Corresponds to the JSON property transparency
1903 1904 1905 |
# File 'generated/google/apis/docs_v1/classes.rb', line 1903 def transparency @transparency end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1910 1911 1912 1913 1914 1915 1916 1917 1918 |
# File 'generated/google/apis/docs_v1/classes.rb', line 1910 def update!(**args) @angle = args[:angle] if args.key?(:angle) @brightness = args[:brightness] if args.key?(:brightness) @content_uri = args[:content_uri] if args.key?(:content_uri) @contrast = args[:contrast] if args.key?(:contrast) @crop_properties = args[:crop_properties] if args.key?(:crop_properties) @source_uri = args[:source_uri] if args.key?(:source_uri) @transparency = args[:transparency] if args.key?(:transparency) end |