-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
made newPage functions to work without arguments too #14
Conversation
…ation when you use this function before any drawing
btw, all test that test Image failed even with fresh copy |
The test failure is because of a reather agggressive linter setting. Please check with
...for both files you're edting. If that passes, run pytest locally. Doing
should be enough. If that passes, there's a good chance the CI will pass, too. |
…ppercased as DEFAULT_FRAMEDURATION in document.py
src/drawbot_skia/drawing.py
Outdated
def newPage(self, width=None, height=None): | ||
if width and not height or height and not width: | ||
raise TypeError("newPage() takes either no argument or two - width and height") | ||
if not width and not height: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not width and not height: | |
if width is None and height is None: |
Thanks Jan! |
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! |
I made the
newPage
function to work without arguments too.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 fixFixes #13.