handd


Namehandd JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/cobacdavid/handd
SummaryHAND-Drawn module for pycairo
upload_time2024-01-13 07:10:09
maintainer
docs_urlNone
authorDavid COBAC
requires_python>3.6
licenseCC-BY-NC-SA
keywords hand-drawn pycairo realistic drawing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # HANDD

HAND-Drawn like Context extension for [pycairo](https://pycairo.readthedocs.io/)

## Installation

`pip3 install handd`

_Dependancy:_

- `pycairo`


## The new Context methods

### classmethod

- `HDD.is_in(x, y, closed_path)`

### methods on tuple lists

- `hdd.lline_hdd(xy)` (return points list used to draw Bezier line)
- `hdd.lpolygon_hdd(xy)` (returns `(p, bb)` path and bounding box)
- `hdd.lround_point_hdd(xy)`
- `hdd.lpoint_hdd(xy, radius=5)`

### 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=0)` (returns `(p, bb)` path and bounding box)
- `hdd.disc_hdd(x, y, radius, a_start, a_end=None)` (returns `(p, bb)` path and bounding box)
- `hdd.sector_hdd(x, y, radius, a_start, a_end, dev=3)` (returns `(p, bb)` path and bounding box)
- `hdd.arc_hdd(x, y, radius, a_start, a_end, dev=3)` (returns `(p, bb)` path and bounding box)
- `hdd.real_circle_hdd(x, y, radius, 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(path, bbox, n=10, angle=math.pi / 4, condition=lambda x, y: True)`
- `hdd.dot_hdd(path, bbox, sep=5)`
- `hdd.axes_hdd(x, y, units=None)`
- `hdd.function_hdd(f, xmin, xmax, n=15)`
- `hdd.data_hdd(a_file)` (functionnality actually not tested)

## Images from examples (see tests section)

### test1
![](https://github.com/cobacdavid/handd/blob/master/tests/test1.png?raw=true)

### test2
![](https://github.com/cobacdavid/handd/blob/master/tests/test2.png?raw=true)

### test4_svg
![](https://raw.githubusercontent.com/cobacdavid/handd/1ca655088d3bc009c79651ca81ec72daa359f5eb/tests/test4_svg.svg)

### test5
![](https://github.com/cobacdavid/handd/blob/master/tests/test5.png?raw=true)

### test6
![](https://github.com/cobacdavid/handd/blob/master/tests/test6.png?raw=true)

### test7
![](https://github.com/cobacdavid/handd/blob/master/tests/test7.png?raw=true)

### test8
![](https://github.com/cobacdavid/handd/blob/master/tests/test8.png?raw=true)


### catriona17
![](https://github.com/cobacdavid/handd/blob/master/tests/catriona17.png?raw=true)

### catriona38
![](https://github.com/cobacdavid/handd/blob/master/tests/catriona38.png?raw=true)

### catriona57
![](https://github.com/cobacdavid/handd/blob/master/tests/catriona57.png?raw=true)

_Catriona figures from [Catriona Shearer](https://twitter.com/Cshearer41)'s book "geometry puzzle"_




## Copyright

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cobacdavid/handd",
    "name": "handd",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">3.6",
    "maintainer_email": "",
    "keywords": "hand-drawn,pycairo,realistic,drawing",
    "author": "David COBAC",
    "author_email": "david.cobac@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/fe/ca/e50340b9097843b72699484fa3cccdded2a2fd2454a89bd2504223d52d80/handd-0.1.3.tar.gz",
    "platform": null,
    "description": "# HANDD\n\nHAND-Drawn like Context extension for [pycairo](https://pycairo.readthedocs.io/)\n\n## Installation\n\n`pip3 install handd`\n\n_Dependancy:_\n\n- `pycairo`\n\n\n## The new Context methods\n\n### classmethod\n\n- `HDD.is_in(x, y, closed_path)`\n\n### methods on tuple lists\n\n- `hdd.lline_hdd(xy)` (return points list used to draw Bezier line)\n- `hdd.lpolygon_hdd(xy)` (returns `(p, bb)` path and bounding box)\n- `hdd.lround_point_hdd(xy)`\n- `hdd.lpoint_hdd(xy, radius=5)`\n\n### basic figures methods\n\n- `hdd.rectangle_hdd(x, y, w, h)` (returns `(p, bb)` path and bounding box)\n- `hdd.regular_polygon_hdd(x, y, radius, n_sides, angle=0)` (returns `(p, bb)` path and bounding box)\n- `hdd.disc_hdd(x, y, radius, a_start, a_end=None)` (returns `(p, bb)` path and bounding box)\n- `hdd.sector_hdd(x, y, radius, a_start, a_end, dev=3)` (returns `(p, bb)` path and bounding box)\n- `hdd.arc_hdd(x, y, radius, a_start, a_end, dev=3)` (returns `(p, bb)` path and bounding box)\n- `hdd.real_circle_hdd(x, y, radius, step=.005)` (returns `(p, bb)` path and bounding box)\n- `hdd.circle_hdd(x, y, radius, dev=3, step=.01)` (returns `(p, bb)` path and bounding box)\n\n### various methods\n\n- `hdd.hatch_hdd(path, bbox, n=10, angle=math.pi / 4, condition=lambda x, y: True)`\n- `hdd.dot_hdd(path, bbox, sep=5)`\n- `hdd.axes_hdd(x, y, units=None)`\n- `hdd.function_hdd(f, xmin, xmax, n=15)`\n- `hdd.data_hdd(a_file)` (functionnality actually not tested)\n\n## Images from examples (see tests section)\n\n### test1\n![](https://github.com/cobacdavid/handd/blob/master/tests/test1.png?raw=true)\n\n### test2\n![](https://github.com/cobacdavid/handd/blob/master/tests/test2.png?raw=true)\n\n### test4_svg\n![](https://raw.githubusercontent.com/cobacdavid/handd/1ca655088d3bc009c79651ca81ec72daa359f5eb/tests/test4_svg.svg)\n\n### test5\n![](https://github.com/cobacdavid/handd/blob/master/tests/test5.png?raw=true)\n\n### test6\n![](https://github.com/cobacdavid/handd/blob/master/tests/test6.png?raw=true)\n\n### test7\n![](https://github.com/cobacdavid/handd/blob/master/tests/test7.png?raw=true)\n\n### test8\n![](https://github.com/cobacdavid/handd/blob/master/tests/test8.png?raw=true)\n\n\n### catriona17\n![](https://github.com/cobacdavid/handd/blob/master/tests/catriona17.png?raw=true)\n\n### catriona38\n![](https://github.com/cobacdavid/handd/blob/master/tests/catriona38.png?raw=true)\n\n### catriona57\n![](https://github.com/cobacdavid/handd/blob/master/tests/catriona57.png?raw=true)\n\n_Catriona figures from [Catriona Shearer](https://twitter.com/Cshearer41)'s book \"geometry puzzle\"_\n\n\n\n\n## Copyright\n\n2022-2024 / D. COBAC / CC-BY-NC-SA\n",
    "bugtrack_url": null,
    "license": "CC-BY-NC-SA",
    "summary": "HAND-Drawn module for pycairo",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/cobacdavid/handd"
    },
    "split_keywords": [
        "hand-drawn",
        "pycairo",
        "realistic",
        "drawing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "05c75c319855cf1a8fff20bfd826d2e94b17ce0c112cf84074a5c15f45b97724",
                "md5": "6fb152e56145cbede1e405d39b377d4d",
                "sha256": "9aa699b55d0227448ee2c0425b0517c00dbe7607515ce6f1e4dacb2bf4de2c7e"
            },
            "downloads": -1,
            "filename": "handd-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6fb152e56145cbede1e405d39b377d4d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">3.6",
            "size": 8175,
            "upload_time": "2024-01-13T07:10:08",
            "upload_time_iso_8601": "2024-01-13T07:10:08.168345Z",
            "url": "https://files.pythonhosted.org/packages/05/c7/5c319855cf1a8fff20bfd826d2e94b17ce0c112cf84074a5c15f45b97724/handd-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fecae50340b9097843b72699484fa3cccdded2a2fd2454a89bd2504223d52d80",
                "md5": "8381159d16e55f703178ef1d992d2a3f",
                "sha256": "954b177bcc95465c057aab5c5760e990fde996ffd8ad8eb71676de2f5cfcdb77"
            },
            "downloads": -1,
            "filename": "handd-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "8381159d16e55f703178ef1d992d2a3f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">3.6",
            "size": 13953,
            "upload_time": "2024-01-13T07:10:09",
            "upload_time_iso_8601": "2024-01-13T07:10:09.716837Z",
            "url": "https://files.pythonhosted.org/packages/fe/ca/e50340b9097843b72699484fa3cccdded2a2fd2454a89bd2504223d52d80/handd-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-13 07:10:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cobacdavid",
    "github_project": "handd",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "handd"
}
        
Elapsed time: 0.44134s