{"id":16488867,"url":"https://github.com/jimsynz/vivid","last_synced_at":"2025-03-16T18:31:51.351Z","repository":{"id":62430742,"uuid":"77002407","full_name":"jimsynz/vivid","owner":"jimsynz","description":"Vivid is a simple 2D rendering library written in Elixir.","archived":false,"fork":false,"pushed_at":"2024-10-07T20:52:49.000Z","size":1088,"stargazers_count":32,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-12T13:40:08.327Z","etag":null,"topics":["2d","buffer","elixir","frame","graphics","hershey-fonts","rendering-2d-graphics","shape"],"latest_commit_sha":null,"homepage":"https://harton.dev/james/vivid","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jimsynz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2016-12-21T00:38:36.000Z","updated_at":"2024-10-07T12:48:51.000Z","dependencies_parsed_at":"2023-12-13T23:25:28.139Z","dependency_job_id":"dba3fcbf-e5d3-4bb2-9e2a-dd391e1f29bb","html_url":"https://github.com/jimsynz/vivid","commit_stats":null,"previous_names":["jamesotron/vivid.ex","jimsynz/vivid.ex"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimsynz%2Fvivid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimsynz%2Fvivid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimsynz%2Fvivid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimsynz%2Fvivid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jimsynz","download_url":"https://codeload.github.com/jimsynz/vivid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826783,"owners_count":20354220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","buffer","elixir","frame","graphics","hershey-fonts","rendering-2d-graphics","shape"],"created_at":"2024-10-11T13:40:13.912Z","updated_at":"2025-03-16T18:31:50.031Z","avatar_url":"https://github.com/jimsynz.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vivid\n\n[![Build Status](https://drone.harton.dev/api/badges/james/vivid/status.svg?ref=refs/heads/main)](https://drone.harton.dev/james/vivid)\n[![Hex.pm](https://img.shields.io/hexpm/v/vivid.svg)](https://hex.pm/packages/vivid)\n\nVivid is a simple 2D rendering library.\n\n## Features\n\n- Supports drawing and manipulating a number of basic 2D primitives.\n- Supports filling arbitrary polygons.\n- Supports arbitrary transformations shape transformations.\n- Renders shapes onto a buffer.\n- 100% pure Elixir with no dependencies.\n- Render to PNG using [vivid_png](https://harton.dev/james/vivid_png).\n\n## Demo\n\nI implemented a simple ASCII renderer for debugging and testing purposes, so at\nany time you can pipe almost any Vivid struct to `IO.puts` and the contents of\nthe buffer will be rendered and printed onto the screen.\n\n### Basic drawing\n\nFrames behave as a simple collection of shapes and colours, which you can simply\npush on to.\n\n```elixir\nuse Vivid\nFrame.init(10,10, RGBA.white)\n|\u003e Frame.push(Circle.init(Point.init(5,5), 4), RGBA.black)\n|\u003e IO.puts\n```\n\n```\n@@@@   @@@\n@@  @@@  @\n@@ @@@@@ @\n@ @@@@@@@\n@ @@@@@@@\n@ @@@@@@@\n@@ @@@@@ @\n@@  @@@  @\n@@@@   @@@\n@@@@@@@@@@\n```\n\n### Transformations\n\nVivid supports a number of standards transforms which can be applied to a shape\nbefore it is added to a frame. It also makes provision for you to write your own.\n\n```elixir\nuse Vivid\nframe = Frame.init(20, 20, RGBA.white)\nshape = Box.init(Point.init(0,0), Point.init(5,5))\n  |\u003e Transform.rotate(45)\n  |\u003e Transform.fill(frame)\n  |\u003e Transform.center(frame)\n  |\u003e Transform.apply\nFrame.push(frame, shape, RGBA.black)\n|\u003e IO.puts\n```\n\n```\n@@@@@@@@@@ @@@@@@@@@\n@@@@@@@@@ @ @@@@@@@@\n@@@@@@@@ @@@ @@@@@@@\n@@@@@@@ @@@@@ @@@@@@\n@@@@@  @@@@@@@ @@@@@\n@@@@ @@@@@@@@@@ @@@@\n@@@ @@@@@@@@@@@@ @@@\n@@ @@@@@@@@@@@@@@ @@\n@ @@@@@@@@@@@@@@@@ @\n @@@@@@@@@@@@@@@@@@\n@ @@@@@@@@@@@@@@@@ @\n@@ @@@@@@@@@@@@@@ @@\n@@@ @@@@@@@@@@@@ @@@\n@@@@ @@@@@@@@@@ @@@@\n@@@@@ @@@@@@@@@ @@@@\n@@@@@@ @@@@@@@ @@@@@\n@@@@@@@ @@@@@ @@@@@@\n@@@@@@@@ @@@ @@@@@@@\n@@@@@@@@@ @ @@@@@@@@\n@@@@@@@@@@ @@@@@@@@@\n```\n\n## Installation\n\nVivid is [available in Hex](https://hex.pm/packages/vivid), the package can be\ninstalled by adding `vivid` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:vivid, \"~\u003e 0.4.4\"}\n  ]\nend\n```\n\nDocumentation for the latest release can be found on\n[HexDocs](https://hexdocs.pm/vivid) and for the `main` branch on\n[docs.harton.nz](https://docs.harton.nz/james/vivid).\n\n## Github Mirror\n\nThis repository is mirrored [on Github](https://github.com/jimsynz/vivid)\nfrom it's primary location [on my Forgejo instance](https://harton.dev/james/vivid).\nFeel free to raise issues and open PRs on Github.\n\n## License\n\nSource code is licensed under the terms of the MIT license, the text of which\nis included in the `LICENSE` file in this distribution.\n\nThis distribution includes the Hershey vector font from\n[The Hershey Fonts](http://sol.gfxile.net/hershey/index.html).\n\nFont use restrictions:\n\n```\n This distribution of the Hershey Fonts may be used by anyone for\n  any purpose, commercial or otherwise, providing that:\n    1. The following acknowledgements must be distributed with\n      the font data:\n      - The Hershey Fonts were originally created by Dr.\n        A. V. Hershey while working at the U. S.\n        National Bureau of Standards.\n      - The format of the Font data in this distribution\n        was originally created by\n          James Hurt\n          Cognition, Inc.\n          900 Technology Park Drive\n          Billerica, MA 01821\n          (mit-eddie!ci-dandelion!hurt)\n    2. The font data in this distribution may be converted into\n      any other format *EXCEPT* the format distributed by\n      the U.S. NTIS (which organization holds the rights\n      to the distribution and use of the font data in that\n      particular format). Not that anybody would really\n      *want* to use their format... each point is described\n      in eight bytes as \"xxx yyy:\", where xxx and yyy are\n      the coordinate values as ASCII numbers.\n```\n\n## Status\n\nThis library is now in use in several projects and seems to work well.\n\nFuture improvements include:\n\n- Improve `Vivid.SLPFA`.\n- Add transformations which can apply rotation matrices directly.\n- Add ability to composit multiple frames together.\n- Support bitmaps as a shape.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimsynz%2Fvivid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimsynz%2Fvivid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimsynz%2Fvivid/lists"}