Some source code for Alejandro Piad Morffis (because Substack is pathetic when it comes to comments on posts compared to comments on Notes, I mean, WTF Substack):
import tesserax as tess
import tesserax.layout as lay
def main ():
filename = r'C:\Demo\HCC\Python'
# Initialize canvas...
with tess.Canvas() as canvas:
# One big Column of rows...
with lay.Column(gap=0):
# Top Margin...
tess.Rect(size, 30, fill=None, stroke=None)
# Rows...
for row in range(rows):
with lay.Row(gap=0):
# Left Margin...
tess.Rect(50, size, fill=None, stroke=None)
# Columns...
for col in range(cols):
color = '#dfdfdf' if (row+col) % 2 else '#ff7f7f'
tess.Square(size, fill=color, stroke='black')
# Fit the viewport to the shapes and render
canvas.fit(padding=pad)
canvas.save(filename)
if __name__ == '__main__':
print()
main()
print()
Generates errors when run.
Feb 13
at
3:54 PM
Log in or sign up
Join the most interesting and insightful discussions.