def fetch(entries, root): for entry in entries: field = entry[0] text = entry[1].get() if text == '': prop.get_height_map()[field] = 0 else: prop.get_height_map()[field] = int(text) root.destroy()
def get_gray_value_from_color(pixel, distinct_colors): gray_value = 0 matching_color = color_extractor.get_matching_color(pixel, distinct_colors) if matching_color is not None: gray_value = prop.get_height_map()[matching_color] * 0.1 return gray_value