Class: Google::Apis::DocsV1::CropProperties
- Inherits:
 - 
      Object
      
        
- Object
 - Google::Apis::DocsV1::CropProperties
 
 
- Includes:
 - Core::Hashable, Core::JsonObjectSupport
 
- Defined in:
 - lib/google/apis/docs_v1/classes.rb,
lib/google/apis/docs_v1/representations.rb,
lib/google/apis/docs_v1/representations.rb 
Overview
The crop properties of an image. The crop rectangle is represented using fractional offsets from the original content's 4 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.
Instance Attribute Summary collapse
- 
  
    
      #angle  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The clockwise rotation angle of the crop rectangle around its center, in radians.
 - 
  
    
      #offset_bottom  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The offset specifies how far inwards the bottom edge of the crop rectangle is from the bottom edge of the original content as a fraction of the original content's height.
 - 
  
    
      #offset_left  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The offset specifies how far inwards the left edge of the crop rectangle is from the left edge of the original content as a fraction of the original content's width.
 - 
  
    
      #offset_right  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The offset specifies how far inwards the right edge of the crop rectangle is from the right edge of the original content as a fraction of the original content's width.
 - 
  
    
      #offset_top  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
The offset specifies how far inwards the top edge of the crop rectangle is from the top edge of the original content as a fraction of the original content's height.
 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ CropProperties 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of CropProperties.
 - 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Update properties of this object.
 
Constructor Details
#initialize(**args) ⇒ CropProperties
Returns a new instance of CropProperties.
      631 632 633  | 
    
      # File 'lib/google/apis/docs_v1/classes.rb', line 631 def initialize(**args) update!(**args) end  | 
  
Instance Attribute Details
#angle ⇒ Float
The clockwise rotation angle of the crop rectangle around its center, in
radians. Rotation is applied after the offsets.
Corresponds to the JSON property angle
      601 602 603  | 
    
      # File 'lib/google/apis/docs_v1/classes.rb', line 601 def angle @angle end  | 
  
#offset_bottom ⇒ Float
The offset specifies how far inwards the bottom edge of the crop rectangle is
from the bottom edge of the original content as a fraction of the original
content's height.
Corresponds to the JSON property offsetBottom
      608 609 610  | 
    
      # File 'lib/google/apis/docs_v1/classes.rb', line 608 def offset_bottom @offset_bottom end  | 
  
#offset_left ⇒ Float
The offset specifies how far inwards the left edge of the crop rectangle is
from the left edge of the original content as a fraction of the original
content's width.
Corresponds to the JSON property offsetLeft
      615 616 617  | 
    
      # File 'lib/google/apis/docs_v1/classes.rb', line 615 def offset_left @offset_left end  | 
  
#offset_right ⇒ Float
The offset specifies how far inwards the right edge of the crop rectangle is
from the right edge of the original content as a fraction of the original
content's width.
Corresponds to the JSON property offsetRight
      622 623 624  | 
    
      # File 'lib/google/apis/docs_v1/classes.rb', line 622 def offset_right @offset_right end  | 
  
#offset_top ⇒ Float
The offset specifies how far inwards the top edge of the crop rectangle is
from the top edge of the original content as a fraction of the original
content's height.
Corresponds to the JSON property offsetTop
      629 630 631  | 
    
      # File 'lib/google/apis/docs_v1/classes.rb', line 629 def offset_top @offset_top end  | 
  
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
      636 637 638 639 640 641 642  | 
    
      # File 'lib/google/apis/docs_v1/classes.rb', line 636 def update!(**args) @angle = args[:angle] if args.key?(:angle) @offset_bottom = args[:offset_bottom] if args.key?(:offset_bottom) @offset_left = args[:offset_left] if args.key?(:offset_left) @offset_right = args[:offset_right] if args.key?(:offset_right) @offset_top = args[:offset_top] if args.key?(:offset_top) end  |