aboutsummaryrefslogtreecommitdiffhomepage
path: root/qt/ScintillaEditBase/PlatQt.cpp
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-03-20 09:24:43 +1100
committerNeil <nyamatongwe@gmail.com>2021-03-20 09:24:43 +1100
commit6c56011f882cdfa758898029be5cabe82fc9228c (patch)
tree7b9720ac901dcaa37a7d93035d34b5c9bd536897 /qt/ScintillaEditBase/PlatQt.cpp
parent6ca286d41a1ca8e6d948d131fdaaf8b8199c905e (diff)
downloadscintilla-mirror-6c56011f882cdfa758898029be5cabe82fc9228c.tar.gz
Implement RectangleFrame.
Diffstat (limited to 'qt/ScintillaEditBase/PlatQt.cpp')
-rw-r--r--qt/ScintillaEditBase/PlatQt.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp
index 6c7f789ce..fa4c062d8 100644
--- a/qt/ScintillaEditBase/PlatQt.cpp
+++ b/qt/ScintillaEditBase/PlatQt.cpp
@@ -346,6 +346,14 @@ void SurfaceImpl::RectangleDraw(PRectangle rc, FillStroke fillStroke)
GetPainter()->drawRect(rect);
}
+void SurfaceImpl::RectangleFrame(PRectangle rc, Stroke stroke) {
+ PenColourWidth(stroke.colour, stroke.width);
+ // Default QBrush is Qt::NoBrush so does not fill
+ GetPainter()->setBrush(QBrush());
+ const QRectF rect = QRectFFromPRect(rc.Inset(stroke.width / 2));
+ GetPainter()->drawRect(rect);
+}
+
void SurfaceImpl::FillRectangle(PRectangle rc, ColourDesired back)
{
GetPainter()->fillRect(QRectFFromPRect(rc), QColorFromCA(back));