1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
.TH "al_draw_glyph" "3" "" "Allegro reference manual" ""
.SH NAME
.PP
al_draw_glyph \- Allegro 5 API
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <allegro5/allegro_font.h>
void\ al_draw_glyph(const\ ALLEGRO_FONT\ *f,\ ALLEGRO_COLOR\ color,\ float\ x,\ float\ y,
\ \ \ int\ codepoint)
\f[]
.fi
.SH DESCRIPTION
.PP
Draws the glyph that corresponds with \f[C]codepoint\f[] in the given
\f[C]color\f[] using the given \f[C]font\f[].
If \f[C]font\f[] does not have such a glyph, nothing will be drawn.
.PP
To draw a string as left to right horizontal text you will need to use
al_get_glyph_advance(3) to determine the position of each glyph.
For drawing strings in other directions, such as top to down, use
al_get_glyph_dimensions(3) to determine the size and position of each
glyph.
.PP
If you have to draw many glyphs at the same time, use
al_hold_bitmap_drawing(3) with true as the parameter, before drawing the
glyphs, and then call al_hold_bitmap_drawing(3) again with false as a
parameter when done drawing the glyphs to further enhance performance.
.SH SINCE
.PP
5.1.12
.SH SEE ALSO
.PP
al_get_glyph_width(3), al_get_glyph_dimensions(3),
al_get_glyph_advance(3).
|