C# Класс PixelFarm.Drawing.WinGdi.WinGdiTextService

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CalculateGlyphAdvancePos ( char str, int startAt, int len, RequestFont font, int glyphXAdvances ) : void
GetWinGdiFont ( RequestFont f ) : ActualFont
MeasureString ( char buff, int startAt, int len, RequestFont font ) : Size
MeasureString ( char buff, int startAt, int len, RequestFont font, float maxWidth, int &charFit, int &charFitWidth ) : Size

Measure the width and height of string str when drawn on device context HDC using the given font font.
Restrict the width of the string and get the number of characters able to fit in the restriction and the width those characters take.

MeasureWhitespace ( RequestFont f ) : float
SetDefaultEncoding ( Encoding en ) : void

Приватные методы

Метод Описание
MeasureCharWidths ( IntPtr hFont, int &charWidths, NativeTextWin32 &abcSizes ) : void
SetFont ( RequestFont font ) : WinGdiFont
WinGdiTextService ( ) : System

Описание методов

CalculateGlyphAdvancePos() публичный статический Метод

public static CalculateGlyphAdvancePos ( char str, int startAt, int len, RequestFont font, int glyphXAdvances ) : void
str char
startAt int
len int
font PixelFarm.Drawing.RequestFont
glyphXAdvances int
Результат void

GetWinGdiFont() публичный статический Метод

public static GetWinGdiFont ( RequestFont f ) : ActualFont
f PixelFarm.Drawing.RequestFont
Результат PixelFarm.Drawing.Fonts.ActualFont

MeasureString() публичный статический Метод

public static MeasureString ( char buff, int startAt, int len, RequestFont font ) : Size
buff char
startAt int
len int
font PixelFarm.Drawing.RequestFont
Результат Size

MeasureString() публичный статический Метод

Measure the width and height of string str when drawn on device context HDC using the given font font.
Restrict the width of the string and get the number of characters able to fit in the restriction and the width those characters take.
public static MeasureString ( char buff, int startAt, int len, RequestFont font, float maxWidth, int &charFit, int &charFitWidth ) : Size
buff char
startAt int
len int
font PixelFarm.Drawing.RequestFont the font to measure string with
maxWidth float the max width to render the string in
charFit int the number of characters that will fit under restriction
charFitWidth int
Результат Size

MeasureWhitespace() публичный статический Метод

public static MeasureWhitespace ( RequestFont f ) : float
f PixelFarm.Drawing.RequestFont
Результат float

SetDefaultEncoding() публичный статический Метод

public static SetDefaultEncoding ( Encoding en ) : void
en System.Text.Encoding
Результат void