MCPcopy Create free account
hub / github.com/OpenBoard-org/OpenBoard / shape

Method shape

src/tools/UBGraphicsTriangle.cpp:390–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390QPainterPath UBGraphicsTriangle::shape() const
391{
392 QPainterPath tShape;
393 QPolygonF tPolygon;
394
395 //qDebug() << "UBGraphicsTriangle shape()"<<"A1 ="<<A1<<"B1 ="<<B1<<"C1 ="<<C1;
396
397 tPolygon << A1 << B1 << C1;
398 tShape.addPolygon(tPolygon);
399 tPolygon.clear();
400
401 if (mShouldPaintInnerTriangle) {
402 tPolygon << A2 << B2 << C2;
403 tShape.addPolygon(tPolygon);
404 tPolygon.clear();
405 }
406
407 //qDebug() << "UBGraphicsTriangle shape()"<<"A1 ="<<A1<<"B1 ="<<B1<<"C1 ="<<C1;
408 //qDebug() << "UBGraphicsTriangle shape()"<<"A2 ="<<A2<<"B2 ="<<B2<<"C2 ="<<C2;
409
410 return tShape;
411}
412
413void UBGraphicsTriangle::paintHelp(QPainter *painter)
414{

Callers

nothing calls this directly

Calls 2

addPolygonMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected