Skip to main content

HAND-Drawn module for pycairo

Project description

HANDD

HAND-Drawn like Context extension for pycairo

Installation

pip3 install handd

Dependancy:

  • pycairo

The new Context methods

classmethod

  • HDD.is_in(x, y, close_path)

methods on tuple lists

  • hdd.lpolygon_hdd(xy) (returns (p, bb) path and bounding box)
  • hdd.lround_point_hdd(xy)
  • hdd.lpoint_hdd(xy)
  • hdd.lline_hdd(xy)

basic figures methods

  • hdd.rectangle_hdd(x, y, w, h) (returns (p, bb) path and bounding box)
  • hdd.regular_polygon_hdd(x, y, radius, n_sides, angle_radian=0) (returns (p, bb) path and bounding box)
  • hdd.disc_hdd(x, y, radius, a_debut, a_fin=None) (returns (p, bb) path and bounding box)
  • hdd.sector_hdd(x, y, radius, a_debut, a_fin, dev=3) (returns (p, bb) path and bounding box)
  • hdd.real_circle_hdd(self, xc, yc, r, step=.005) (returns (p, bb) path and bounding box)
  • hdd.circle_hdd(x, y, radius, dev=3, step=.01) (returns (p, bb) path and bounding box)

various methods

  • hdd.hatch_hdd(closed_path, bbox, nb=10, angle=math.pi / 4, condition=lambda x, y: True)
  • hdd.dot_hdd(closed_path, bbox, sep=5)
  • hdd.axes_hdd(x, y, units=None)
  • hdd.function_hdd(function, xmin, xmax, nb=15)
  • hdd.data_hdd(file)

Images from examples (see tests section)

test1

test2

test4_svg

test5

test6

catriona57

figure from Catriona Shearer's book "geometry puzzle"

Copyright

2022 / D. COBAC / CC-BY-NC-SA

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

handd-0.1.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

handd-0.1-py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 3

Supported by

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