View Single Post
Old 12-22-2018, 09:26 AM   #5
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,571
Default

My take on it
Code:
// JT: Essential filled rectangle
// makes a rectangle of any color

//@param1:wet 'opacity' 1.0 0 1 0.5 0.01 
//@param2:R 'Red' 0.5 0 1 0.5 0.01
//@param3:G 'Green' 0.5 0 1 0.5 0.01
//@param4:B 'Blue' 0.5 0 1 0.5 0.01

//@param6:w1 'Width' 50 2 1920 50 2
//@param7:h1 'Height' 50 2 1080 50 2

//@param9:P1 'X position' 50 0 100 50 1
//@param10:P2 'Y position2' 50 0 100 50 1
src=0;
PW=Project_w/100;
PH=Project_h/100;

gfx_blit(0);
gfx_mode=1;
gfx_set(R,G,B,wet);

//line
gfx_gradrect((PW*P1-(w1/2)),(PH*P2-(h1/2)),w1,h1,R,G,B,wet);
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog

Last edited by EpicSounds; 12-22-2018 at 09:37 AM. Reason: better center aligned preset
EpicSounds is offline   Reply With Quote