Only move across frames if shift greater than 1
This commit is contained in:
parent
0643bcc333
commit
bc592291bb
|
@ -70,8 +70,10 @@ class positionTag implements ASSPositioningTag {
|
|||
$frame = $line->end - $line->start;
|
||||
$hasMoved = $this->start < $frame;
|
||||
|
||||
$shift = $this->end - $this->start;
|
||||
|
||||
if($hasMoved){
|
||||
return "\\move(" . $this->from->x ."," . $this->from->y ."," . $this->to->x ."," . $this->to->y .",".ceil(($this->start - 1) * $frameDurationMs).",".floor($this->end * $frameDurationMs).")";
|
||||
return "\\move(" . $this->from->x ."," . $this->from->y ."," . $this->to->x ."," . $this->to->y .",".ceil(($shift > 1 ? ($this->start - 1) : $this->end) * $frameDurationMs).",".floor($this->end * $frameDurationMs).")";
|
||||
}
|
||||
return "\\pos(".$this->from->x ."," . $this->from->y.")";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue