Skip to main content

Drawing utilities for generating geometric patterns and grids using Pillow and aggdraw

Project description

lambda-draw-tools

Drawing utilities for generating geometric patterns, grids, and wave-based line art using Pillow and aggdraw.

Install

pip install lambda-draw-tools

Quick start

Hexagon grid

from lambdawaker.draw.grid.hexagon_grid import create_hexagon_grid

img = create_hexagon_grid(
    width=600,
    height=600,
    hexagon_size=40,
    thickness=2,
    angle=0,
    color="#4B0082",
    bg_color=(255, 255, 255, 0),
)
img.show()

Angled parallel lines

from lambdawaker.draw.waves.parallel_lines import create_parallel_lines

img = create_parallel_lines(
    width=800,
    height=600,
    spacing=24,
    thickness=2,
    angle=35,
    color="midnightblue",
    bg_color=(255, 255, 255, 0),
)
img.show()

Project Structure

The project is organized into several packages under lambdawaker.draw, each serving a specific purpose:

  • lambdawaker.draw.grid: Contains functions to generate grid-based patterns.

    • shapes_grid.py: Creates grids of arbitrary shapes (circles, squares, etc.).
    • hexagon_grid.py: Generates hexagonal tiling grids.
    • traingles_grid.py: Generates equilateral triangle tiling grids.
    • concentric_polygins.py: Draws concentric polygons.
    • simple_shapes.py: Helper functions for drawing basic shapes like circles, squares, triangles, polygons, and stars.
  • lambdawaker.draw.waves: Provides tools for drawing wave-like patterns.

    • parallel_lines.py: Draws parallel lines at a specified angle.
    • parallel_sin.py: Draws parallel sine waves.
    • square_wave.py: Draws parallel square waves.
    • parallel_sawtooth.py: Draws parallel sawtooth waves.
  • lambdawaker.draw.header: Utilities for creating image headers with decorative bottom edges.

    • sin_header.py: Header with a sine-wave bottom edge.
    • curved_header.py: Header with a curved bottom edge.
    • square_header.py: Simple rectangular header.
  • lambdawaker.draw.color: Color manipulation and generation tools.

    • HSLuvColor.py: A class for handling colors in the HSLuv color space.
    • generate_color.py: Functions for generating random colors.
    • generate_from_color.py: Functions for generating color palettes (complementary, triadic, etc.) from a base color.
    • visualization.py: Tools for visualizing color palettes.
    • utils.py: Utility functions for color math and parsing.
  • lambdawaker.draw.shapes:

    • concentric.py: Contains rotating_polygons for drawing concentric rotating polygons.

Requirements

  • Python 3.8+
  • Pillow >= 9.0
  • aggdraw >= 1.3.16.post1

Notes

  • On some platforms, aggdraw may require build tools if a prebuilt wheel isn’t available.
  • The library exposes convenience creators like create_hexagon_grid and create_parallel_lines, as well as lower-level draw_* functions that render into an existing aggdraw.Draw context.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lambdawaker_draw_tools-0.1.2.tar.gz (46.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lambdawaker_draw_tools-0.1.2-py3-none-any.whl (52.1 kB view details)

Uploaded Python 3

File details

Details for the file lambdawaker_draw_tools-0.1.2.tar.gz.

File metadata

  • Download URL: lambdawaker_draw_tools-0.1.2.tar.gz
  • Upload date:
  • Size: 46.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for lambdawaker_draw_tools-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2621a37d4d6b7711ba153bb2afa440198b5dd6a3b7a7e5222a38b3ae8b7e9cf8
MD5 8133e7bae65bda975209a29f4afe27ef
BLAKE2b-256 9f3d3d4f2a0d87ed555eb1ce8a830c2f03bf55782a9e363c799b9eec64e73bfa

See more details on using hashes here.

File details

Details for the file lambdawaker_draw_tools-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for lambdawaker_draw_tools-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b8b82c75c543fa6d5637e06cc2cd235c95ec5ad94b3e56b9e22d77b6659df52a
MD5 0d64164c63c1c0f984f48433d15e1a29
BLAKE2b-256 644db4383d0ab9f5b5c8653dc72976868a2e5501c39f090e223934c731c10789

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page