Browse Source

edited the single_column_wavy.py script

master
manetta 3 years ago
parent
commit
a5c8c83094
  1. 13
      asciiWriter/examples/single_column_wavy.py

13
asciiWriter/examples/single_column_wavy.py

@ -8,13 +8,11 @@ from os.path import join, dirname
# Define width and height of the output
width = 100
height = 500
height = 370
# Import a text
text = open(join(dirname(__file__), 'data', 'language.txt')).read()
# Import a hyphenator
# Make an empty layers list
layers = []
@ -39,15 +37,10 @@ try:
except ImportError:
lines, remaining = make_column(text, height=height, line_width=sin_width, line_offset=cos_width)
# Transform the text into multiple columns
# lines, remaining = make_multi_column(text, height=height-3, use_hyphenator=h_en)
# Move the text slightly
lines = translate(lines, x=15, y=1)
# Create an background
background = make_lines(width, height, ' ')
# Add all your layers to the layers list
layers.append(background)
# Add the lines to the layers
layers.append(lines)
# Merge the layers into one layer again

Loading…
Cancel
Save