Render speed legends both N and S
This commit is contained in:
parent
ea38bdaa50
commit
8f96849fc4
1 changed files with 6 additions and 5 deletions
|
@ -108,12 +108,13 @@ class Hodograph():
|
||||||
text = "%dkt" % speed
|
text = "%dkt" % speed
|
||||||
extents = cr.text_extents(text)
|
extents = cr.text_extents(text)
|
||||||
|
|
||||||
sx, sy = self.sample_to_screen(speed, 180)
|
for angle in (0, 180):
|
||||||
|
sx, sy = self.sample_to_screen(speed, angle)
|
||||||
|
|
||||||
cr.move_to(x + sx + extents.width * 0.25,
|
cr.move_to(x + sx + extents.width * 0.25,
|
||||||
y + sy - extents.height * 1.5)
|
y + sy - extents.height * 1.5)
|
||||||
cr.show_text(text)
|
cr.show_text(text)
|
||||||
cr.stroke()
|
cr.stroke()
|
||||||
|
|
||||||
cr.restore()
|
cr.restore()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue