Home | Trees | Indices | Help |
|
---|
|
1 # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Rickard Lindberg, Roger Lindberg 2 # 3 # This file is part of Timeline. 4 # 5 # Timeline is free software: you can redistribute it and/or modify 6 # it under the terms of the GNU General Public License as published by 7 # the Free Software Foundation, either version 3 of the License, or 8 # (at your option) any later version. 9 # 10 # Timeline is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU General Public License for more details. 14 # 15 # You should have received a copy of the GNU General Public License 16 # along with Timeline. If not, see <http://www.gnu.org/licenses/>. 17 18 19 import wx 20 21237925 self.drawer = drawer 26 self._erase_background(dc, bg_colour) 27 self._draw_eras(dc, scene, timeline) 28 self._draw_weekend_days(dc, drawer, scene, colorize_weekends, weekend_colour)29 3436 if colorize_weekends and scene.minor_strip_is_day(): 37 _, h = dc.GetSizeTuple() 38 for strip_period in scene.minor_strip_data: 39 if scene.is_weekend_day(strip_period.start_time): 40 self._draw_weekend_rect(strip_period, h, weekend_colour)4143 _, h = dc.GetSizeTuple() 44 for era in timeline.get_all_periods(): 45 if self.drawer.period_is_visible(era.get_time_period()): 46 self._draw_era(era, h)47 51 54 5860 x, width = self._get_timeperiod_measures(timeperiod) 61 self._draw_backgound_rect(x, h, max(1, width), colour, Offset)6264 self._set_color(self.drawer.dc, colour) 65 self.drawer.dc.DrawRectangle(x, Offset, width, h - 2 * Offset)6668 x, width = self._get_timeperiod_measures(era.get_time_period()) 69 wt, ht = self.drawer.dc.GetTextExtent(era.get_name()) 70 self.drawer.dc.DrawText(era.get_name(), x + width / 2 - wt / 2, h - ht)71 75
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Aug 19 01:55:20 2018 | http://epydoc.sourceforge.net |