Use Context.save(), Context.restore() stack
This commit is contained in:
parent
9e3c30f487
commit
a5879df512
1 changed files with 3 additions and 0 deletions
|
@ -104,6 +104,8 @@ class SkewTGraph():
|
||||||
y: float,
|
y: float,
|
||||||
samples: Iterable[SoundingSample],
|
samples: Iterable[SoundingSample],
|
||||||
fn: Callable):
|
fn: Callable):
|
||||||
|
cr.save()
|
||||||
|
|
||||||
first = True
|
first = True
|
||||||
|
|
||||||
for sample in samples:
|
for sample in samples:
|
||||||
|
@ -129,6 +131,7 @@ class SkewTGraph():
|
||||||
cr.line_to(x + sx, y + sy)
|
cr.line_to(x + sx, y + sy)
|
||||||
|
|
||||||
cr.stroke()
|
cr.stroke()
|
||||||
|
cr.restore()
|
||||||
|
|
||||||
def draw(self,
|
def draw(self,
|
||||||
cr: cairo.Context,
|
cr: cairo.Context,
|
||||||
|
|
Loading…
Add table
Reference in a new issue