From 7da02c33737852d52d2e9fd1bda07e01de0c2100 Mon Sep 17 00:00:00 2001 From: Jonathan Campbell Date: Sun, 5 Jan 2025 09:48:46 -0800 Subject: [PATCH] Dot not allow virtual method override for DrawTextChar(), clarify the DrawTextChar1bpp method should be overridden (i.e. by the SDL surface DC) when a higher performance optimized routine is available --- src/gui/sdl_gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/sdl_gui.cpp b/src/gui/sdl_gui.cpp index c24d42710..18e4e29be 100644 --- a/src/gui/sdl_gui.cpp +++ b/src/gui/sdl_gui.cpp @@ -426,7 +426,7 @@ namespace WLGUI { virtual Handle SelectFont(Handle newValue); virtual bool TextOut(long x,long y,const char *str/*TODO UTF-8*/); virtual bool DrawTextChar1bpp(long x,long y,FontHandle::Bitmap &bmp); - virtual bool DrawTextChar(long x,long y,FontHandle::Bitmap &bmp); + bool DrawTextChar(long x,long y,FontHandle::Bitmap &bmp); static DevicePixel GetPixel_stub(Obj &obj,long x,long y); static void SetPixel_stub(Obj &obj,long x,long y,const DevicePixel c); @@ -801,6 +801,7 @@ namespace WLGUI { return InvalidHandleValue; } + /* NTS: Override this method if you have a faster more optimized routine for 1bpp bitmap font rendering */ bool Obj::DrawTextChar1bpp(long x,long y,FontHandle::Bitmap &bmp) { long dx = x + bmp.dx; for (unsigned int subx=0;subx < bmp.dw;subx++) {