예제 #1
0
	def draw(self, painter):
		if self.fillMode:
			path = QPainterPath()
			path.addRegion(self.region)
			painter.fillPath(path, QBrush(self.color))

		for edge in self.edges:
			edge.draw(painter)
예제 #2
0
파일: emf_export.py 프로젝트: metgem/metgem
 def updateState(self, state):
     """Examine what has changed in state and call apropriate function."""
     ss = state.state()
     if ss & QPaintEngine.DirtyPen:
         self._updatePen(state.pen())
     if ss & QPaintEngine.DirtyBrush:
         self._updateBrush(state.brush())
     if ss & QPaintEngine.DirtyClipPath:
         self._updateClipPath(state.clipPath(), state.clipOperation())
     if ss & QPaintEngine.DirtyClipRegion:
         path = QPainterPath()
         path.addRegion(state.clipRegion())
         self._updateClipPath(path, state.clipOperation())
     if ss & QPaintEngine.DirtyTransform:
         self._updateTransform(state.transform())