* @brief Strokes the rectangle (x, y, w, h) with the active stroke style. */
| 1260 | * @brief Strokes the rectangle (x, y, w, h) with the active stroke style. |
| 1261 | */ |
| 1262 | void Widgets::PainterContext::strokeRect(qreal x, qreal y, qreal w, qreal h) |
| 1263 | { |
| 1264 | if (!active()) |
| 1265 | return; |
| 1266 | |
| 1267 | QPainterPath p; |
| 1268 | p.addRect(x, y, w, h); |
| 1269 | |
| 1270 | if (shadowActive()) { |
| 1271 | QPen pen = m_state.strokePen; |
| 1272 | renderWithShadow( |
| 1273 | [p, pen](QPainter* qp) { qp->strokePath(p, pen); }, |
| 1274 | p.boundingRect().adjusted(-pen.widthF(), -pen.widthF(), pen.widthF(), pen.widthF())); |
| 1275 | } |
| 1276 | |
| 1277 | m_painter->strokePath(p, m_state.strokePen); |
| 1278 | } |
| 1279 | |
| 1280 | /** |
| 1281 | * @brief Clears the rectangle (x, y, w, h) to transparent. |
no outgoing calls
no test coverage detected