Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

coopgui: Add surface PrintText method to IFont

  • Loading branch information...
commit fbdd7e2fdd13aebbef57809b42aed0efc9da72e8 1 parent fd6743d
@fincs authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 sdk/userlib/coopgui/include/coopgui/font.h
View
9 sdk/userlib/coopgui/include/coopgui/font.h
@@ -17,6 +17,12 @@ __ENUM_BEGIN(PrintTextFlags, word_t)
AtBaseline = BIT(0)
__ENUM_END(PrintTextFlags);
+typedef struct
+{
+ color_t* buffer;
+ int width, height, stride;
+} surface_t;
+
struct IFont
{
virtual void Dispose() = 0;
@@ -27,6 +33,9 @@ struct IFont
// Print text in a 256x192 16-bit bitmap buffer
virtual int PrintText(color_t* buf, int x, int y, const char* text, color_t brush = Colors::Black, word_t flags = 0) = 0;
+
+ // Print text in a surface
+ virtual int PrintText(const surface_t* s, int x, int y, const char* text, color_t brush = Colors::Black, word_t flags = 0) = 0;
};
class FontPtr
Please sign in to comment.
Something went wrong with that request. Please try again.