Table of Contents

Class NativeSdlTtf

The native sdl ttf class

internal static class NativeSdlTtf

Inheritance

Inherited Members

Constructors

NativeSdlTtf()

Initializes a new instance of the Alis.Core.Graphic.Sdl2.Extensions.Sdl2Ttf.SdlTtf class

private static NativeSdlTtf()

Fields

NativeLibName

The native lib name

private const string NativeLibName = "sdl2_ttf"

Field Value

string

Methods

InternalByteSwappedUnicode(int)

Ttf the byte swapped unicode using the specified swapped

internal static extern void InternalByteSwappedUnicode(int swapped)

Parameters

swapped int

The swapped

InternalCloseFont(IntPtr)

Ttf the close font using the specified font

internal static extern void InternalCloseFont(IntPtr font)

Parameters

font IntPtr

The font

InternalFontAscent(IntPtr)

Ttf the font ascent using the specified font

internal static extern int InternalFontAscent(IntPtr font)

Parameters

font IntPtr

The font

Returns

int

The int

InternalFontDescent(IntPtr)

Ttf the font descent using the specified font

internal static extern int InternalFontDescent(IntPtr font)

Parameters

font IntPtr

The font

Returns

int

The int

InternalFontFaceIsFixedWidth(IntPtr)

Ttf the font face is fixed width using the specified font

internal static extern int InternalFontFaceIsFixedWidth(IntPtr font)

Parameters

font IntPtr

The font

Returns

int

The int

InternalFontFaceStyleName(IntPtr)

Internals the ttf font face style name using the specified font

internal static extern IntPtr InternalFontFaceStyleName(IntPtr font)

Parameters

font IntPtr

The font

Returns

IntPtr

The int ptr

InternalFontFaces(IntPtr)

Ttf the font faces using the specified font

internal static extern IntPtr InternalFontFaces(IntPtr font)

Parameters

font IntPtr

The font

Returns

IntPtr

The int ptr

InternalFontHeight(IntPtr)

Ttf the font height using the specified font

internal static extern int InternalFontHeight(IntPtr font)

Parameters

font IntPtr

The font

Returns

int

The int

InternalFontLineSkip(IntPtr)

Ttf the font line skip using the specified font

internal static extern int InternalFontLineSkip(IntPtr font)

Parameters

font IntPtr

The font

Returns

int

The int

InternalGetFontHinting(IntPtr)

Ttf the get font hinting using the specified font

internal static extern int InternalGetFontHinting(IntPtr font)

Parameters

font IntPtr

The font

Returns

int

The int

InternalGetFontKerning(IntPtr)

Ttf the get font kerning using the specified font

internal static extern int InternalGetFontKerning(IntPtr font)

Parameters

font IntPtr

The font

Returns

int

The int

InternalGetFontKerningSize(IntPtr, int, int)

Sdl the get font kerning size using the specified font

internal static extern int InternalGetFontKerningSize(IntPtr font, int prevIndex, int index)

Parameters

font IntPtr

The font

prevIndex int

The prev index

index int

The index

Returns

int

The int

InternalGetFontKerningSizeGlyphs(IntPtr, ushort, ushort)

Ttf the get font kerning size glyphs using the specified font

internal static extern int InternalGetFontKerningSizeGlyphs(IntPtr font, ushort previousCh, ushort ch)

Parameters

font IntPtr

The font

previousCh ushort

The previous ch

ch ushort

The ch

Returns

int

The int

InternalGetFontOutline(IntPtr)

Ttf the get font outline using the specified font

internal static extern int InternalGetFontOutline(IntPtr font)

Parameters

font IntPtr

The font

Returns

int

The int

InternalGetFontStyle(IntPtr)

Ttf the get font style using the specified font

internal static extern int InternalGetFontStyle(IntPtr font)

Parameters

font IntPtr

The font

Returns

int

The int

InternalGetTtfVersion()

Internals the get ttf version

public static Version InternalGetTtfVersion()

Returns

Version

The sdl version

InternalGlyphIsProvided(IntPtr, ushort)

Ttf the glyph is provided using the specified font

internal static extern int InternalGlyphIsProvided(IntPtr font, ushort ch)

Parameters

font IntPtr

The font

ch ushort

The ch

Returns

int

The int

