You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.
New property on PreRenderedSub - renderedPosition. null by default. Updated at some time after sub is drawn. (When? Can't do it in next renderer clock tick because it might be paused. Separate rAF timer?)
Generate clip parameters using renderedPosition and persist on PreRenderedSub
Set visibility: hidden on the sub meanwhile.
Won't work for dialogues containing \t since those are not cached. Any workarounds?
If the sub is absolutely positioned (i.e. the dialogue contains \pos or \move) this is fine. Otherwise the sub may be rendered at different positions based on seeking behavior, and the previous calculated clip will persist. Maybe always calculate the sub position first, and only apply the cached clip if the cached position matches, else recalculate the clip? Or maybe it's not worth it.
<Kanmuri> So, a question about clipping. Is that not possible with the current renderer, or just hasn't been implemented yet?
<~Arnavion> Clipping can be done with CSS / SVG, but the values in the ASS are relative to the top-left of the viewport, whereas libjass doesn't know anything about where a subtitle <div> ends up on the web page
<~Arnavion> since it leaves layout to the browser
<~Arnavion> It *could* be done by rendering the sub without clipping, waiting a tick, recording its dimensions, then apply the clip, but that's hacky and the "tick" will be long enough to have the unclipped sub be visible
<Kanmuri> What about rendering the sub as transparent, clipping, then changing it to visible?
<~Arnavion> I can't think of any issues with that
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
visibility: hidden
on the sub meanwhile.The text was updated successfully, but these errors were encountered: