`background()` in `setup()` does not persist
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 56/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- computer-graphics
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.
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
- Dominant language
- Rust
- Stars
- 69
- Forks
- 14
- Avg merge
- 15d 22h
- Merged PRs (30d)
- 3
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.
More from processing/libprocessing
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
processing/libprocessing#233 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
processing/libprocessing#229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
processing/libprocessing#201 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
processing/libprocessing#194 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
processing/libprocessing#146 · 1 comment ·
All issues in processing/libprocessing
Similar issues
-
todo:perf
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
ACP agents get no MCP servers when the thread is created before the project's first worktree loads Openstate:needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zed-industries/zed#64611 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ontola/atomic-server#1625 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
objectionary/phie#154 ·