Cache width and xposition in get_font_metrics
commitc734b6b9be6d860c3cabd1d513e2980da4f33a69
authorThomas Perl <thp@perli.net>
Thu, 8 Jan 2009 18:32:47 +0000 (8 19:32 +0100)
committerThomas Perl <thp@perli.net>
Thu, 8 Jan 2009 18:32:47 +0000 (8 19:32 +0100)
tree89a6f81d1302d26e26fb1d15b249543eaac1e5fa
parent22eb5ce6d33ee8cc392aa209b3eb0baf1654de8d
Cache width and xposition in get_font_metrics

To save some cycles, do not re-calculate the font
metrics every time a string is drawn, but save the
width and xposition permanently after the first
calculation to speed up font drawing.
graphics.c
graphics.h