InternalGlyphMetrics(IntPtr, ushort, out int, out int, out int, out int, out int)

Ttf the glyph metrics using the specified font

internal static extern int InternalGlyphMetrics(IntPtr font, ushort ch, out int minx, out int max, out int miny, out int maxy, out int advance)

Parameters

font IntPtr

The font

ch ushort

The ch

minx int

The minx

max int

The max

miny int

The miny

maxy int

The maxy

advance int

The advance

Returns

int

The int

InternalInit()

Ttf the init

internal static extern int InternalInit()

Returns

int

The int

InternalOpenFont(string, int)

Internals the ttf open font using the specified file

internal static extern IntPtr InternalOpenFont(string file, int ptSize)

Parameters

file string

The file

ptSize int

The ptSize

Returns

IntPtr

The int ptr

InternalOpenFontIndex(string, int, long)

Internals the ttf open font index using the specified file

internal static extern IntPtr InternalOpenFontIndex(string file, int ptSize, long index)

Parameters

file string

The file

ptSize int

the size

index long

The index

Returns

IntPtr

The int ptr

InternalQuit()

Ttf the quit

internal static extern void InternalQuit()

InternalRenderGlyphBlended(IntPtr, ushort, Color)

Ttf the render glyph blended using the specified font

internal static extern IntPtr InternalRenderGlyphBlended(IntPtr font, ushort ch, Color fg)

Parameters

font IntPtr

The font

ch ushort

The ch

fg Color

The fg

Returns

IntPtr

The int ptr

InternalRenderGlyphShaded(IntPtr, ushort, Color, Color)

Ttf the render glyph shaded using the specified font

internal static extern IntPtr InternalRenderGlyphShaded(IntPtr font, ushort ch, Color fg, Color bg)

Parameters

font IntPtr

The font

ch ushort

The ch

fg Color

The fg

bg Color

The bg

Returns

IntPtr

The int ptr

InternalRenderGlyphSolid(IntPtr, ushort, Color)

Ttf the render glyph solid using the specified font

internal static extern IntPtr InternalRenderGlyphSolid(IntPtr font, ushort ch, Color fg)

Parameters

font IntPtr

The font

ch ushort

The ch

fg Color

The fg

Returns

IntPtr

The int ptr

InternalRenderTextBlended(IntPtr, string, Color)

Ttf the render text blended using the specified font

internal static extern IntPtr InternalRenderTextBlended(IntPtr font, string text, Color fg)

Parameters

font IntPtr

The font

text string

The text

fg Color

The fg

Returns

IntPtr

The int ptr

InternalRenderTextBlendedWrapped(IntPtr, string, Color, uint)

Ttf the render text blended wrapped using the specified font

internal static extern IntPtr InternalRenderTextBlendedWrapped(IntPtr font, string text, Color fg, uint wrapped)

Parameters

font IntPtr

The font

text string

The text

fg Color

The fg

wrapped uint

The wrapped

Returns

IntPtr

The int ptr

InternalRenderTextShaded(IntPtr, string, Color, Color)

Ttf the render text shaded using the specified font

internal static extern IntPtr InternalRenderTextShaded(IntPtr font, string text, Color fg, Color bg)

Parameters

font IntPtr

The font

text string

The text

fg Color

The fg

bg Color

The bg

Returns

IntPtr

The int ptr

InternalRenderTextSolid(IntPtr, string, Color)

Ttf the render text solid using the specified font

internal static extern IntPtr InternalRenderTextSolid(IntPtr font, string text, Color fg)

Parameters

font IntPtr

The font

text string

The text

fg Color

The fg

Returns

IntPtr

The int ptr

InternalRenderUTF8Solid(IntPtr, string, Color)

Internals the ttf render utf 8 solid using the specified font

internal static extern IntPtr InternalRenderUTF8Solid(IntPtr font, string text, Color fg)

Parameters

font IntPtr

The font

text string

The text

fg Color

The fg

Returns

IntPtr

The int ptr

InternalRenderUnicodeBlended(IntPtr, string, Color)

Ttf the render unicode blended using the specified font

internal static extern IntPtr InternalRenderUnicodeBlended(IntPtr font, string text, Color fg)

Parameters

font IntPtr

The font

text string

The text

fg Color

The fg

Returns

IntPtr

The int ptr

