Module default
source code
|
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
|
|
|
|
|
|
|
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,
Drawer,
TimelineScene,
ICONS_DIR,
sort_categories,
TimePeriod,
EXTENDED_CONTAINER_HEIGHT,
Font,
font,
LegendDrawer,
BRUSHSTYLE_TRANSPARENT
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.
|