Beispiel #1
0
def test_PictureRecorder_init():
    assert isinstance(skia.PictureRecorder(), skia.PictureRecorder)
Beispiel #2
0
 def beginPage(self, width, height):
     assert self._currentRecorder is None
     self.pageWidth = width
     self.pageHeight = height
     self._currentRecorder = skia.PictureRecorder()
     return self._currentRecorder.beginRecording(width, height)
Beispiel #3
0
def recorder():
    return skia.PictureRecorder()
Beispiel #4
0
def picture():
    recorder = skia.PictureRecorder()
    canvas = recorder.beginRecording(skia.Rect(100, 100))
    canvas.clear(0xFFFFFFFF)
    canvas.drawLine(0, 0, 100, 100, skia.Paint())
    return recorder.finishRecordingAsPicture()