Reformat code
This commit is contained in:
parent
65f37d05dc
commit
cab81e36ea
@ -191,7 +191,6 @@ def ReadCommentsSH5V (f, fontsize):
|
||||
c_color = str(comment['color'])
|
||||
c = str(comment['text'])
|
||||
size = fontsize
|
||||
#print(c_at,' ',round(float(c_at),2),' ',c)
|
||||
yield (float(c_at), int(c_date), i, c, {'0': 0, '1': 0, '4': 2, '5': 1}[c_type], int(c_color[1:], 16), size, (c.count('\n')+1)*size, CalculateLength(c)*size)
|
||||
i += 1
|
||||
except (AssertionError, AttributeError, IndexError, TypeError, ValueError):
|
||||
@ -226,7 +225,7 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
|
||||
|
||||
|
||||
def NeedWhiteBorder(rgb):
|
||||
h, l, s = colorsys.rgb_to_hls(((rgb>>16)&0xff)/255, ((rgb>>8)&0xff)/255, (rgb&0xff)/255)
|
||||
h, l, s = colorsys.rgb_to_hls(((rgb >> 16) & 0xff)/255.0, ((rgb >> 8) & 0xff)/255.0, (rgb & 0xff)/255.0)
|
||||
return (1/12 < h < 7/12 and l < 1/3) or l < 5/12
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user