Julian I have small issue that i cannot figure out how to fix so if you can please assist:
Image of the item is not shrinking/stretching it just reveal its content and disappears when its off the original.
Drawing code
Code:
for j = 1, #tbl.info[i].items do
local as_item = tbl.info[i].items[j]
local item_bm = item_ghosts[as_item].bm
local item_start, item_lenght = item_blit(as_item, tbl.time_start, tbl.time_end, pos)
reaper.JS_Composite(track_window,
math.ceil(item_start * zoom_lvl) - Arr_pixel, -- X
item_t - y_view_start + item_bar, -- Y
math.ceil(item_lenght * zoom_lvl), -- W
item_h, -- H
item_bm,
0, --x
0, --y
math.ceil((item_lenght * zoom_lvl)), --w
item_h) --h
end
grabbing code
Code:
for j = 1, #tbl.info[i].items do
local as_tr, as_item = tbl.info[i].track, tbl.info[i].items[j]
local item_t, item_h, item_b = TBH[as_tr].t, TBH[as_tr].h, TBH[as_tr].b
local item_bar = (item_h > 42) and 15 or 0
local item_start, item_lenght = item_blit(as_item, tbl.time_start, tbl.time_end)
local bm = reaper.JS_LICE_CreateBitmap(true, math.ceil(item_lenght * zoom_lvl), item_h)
local dc = reaper.JS_LICE_GetDC(bm)
reaper.JS_GDI_Blit(dc, 0, 0, track_window_dc, -- SOURCE - DESTINATION
math.floor(item_start * zoom_lvl) - Arr_pixel, -- X
((item_t + item_bar) - y_view_start), -- Y
math.ceil(item_lenght * zoom_lvl), -- W
item_h - 19) -- H (-19 TO COMPENSATE ITEM BAR REMOVING)
item_ghosts[as_item] = {bm = bm , dc = dc }
end