Quote:
Originally Posted by o_e
Hi, it returns a ReaScript console output:
|
Thanks! These tests point to a probable malfunction of the JS_Composite function. Could you try this code and tell me if this fills the arrange view? :
(using a different/theoretically not optimal drawing method)
Code:
local trackview = reaper.JS_Window_FindChildByID( reaper.GetMainHwnd(), 1000)
local _, w, h = reaper.JS_Window_GetClientSize( trackview )
local floor = math.floor
local start = reaper.time_precise()
local more = math.floor(w/150)
local pen = reaper.JS_GDI_CreatePen( more, 16777215 )
w = -more
function draw()
w = w + more
local hdc = reaper.JS_GDI_GetClientDC( trackview )
reaper.JS_GDI_SelectObject( hdc, pen )
reaper.JS_GDI_Line( hdc, w, 0, w, h )
reaper.JS_GDI_ReleaseDC( trackview, hdc )
if reaper.time_precise()-start <=5 then
reaper.defer(draw)
else
reaper.UpdateArrange()
reaper.JS_GDI_DeleteObject( pen )
reaper.ShowConsoleMsg("script end\n\n")
return reaper.defer(function() end)
end
end
draw()