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,
|
'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)
|
||||||
|
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Reference in New Issue