gfxblit(); function broken as of 4.75
|
06-29-2015 04:10 PM
|
|
Human being with feelings
|
|
gfxblit(); function broken as of 4.75
gfxblit(); function broken as of 4.75
the gfxblit() function is broken as of 4.76. The rotation is offset by srcx and srcy. In new versions, you have to add an offset of -srcx and -srcy for it to work properly.
in this code the left circle has the offset "fixed", the right does not.
if you are blitting an offscreen image, this is not a problem, as srcx and srcy are often 0.
Current REAPER versions:
REAPER 4.75:
Code:
desc:rotation test
slider1:0<0,360,1>rotation
@gfx
function simple_knob(x,y,radius,pr,pg,pb)
(
gfx_circle(x,y,radius,1); //gfx_set(pr,pg,pb);
gfx_r=pr; gfx_g=pg; gfx_b=pb;
gfx_circle(x+radius*.75,y,radius*.1,1); );
//gfx_set(.5,.5,.5,1);
x=y=100; r=45;
gfx_r=.5; gfx_g=.5; gfx_b=.5;
simple_knob(x,y,r,.9,.1,.1);
srcx=destx=x-r; srcy=desty=y-r; srcw=srch=destw=desth=r*2; rotxoffs=-srcx; rotyoffs=-srcy;
gfx_blit(-1, 1,rot= slider1*.0174532925, srcx, srcy, srcw, srch, destx, desty, destw, desth, rotxoffs, rotyoffs);
//gfx_set(.5,.5,.5,1);
x=300; y=100; r=45;
gfx_r=.5; gfx_g=.5; gfx_b=.5;
simple_knob(x,y,r,.9,.1,.1);
srcx=destx=x-r; srcy=desty=y-r; srcw=srch=destw=desth=r*2; rotxoffs=-srcx; rotyoffs=-srcy;
gfx_blit(-1, 1,rot= slider1*.0174532925, srcx, srcy, srcw, srch, destx, desty, destw, desth);
discussion:
http://forum.cockos.com/showthread.php?t=163478
|
|
Issue Details
|
Project
Deprecated REAPER issue tracker
Category Plugins
Status Unconfirmed
Priority 5 - Medium
Affected Version 4.76
Fixed Version (none)
Users able to reproduce bug
1
Users unable to reproduce bug
0
Assigned Users
(none)
Tags
(none)
|
|