render a string
int my_string( int x, int y,
char *str, int len,
char *font, unsigned long color,
int bkgd, struct _rect *sclip,
int widechar_flag,
struct _rect *sextent );
This function renders a string. The arguments are:
- x, y
- The location at which to draw the string, given in source coordinates.
They need to be converted to printer coordinates.
If printing is done in landscape mode, you'll need to swap the
x and y coordinates.
- str
- The string to be rendered.
- len
- The number of bytes in the string.
- font
- The name of the font to use.
- color
- The color to be used for the string.
- bkgd
- The background color. This is used to fill the rectangle behind
the string. A value of -1 indicates a tranparent background.
- sclip
- A pointer to the clipping rectangle for the string.
- widechar_flag
- Not used.
- sextent
- A pointer to the extent of the string. If this is provided,
the function should scale the characters to make the string
fit inside the rectangle.
- 1
- The string was successfully rendered.
- 0
- The render library should render/pixelize the characters.
Photon
Safety: | |
Interrupt handler |
Not applicable |
Signal handler |
Not applicable |
Thread |
Not applicable |