Modify GetZoomFactor
This commit is contained in:
parent
1b3b33b493
commit
89037da921
1 changed files with 2 additions and 2 deletions
|
@ -216,8 +216,7 @@ CommentFormatMap = {None: None, 'Niconico': ReadCommentsNiconico, 'Acfun': ReadC
|
|||
|
||||
|
||||
def WriteCommentBilibiliPositioned(f, c, width, height, styleid):
|
||||
BiliPlayerSize = (672, 437)
|
||||
BiliPlayerAspect = 672/437
|
||||
BiliPlayerSize = (672, 438)
|
||||
|
||||
def GetZoomFactor(TargetSize):
|
||||
try:
|
||||
|
@ -227,6 +226,7 @@ def WriteCommentBilibiliPositioned(f, c, width, height, styleid):
|
|||
pass
|
||||
GetZoomFactor.Cached_TargetSize = TargetSize
|
||||
try:
|
||||
BiliPlayerAspect = BiliPlayerSize[0]/BiliPlayerSize[1]
|
||||
TargetAspect = TargetSize[0]/TargetSize[1]
|
||||
if TargetAspect < BiliPlayerAspect: # narrower
|
||||
ScaleFactor = TargetSize[0]/BiliPlayerSize[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue