Blender V2.61 - r43446
Functions

BKE_bmfont.h File Reference

Go to the source code of this file.

Functions

void printfGlyph (struct bmGlyph *glyph)
void calcAlpha (struct ImBuf *ibuf)
void readBitmapFontVersion0 (struct ImBuf *ibuf, unsigned char *rect, int step)
void detectBitmapFont (struct ImBuf *ibuf)
int locateGlyph (struct bmFont *bmfont, unsigned short unicode)
void matrixGlyph (struct ImBuf *ibuf, unsigned short unicode, float *centerx, float *centery, float *sizex, float *sizey, float *transx, float *transy, float *movex, float *movey, float *advance)

Detailed Description

Since:
March 2001
Author:
nzc

Definition in file BKE_bmfont.h.


Function Documentation

void calcAlpha ( struct ImBuf ibuf)

Definition at line 71 of file bmfont.c.

References i, MAX3, ImBuf::rect, ImBuf::x, and ImBuf::y.

Referenced by readBitmapFontVersion0().

void detectBitmapFont ( struct ImBuf ibuf)
int locateGlyph ( struct bmFont bmfont,
unsigned short  unicode 
)

Definition at line 213 of file bmfont.c.

References bmFont::glyphcount, bmFont::glyphs, max, min, and bmGlyph::unicode.

Referenced by matrixGlyph().

void matrixGlyph ( struct ImBuf ibuf,
unsigned short  unicode,
float *  centerx,
float *  centery,
float *  sizex,
float *  sizey,
float *  transx,
float *  transy,
float *  movex,
float *  movey,
float *  advance 
)
void printfGlyph ( bmGlyph glyph)

Two external functions:

void detectBitmapFont(ImBuf *ibuf) detects if an image buffer contains a bitmap font. It makes the specific bitmap data which is stored in the bitmap invisible to blender.

void matrixGlyph(ImBuf * ibuf, unsigned short unicode, *float x 7) returns all the information about the character (unicode) in the floats

Room for improvement: add kerning data in the bitmap all calculations in matrixGlyph() are static and could be done during initialization

Definition at line 59 of file bmfont.c.

References bmGlyph::advance, bmGlyph::locx, bmGlyph::locy, bmGlyph::ofsx, bmGlyph::ofsy, bmGlyph::reserved, bmGlyph::sizex, bmGlyph::sizey, and bmGlyph::unicode.

Referenced by readBitmapFontVersion0().

void readBitmapFontVersion0 ( struct ImBuf ibuf,
unsigned char *  rect,
int  step 
)