Home| base |src.lib|graphic|fbuffer| FrameBufferText Index

FrameBufferText

Syntax
int FrameBufferText(struct FrameBuffer *ptr,struct FrameBufferMatrix *matrix, struct FrameBufferFont *fnt,int x,int y, int num,char *txt,unsigned int color, unsigned char m,int sflg, struct FrameBufferClip *clip);
Header
base/rfbuffer.h
Library
rfbuf
Description

The FrameBufferText function plots text.

The argument ptr is a pointer to the frame buffer. The argument matrix is an optional transformation matrix that can be applied to the rectangle. If this is set to a NULL pointer then no transformation is applied.

The argument fnt is a pointer to the structure containing the frame buffer font.

The position at which the text is plotted is given by the arguments x, and y.

The number of character to plot is given by the argument num, and the characters are taken from the array pointed to by the argument txt.

The color used to plot the text is given by the color which is a 32-bit number that represents the alpha,red,green and blue components of the color as 8-bit number. The alpha channel occupies the most significant bits and the blue channel occupies the least significant bits. The argument mask defines which color channels are active. Setting this argument to (0x0f) will output the color to all four channels. The most significant bit controls the alpha channel and the least significant bit controls the blue channel.

The argument sflg determines whether interpolation is used to smooth the image; if this argument is set to a non-zero value then interpolation is used.

The clipping polygon is given by the argument clip. If this is set to a NULL pointer, no clipping is performed.

Returns
Returns zero on success. On error, (-1) is returned.
Errors
On error, (-1) is returned.
Example
None