MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / strokeRect

Method strokeRect

app/src/UI/Widgets/PainterContext.cpp:1262–1278  ·  view source on GitHub ↗

* @brief Strokes the rectangle (x, y, w, h) with the active stroke style. */

Source from the content-addressed store, hash-verified

1260 * @brief Strokes the rectangle (x, y, w, h) with the active stroke style.
1261 */
1262void 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.

Callers 15

drawLineFunction · 0.80
afterDatasetsDrawFunction · 0.80
draw_barFunction · 0.80
paintFunction · 0.80
paintFunction · 0.80
paintFunction · 0.80
paintFunction · 0.80
paintFunction · 0.80
paintFunction · 0.80
paintFunction · 0.80
stat_cardFunction · 0.80
paintFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected