Experimental communication tools (televex screen + televex print)
https://televex.vvvvvvaria.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
848 B
32 lines
848 B
4 years ago
|
#!/usr/bin/env python3
|
||
|
|
||
|
"""
|
||
|
Same as image_sentence.py, but rotates the result.
|
||
|
Uses an image to define where to put chars.
|
||
|
In this case with the sentence/word ASCII
|
||
|
"""
|
||
|
|
||
|
from asciiWriter.patterns import image
|
||
|
from asciiWriter.utils import make_lines, visit, print_lines, rotate
|
||
|
from asciiWriter.marks import sentence, single
|
||
|
|
||
|
width = 75
|
||
|
height = 75
|
||
|
|
||
|
# Where to find the image
|
||
|
image_path = 'images/blobs-small.png'
|
||
|
# Construct the pattern
|
||
|
image_pattern = image(image_path)
|
||
|
# Set the marker, in this case a sentence
|
||
|
mark = sentence('ASCII ')
|
||
|
# Define what to use on a blank space, as a variation you coul use: single('*')
|
||
|
blank = single(' ')
|
||
|
|
||
|
# Make a canvas
|
||
|
lines = make_lines(width, height)
|
||
|
# Draw the picture
|
||
|
result = visit(lines, image_pattern, mark, blank)
|
||
|
# Rotate the canvas
|
||
|
result = rotate(result)
|
||
|
# Print the result
|
||
|
print_lines(result)
|