From 38a25fbc4d8a244d2dd7d5018eb99e8933c05d88 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Tue, 4 Jan 2022 00:48:47 -0500 Subject: [PATCH] Fix windows compile error pegtl.hpp is dumb and leaks windows.h which then causes #define conflicts --- common/font/font.cpp | 4 ++-- include/font/font.h | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/common/font/font.cpp b/common/font/font.cpp index 8279bd4f53..c966724650 100644 --- a/common/font/font.cpp +++ b/common/font/font.cpp @@ -261,8 +261,8 @@ VECTOR2D FONT::getBoundingBox( const UTF8& aText, TEXT_STYLE_FLAGS aTextStyle, } -void FONT::DrawText( KIGFX::GAL* aGal, const UTF8& aText, const VECTOR2D& aPosition, - const TEXT_ATTRIBUTES& aAttributes ) const +void FONT::KiDrawText( KIGFX::GAL* aGal, const UTF8& aText, const VECTOR2D& aPosition, + const TEXT_ATTRIBUTES& aAttributes ) const { // FONT TODO: do we need to set the attributes to the gal at all? aGal->SetHorizontalJustify( aAttributes.m_Halign ); diff --git a/include/font/font.h b/include/font/font.h index 1228d1359b..3fc11fd20e 100644 --- a/include/font/font.h +++ b/include/font/font.h @@ -35,7 +35,12 @@ #include #include #include -#include + + +namespace MARKUP +{ +struct NODE; +} namespace KIGFX { @@ -132,8 +137,8 @@ public: return Draw( aGal, aText, aPosition, VECTOR2D( 0, 0 ), aAttributes ); } - virtual void DrawText( KIGFX::GAL* aGal, const UTF8& aText, const VECTOR2D& aPosition, - const TEXT_ATTRIBUTES& aAttributes ) const; + virtual void KiDrawText( KIGFX::GAL* aGal, const UTF8& aText, const VECTOR2D& aPosition, + const TEXT_ATTRIBUTES& aAttributes ) const; /** * Compute the boundary limits of aText (the bounding box of all shapes).