{"id":13908213,"url":"https://github.com/ahwayakchih/SimpleSVGView","last_synced_at":"2025-07-18T07:30:40.730Z","repository":{"id":214364734,"uuid":"736024448","full_name":"ahwayakchih/SimpleSVGView","owner":"ahwayakchih","description":"A VERY naive, simple parser and renderer spacializing in QRCode SVGs that use Path element.","archived":false,"fork":false,"pushed_at":"2024-02-28T18:10:47.000Z","size":211,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T13:40:54.179Z","etag":null,"topics":["brightscript","qrcode","roku","svg"],"latest_commit_sha":null,"homepage":"","language":"Brightscript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahwayakchih.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}},"created_at":"2023-12-26T19:06:58.000Z","updated_at":"2024-11-30T07:16:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"33dec2b4-738b-4948-9218-0b15ae5999f7","html_url":"https://github.com/ahwayakchih/SimpleSVGView","commit_stats":null,"previous_names":["ahwayakchih/simplesvgview"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ahwayakchih/SimpleSVGView","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahwayakchih%2FSimpleSVGView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahwayakchih%2FSimpleSVGView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahwayakchih%2FSimpleSVGView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahwayakchih%2FSimpleSVGView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahwayakchih","download_url":"https://codeload.github.com/ahwayakchih/SimpleSVGView/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahwayakchih%2FSimpleSVGView/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265720367,"owners_count":23817218,"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":["brightscript","qrcode","roku","svg"],"created_at":"2024-08-06T23:02:33.127Z","updated_at":"2025-07-18T07:30:40.456Z","avatar_url":"https://github.com/ahwayakchih.png","language":"Brightscript","readme":"Simple SVG View\n===============\n\nA VERY naive, simple parser and renderer specializing in SVG files with QRCode encoded in Path element.\n\n\n## Usage\n\nEither import whole [SimpleSVGView](components/SimpleSVGView) directory to your project, or import it\ndynamically using [ComponentLibrary](https://developer.roku.com/en-gb/docs/references/scenegraph/control-nodes/componentlibrary.md).\n\n```xml\n\u003cSimpleSVGView\n\tid=\"renderedCode\"\n\twidth=\"500\"\n\theight=\"500\"\n\tpadding=\"-1\"\n\tblendColor=\"#FFFFFF\" /\u003e\n```\n\nAfter `SimpleSVGView` is set on SceneGraph, set its `svgData` field to the content of SVG file.\nIt will run [`SimpleSVGTask`](components/SimpleSVGView/SimpleSVGTask) to parse and render SVG as PNG.\nYou can observe `status` field for `failed` or `ready` state, same as with well-known `Poster` node.\n\n```brs\nrenderedCode.observeFieldScoped(\"status\", \"onRenderedStatusChange\")\nrenderedCode.svgData = downloadedSVGContent\n```\n\nCheck [Example](example) to see how it all can be handled.\n\n\n## Running example\n\nBy default `make` command will use `dev` environment, so be sure to have a `dev.env` file configured.\nSee [dev.env.sample](dev.env.sample) - you can remove the `.sample` from the name and fill in your info there.\n\nOnce environment is configured, simply run:\n\n```sh\nmake test\n```\n\nIt should package example, sideload it to Roku device and launch app that shows QRCodes on screen:\n\n![example screenshot](example/screenshot.png)\n\n\n## TODO\n\n- It would be nice to parse data from QRCode. We already have \"bits\", we just have to decode them;\n- It could be useful to support also SVGs that use `Rectangle` nodes instead of a single `Path`;\n- Someday it could support more of SVG and handle generic images, as long as they don't use any curves\n  (so not many of them).\n  Roku's [Draw2D](https://developer.roku.com/en-gb/docs/references/brightscript/interfaces/ifdraw2d.md)\n  does not support curves, and implementing custom drawing is out of scope. It's not impossible but\n  would require A LOT of work and result would run too slow to be of any use.\n\n\n## Thanks\n\nWhile working on this component, these were of great help:\n\n- [QRCode generator](https://github.com/kazuhikoarase/qrcode-generator) i used for\n  quickly creating example files (it's easy to edit JS version to output different formats of SVG);\n- [SVG Path syntax guide](https://css-tricks.com/svg-path-syntax-illustrated-guide/)\n  that explained basics of SVG Path quite well;\n- [SVG specification](https://www.w3.org/TR/SVG11/paths.html#PathData) that clarified\n  everything else;\n- [Inkscape](https://inkscape.org/) helped pre-rendering SVG to PNG examples;\n- [Sublime Text and Sublime Merge](https://www.sublimehq.com/) used to write and commit project.","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahwayakchih%2FSimpleSVGView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahwayakchih%2FSimpleSVGView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahwayakchih%2FSimpleSVGView/lists"}