forked from youen/assembly_handbook
fixed bug related to clipping in fast render mode
This commit is contained in:
parent
c06af9db24
commit
a7201934be
@ -509,13 +509,14 @@ class RasterView:
|
||||
])
|
||||
|
||||
# set clip color
|
||||
clip_color = (0.5, 0.5, 0.5)
|
||||
colorized_clip_img = Image.merge("RGB", [
|
||||
clip_img.point(lambda p: int(clip_color[0] * (255.0 - p))),
|
||||
clip_img.point(lambda p: int(clip_color[1] * (255.0 - p))),
|
||||
clip_img.point(lambda p: int(clip_color[2] * (255.0 - p)))
|
||||
])
|
||||
result.paste(colorized_clip_img, clip_img.point(lambda p: 255 - p))
|
||||
if not fast_render:
|
||||
clip_color = (0.5, 0.5, 0.5)
|
||||
colorized_clip_img = Image.merge("RGB", [
|
||||
clip_img.point(lambda p: int(clip_color[0] * (255.0 - p))),
|
||||
clip_img.point(lambda p: int(clip_color[1] * (255.0 - p))),
|
||||
clip_img.point(lambda p: int(clip_color[2] * (255.0 - p)))
|
||||
])
|
||||
result.paste(colorized_clip_img, clip_img.point(lambda p: 255 - p))
|
||||
|
||||
# crop 1px borders
|
||||
result = result.crop((1, 1, result.size[0] - 1, result.size[1] - 1))
|
||||
|
Loading…
Reference in New Issue
Block a user