C# Class PixelFarm.Drawing.WinGdi.WinGdiTextService

Exibir arquivo Open project: prepare/HTML-Renderer Class Usage Examples

Public Methods

Method 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

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

Method Details

CalculateGlyphAdvancePos() public static method

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
return void

GetWinGdiFont() public static method

public static GetWinGdiFont ( RequestFont f ) : ActualFont
f PixelFarm.Drawing.RequestFont
return PixelFarm.Drawing.Fonts.ActualFont

MeasureString() public static method

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

MeasureString() public static method

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
return Size

MeasureWhitespace() public static method

public static MeasureWhitespace ( RequestFont f ) : float
f PixelFarm.Drawing.RequestFont
return float

SetDefaultEncoding() public static method

public static SetDefaultEncoding ( Encoding en ) : void
en System.Text.Encoding
return void