Skip to content
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

Adding exit_sketch() information, and other tweaks. #139

Merged
merged 2 commits into from
Aug 24, 2022

Conversation

villares
Copy link
Collaborator

Adding the need for exit_sketch() as discussed in #137
Also mentioned you might try begin_raw() if you want 3D, and an example.

Please proof read and make any edit you see fit!

Adding the need for `exit_sketch()` as discussed in #137
Also mentioned you might try `begin_raw()` if you want 3D, and an example.
@hx2A
Copy link
Collaborator

hx2A commented Aug 24, 2022

Hmmm, I'd like to make a few small changes but it doesn't seem I can edit the PR. Should I be able to do this?

Can you change this:

When using the ``PDF`` and ``SVG`` rendererers that write to a file, you must call ``exit_sketch()`` by the end of your drawing. If you'd like to draw 3D objects to a PDF or SVG file, you might try the ``begin_raw()`` method istead of this.

to something like:

When using the ``PDF`` and ``SVG`` renderers with the ``size()`` method, you must use the ``path`` parameter to specify the file to write the output to. No window will open while the Sketch is running. You must also call :doc:`sketch_exit_sketch` to exit the Sketch and write the completed output to the file. Without this call, the Sketch will not exit and the output file will be empty. If you would like to draw 3D objects to a PDF or SVG file, use the ``P3D`` renderer with a call to :doc:`sketch_begin_raw`.

I added some extra information and also the restructuredtext that will create html links to exit_sketch() and begin_raw() in the documentation.

Feel free to make additional changes to that text as you see fit.

@hx2A
Copy link
Collaborator

hx2A commented Aug 24, 2022

I like that you included an example, that is helpful.

@hx2A hx2A merged commit 90a98fd into py5coding:main Aug 24, 2022
@hx2A
Copy link
Collaborator

hx2A commented Aug 24, 2022

Thanks for another helpful PR!

@villares villares deleted the patch-1 branch June 16, 2024 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants