windows.h defines DrawText and shadows the function Canvas.DrawText, fix based on the solution #70 (#394)

Co-authored-by: Sebastian Carrion Ständer <sebastian.carrion@tum.de>
This commit is contained in:
SColibri 2022-05-04 23:39:03 +02:00 committed by GitHub
parent bc206f85da
commit 09a2c077eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,12 @@
#include "ftxui/screen/color.hpp" // for Color
#include "ftxui/screen/screen.hpp" // for Pixel
#ifdef DrawText
// Workaround for WinUsr.h (via Windows.h) defining macros that break things.
// https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-drawtext
#undef DrawText
#endif
namespace ftxui {
struct Canvas {