relative stroke px size & no Qt pen on stroke

This commit is contained in:
tassaron 2017-08-08 05:57:19 -04:00
parent 060a7dc2d2
commit 354637d34c
2 changed files with 7 additions and 3 deletions

View File

@ -53,7 +53,7 @@ class Component(Component):
'textColor': self.page.pushButton_textColor, 'textColor': self.page.pushButton_textColor,
'strokeColor': self.page.pushButton_strokeColor, 'strokeColor': self.page.pushButton_strokeColor,
}, relativeWidgets=[ }, relativeWidgets=[
'xPosition', 'yPosition', 'fontSize', 'xPosition', 'yPosition', 'fontSize', 'stroke'
]) ])
self.centerXY() self.centerXY()
@ -147,6 +147,7 @@ class Component(Component):
path = QtGui.QPainterPath() path = QtGui.QPainterPath()
path.addText(x, y, font, self.title) path.addText(x, y, font, self.title)
path = outliner.createStroke(path) path = outliner.createStroke(path)
image.setPen(QtCore.Qt.NoPen)
image.setBrush(PaintColor(*self.strokeColor)) image.setBrush(PaintColor(*self.strokeColor))
image.drawPath(path) image.drawPath(path)

View File

@ -21,8 +21,11 @@ class FramePainter(QtGui.QPainter):
self.image = QtGui.QImage(ImageQt(image)) self.image = QtGui.QImage(ImageQt(image))
super().__init__(self.image) super().__init__(self.image)
def setPen(self, RgbTuple): def setPen(self, penStyle):
super().setPen(PaintColor(*RgbTuple)) if type(penStyle) is tuple:
super().setPen(PaintColor(*penStyle))
else:
super().setPen(penStyle)
def finalize(self): def finalize(self):
self.end() self.end()