This commit is contained in:
2020-07-02 23:06:37 +02:00
parent 1bd3eb79dc
commit 1fa80250fe
3 changed files with 86 additions and 50 deletions

View File

@@ -172,6 +172,13 @@ public:
drawLineVer(y+1, y+h-2, x); // left 2 pixels already included above
drawLineVer(y+1, y+h-2, x+w-1); // right 2 pixels already included above
}
void drawRect(const Scalar x, const Scalar y, const Scalar w, const Scalar h, Color ct, Color cl, Color cb, Color cr) {
setColor(ct); drawLineHor(x, x+w-1, y); // top
setColor(cb); drawLineHor(x, x+w-1, y+h-1); // bottom
setColor(cl); drawLineVer(y+1, y+h-2, x); // left 2 pixels already included above
setColor(cr); drawLineVer(y+1, y+h-2, x+w-1); // right 2 pixels already included above
}
// void drawRect(const Scalar x1, const Scalar y1, const Scalar x2, const Scalar y2) {