GRAPHICS: Added ManagedSurface and Screen classes
This commit is contained in:
parent
7105fb23a8
commit
433a2daa6a
7 changed files with 869 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#include "graphics/font.h"
|
||||
#include "graphics/managed_surface.h"
|
||||
|
||||
#include "common/array.h"
|
||||
#include "common/util.h"
|
||||
|
@ -273,6 +274,16 @@ void Font::drawString(Surface *dst, const Common::U32String &str, int x, int y,
|
|||
drawStringImpl(*this, dst, str, x, y, w, color, align, 0);
|
||||
}
|
||||
|
||||
void Font::drawString(ManagedSurface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align, int deltax, bool useEllipsis) const {
|
||||
drawString(&dst->_innerSurface, str, x, y, w, color, align, deltax, useEllipsis);
|
||||
dst->addDirtyRect(Common::Rect(x, y, x + w, y + getFontHeight()));
|
||||
}
|
||||
|
||||
void Font::drawString(ManagedSurface *dst, const Common::U32String &str, int x, int y, int w, uint32 color, TextAlign align) const {
|
||||
drawString(&dst->_innerSurface, str, x, y, w, color, align);
|
||||
dst->addDirtyRect(Common::Rect(x, y, x + w, y + getFontHeight()));
|
||||
}
|
||||
|
||||
int Font::wordWrapText(const Common::String &str, int maxWidth, Common::Array<Common::String> &lines) const {
|
||||
return wordWrapTextImpl(*this, str, maxWidth, lines);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue