relative stroke px size & no Qt pen on stroke
This commit is contained in:
parent
060a7dc2d2
commit
354637d34c
|
@ -53,7 +53,7 @@ class Component(Component):
|
|||
'textColor': self.page.pushButton_textColor,
|
||||
'strokeColor': self.page.pushButton_strokeColor,
|
||||
}, relativeWidgets=[
|
||||
'xPosition', 'yPosition', 'fontSize',
|
||||
'xPosition', 'yPosition', 'fontSize', 'stroke'
|
||||
])
|
||||
self.centerXY()
|
||||
|
||||
|
@ -147,6 +147,7 @@ class Component(Component):
|
|||
path = QtGui.QPainterPath()
|
||||
path.addText(x, y, font, self.title)
|
||||
path = outliner.createStroke(path)
|
||||
image.setPen(QtCore.Qt.NoPen)
|
||||
image.setBrush(PaintColor(*self.strokeColor))
|
||||
image.drawPath(path)
|
||||
|
||||
|
|
|
@ -21,8 +21,11 @@ class FramePainter(QtGui.QPainter):
|
|||
self.image = QtGui.QImage(ImageQt(image))
|
||||
super().__init__(self.image)
|
||||
|
||||
def setPen(self, RgbTuple):
|
||||
super().setPen(PaintColor(*RgbTuple))
|
||||
def setPen(self, penStyle):
|
||||
if type(penStyle) is tuple:
|
||||
super().setPen(PaintColor(*penStyle))
|
||||
else:
|
||||
super().setPen(penStyle)
|
||||
|
||||
def finalize(self):
|
||||
self.end()
|
||||
|
|
Reference in New Issue