aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/PlatWin.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-03-26 18:02:24 +1100
committerNeil <nyamatongwe@gmail.com>2021-03-26 18:02:24 +1100
commitceb3ef8f45e5599d3993d347dfff2ac249902d97 (patch)
treec9af0a34f4552311f6858ae5fe6a91149672fe6f /win32/PlatWin.cxx
parent7a3c73483c17da8f669fe3551ad274a02144486a (diff)
downloadscintilla-mirror-ceb3ef8f45e5599d3993d347dfff2ac249902d97.tar.gz
Add SC_SUPPORTS_PIXEL_MODIFICATION to differentiate character cell and
pixel oriented platforms.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r--win32/PlatWin.cxx11
1 files changed, 10 insertions, 1 deletions
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 {