module charge.gfx.bitmapfont
Graphics

Simple bitmap font.

Code Map

//! Simple bitmap font.
module charge.gfx.bitmapfont;


enum tabSize;
enum Width;
enum Height;
enum GlyphWidth;
enum GlyphHeight;

struct BitmapState
{
public:
	offX: i32;
	offY: i32;
	glyphWidth: i32;
	glyphHeight: i32;
}

//! Texture that can be used for fonts.
global bitmapTexture: Texture2D;
global glyphData: immutable(char)[][160];

//! Computes the size of the bounding box for the given text.
fn buildSize(s: BitmapState, text: scope (const(scope (u8)[]), width: u32, height: u32) { }
//! Builds the vertices in builder of the given text. Uses quads, so for
//! vertices per glyph.
fn buildVertices(s: BitmapState, b: DrawVertexBuilder, text: scope (const(scope (u8)[])) { }
//! Builds the vertices in builder of the given text. Uses quads, so for
//! vertices per glyph.
fn buildVerticesGrid(s: BitmapState, b: DrawVertexBuilder, stride: u32, data: scope (const(scope (u8)[]), color: math.Color4b) { }
fn buildVertex(s: BitmapState, b: DrawVertexBuilder, x: i32, y: i32, c: u8, color: math.Color4b) { }
fn __ctor() { }
fn initBitmap() { }
fn closeBitmap() { }
global bitmapTexture: Texture2D

Texture that can be used for fonts.

fn buildSize(s: BitmapState, text: scope (const(scope (u8)[]), width: u32, height: u32)

Computes the size of the bounding box for the given text.

fn buildVertices(s: BitmapState, b: DrawVertexBuilder, text: scope (const(scope (u8)[]))

Builds the vertices in builder of the given text. Uses quads, so for vertices per glyph.

fn buildVerticesGrid(s: BitmapState, b: DrawVertexBuilder, stride: u32, data: scope (const(scope (u8)[]), color: math.Color4b)

Builds the vertices in builder of the given text. Uses quads, so for vertices per glyph.