Add cr.save(), cr.restore() calls
This commit is contained in:
parent
e403694e5e
commit
5410c1f9ff
1 changed files with 8 additions and 0 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue