Set clipping region to snip isotherms
This commit is contained in:
parent
2fbf648ce6
commit
60158d6f55
1 changed files with 4 additions and 1 deletions
|
@ -68,7 +68,7 @@ class SkewT():
|
|||
return self.skew_t_to_graph(x, y)
|
||||
|
||||
def draw_isotherms(self, cr: cairo.Context, x: float, y: float):
|
||||
cr.set_source_rgb(0.99, 0.99, 0.99)
|
||||
cr.set_source_rgb(0.95, 0.95, 0.95)
|
||||
|
||||
for temp in range(-150, TEMP_MAX+1, TEMP_STEP):
|
||||
x1, y1 = self.graph_to_screen(*self.sample_to_graph(temp, PRESSURE_MAX))
|
||||
|
@ -115,6 +115,9 @@ class SkewT():
|
|||
x: float,
|
||||
y: float,
|
||||
samples: Iterable[SoundingSample]):
|
||||
cr.rectangle(x, y, self.width, self.height)
|
||||
cr.clip()
|
||||
|
||||
self.draw_isotherms(cr, x, y)
|
||||
self.draw_isobars(cr, x, y)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue