Package Gnumed :: Package timelinelib :: Package canvas :: Package drawing :: Package drawers :: Module default
[frames] | no frames]

Module default

source code

Classes
  DefaultDrawingAlgorithm
Functions
 
break_text(text, dc, max_width_in_px)
Break the text into lines so that they fits within the given width.
source code
 
break_sentence(dc, lines, sentence, max_width_in_px)
Break a sentence into lines.
source code
 
break_line(dc, sentence, max_word_len_in_ch)
Break a sentence into words.
source code
 
break_word(dc, word, max_word_len_in_ch)
Break words if they are too long.
source code
 
get_max_word_length(dc, max_width_in_px) source code
Variables
  OUTER_PADDING = 5
  INNER_PADDING = 3
  PERIOD_THRESHOLD = 20
  BALLOON_RADIUS = 12
  ARROW_OFFSET = BALLOON_RADIUS+ 25
  DATA_INDICATOR_SIZE = 10
  CONTRAST_RATIO_THREASHOLD = 2250
  WHITE = 255, 255, 255
  BLACK = 0, 0, 0

Imports: math, os, wx, sort_categories, TimePeriod, DividerLine, LegendDrawer, MinorStripDrawer, NowLine, Drawer, TimelineScene, ICONS_DIR, EXTENDED_CONTAINER_HEIGHT, unique_based_on_eq, Font, BRUSHSTYLE_TRANSPARENT, font


Function Details

break_word(dc, word, max_word_len_in_ch)

source code 

Break words if they are too long.

If a single word is too long to fit we have to break it. If not we just return the word given.