From 20bb1c7c0f6931819745d9756ab14246c20c4e9f Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 25 Mar 2021 09:20:08 +1100 Subject: Implement translucent FillRectangle. --- qt/ScintillaEditBase/PlatQt.cpp | 5 +++++ qt/ScintillaEditBase/PlatQt.h | 1 + 2 files changed, 6 insertions(+) (limited to 'qt') diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp index a1adf0a0d..37fc409f7 100644 --- a/qt/ScintillaEditBase/PlatQt.cpp +++ b/qt/ScintillaEditBase/PlatQt.cpp @@ -319,6 +319,11 @@ void SurfaceImpl::FillRectangle(PRectangle rc, ColourDesired back) GetPainter()->fillRect(QRectFFromPRect(rc), QColorFromCA(back)); } +void SurfaceImpl::FillRectangle(PRectangle rc, Fill fill) +{ + GetPainter()->fillRect(QRectFFromPRect(rc), QColorFromColourAlpha(fill.colour)); +} + void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern) { // Tile pattern over rectangle diff --git a/qt/ScintillaEditBase/PlatQt.h b/qt/ScintillaEditBase/PlatQt.h index a743a4be5..173bd53d5 100644 --- a/qt/ScintillaEditBase/PlatQt.h +++ b/qt/ScintillaEditBase/PlatQt.h @@ -103,6 +103,7 @@ public: void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back) override; void FillRectangle(PRectangle rc, ColourDesired back) override; + void FillRectangle(PRectangle rc, Fill fill) override; void FillRectangle(PRectangle rc, Surface &surfacePattern) override; void RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesired back) override; -- cgit v1.2.3