C# Class RenderingLibrary.Graphics.BitmapFont

Inheritance: IDisposable
ファイルを表示 Open project: vchelaru/FlatRedBall Class Usage Examples

Public Methods

Method 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

Method 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 method

public AssignCharacterTextureCoordinates ( int asciiNumber, float &tVTop, float &tVBottom, float &tULeft, float &tURight ) : void
asciiNumber int
tVTop float
tVBottom float
tULeft float
tURight float
return void

BitmapFont() public method

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

BitmapFont() public method

public BitmapFont ( string fontFile, SystemManagers managers ) : System
fontFile string
managers SystemManagers
return System

BitmapFont() public method

public BitmapFont ( string textureFile, string fontFile, SystemManagers managers ) : System
textureFile string
fontFile string
managers SystemManagers
return System

Dispose() public method

public Dispose ( ) : void
return void

DistanceFromTopOfLine() public method

public DistanceFromTopOfLine ( int asciiNumber ) : float
asciiNumber int
return float

GetCharacterHeight() public method

public GetCharacterHeight ( int asciiNumber ) : float
asciiNumber int
return float

GetCharacterInfo() public method

public GetCharacterInfo ( char character ) : BitmapCharacterInfo
character char
return BitmapCharacterInfo

GetCharacterInfo() public method

public GetCharacterInfo ( int asciiNumber ) : BitmapCharacterInfo
asciiNumber int
return BitmapCharacterInfo

GetCharacterRect() public method

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
return Microsoft.Xna.Framework.Rectangle

GetCharacterScaleX() public method

public GetCharacterScaleX ( int asciiNumber ) : float
asciiNumber int
return float

GetCharacterSpacing() public method

public GetCharacterSpacing ( int asciiNumber ) : float
asciiNumber int
return float

GetCharacterWidth() public method

public GetCharacterWidth ( char character ) : float
character char
return float

GetCharacterWidth() public method

public GetCharacterWidth ( int asciiNumber ) : float
asciiNumber int
return float

GetCharacterXOffset() public method

public GetCharacterXOffset ( int asciiNumber ) : float
asciiNumber int
return float

GetRequiredWithAndHeight() public method

public GetRequiredWithAndHeight ( IEnumerable lines, int &requiredWidth, int &requiredHeight ) : void
lines IEnumerable
requiredWidth int
requiredHeight int
return void

GetSourceTextures() public static method

public static GetSourceTextures ( string fontPattern ) : string[]
fontPattern string
return string[]

MeasureString() public method

public MeasureString ( string line ) : int
line string
return int

RenderAtlasedTextureToScreen() public method

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

RenderToTexture2D() public method

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
return Microsoft.Xna.Framework.Graphics.Texture2D

RenderToTexture2D() public method

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

RenderToTexture2D() public method

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

SetFontPattern() public method

public SetFontPattern ( string fontPattern ) : void
fontPattern string
return void

SetFontPatternFromFile() public method

public SetFontPatternFromFile ( string fntFileName ) : void
fntFileName string
return void