1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2025-04-21 12:27:27 +03:00

Don't pass around naked Surface pointers when drawing

Use references instead.
This commit is contained in:
Maarten ter Huurne
2014-08-10 04:26:59 +02:00
parent 20c5ec4eb6
commit aff5f53f7d
34 changed files with 255 additions and 220 deletions

View File

@@ -38,7 +38,7 @@ public:
return lineSpacing;
}
void write(Surface *surface,
void write(Surface& surface,
const std::string &text, int x, int y,
HAlign halign = HAlignLeft, VAlign valign = VAlignTop);
@@ -48,7 +48,7 @@ private:
std::string wordWrapSingleLine(const std::string &text,
size_t start, size_t end, int width);
void writeLine(Surface *surface, std::string const& text,
void writeLine(Surface& surface, std::string const& text,
int x, int y, HAlign halign, VAlign valign);
TTF_Font *font;