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
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
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