LayMeshDocs
中文

Vector

vector.lay
# Editable paths, gradient paint, colored spans and fused instances.page = canvas(name="LayMesh vectors", size=(180 mm, 120 mm), background="#ffffff") heading = text(spans=[span("Lay", color="#087f8c"), span("Mesh", color="#1d2640"), span("  vectors", color="#5b6680")],               font_family="DejaVu Sans", font_size=20 pt)page.add(heading, target=page.top_left, offset=(10 mm, 7 mm)) warm = linear_gradient(start=(0, 0), end=(1, 1),                       stops=[(0, "#fff0ce"), (0.55, "#ff8a60"), (1, "#ad3462")])cool = radial_gradient(center=(0.35, 0.3), radius=0.8,                       stops=[(0, "#cbfff5"), (1, "#087f8c")]) wave = path(commands=[move_to(0 mm, 23 mm), cubic_to(14 mm, -5 mm, 31 mm, -5 mm, 45 mm, 23 mm),                      cubic_to(31 mm, 40 mm, 14 mm, 40 mm, 0 mm, 23 mm), close()],

Preview

Background
Vector
Original example
Total —
Details

Not run yet

Measured in this browser; excludes debounce.

Edits stay on this page
Dependencies
  • examples/vector.lay

Reproduce

sh
laymesh validate examples/vector.laylaymesh render examples/vector.lay -o figure.svglaymesh render examples/vector.lay -o figure.pdflaymesh render examples/vector.lay -o figure.png --dpi 300