View Single Post
Old 03-18-2024, 03:45 AM  
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,912
Default




Code:
-- Ultra Basic GFX
-- For quick testing purposes

window_w = 640
window_h = 270

function init(window_w, window_h, window_x, window_y, docked)
  gfx.init("GFX" , window_w, window_h, docked, window_x, window_y)  -- name,w,h,dockstate,xpos,ypos
end

-- DRAW IN GFX WINDOW
function run()
  char = gfx.getchar()
  
  gfx.roundrect(gfx.w / 4, gfx.h / 4, gfx.w / 2, gfx.h / 2, 10, true)
  
  gfx.update()
  if char ~= 27 or char < 0 then reaper.defer(run) else gfx.quit() end

end -- END DEFER

init(window_w, window_h)
run()
It seems the values need rounding before input





Code:
gfx.roundrect( math.floor(gfx.w / 4), math.floor(gfx.h / 4), math.floor(gfx.w / 2), math.floor(gfx.h / 2), 10, true)

But this doesnt solve the fill request.
X-Raym is offline   Reply With Quote