| 38 | } // namespace colors |
| 39 | |
| 40 | static void drawDiamond(QPainter &painter, int myx, int myy, bool shadow) |
| 41 | { |
| 42 | using namespace traditional; |
| 43 | QPointF points[4] = {QPointF(myx, myy), |
| 44 | QPointF(myx + HALF_SOL_W, myy + HALF_SOL_W), |
| 45 | QPointF(myx, myy + SOL_WIDTH), |
| 46 | QPointF(myx - HALF_SOL_W, myy + HALF_SOL_W)}; |
| 47 | |
| 48 | if (shadow) |
| 49 | { |
| 50 | for (auto &&p : points) |
| 51 | { |
| 52 | p += QPointF(SHADOW_OFFSET, SHADOW_OFFSET); |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | painter.drawConvexPolygon(points, 4); |
| 57 | } |
| 58 | |
| 59 | void solution(QPainter &painter, int x, int y, bool selected) |
| 60 | { |