MCPcopy Create free account
hub / github.com/ActiveState/code / drawPointer

Method drawPointer

recipes/Python/578683_Analog_clock/recipe-578683.py:45–50  ·  view source on GitHub ↗
(color, rotation, pointer)

Source from the content-addressed store, hash-verified

43 painter = QtGui.QPainter(self)
44 #zipping code to draw pointers
45 def drawPointer(color, rotation, pointer):
46 painter.setBrush(QtGui.QBrush(color))
47 painter.save()
48 painter.rotate(rotation)
49 painter.drawConvexPolygon(pointer)
50 painter.restore()
51 #tune up painter
52 painter.setRenderHint(QtGui.QPainter.Antialiasing)
53 painter.translate(self.width() / 2, self.height() / 2)

Callers

nothing calls this directly

Calls 3

restoreMethod · 0.80
saveMethod · 0.45
rotateMethod · 0.45

Tested by

no test coverage detected