From 5410c1f9ff1789b4afb43eb6785ccdcca983582c Mon Sep 17 00:00:00 2001 From: XANTRONIX Industrial Date: Wed, 26 Mar 2025 11:33:33 -0400 Subject: [PATCH] Add cr.save(), cr.restore() calls --- lib/xmet/spc.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/xmet/spc.py b/lib/xmet/spc.py index 14ff4c6..3fe8ab7 100644 --- a/lib/xmet/spc.py +++ b/lib/xmet/spc.py @@ -518,6 +518,8 @@ class SPCOutlookMap(EquirectMap): super().__init__(*MAP_SCREEN_DIMENSIONS, MAP_BOUNDS) def draw_logo(self, cr: cairo.Context, path: str): + cr.save() + width = self.LOGO_WIDTH height = self.LOGO_HEIGHT margin = self.LOGO_MARGIN @@ -527,7 +529,11 @@ class SPCOutlookMap(EquirectMap): self.draw_from_file(cr, path, x, y, width, height) + cr.restore() + def draw_annotation(self, cr: cairo.Context, text: str): + cr.save() + cr.select_font_face('Muli') cr.set_font_size(28) @@ -538,6 +544,8 @@ class SPCOutlookMap(EquirectMap): cr.show_text(text) + cr.restore() + def draw_categories(self, cr: cairo.Context, outlook: SPCOutlook): cr.save()