fix: timeline progress smoothness and blurring (#145)
* Don't clip incomplete pixels on background * Render background in parts instead of clipping for foreground
This commit is contained in:

committed by
GitHub

parent
65b82f8be9
commit
f0a4b34635
@@ -1485,15 +1485,17 @@ function render_timeline(this)
|
||||
local time_x = bax + time_padding
|
||||
local time_width = this.width - time_padding * 2
|
||||
local foreground_size = fby - fay
|
||||
local foreground_coordinates = fax .. ',' .. fay .. ',' .. fbx .. ',' .. fby -- for clipping
|
||||
local foreground_coordinates = round(fax) .. ',' .. fay .. ',' .. round(fbx) .. ',' .. fby -- for clipping
|
||||
|
||||
-- Background
|
||||
ass:new_event()
|
||||
ass:pos(0, 0)
|
||||
ass:append('{\\blur0\\bord0\\1c&H' .. options.color_background .. '\\iclip(' .. foreground_coordinates .. ')}')
|
||||
ass:append('{\\blur0\\bord0\\1c&H' .. options.color_background .. '}')
|
||||
ass:opacity(math.max(options.timeline_opacity - 0.1, 0))
|
||||
ass:draw_start()
|
||||
ass:rect_cw(bax, bay, bbx, bby)
|
||||
ass:rect_cw(bax, bay, fax, bby) --left of progress
|
||||
ass:rect_cw(fbx, bay, bbx, bby) --right of progress
|
||||
ass:rect_cw(fax, bay, fbx, fay) --above progress
|
||||
ass:draw_stop()
|
||||
|
||||
-- Progress
|
||||
|
Reference in New Issue
Block a user