From ceb3ef8f45e5599d3993d347dfff2ac249902d97 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 26 Mar 2021 18:02:24 +1100 Subject: Add SC_SUPPORTS_PIXEL_MODIFICATION to differentiate character cell and pixel oriented platforms. --- win32/PlatWin.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 4ecd19c0e..064871463 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -211,6 +211,10 @@ void LoadDpiForWindow() noexcept { HINSTANCE hinstPlatformRes {}; +const int SupportsGDI[] = { + SC_SUPPORTS_PIXEL_MODIFICATION, +}; + constexpr BYTE Win32MapFontQuality(int extraFontFlag) noexcept { switch (extraFontFlag & SC_EFF_QUALITY_MASK) { @@ -582,7 +586,11 @@ void SurfaceGDI::Release() noexcept { Clear(); } -int SurfaceGDI::Supports(int /* feature */) noexcept { +int SurfaceGDI::Supports(int feature) noexcept { + for (const int f : SupportsGDI) { + if (f == feature) + return 1; + } return 0; } @@ -1255,6 +1263,7 @@ const int SupportsD2D[] = { SC_SUPPORTS_LINE_DRAWS_FINAL, SC_SUPPORTS_FRACTIONAL_STROKE_WIDTH, SC_SUPPORTS_TRANSLUCENT_STROKE, + SC_SUPPORTS_PIXEL_MODIFICATION, }; constexpr D2D_COLOR_F ColorFromColourAlpha(ColourAlpha colour) noexcept { -- cgit v1.2.3