#709 closed bug (fixed)
B_OP_ADD drawing mode not working in SoundRecorder
Reported by: | korli | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | - General | Version: | |
Keywords: | Cc: | diver | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
I noticed that B_OP_ADD isn't implemented when using SoundRecorder.
But it seems B_OP_ERASE, B_OP_INVERT, B_OP_SELECT, B_OP_MIN, B_OP_MAX, B_OP_SUBSTRACT, B_OP_BLEND aren't implemented too.
Change History (12)
comment:1 by , 18 years ago
Cc: | added |
---|
comment:2 by , 18 years ago
Cc: | added |
---|
comment:3 by , 18 years ago
comment:4 by , 18 years ago
Status: | new → assigned |
---|
comment:5 by , 18 years ago
OK, I didn't have a look at Playground to test. So forget my remark about other modes than B_OP_ADD.
In SoundRecorder, there is a B_OP_ADD set and StrokeLine done in ScopeView::RenderBitmap(). I can see something drawn when I replace with B_OP_OVER. http://svn.berlios.de/viewcvs/haiku/haiku/trunk/src/apps/soundrecorder/ ScopeView.cpp?rev=17718&view=markup
comment:6 by , 18 years ago
Summary: | drawing modes not implemented → B_OP_ADD drawing mode not working in SoundRecorder |
---|
comment:7 by , 18 years ago
Stephan, I could be wrong but I think the way the add is done will result in an overflow of the uint8 data type
uint8 rt = min_c(255, _p.data8[2] + (r));
=> if _p.data8[2] and r are uint8, and values are 130, 130, the value of rt will be : 5 instead of 255. Thus it should IMO be (optimizations could be done): uint8 rt = min_c(255, (uint16)_p.data8[2] + (uint16)(r));
comment:9 by , 18 years ago
I committed a fix in revision 18050. Not very good IMO. Stephan, it would be cool if you could review this. Thanks.
comment:10 by , 18 years ago
Resolution: | → fixed |
---|
comment:11 by , 18 years ago
Status: | assigned → closed |
---|
comment:12 by , 18 years ago
Fixed by stippi. Thanks. Though there is a big performance hit compared with Dano (at least x5). Maybe we should make an optimized StrokeLine for 1 pixel. Also, is it valid to draw a square (0,0,1,1) to actually draw a single point ?
Could you please point to the code in SoundRecorder that does not work? As you can see in Playground, all drawing modes work fine there.