module timelinelib.canvas.drawing.drawers.default¶
-
timelinelib.canvas.drawing.drawers.default.
OUTER_PADDING
= 5¶
-
timelinelib.canvas.drawing.drawers.default.
INNER_PADDING
= 3¶
-
timelinelib.canvas.drawing.drawers.default.
PERIOD_THRESHOLD
= 20¶
-
timelinelib.canvas.drawing.drawers.default.
BALLOON_RADIUS
= 12¶
-
timelinelib.canvas.drawing.drawers.default.
ARROW_OFFSET
= 37¶
-
timelinelib.canvas.drawing.drawers.default.
DATA_INDICATOR_SIZE
= 10¶
-
timelinelib.canvas.drawing.drawers.default.
CONTRAST_RATIO_THREASHOLD
= 2250¶
-
timelinelib.canvas.drawing.drawers.default.
WHITE
= (255, 255, 255)¶
-
timelinelib.canvas.drawing.drawers.default.
BLACK
= (0, 0, 0)¶
-
class
timelinelib.canvas.drawing.drawers.default.
DefaultDrawingAlgorithm
[source]¶ Bases:
timelinelib.canvas.drawing.interface.Drawer
-
event_is_period
(time_period)[source]¶ Return True if the event time_period will make the event appear below the center line, as a period event.
-
draw
(dc, timeline, view_properties, appearance, fast_draw=False)[source]¶ Draw a representation of a timeline.
The dc is used to do the actual drawing. The timeline is used to get the events to visualize. The view properties contains information like which events are selected in the view we are drawing for and what period is currently displayed.
When the dc is temporarily stored in a class variable such as self.dc, this class variable must be deleted before the draw method ends.
-
snap_selection
(period_selection)[source]¶ Return a tuple where the selection has been stretched to fit to minor strip.
period_selection: (start, end) Return: (new_start, new_end)
-
event_at
(x, y, alt_down=False)[source]¶ Return the event at pixel coordinate (x, y) or None if no event there.
-
event_with_rect_at
(x, y, view_properties=None)[source]¶ Return the event at pixel coordinate (x, y) and its rect in a tuple (event, rect) or None if no event there.
-