C# 클래스 AODL.Document.Helper.SizeConverter

The SizeConverter class offer different methods for size type conversation.
obsolete - don't start to use it, it will maybe deleted within an upcoming version
파일 보기 프로젝트 열기: monsterlabs/HumanRightsTracker

공개 프로퍼티들

프로퍼티 타입 설명
intocm double
pxtocm double

공개 메소드들

메소드 설명
CmToInch ( double cm ) : double

Cms to inch.

CmToInchAsString ( double cm ) : string

Cms to inch as string.

CmToPixel ( double cm ) : double

Cms to pixel.

CmToPixelAsString ( double cm ) : string

Cms to pixel as string.

GetDoubleFromAnOfficeSizeValue ( string aSizeValue ) : double

Gets the double from an office size value.

There is no translation between cm or inch. You will just get the size you posted as double value.

GetHeightInCm ( int heightPixel, int dpiY ) : double

Cacluates the height in cm from height in pixel by using the vertical resolution.

GetHeightInPixel ( int height, int dpiY, bool cm ) : double

Cacluates the relative height in pixel from height in cm or inch by using the vertical resolution.

GetPixelFromAnOfficeSizeValue ( string aSizeValue ) : int

Gets the pixel from an office size value. e.g pass 1.54cm and get back 58

GetWidthInCm ( int widthPixel, int dpiX ) : double

Cacluates the width in cm from width in pixel by using the horizontal resolution.

GetWidthInPixel ( int width, int dpiX, bool cm ) : double

Cacluates the width in pixel from width in cm or inch by using the horizontal resolution.

InchToCm ( double inch ) : double

Inches to cm.

InchToCmAsString ( double inch ) : string

Inches to cm as string.

InchToPixel ( double inch ) : double

Inches to pixel.

InchToPixelAsString ( double inch ) : string

Inches to pixel as string.

IsCm ( string value ) : bool

Determines whether the specified value is in cm.

IsInch ( string value ) : bool

Determines whether the specified value is in inch.

MmToPixel ( double mm ) : double

Cms to pixel.

SizeConverter ( ) : System

Initializes a new instance of the SizeConverter class.

메소드 상세

CmToInch() 공개 정적인 메소드

Cms to inch.
public static CmToInch ( double cm ) : double
cm double The cm.
리턴 double

CmToInchAsString() 공개 정적인 메소드

Cms to inch as string.
public static CmToInchAsString ( double cm ) : string
cm double The cm.
리턴 string

CmToPixel() 공개 정적인 메소드

Cms to pixel.
public static CmToPixel ( double cm ) : double
cm double The cm.
리턴 double

CmToPixelAsString() 공개 정적인 메소드

Cms to pixel as string.
public static CmToPixelAsString ( double cm ) : string
cm double The cm.
리턴 string

GetDoubleFromAnOfficeSizeValue() 공개 정적인 메소드

Gets the double from an office size value.
There is no translation between cm or inch. You will just get the size you posted as double value.
public static GetDoubleFromAnOfficeSizeValue ( string aSizeValue ) : double
aSizeValue string A size value.
리턴 double

GetHeightInCm() 공개 정적인 메소드

Cacluates the height in cm from height in pixel by using the vertical resolution.
public static GetHeightInCm ( int heightPixel, int dpiY ) : double
heightPixel int The height.
dpiY int The dpi Y.
리턴 double

GetHeightInPixel() 공개 정적인 메소드

Cacluates the relative height in pixel from height in cm or inch by using the vertical resolution.
public static GetHeightInPixel ( int height, int dpiY, bool cm ) : double
height int The height.
dpiY int The dpi vertical.
cm bool if set to true in cm otherwise inch.
리턴 double

GetPixelFromAnOfficeSizeValue() 공개 정적인 메소드

Gets the pixel from an office size value. e.g pass 1.54cm and get back 58
public static GetPixelFromAnOfficeSizeValue ( string aSizeValue ) : int
aSizeValue string A size value.
리턴 int

GetWidthInCm() 공개 정적인 메소드

Cacluates the width in cm from width in pixel by using the horizontal resolution.
public static GetWidthInCm ( int widthPixel, int dpiX ) : double
widthPixel int The width.
dpiX int The dpi X.
리턴 double

GetWidthInPixel() 공개 정적인 메소드

Cacluates the width in pixel from width in cm or inch by using the horizontal resolution.
public static GetWidthInPixel ( int width, int dpiX, bool cm ) : double
width int The width.
dpiX int The dpi X.
cm bool if set to true in cm otherwise inch.
리턴 double

InchToCm() 공개 정적인 메소드

Inches to cm.
public static InchToCm ( double inch ) : double
inch double The inch.
리턴 double

InchToCmAsString() 공개 정적인 메소드

Inches to cm as string.
public static InchToCmAsString ( double inch ) : string
inch double The inch.
리턴 string

InchToPixel() 공개 정적인 메소드

Inches to pixel.
public static InchToPixel ( double inch ) : double
inch double The inch.
리턴 double

InchToPixelAsString() 공개 정적인 메소드

Inches to pixel as string.
public static InchToPixelAsString ( double inch ) : string
inch double The inch.
리턴 string

IsCm() 공개 정적인 메소드

Determines whether the specified value is in cm.
public static IsCm ( string value ) : bool
value string The value.
리턴 bool

IsInch() 공개 정적인 메소드

Determines whether the specified value is in inch.
public static IsInch ( string value ) : bool
value string The value.
리턴 bool

MmToPixel() 공개 정적인 메소드

Cms to pixel.
public static MmToPixel ( double mm ) : double
mm double
리턴 double

SizeConverter() 공개 메소드

Initializes a new instance of the SizeConverter class.
public SizeConverter ( ) : System
리턴 System

프로퍼티 상세

intocm 공개적으로 정적으로 프로퍼티

Inch to cm factor
public static double intocm
리턴 double

pxtocm 공개적으로 정적으로 프로퍼티

Pixel to cm factor
public static double pxtocm
리턴 double