aboutsummaryrefslogtreecommitdiffhomepage
path: root/qt/ScintillaEditBase/PlatQt.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-05-22 09:08:54 +1000
committerNeil <nyamatongwe@gmail.com>2018-05-22 09:08:54 +1000
commit2e2e70c7ee89b353ad0e6ef409cb9621729d72f8 (patch)
treed5899867d76d457bda2c48dd298b6f41a0217ad1 /qt/ScintillaEditBase/PlatQt.h
parentcc5e63013d7aa447a74fafba0ee4dd560b6952c7 (diff)
downloadscintilla-mirror-2e2e70c7ee89b353ad0e6ef409cb9621729d72f8.tar.gz
Add GradientRectangle method to Surface to draw rectangles with vertical or
horizontal gradients.
Diffstat (limited to 'qt/ScintillaEditBase/PlatQt.h')
-rw-r--r--qt/ScintillaEditBase/PlatQt.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt/ScintillaEditBase/PlatQt.h b/qt/ScintillaEditBase/PlatQt.h
index 0cd62cb8b..6baa12877 100644
--- a/qt/ScintillaEditBase/PlatQt.h
+++ b/qt/ScintillaEditBase/PlatQt.h
@@ -31,6 +31,11 @@ inline QColor QColorFromCA(ColourDesired ca)
return QColor(c & 0xff, (c >> 8) & 0xff, (c >> 16) & 0xff);
}
+inline QColor QColorFromColourAlpha(ColourAlpha ca)
+{
+ return QColor(ca.GetRed(), ca.GetGreen(), ca.GetBlue(), ca.GetAlpha());
+}
+
inline QRect QRectFromPRect(PRectangle pr)
{
return QRect(pr.left, pr.top, pr.Width(), pr.Height());
@@ -91,6 +96,7 @@ public:
ColourDesired back) override;
void AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill,
int alphaFill, ColourDesired outline, int alphaOutline, int flags) override;
+ void GradientRectangle(PRectangle rc, const std::vector<ColourStop> &stops, GradientOptions options) override;
void DrawRGBAImage(PRectangle rc, int width, int height,
const unsigned char *pixelsImage) override;
void Ellipse(PRectangle rc, ColourDesired fore,