{"id":46176149,"url":"https://github.com/nico-robert/pix","last_synced_at":"2026-03-02T18:01:24.458Z","repository":{"id":242559177,"uuid":"809890632","full_name":"nico-robert/pix","owner":"nico-robert","description":"Tcl/Tk wrapper around Pixie, a full-featured 2D graphics library written in Nim.","archived":false,"fork":false,"pushed_at":"2026-03-02T16:01:22.000Z","size":9791,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-02T16:09:52.402Z","etag":null,"topics":["2d-graphics","nim","tcl-tk"],"latest_commit_sha":null,"homepage":"https://nico-robert.github.io/pix/","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nico-robert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.txt","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-03T16:40:00.000Z","updated_at":"2026-03-02T16:03:19.000Z","dependencies_parsed_at":"2024-06-03T19:37:13.844Z","dependency_job_id":"7b3a6690-bd00-4674-8f96-984270cacc85","html_url":"https://github.com/nico-robert/pix","commit_stats":null,"previous_names":["nico-robert/pix"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/nico-robert/pix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nico-robert%2Fpix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nico-robert%2Fpix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nico-robert%2Fpix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nico-robert%2Fpix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nico-robert","download_url":"https://codeload.github.com/nico-robert/pix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nico-robert%2Fpix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30013921,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T17:00:27.440Z","status":"ssl_error","status_checked_at":"2026-03-02T17:00:03.402Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d-graphics","nim","tcl-tk"],"created_at":"2026-03-02T18:01:22.037Z","updated_at":"2026-03-02T18:01:24.447Z","avatar_url":"https://github.com/nico-robert.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"pix - 2D graphics library\n================\nTcl/Tk wrapper around [Pixie](https://github.com/treeform/pixie), a full-featured 2D graphics library written in 👑 [Nim](https://nim-lang.org).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/pix-dark.png#gh-dark-mode-only\"\u003e\n  \u003cimg src=\"docs/assets/pix.png#gh-light-mode-only\"\u003e\n\u003c/p\u003e\n\nCompatibility :\n-------------------------\n- Tcl/Tk 8.6 or higher\n\nPlatforms :\n-------------------------\n- MacOS (x64 / arm64)\n- Windows x64\n- Linux x64\n\nSource distributions and binary packages can be downloaded [here](https://github.com/nico-robert/pix/releases) for the platforms mentioned\nabove.\n\n\u003e [!NOTE]  \n\u003e I have mainly tested this package on Windows and MacOs x64 with version **8.6.16** and **9.0.1** of Tcl/Tk, it should work on Linux and\nMacOS arm (I hope so !)\n\nBuild :\n-------------------------\nIf you want to build `pix` from source, please refer to [BUILDING.md](BUILDING.md) for detailed compilation instructions.\n\nExample :\n-------------------------\n```tcl\npackage require pix\n\n# Init 'context' with size + color.\nset ctx [pix::ctx::new {200 200} \"white\"]\n\n# Style first rectangle.\npix::ctx::fillStyle $ctx \"rgb(0, 0, 255)\" ; # blue color\npix::ctx::fillRect $ctx {10 10} {100 100}\n\n# Style second rectangle.\npix::ctx::fillStyle $ctx \"rgba(255, 0, 0, 0.5)\" ; # red color with alpha 50%\npix::ctx::fillRect $ctx {50 50} {100 100}\n\n# Save context in a image file (*.png|*.bmp|*.qoi|*.ppm)\npix::ctx::writeFile $ctx rectangle.png\n\n# Or display in label by example :\nset p [image create photo]\npix::drawSurface $ctx $p\nlabel .l -image $p\npack .l\n```\nSee **[examples folder](/examples)** for more demos.\n\nDocumentation :\n-------------------------\nA large part of the `pix` [documentation](https://nico-robert.github.io/pix/) comes from the [Pixie API](https://treeform.github.io/pixie/) and source files. \n\n#### Currently API tested and supported are :\n| API        | Description\n| ------     | ------\n| _context_  | This namespace provides a 2D API commonly used on the web.\n| _font_     | This namespace allows you to write text, load fonts.\n| _image_    | Crop, resize, blur image and much more.\n| _paint_    | This namespace plays with colors.\n| _path_     | Vector Paths.\n| _svg_      | Parse, render SVG (namespace pretty limited, see note below for extended solution)\n\n\u003e [!NOTE]  \n\u003e Since version `0.8`, if available, [resvg](https://github.com/linebender/resvg) is used to render SVG files in the `pix::svg` namespace.\n\nAcknowledgments :\n-------------------------\n- [tclstubs-nimble](https://github.com/mpcjanssen/tclstubs-nimble) (MIT)\n- [Pixie](https://github.com/treeform/pixie) (MIT)\n\nLicense :\n-------------------------\n**pix** is covered under the terms of the [MIT](LICENSE) license.\n\nChanges :\n-------------------------\n*  **03-Jun-2024** : 0.1\n    - Initial release.\n*  **25-Jun-2024** : 0.2\n    - Add `font` namespace + test file.\n    - Add `image` namespace + test file.\n    - Add `paint` namespace + test file.\n    - Add `path` namespace + test file.\n    - Rename `pix::ctx::getSize` by `pix::ctx::get` \n    - Rename `pix::img::read` by `pix::img::readImage`\n    - Rename `pix::font::read` by `pix::font::readFont`\n    - Add documentation based on Pixie API reference.\n    - Add binary for Linux.\n    - Code refactoring.\n*  **06-Oct-2024** : 0.3\n    - Doc : Jpeg format is not supported for pix::ctx::writeFile.\n    - Rename `pix::parsePath` to `pix::pathObjToString`\n    - Add `pix::svgStyleToPathObj` proc (convert SVG path string to path object)\n    - Add `pix::rotMatrix` proc (matrix rotation)\n    - Fix bug `pix::path::fillOverlaps` bad arguments, used.\n    - Code refactoring.\n*  **02-Mar-2025** : 0.4\n    - Support for `Tcl/Tk9`.\n    - Adds binary for MacOS `arm64`.\n    - Adds `X11` for purpose testing.\n    - Code refactoring ++.\n*  **03-Apr-2025** : 0.5\n    - Try to improve the comments for the documentation.\n    - Fixes bug for `pix::ctx::clip` + `pix::ctx::isPointInPath`   \n      procedures when args count was equal to 2.\n    - Adds `pix::toBinary` procedure.\n    - Adds `pix::getKeys` procedure for image \u0026 context, useful for debugging.\n    - Adds procedures for working with `matrices` (translate, scale, multiply).\n    - Adds `useMalloc` flag for `nim c` command.\n    - Adds another test for fonts (works only with Tcl9)\n    - Reworks tests files (Compare the result with `pix::img::diff` proc).\n    - Simplification of some procedures + cosmetic changes.\n*  **07-Sep-2025** : 0.6\n    - Fix doc : Matrix values are in column order.\n    - Adds HSL color.\n    - Redefining Tcl/Tk procedures for transition to Nim version `2.2.4`.\n    - Fixes `setLineDash` command to get around pixie's problem when Tcl list is not even.\n    - Try to improve the `X11` binding.\n    - Cosmetic changes.\n*  **13-Oct-2025** : 0.7\n    - Adds new procedures for playing with colours (mix, darken,...).\n    - Improved compilation support.\n    - Bump `pixie` to version `5.1.0`.\n    - Refactoring matrix3x3 procedure.\n    - Fix doc: Matrix values are in row order (I think it's good now!).\n*  **17-Nov-2025** : 0.8\n    - Adds `hsl` color + `spin` command.\n    - Adds matrix inverse procedure.\n    - Adds `toGrayScale` procedure.\n    - Update `ruff` version to `2.7.0`.\n    - `resvg` rust library [C-API] for SVG rendering, is now a  \n      part of this project (optional). From now on there will be two releases    \n      distributions, one with `resvg` binding and one without.\n    - Previous versions `(v0.1-v0.7)` included `Ruff!` documentation    \n      assets without proper license attribution. This has been corrected in `v0.8+`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnico-robert%2Fpix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnico-robert%2Fpix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnico-robert%2Fpix/lists"}