From 128ad8f8e870f1aa0aa1afffe8f857e1e3c9ae62 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Tue, 4 Aug 2015 00:04:30 +0300 Subject: [PATCH] Black and white icon border; options. --- mapper.py | 54 ++++++++++++++++++++++++++++-------------------------- tags.yml | 2 ++ ui.py | 30 ++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 26 deletions(-) diff --git a/mapper.py b/mapper.py index 80b8ba4..d7a0ef2 100644 --- a/mapper.py +++ b/mapper.py @@ -78,7 +78,7 @@ def get_d_from_file(file_name): else: # print 'No such icon: ' + file_name # TODO: add to missed icons - return 'M 4,4 L 4,10 10,10 10,4 4,4', 0, 0 + return 'M 4,4 L 4,10 10,10 10,4 z', 0, 0 # Old style. @@ -152,7 +152,8 @@ def draw_point_outline(shape, x, y, fill, size=16, xx=0, yy=0): r = int(fill[0:2], 16) g = int(fill[2:4], 16) b = int(fill[4:6], 16) - if r + g > 430 or g + b > 500 or r + b > 400: + Y = 0.2126 * r + 0.7152 * g + 0.0722 * b + if Y > 200: outline_fill = '000000' opacity = 0.3 output_file.write('