+ def drawText(self, painter, center, s):
+ r = self.getCenterRadius()
+ painter.save()
+ pen = QPen(Qt.white, r / 150., Qt.SolidLine)
+ brush = QBrush(Qt.white)
+ painter.setBrush(brush)
+ pen.setColor(Qt.black);
+ painter.setPen(pen)
+ font = QFont("Meiryo UI", 0, QFont.Bold)
+ font.setPointSizeF(self.FONT_SIZE * r)
+ painter.setFont(font)
+ path = QPainterPath()
+ for l in s.split("\n"):
+ path.addText(center, font, l)
+ center += QPoint(0, self.FONT_SIZE * r * 1.5)
+ bounding = path.boundingRect()
+ path.translate(-bounding.width() / 2., bounding.height() / 2.)
+ painter.drawPath(path)
+ painter.restore()
+