C# Class PixelFarm.Drawing.WinGdi.WinGdiTextService

Afficher le fichier Open project: prepare/HTML-Renderer Class Usage Examples

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
MeasureCharWidths ( IntPtr hFont, int &charWidths, NativeTextWin32 &abcSizes ) : void
SetFont ( RequestFont font ) : WinGdiFont
WinGdiTextService ( ) : System

Method Details

CalculateGlyphAdvancePos() public static méthode

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
Résultat void

GetWinGdiFont() public static méthode

public static GetWinGdiFont ( RequestFont f ) : ActualFont
f PixelFarm.Drawing.RequestFont
Résultat PixelFarm.Drawing.Fonts.ActualFont

MeasureString() public static méthode

public static MeasureString ( char buff, int startAt, int len, RequestFont font ) : Size
buff char
startAt int
len int
font PixelFarm.Drawing.RequestFont
Résultat Size

MeasureString() public static méthode

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
Résultat Size

MeasureWhitespace() public static méthode

public static MeasureWhitespace ( RequestFont f ) : float
f PixelFarm.Drawing.RequestFont
Résultat float

SetDefaultEncoding() public static méthode

public static SetDefaultEncoding ( Encoding en ) : void
en System.Text.Encoding
Résultat void