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 timelinelib.canvas.drawing.drawers.resources as resource 20 import timelinelib.wxgui.components.font as font 21 22248126 self._scene = drawer.scene 27 self._dc = drawer.dc 28 self._time_type = drawer.time_type 29 self._appearance = drawer.appearance 30 drawer.dc.SetPen(resource.get_pen('gray-dashed'))3133 self._draw_minor_strip_divider_line_at(end_time) 34 self._draw_minor_strip_label(label, start_time, end_time)35 3941 self._set_minor_strip_font(start_time) 42 x = self._calc_label_x_start_pos(label, start_time, end_time) 43 height = self._get_label_height(label) 44 {0: self._draw_at_top, 45 1: self._draw_at_divider, 46 2: self._draw_at_bottom}[self._appearance.get_time_scale_pos()](label, x, height)47 50 53 5658 width = self._get_label_width(label) 59 start_x = self._scene.x_pos_for_time(start_time) 60 end_x = self._scene.x_pos_for_time(end_time) 61 return (start_x + end_x - width) // 262 65 6870 if self._scene.minor_strip_is_day(): 71 bold = self._time_type.is_weekend_day(start_time) 72 italic = self._time_type.is_special_day(start_time) 73 font.set_minor_strip_text_font(self._appearance.get_minor_strip_font(), 74 self._dc, 75 force_bold=bold, 76 force_normal=not bold, 77 force_italic=italic, 78 force_upright=not italic) 79 else: 80 font.set_minor_strip_text_font(self._appearance.get_minor_strip_font(), self._dc)
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Jul 23 01:55:31 2020 | http://epydoc.sourceforge.net |