diff options
author | Neil <nyamatongwe@gmail.com> | 2021-03-20 09:24:43 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-03-20 09:24:43 +1100 |
commit | 6c56011f882cdfa758898029be5cabe82fc9228c (patch) | |
tree | 7b9720ac901dcaa37a7d93035d34b5c9bd536897 /gtk/PlatGTK.cxx | |
parent | 6ca286d41a1ca8e6d948d131fdaaf8b8199c905e (diff) | |
download | scintilla-mirror-6c56011f882cdfa758898029be5cabe82fc9228c.tar.gz |
Implement RectangleFrame.
Diffstat (limited to 'gtk/PlatGTK.cxx')
-rwxr-xr-x | gtk/PlatGTK.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index b71689007..0b87b8743 100755 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -165,6 +165,7 @@ public: void Polygon(const Point *pts, size_t npts, FillStroke fillStroke) override; void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back) override; void RectangleDraw(PRectangle rc, FillStroke fillStroke) override; + void RectangleFrame(PRectangle rc, Stroke stroke) override; void FillRectangle(PRectangle rc, ColourDesired back) override; void FillRectangle(PRectangle rc, Fill fill) override; void FillRectangle(PRectangle rc, Surface &surfacePattern) override; @@ -534,6 +535,15 @@ void SurfaceImpl::RectangleDraw(PRectangle rc, FillStroke fillStroke) { } } +void SurfaceImpl::RectangleFrame(PRectangle rc, Stroke stroke) { + if (context) { + CairoRectangle(rc.Inset(stroke.width / 2)); + PenColourAlpha(stroke.colour); + cairo_set_line_width(context, stroke.width); + cairo_stroke(context); + } +} + void SurfaceImpl::FillRectangle(PRectangle rc, ColourDesired back) { PenColour(back); if (context && (rc.left < maxCoordinate)) { // Protect against out of range |