justvanrossum / drawbot-skia

A cross-platform subset of the DrawBot drawing API, using Skia
Apache License 2.0
77 stars 8 forks source link

made newPage functions to work without arguments too #14

Closed jansindl3r closed 3 years ago

jansindl3r commented 3 years ago

I made the newPage function to work without arguments too.

    Initial newPage() without arguments: 1000 x 1000
    Second newPage() without arguments: same as previous page

I found an issue that the function throws an error if you don't draw before. Probably because RecordingDocument's self.pageWidth = self.pageHeight = None Drawing makes it somehow become not None. It got a temporary fix

Fixes #13.

jansindl3r commented 3 years ago

btw, all test that test Image failed even with fresh copy

justvanrossum commented 3 years ago

The test failure is because of a reather agggressive linter setting. Please check with

$ flake8 --max-line-length=127 path/to/file.py

...for both files you're edting. If that passes, run pytest locally. Doing

$ pytest

should be enough. If that passes, there's a good chance the CI will pass, too.

justvanrossum commented 3 years ago

Thanks Jan!

jansindl3r commented 3 years ago

I learnt something again :) I thank you!

I am making a small python workshop soon and it's great to welcome a few Windows users too. VS code setup with split editor where one half shows the exported image works pretty well as a substitution for DrawBot app.

Though sharing install instructions with 13 steps is not that good for beginners, but they managed!