FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add SVG export examples for various scenarios by hxrshxz · Pull Request #1291 · processing/processing4 · GitHub

Add SVG export examples for various scenarios - #1291

Open
hxrshxz wants to merge 2 commits into
processing:mainfrom
hxrshxz:svg-examples
Open

Add SVG export examples for various scenarios#1291
hxrshxz wants to merge 2 commits into
processing:mainfrom
hxrshxz:svg-examples

Conversation

hxrshxz commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

Description

Added 5 complete examples for the Processing SVG library based on the official reference documentation. These examples were previously listed on the Processing website but not bundled with the library.

Changes

Created examples directory with 5 working examples:

  1. NoScreenDisplay - Export SVG without opening a display window
  2. WithScreenDisplay - Export SVG while displaying on screen using beginRecord()
  3. SingleFrameFromAnimation - Capture a single frame from an animated sketch
  4. ThreeDGeometry - Export 3D geometry as flattened SVG using beginRaw()
  5. UsingCreateGraphics - Programmatically create SVG files using createGraphics()

Closes

Fixes #1290

Copilot AI review requested due to automatic review settings October 16, 2025 11:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull Request Overview

This PR adds example code files for the Processing SVG library, demonstrating five different approaches to exporting SVG graphics from Processing sketches.

Key Changes:

  • Created examples directory with 5 complete, working SVG export examples
  • Each example demonstrates a distinct use case: no display, with display, single frame capture, 3D geometry export, and programmatic creation
  • Examples are based on official Processing reference documentation

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
NoScreenDisplay/NoScreenDisplay.pde Demonstrates SVG export without opening a display window
WithScreenDisplay/WithScreenDisplay.pde Shows how to export SVG while displaying on screen using beginRecord()
SingleFrameFromAnimation/SingleFrameFromAnimation.pde Captures a single frame from an animated sketch
ThreeDGeometry/ThreeDGeometry.pde Exports 3D geometry as flattened SVG using beginRaw()
UsingCreateGraphics/UsingCreateGraphics.pde Creates SVG files programmatically using createGraphics()

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull Request Overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Stefterv requested a review from SableRaf October 21, 2025 08:11

Copy link
Copy Markdown
Member

Hi @SableRaf could you check if these examples are solid enough to explain how to use the SVG library?

catilac commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator

Hi @SableRaf could you check if these examples are solid enough to explain how to use the SVG library?

ping @SableRaf :)

SableRaf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good overall. I requested small changes.

/**
* Single Frame from an Animation (With Screen Display)
*
* It's also possible to save one frame from a program with

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

"It's also possible to..." made sense in the context of the tutorial but it is confusing in an example that needs to stand on its own.

@@ -0,0 +1,17 @@
/**
* Using createGraphics() to Create an SVG File

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It would be helpful to mention that this code won't display anything in the sketch window.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Create examples for the svg library

5 participants


Back | FazBrowse Home | New Git URL