FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 1280 : Semitransparent rect drawn over image not rendered correctly
Last modified: 2010-06-05 03:14
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
ASSIGNED
Resolution:
-
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
andres.wanner
Assigned To:
fry
Attachment
Type
Created
Size
Actions
zip file with a patch, including data folder
application/zip
2009-08-13 16:54
21.03 KB
Description
: Opened: 2009-06-16 10:50
// Revision 1.0.1
// Mac OS 10.4 / 10.5
// When a semitransparent rect should be drawn (once) over an image
// the rect is instead re-drawn everytime void draw is executed.
// This leads to a fading effect, when instead the rect is not supposed not
change.
PImage img;
boolean firsttime=true;
void setup()
{
size(200,200);
img = loadImage("milan_rubbish.jpg");
background(255);
fill(0,128);
}
void draw()
{
if (firsttime) {
//draw left image once, overlay a semitransparent rect
copy(img,10,50,80,80, 10,50,80,80);
rect(10,50,80,80);
firsttime=false;
} else {
//draw right image repeatedly, overlay a semitransparent rect
copy(img,110,50,80,80, 110,50,80,80);
rect(110,50,80,80);
}
}
Additional Comment
#1 From fry 2009-06-16 10:54
please use tools > archive sketch to create a zip file and attach the
sketch here.
Additional Comment
#2 From fry 2009-06-16 10:54
please also update to 1.0.5 to make sure that it's not something that's
been fixed in the meantime.
Additional Comment
#3 From andres.wanner 2009-06-16 11:03
// also for Revision 1.0.5
// sorry ;)
Additional Comment
#4 From fry 2009-08-13 14:57
I still need the sketch to fix this.
Additional Comment
#5 From andres.wanner 2009-08-13 16:54
edit
]
zip file with a patch, including data folder
there you go.
its the same code as posted in the bug description.
Thanks for your concern!
Andres
This bug is now being tracked
here
.