processing / processing/libprocessing
`background()` in `setup()` does not persist
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 69
- Forks
- 14
- Avg merge
- 15d 22h
- Merged PRs (30d)
- 3
Description
In Processing (Java), calling background() inside setup() sets the initial canvas background, which remains visible unless explicitly changed in draw().
In libprocessing / mewnala, calling background() inside setup() appears to have no effect once draw() starts.
Example
from mewnala import *
def setup():
size(600, 600)
background(255)
def draw():
fill(255, 0, 0)
rect(100, 100, 200, 200)
run()
See screenshot below for output.
Expected behavior (Processing Java)
White background with a red rectangle drawn on top.
Actual behavior (libprocessing / mewnala)
Black background with a red rectangle, suggesting the background set in setup() is cleared or ignored when draw() runs.
Screenshot
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the setup(), draw(), and run() example from the report, then trace the render lifecycle between setup() and draw(). Confirm that the completed behavior keeps the white background from setup() visible beneath the red rectangle, matching Processing Java.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 56/100