aboutsummaryrefslogtreecommitdiffhomepage
path: root/qt/ScintillaEditBase/PlatQt.h
diff options
context:
space:
mode:
authormitchell <unknown>2018-05-25 17:44:28 -0400
committermitchell <unknown>2018-05-25 17:44:28 -0400
commitfba451a1d76be9b6945c9d5d7e219f7d7d1a4260 (patch)
tree0e1aa6f197c34e6c1a9782e264359c220ed014a7 /qt/ScintillaEditBase/PlatQt.h
parent9f00df4e57e917035d2f939ce70ccf2ee83a9725 (diff)
downloadscintilla-mirror-fba451a1d76be9b6945c9d5d7e219f7d7d1a4260.tar.gz
Backport: Add GradientRectangle method to Surface to draw rectangles with vertical or horizontal gradients.
Backport of changeset 6965:90c71d69e3b6.
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 ed51cf598..345538bb0 100644
--- a/qt/ScintillaEditBase/PlatQt.h
+++ b/qt/ScintillaEditBase/PlatQt.h
@@ -32,6 +32,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());
@@ -92,6 +97,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,