Class: TencentCloud::Vod::V20180717::ImageCenterCut

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20180717/models.rb

Overview

图片中心裁剪处理。

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type = nil, width = nil, height = nil, radius = nil) ⇒ ImageCenterCut

Returns a new instance of ImageCenterCut.



15528
15529
15530
15531
15532
15533
# File 'lib/v20180717/models.rb', line 15528

def initialize(type=nil, width=nil, height=nil, radius=nil)
  @Type = type
  @Width = width
  @Height = height
  @Radius = radius
end

Instance Attribute Details

#HeightObject

<li>Circle : 内切圆裁剪,输出图片半径为 Radius。</li> <li>Rectangle : 矩形裁剪,输出图片宽为 Width , 高为 Height。</li>

Parameters:

  • Type:

    图片的裁剪模式,可选 Circle 和 Rectangle。

  • Width:

    输出图片的宽度,单位为像素,当 Type 取值为 Rectangle 时有效。

  • Height:

    输出图片的高度,单位为像素,当 Type 取值为 Rectangle 时有效。

  • Radius:

    输出图片的半径,单位为像素,当 Type 取值为 Circle 时有效。



15526
15527
15528
# File 'lib/v20180717/models.rb', line 15526

def Height
  @Height
end

#RadiusObject

<li>Circle : 内切圆裁剪,输出图片半径为 Radius。</li> <li>Rectangle : 矩形裁剪,输出图片宽为 Width , 高为 Height。</li>

Parameters:

  • Type:

    图片的裁剪模式,可选 Circle 和 Rectangle。

  • Width:

    输出图片的宽度,单位为像素,当 Type 取值为 Rectangle 时有效。

  • Height:

    输出图片的高度,单位为像素,当 Type 取值为 Rectangle 时有效。

  • Radius:

    输出图片的半径,单位为像素,当 Type 取值为 Circle 时有效。



15526
15527
15528
# File 'lib/v20180717/models.rb', line 15526

def Radius
  @Radius
end

#TypeObject

<li>Circle : 内切圆裁剪,输出图片半径为 Radius。</li> <li>Rectangle : 矩形裁剪,输出图片宽为 Width , 高为 Height。</li>

Parameters:

  • Type:

    图片的裁剪模式,可选 Circle 和 Rectangle。

  • Width:

    输出图片的宽度,单位为像素,当 Type 取值为 Rectangle 时有效。

  • Height:

    输出图片的高度,单位为像素,当 Type 取值为 Rectangle 时有效。

  • Radius:

    输出图片的半径,单位为像素,当 Type 取值为 Circle 时有效。



15526
15527
15528
# File 'lib/v20180717/models.rb', line 15526

def Type
  @Type
end

#WidthObject

<li>Circle : 内切圆裁剪,输出图片半径为 Radius。</li> <li>Rectangle : 矩形裁剪,输出图片宽为 Width , 高为 Height。</li>

Parameters:

  • Type:

    图片的裁剪模式,可选 Circle 和 Rectangle。

  • Width:

    输出图片的宽度,单位为像素,当 Type 取值为 Rectangle 时有效。

  • Height:

    输出图片的高度,单位为像素,当 Type 取值为 Rectangle 时有效。

  • Radius:

    输出图片的半径,单位为像素,当 Type 取值为 Circle 时有效。



15526
15527
15528
# File 'lib/v20180717/models.rb', line 15526

def Width
  @Width
end

Instance Method Details

#deserialize(params) ⇒ Object



15535
15536
15537
15538
15539
15540
# File 'lib/v20180717/models.rb', line 15535

def deserialize(params)
  @Type = params['Type']
  @Width = params['Width']
  @Height = params['Height']
  @Radius = params['Radius']
end