most clip marker work completed #333

This commit is contained in:
itsmattkc
2019-02-01 02:53:54 +11:00
parent 0513749b9d
commit db92e5231f
11 changed files with 149 additions and 50 deletions
+17
View File
@@ -1 +1,18 @@
#include "marker.h"
void draw_marker(QPainter &p, int x, int y, int bottom, bool selected, bool flipped) {
const QPoint points[5] = {
QPoint(x, bottom),
QPoint(x + MARKER_SIZE, bottom - MARKER_SIZE),
QPoint(x + MARKER_SIZE, y),
QPoint(x - MARKER_SIZE, y),
QPoint(x - MARKER_SIZE, bottom - MARKER_SIZE)
};
p.setPen(Qt::black);
if (selected) {
p.setBrush(QColor(208, 255, 208));
} else {
p.setBrush(QColor(128, 224, 128));
}
p.drawPolygon(points, 5);
}