本文整理汇总了Python中AnyQt.QtGui.QPen.color方法的典型用法代码示例。如果您正苦于以下问题:Python QPen.color方法的具体用法?Python QPen.color怎么用?Python QPen.color使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AnyQt.QtGui.QPen
的用法示例。
在下文中一共展示了QPen.color方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generate_pens
# 需要导入模块: from AnyQt.QtGui import QPen [as 别名]
# 或者: from AnyQt.QtGui.QPen import color [as 别名]
def generate_pens(basecolor):
pen = QPen(basecolor, 1)
pen.setCosmetic(True)
shadow_pen = QPen(pen.color().lighter(160), 2.5)
shadow_pen.setCosmetic(True)
return pen, shadow_pen
示例2: __updateStyleState
# 需要导入模块: from AnyQt.QtGui import QPen [as 别名]
# 或者: from AnyQt.QtGui.QPen import color [as 别名]
def __updateStyleState(self):
"""
Update the arrows' brush, pen, ... based on it's state
"""
if self.isSelected():
color = self.__color.darker(150)
pen = QPen(QColor(96, 158, 215), Qt.DashDotLine)
pen.setWidthF(1.25)
pen.setCosmetic(True)
self.__shadow.setColor(pen.color().darker(150))
else:
color = self.__color
pen = QPen(Qt.NoPen)
self.__shadow.setColor(QColor(63, 63, 63, 180))
self.__arrowItem.setBrush(color)
self.__arrowItem.setPen(pen)
示例3: plot_curves
# 需要导入模块: from AnyQt.QtGui import QPen [as 别名]
# 或者: from AnyQt.QtGui.QPen import color [as 别名]
def plot_curves(self, target, clf_idx):
if (target, clf_idx) not in self._curve_data:
curve = liftCurve_from_results(self.results, clf_idx, target)
color = self.colors[clf_idx]
pen = QPen(color, 1)
pen.setCosmetic(True)
shadow_pen = QPen(pen.color().lighter(160), 2.5)
shadow_pen.setCosmetic(True)
item = pg.PlotDataItem(
curve.points[0], curve.points[1],
pen=pen, shadowPen=shadow_pen,
symbol="+", symbolSize=3, symbolPen=shadow_pen,
antialias=True
)
hull_item = pg.PlotDataItem(
curve.hull[0], curve.hull[1],
pen=pen, antialias=True
)
self._curve_data[target, clf_idx] = \
PlotCurve(curve, item, hull_item)
return self._curve_data[target, clf_idx]