From a926652af980db3abcdef3e8ecb78a763327a1ae Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 20 Mar 2021 18:12:55 +1100 Subject: Replace FillRectangle with FillRectangleAligned as FillRectangle will stop aligning to pixel boundaries. Use Surface::SetMode as simpler and its predecessors will be removed. --- win32/PlatWin.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 34f4faa49..1e6dd06b4 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -2676,7 +2676,7 @@ void SurfaceD2D::DrawTextCommon(PRectangle rc, const Font *font_, XYPOSITION yba void SurfaceD2D::DrawTextNoClip(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourAlpha fore, ColourAlpha back) { if (pRenderTarget) { - FillRectangle(rc, back); + FillRectangleAligned(rc, back); D2DPenColourAlpha(fore); DrawTextCommon(rc, font_, ybase, text, codePageText, ETO_OPAQUE); } @@ -2685,7 +2685,7 @@ void SurfaceD2D::DrawTextNoClip(PRectangle rc, const Font *font_, XYPOSITION yba void SurfaceD2D::DrawTextClipped(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourAlpha fore, ColourAlpha back) { if (pRenderTarget) { - FillRectangle(rc, back); + FillRectangleAligned(rc, back); D2DPenColourAlpha(fore); DrawTextCommon(rc, font_, ybase, text, codePageText, ETO_OPAQUE | ETO_CLIPPED); } @@ -2807,7 +2807,7 @@ XYPOSITION SurfaceD2D::WidthText(const Font *font_, std::string_view text) { void SurfaceD2D::DrawTextNoClipUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourAlpha fore, ColourAlpha back) { if (pRenderTarget) { - FillRectangle(rc, back); + FillRectangleAligned(rc, back); D2DPenColourAlpha(fore); DrawTextCommon(rc, font_, ybase, text, SC_CP_UTF8, ETO_OPAQUE); } @@ -2816,7 +2816,7 @@ void SurfaceD2D::DrawTextNoClipUTF8(PRectangle rc, const Font *font_, XYPOSITION void SurfaceD2D::DrawTextClippedUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourAlpha fore, ColourAlpha back) { if (pRenderTarget) { - FillRectangle(rc, back); + FillRectangleAligned(rc, back); D2DPenColourAlpha(fore); DrawTextCommon(rc, font_, ybase, text, SC_CP_UTF8, ETO_OPAQUE | ETO_CLIPPED); } -- cgit v1.2.3