Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RingOV committed May 29, 2019
1 parent 2dd9a26 commit 8701d40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 8 additions & 2 deletions gis-weather.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
#
# gis_weather.py
v = '0.8.2.84'
v = '0.8.2.85'
# Copyright (C) 2013-2018 Alexander Koltsov <ringov@mail.ru>
#
# This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -1505,7 +1505,13 @@ def draw_scaled_image_svg(self, cr, x, y, pix, w, h, ang = 0):
cr.translate(-w//2, -h//2)
else:
cr.translate(x, y)
cr.scale(w/svg.props.width, h/svg.props.height)
k=1
if svg.props.width>svg.props.height:
k=svg.props.width/svg.props.height
if k==1:
cr.scale(w/svg.props.width, h/svg.props.height)
else:
cr.scale(w/svg.props.width, h/svg.props.height/k)
svg.render_cairo(cr)
cr.restore()

Expand Down
1 change: 0 additions & 1 deletion services/gismeteo.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ def get_weather():
sunrise = dt1.strftime('%H:%M')
sunset = dt2.strftime('%H:%M')
sun_duration = ':'.join(str(dt3).split(':')[:2])
print(sunrise, sunset, sun_duration)

# temperature
t_now = re.findall('<fact.*? t="(.*?)"',source)
Expand Down

0 comments on commit 8701d40

Please sign in to comment.