Binary Image Library
Macros | Functions
C:/Users/Malcolm/Documents/temp/binaryimagelibrary/pcfont.c File Reference
#include "pcfont8x19.h"
#include "pcfont8x8.h"

Macros

#define clamp(x, low, high)   ( (x) < (low) ? (low) : (x) > (high) ? (high) : (x) )
 

Functions

int cgafont_paste (unsigned char *binary, int width, int height, int x, int y, int ch)
 
int pcfont_paste (unsigned char *binary, int width, int height, int x, int y, int ch)
 
int cgafont_putch (unsigned char *binary, int chwidth, int chheight, int cx, int cy, int ch)
 
int pcfont_putch (unsigned char *binary, int chwidth, int chheight, int cx, int cy, int ch)
 

Detailed Description

Code for a PC-like font.

Use to quickly build up raster displays.

cgafont.gif
The CGA 8x8 font
pcfont.gif
The PC 8x19 font

Function Documentation

int cgafont_paste ( unsigned char *  binary,
int  width,
int  height,
int  x,
int  y,
int  ch 
)

Write a character to the binary buffer using 8x8 font

Parameters
[in,out]binary- the buffer
width- bufffer width
height- buffer height
x- pixel x position (left)
y- pixel y position (top)
ch- character to write
Returns
0 on success, -1 on fail
int cgafont_putch ( unsigned char *  binary,
int  chwidth,
int  chheight,
int  cx,
int  cy,
int  ch 
)

Write a character to the binary buffer using 8x8 font

Parameters
[in,out]binary- the buffer
width- bufffer width
height- buffer height
x- character x position (left)
y- character y position (top)
ch- character to write
Returns
0 on success, -1 on fail
int pcfont_paste ( unsigned char *  binary,
int  width,
int  height,
int  x,
int  y,
int  ch 
)

Write a character to the binary buffer, using 8x19 font

Parameters
[in,out]binary- the buffer
width- bufffer width
height- buffer height
x- pixel x position (left)
y- pixel y position (top)
ch- character to write
Returns
0 on success, -1 on fail
int pcfont_putch ( unsigned char *  binary,
int  chwidth,
int  chheight,
int  cx,
int  cy,
int  ch 
)

Write a character to the binary buffer using 8x19 font

Parameters
[in,out]binary- the buffer
width- bufffer width
height- buffer height
x- character x position (left)
y- character y position (top)
ch- character to write
Returns
0 on success, -1 on fail