C# Class RenderingLibrary.Graphics.BitmapFont

Inheritance: IDisposable
Afficher le fichier Open project: vchelaru/FlatRedBall Class Usage Examples

Méthodes publiques

Méthode Description
AssignCharacterTextureCoordinates ( int asciiNumber, float &tVTop, float &tVBottom, float &tULeft, float &tURight ) : void
BitmapFont ( Microsoft.Xna.Framework.Graphics.Texture2D fontTextureGraphic, string fontPattern ) : System
BitmapFont ( string fontFile, SystemManagers managers ) : System
BitmapFont ( string textureFile, string fontFile, SystemManagers managers ) : System
Dispose ( ) : void
DistanceFromTopOfLine ( int asciiNumber ) : float
GetCharacterHeight ( int asciiNumber ) : float
GetCharacterInfo ( char character ) : BitmapCharacterInfo
GetCharacterInfo ( int asciiNumber ) : BitmapCharacterInfo
GetCharacterRect ( char c, int lineNumber, Point &point, Rectangle &destinationRectangle, int &pageIndex, float fontScale = 1 ) : Rectangle
GetCharacterScaleX ( int asciiNumber ) : float
GetCharacterSpacing ( int asciiNumber ) : float
GetCharacterWidth ( char character ) : float
GetCharacterWidth ( int asciiNumber ) : float
GetCharacterXOffset ( int asciiNumber ) : float
GetRequiredWithAndHeight ( IEnumerable lines, int &requiredWidth, int &requiredHeight ) : void
GetSourceTextures ( string fontPattern ) : string[]
MeasureString ( string line ) : int
RenderAtlasedTextureToScreen ( List lines, HorizontalAlignment horizontalAlignment, float textureToRenderHeight, Color color, float rotation, float fontScale, SystemManagers managers, SpriteRenderer spriteRenderer, object objectRequestingChange ) : void

Used for rendering directly to screen with an atlased texture.

RenderToTexture2D ( IEnumerable lines, HorizontalAlignment horizontalAlignment, SystemManagers managers, Microsoft.Xna.Framework.Graphics.Texture2D toReplace, object objectRequestingRender ) : Microsoft.Xna.Framework.Graphics.Texture2D

RenderToTexture2D ( string whatToRender, HorizontalAlignment horizontalAlignment, SystemManagers managers, object objectRequestingRender ) : Microsoft.Xna.Framework.Graphics.Texture2D
RenderToTexture2D ( string whatToRender, SystemManagers managers, object objectRequestingRender ) : Microsoft.Xna.Framework.Graphics.Texture2D
SetFontPattern ( string fontPattern ) : void
SetFontPatternFromFile ( string fntFileName ) : void

Private Methods

Méthode Description
CheckForLoadedAtlasTexture ( string filename ) : AtlasedTexture
DrawLines ( IEnumerable lines, HorizontalAlignment horizontalAlignment, object objectRequestingChange, int requiredWidth, List widths, SpriteRenderer spriteRenderer ) : Point
FillBitmapCharacterInfo ( int characterID, string fontString, int textureWidth, int textureHeight, int lineHeightInPixels, int startingIndex ) : BitmapCharacterInfo
GetRequiredWithAndHeight ( IEnumerable lines, int &requiredWidth, int &requiredHeight, List &widths ) : void
RenderToTexture2DUsingImageData ( IEnumerable lines, HorizontalAlignment horizontalAlignment, SystemManagers managers ) : Microsoft.Xna.Framework.Graphics.Texture2D
RenderToTexture2DUsingRenderStates ( IEnumerable lines, HorizontalAlignment horizontalAlignment, SystemManagers managers, Microsoft.Xna.Framework.Graphics.Texture2D toReplace, object objectRequestingChange ) : Microsoft.Xna.Framework.Graphics.Texture2D

Method Details

AssignCharacterTextureCoordinates() public méthode

public AssignCharacterTextureCoordinates ( int asciiNumber, float &tVTop, float &tVBottom, float &tULeft, float &tURight ) : void
asciiNumber int
tVTop float
tVBottom float
tULeft float
tURight float
Résultat void

BitmapFont() public méthode

public BitmapFont ( Microsoft.Xna.Framework.Graphics.Texture2D fontTextureGraphic, string fontPattern ) : System
fontTextureGraphic Microsoft.Xna.Framework.Graphics.Texture2D
fontPattern string
Résultat System

BitmapFont() public méthode

public BitmapFont ( string fontFile, SystemManagers managers ) : System
fontFile string
managers SystemManagers
Résultat System

BitmapFont() public méthode

