C# 클래스 NContrib.Drawing.Extensions.SizeExtensions

파일 보기 프로젝트 열기: veracross/ncontrib

공개 메소드들

메소드 설명
CropToAspect ( this sourceSize, float aspect ) : Size

Returns a Size that is a sub-section of the given source size and conforms to the specified aspect

Expand ( this sourceSize, int width, int height, ScaleMethod method ) : Size

Scales an image Size, but only up

Scale ( this sourceSize, float scalePercent ) : Size

Calculates a scaled image size, changing the size by a percentage

Scale ( this sourceSize, int width, int height, ScaleMethod method, ScaleType type ) : Size

Scales an image size, preserving aspect ratio.

Shrink ( this sourceSize, int width, int height, ScaleMethod method ) : Size

Scales an image Size, but only down

메소드 상세

CropToAspect() 공개 정적인 메소드

Returns a Size that is a sub-section of the given source size and conforms to the specified aspect
public static CropToAspect ( this sourceSize, float aspect ) : Size
sourceSize this
aspect float
리턴 System.Drawing.Size

Expand() 공개 정적인 메소드

Scales an image Size, but only up
public static Expand ( this sourceSize, int width, int height, ScaleMethod method ) : Size
sourceSize this
width int
height int
method ScaleMethod
리턴 System.Drawing.Size

Scale() 공개 정적인 메소드

Calculates a scaled image size, changing the size by a percentage
public static Scale ( this sourceSize, float scalePercent ) : Size
sourceSize this
scalePercent float Scale percentage. 1 = 100% which yields no change /// .5 = 50% which would reduce the height and width by half.
리턴 System.Drawing.Size

Scale() 공개 정적인 메소드

Scales an image size, preserving aspect ratio.
public static Scale ( this sourceSize, int width, int height, ScaleMethod method, ScaleType type ) : Size
sourceSize this
width int Min or max allowed width. Min/Max controlled by the method parameter
height int Min or max allowed height. Min/Max controlled by the method parameter
method ScaleMethod
type ScaleType
리턴 System.Drawing.Size

Shrink() 공개 정적인 메소드

Scales an image Size, but only down
public static Shrink ( this sourceSize, int width, int height, ScaleMethod method ) : Size
sourceSize this
width int
height int
method ScaleMethod
리턴 System.Drawing.Size