diff --git a/lib/xmet/map.py b/lib/xmet/map.py index 952f7f6..166f423 100644 --- a/lib/xmet/map.py +++ b/lib/xmet/map.py @@ -78,7 +78,7 @@ class EquirectMap(): else: cr.line_to(x, y) - def draw_city(self, cr: cairo.Context, city: City, dark: bool=False): + def draw_city(self, cr: cairo.Context, city: City): cr.save() x, y = self.map_to_screen(city.location) @@ -96,11 +96,6 @@ class EquirectMap(): extents = cr.text_extents(city.name) - if dark: - cr.set_source_rgb(0.9, 0.9, 0.9) - else: - cr.set_source_rgb(0.1, 0.1, 0.1) - cr.arc(x, y, radius, 0, 2*math.pi) cr.fill() diff --git a/lib/xmet/spc.py b/lib/xmet/spc.py index f20ef8a..7191c94 100644 --- a/lib/xmet/spc.py +++ b/lib/xmet/spc.py @@ -925,4 +925,9 @@ class SPCOutlookMap(EquirectMap): if city is None: continue - self.draw_city(cr, city, self.dark) + if self.dark: + cr.set_source_rgb(0.9, 0.9, 0.9) + else: + cr.set_source_rgb(0.1, 0.1, 0.1) + + self.draw_city(cr, city)