Maarten ter Huurne
8f57afcf53
Explicitly convert 32-bit integers to 16-bit.
...
GCC 4.7.0 warns that C++11 considers doing this implicitly ill-formed.
2012-04-10 23:01:16 +02:00
Maarten ter Huurne
b2896d6bac
ASFont: Refactored string drawing methods.
...
Renamed methods that draw a single line from write() to writeLine().
There is now only one write() method left: the public method.
Pass surface to draw on as wrapped Surface instead of SDL_Surface.
At the end of the call chain we still use SDL directly though.
2011-06-02 04:29:19 +02:00
Maarten ter Huurne
a382a425a9
ASFont: access font pixels efficiently.
...
Previous commit ensures that the font surface is always 32 bpp.
Therefore we can read font pixels directly through a pointer.
2011-05-12 02:10:40 +02:00
Maarten ter Huurne
bff04d2418
ASFont: removed duplication of horizontal alignment code.
2011-05-10 02:43:15 +02:00
Maarten ter Huurne
b4f3cde526
ASFont: merged SFontPlus class into ASFont class.
2011-05-10 02:37:10 +02:00
Maarten ter Huurne
1bc55392cd
ASFont: cleanups in text write methods.
2011-05-10 02:23:13 +02:00
Maarten ter Huurne
ff546cdcb0
ASFont: have a single routine for computing text width that also handles newlines.
...
This way the text has to be scanned only once and no copying is needed.
2011-05-10 02:08:14 +02:00
Maarten ter Huurne
e4b71138b9
ASFont: removed precalculation of half heights.
...
There is no point in precalculating something so cheap to recalculate.
Also, the majority of uses was to compensate for passing the wrong alignment argument.
2011-05-10 00:31:45 +02:00
Maarten ter Huurne
492a36b9df
ASFont: simplified object initialization and cleanup.
...
Do initialization and cleanup in constructor and destructor respectively.
Removed constructors that are not used by gmenu2x.
2011-05-09 14:54:11 +02:00
Maarten ter Huurne
ec5d426d83
ASFont: moved SFontPlus code into ASFont source files.
...
This is in preparation of merging the classes.
2011-05-09 14:25:16 +02:00
Maarten ter Huurne
a35a7e2c35
Introduced enums for text alignment in the ASFont class.
2011-05-09 05:17:25 +02:00
Maarten ter Huurne
c54dec90f5
Minor cleanups in SFontPlus and ASFont.
...
Removed unused includes.
Avoid importing classes into default namespace in headers.
Don't use a type alias if it does not add value.
2011-05-09 04:29:59 +02:00
Lars-Peter Clausen
40a26e1a9c
pass strings by reference where possible
2010-05-02 14:38:16 +02:00
Mirko Lindner
cddcd72e33
initial commit - needs clean-up
...
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
2010-02-04 12:33:47 +01:00