InternalRenderUnicodeBlendedWrapped(IntPtr, string, Color, uint)

Ttf the render unicode blended wrapped using the specified font

internal static extern IntPtr InternalRenderUnicodeBlendedWrapped(IntPtr font, string text, Color fg, uint wrapped)

Parameters

font IntPtr

The font

text string

The text

fg Color

The fg

wrapped uint

The wrapped

Returns

IntPtr

The int ptr

InternalRenderUnicodeShaded(IntPtr, string, Color, Color)

Ttf the render unicode shaded using the specified font

internal static extern IntPtr InternalRenderUnicodeShaded(IntPtr font, string text, Color fg, Color bg)

Parameters

font IntPtr

The font

text string

The text

fg Color

The fg

bg Color

The bg

Returns

IntPtr

The int ptr

InternalRenderUnicodeSolid(IntPtr, string, Color)

Ttf the render unicode solid using the specified font

internal static extern IntPtr InternalRenderUnicodeSolid(IntPtr font, string text, Color fg)

Parameters

font IntPtr

The font

text string

The text

fg Color

The fg

Returns

IntPtr

The int ptr

InternalRenderUtf8Blended(IntPtr, string, Color)

Internals the ttf render utf 8 blended using the specified font

internal static extern IntPtr InternalRenderUtf8Blended(IntPtr font, string text, Color fg)

Parameters

font IntPtr

The font

text string

The text

fg Color

The fg

Returns

IntPtr

The int ptr

InternalRenderUtf8BlendedWrapped(IntPtr, string, Color, uint)

Internals the ttf render utf 8 blended wrapped using the specified font

internal static extern IntPtr InternalRenderUtf8BlendedWrapped(IntPtr font, string text, Color fg, uint wrapped)

Parameters

font IntPtr

The font

text string

The text

fg Color

The fg

wrapped uint

The wrapped

Returns

IntPtr

The int ptr

InternalRenderUtf8Shaded(IntPtr, string, Color, Color)

Internals the ttf render utf 8 shaded using the specified font

internal static extern IntPtr InternalRenderUtf8Shaded(IntPtr font, string text, Color fg, Color bg)

Parameters

font IntPtr

The font

text string

The text

fg Color

The fg

bg Color

The bg

Returns

IntPtr

The int ptr

InternalSetFontHinting(IntPtr, int)

Ttf the set font hinting using the specified font

internal static extern void InternalSetFontHinting(IntPtr font, int hinting)

Parameters

font IntPtr

The font

hinting int

The hinting

InternalSetFontKerning(IntPtr, int)

Ttf the set font kerning using the specified font

internal static extern void InternalSetFontKerning(IntPtr font, int allowed)

Parameters

font IntPtr

The font

allowed int

The allowed

InternalSetFontOutline(IntPtr, int)

Ttf the set font outline using the specified font

internal static extern void InternalSetFontOutline(IntPtr font, int outline)

Parameters

font IntPtr

The font

outline int

The outline

InternalSetFontStyle(IntPtr, int)

Ttf the set font style using the specified font

internal static extern void InternalSetFontStyle(IntPtr font, int style)

Parameters

font IntPtr

The font

style int

The style

InternalSetScript(int)

Ttf the set script using the specified script

internal static extern int InternalSetScript(int script)

Parameters

script int

The script

Returns

int

The int

InternalSizeText(IntPtr, string, out int, out int)

Ttf the size text using the specified font

internal static extern int InternalSizeText(IntPtr font, string text, out int w, out int h)

Parameters

font IntPtr

The font

text string

The text

w int

The

h int

The

Returns

int

The int

InternalSizeUTF8(IntPtr, string, out int, out int)

Internals the ttf size utf 8 using the specified font

internal static extern int InternalSizeUTF8(IntPtr font, string text, out int w, out int h)

Parameters

font IntPtr

The font

text string

The text

w int

The

h int

The

Returns

int

The int

InternalSizeUnicode(IntPtr, string, out int, out int)

Ttf the size unicode using the specified font

internal static extern int InternalSizeUnicode(IntPtr font, string text, out int w, out int h)

Parameters

font IntPtr

The font

text string

The text

w int

The

h int

The

Returns

int

The int

InternalWasInit()

Ttf the was init

internal static extern int InternalWasInit()

Returns

int

The int