public BitmapFont ( string textureFile, string fontFile, SystemManagers managers ) : System
textureFile string
fontFile string
managers SystemManagers
Résultat System

Dispose() public méthode

public Dispose ( ) : void
Résultat void

DistanceFromTopOfLine() public méthode

public DistanceFromTopOfLine ( int asciiNumber ) : float
asciiNumber int
Résultat float

GetCharacterHeight() public méthode

public GetCharacterHeight ( int asciiNumber ) : float
asciiNumber int
Résultat float

GetCharacterInfo() public méthode

public GetCharacterInfo ( char character ) : BitmapCharacterInfo
character char
Résultat BitmapCharacterInfo

GetCharacterInfo() public méthode

public GetCharacterInfo ( int asciiNumber ) : BitmapCharacterInfo
asciiNumber int
Résultat BitmapCharacterInfo

GetCharacterRect() public méthode

public GetCharacterRect ( char c, int lineNumber, Point &point, Rectangle &destinationRectangle, int &pageIndex, float fontScale = 1 ) : Rectangle
c char
lineNumber int
point Point
destinationRectangle Microsoft.Xna.Framework.Rectangle
pageIndex int
fontScale float
Résultat Microsoft.Xna.Framework.Rectangle

GetCharacterScaleX() public méthode

public GetCharacterScaleX ( int asciiNumber ) : float
asciiNumber int
Résultat float

GetCharacterSpacing() public méthode

public GetCharacterSpacing ( int asciiNumber ) : float
asciiNumber int
Résultat float

GetCharacterWidth() public méthode

public GetCharacterWidth ( char character ) : float
character char
Résultat float

GetCharacterWidth() public méthode

public GetCharacterWidth ( int asciiNumber ) : float
asciiNumber int
Résultat float

GetCharacterXOffset() public méthode

public GetCharacterXOffset ( int asciiNumber ) : float
asciiNumber int
Résultat float

GetRequiredWithAndHeight() public méthode

public GetRequiredWithAndHeight ( IEnumerable lines, int &requiredWidth, int &requiredHeight ) : void
lines IEnumerable
requiredWidth int
requiredHeight int
Résultat void

GetSourceTextures() public static méthode

public static GetSourceTextures ( string fontPattern ) : string[]
fontPattern string
Résultat string[]

MeasureString() public méthode

public MeasureString ( string line ) : int
line string
Résultat int

RenderAtlasedTextureToScreen() public méthode

Used for rendering directly to screen with an atlased texture.
public RenderAtlasedTextureToScreen ( List lines, HorizontalAlignment horizontalAlignment, float textureToRenderHeight, Color color, float rotation, float fontScale, SystemManagers managers, SpriteRenderer spriteRenderer, object objectRequestingChange ) : void
lines List
horizontalAlignment HorizontalAlignment
textureToRenderHeight float
color Color
rotation float
fontScale float
managers SystemManagers
spriteRenderer SpriteRenderer
objectRequestingChange object
Résultat void

RenderToTexture2D() public méthode

public RenderToTexture2D ( IEnumerable lines, HorizontalAlignment horizontalAlignment, SystemManagers managers, Microsoft.Xna.Framework.Graphics.Texture2D toReplace, object objectRequestingRender ) : Microsoft.Xna.Framework.Graphics.Texture2D
lines IEnumerable
horizontalAlignment HorizontalAlignment
managers SystemManagers
toReplace Microsoft.Xna.Framework.Graphics.Texture2D
objectRequestingRender object
Résultat Microsoft.Xna.Framework.Graphics.Texture2D

RenderToTexture2D() public méthode

public RenderToTexture2D ( string whatToRender, HorizontalAlignment horizontalAlignment, SystemManagers managers, object objectRequestingRender ) : Microsoft.Xna.Framework.Graphics.Texture2D
whatToRender string
horizontalAlignment HorizontalAlignment
managers SystemManagers
objectRequestingRender object
Résultat Microsoft.Xna.Framework.Graphics.Texture2D

RenderToTexture2D() public méthode

public RenderToTexture2D ( string whatToRender, SystemManagers managers, object objectRequestingRender ) : Microsoft.Xna.Framework.Graphics.Texture2D
whatToRender string
managers SystemManagers
objectRequestingRender object
Résultat Microsoft.Xna.Framework.Graphics.Texture2D

SetFontPattern() public méthode

public SetFontPattern ( string fontPattern ) : void
fontPattern string
Résultat void

SetFontPatternFromFile() public méthode

public SetFontPatternFromFile ( string fntFileName ) : void
fntFileName string
Résultat void