Remove directions legends from hodograph
This commit is contained in:
parent
b2cbb3fccd
commit
712f96191c
1 changed files with 0 additions and 24 deletions
|
@ -66,29 +66,6 @@ class Hodograph():
|
||||||
|
|
||||||
cr.restore()
|
cr.restore()
|
||||||
|
|
||||||
def draw_direction_legends(self, cr: cairo.Context, x, y):
|
|
||||||
cr.save()
|
|
||||||
|
|
||||||
cr.select_font_face('Sans',
|
|
||||||
cairo.FONT_SLANT_NORMAL,
|
|
||||||
cairo.FONT_WEIGHT_BOLD)
|
|
||||||
|
|
||||||
cr.set_font_size(16)
|
|
||||||
|
|
||||||
for angle in range(0, 360, WIND_DIR_STEP):
|
|
||||||
text = "%d°" % angle
|
|
||||||
extents = cr.text_extents(text)
|
|
||||||
r = self.radius + ((extents.width + extents.height) / 2)
|
|
||||||
|
|
||||||
sx = 0.1 * self.width + r * math.cos(radians(angle))
|
|
||||||
sy = 0.9 * self.height + r * math.sin(radians(angle))
|
|
||||||
|
|
||||||
cr.move_to(x + sx - extents.width / 2, y + sy + extents.height / 2)
|
|
||||||
cr.show_text(text)
|
|
||||||
cr.stroke()
|
|
||||||
|
|
||||||
cr.restore()
|
|
||||||
|
|
||||||
def draw_speed_legends(self, cr: cairo.Context, x, y):
|
def draw_speed_legends(self, cr: cairo.Context, x, y):
|
||||||
cr.save()
|
cr.save()
|
||||||
|
|
||||||
|
@ -219,7 +196,6 @@ class Hodograph():
|
||||||
self.draw_sounding(cr, x, y, sounding)
|
self.draw_sounding(cr, x, y, sounding)
|
||||||
|
|
||||||
self.draw_speed_legends(cr, x, y)
|
self.draw_speed_legends(cr, x, y)
|
||||||
self.draw_direction_legends(cr, x, y)
|
|
||||||
self.draw_height_legends(cr, x, y)
|
self.draw_height_legends(cr, x, y)
|
||||||
|
|
||||||
cr.reset_clip()
|
cr.reset_clip()
|
||||||
|
|
Loading…
Add table
Reference in a new issue