MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / PaintMonoforumShape

Function PaintMonoforumShape

Telegram/SourceFiles/ui/empty_userpic.cpp:664–691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

662EmptyUserpic::~EmptyUserpic() = default;
663
664void PaintMonoforumShape(QPainter &p, QRect rect) {
665 p.drawEllipse(rect);
666
667 auto path = QPainterPath();
668 path.moveTo(
669 rect.x() + rect.width() * 0.5,
670 rect.y() + rect.height() * 0.5);
671 path.arcTo(
672 QRectF(
673 rect.x() - rect.width() * 0.5,
674 rect.y(),
675 rect.width(),
676 rect.height()),
677 0,
678 -90);
679 path.arcTo(
680 QRectF(
681 rect.x() - rect.width() * 0.25,
682 rect.y() - rect.height() * 2,
683 rect.width() * 0.5,
684 rect.height() * 3),
685 -90,
686 45);
687 path.lineTo(
688 rect.x() + rect.width() * 0.5,
689 rect.y() + rect.height() * 0.5);
690 p.drawPath(path);
691}
692
693QImage MonoforumShapeMask(QSize size) {
694 auto result = QImage(size, QImage::Format_ARGB32_Premultiplied);

Callers 2

paintMonoforumMethod · 0.85
MonoforumShapeMaskFunction · 0.85

Calls 5

QPainterPathClass · 0.85
moveToMethod · 0.45
widthMethod · 0.45
yMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected