{"id":29257247,"url":"https://github.com/Avocadocs/svgg","last_synced_at":"2025-07-04T04:03:12.491Z","repository":{"id":302530435,"uuid":"1012768460","full_name":"Avocadocs/svgg","owner":"Avocadocs","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-02T21:29:45.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-02T22:29:58.308Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Avocadocs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-07-02T21:15:53.000Z","updated_at":"2025-07-02T21:29:48.000Z","dependencies_parsed_at":"2025-07-02T22:30:02.031Z","dependency_job_id":"f0c56f78-4397-4f54-b4da-53f683215bad","html_url":"https://github.com/Avocadocs/svgg","commit_stats":null,"previous_names":["avocadocs/svgg"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Avocadocs/svgg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avocadocs%2Fsvgg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avocadocs%2Fsvgg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avocadocs%2Fsvgg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avocadocs%2Fsvgg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Avocadocs","download_url":"https://codeload.github.com/Avocadocs/svgg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Avocadocs%2Fsvgg/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263443083,"owners_count":23467244,"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":[],"created_at":"2025-07-04T04:01:34.142Z","updated_at":"2025-07-04T04:03:12.486Z","avatar_url":"https://github.com/Avocadocs.png","language":"C","funding_links":[],"categories":["Libraries"],"sub_categories":["Graphics"],"readme":"# SVGG — SVG to `gg.Image` for V\n\n**SVGG** is a small utility library for the [V programming language](https://vlang.io) that allows you to load and rasterize SVG files into `gg.Image` objects using the [`gg`](https://modules.vlang.io/gg.html) graphics module.\n\n![Demo screenshot](https://github.com/user-attachments/assets/2187b7cc-2820-4508-9aec-376e8cdb46dd)\n\n\nIt uses [memononen/nanosvg](https://github.com/memononen/nanosvg) under the hood for SVG parsing and rasterization.\n\n## Features\n\n- Rasterizes `.svg` files to V `gg.Image`\n- Simple API with optional configuration\n- Integrates easily with any V `gg.Context`\n\n## Installation\n\nClone the repository into your V module path or use it directly in your project.\n\n```bash\ngit clone https://github.com/your-username/svgg.v\n```\n\n## Usage Example\n```v\nimport gg\nimport gx\nimport svgg\n\n@[heap]\nstruct App {\nmut:\n\timg gg.Image\n}\n\nfn main() {\n\tmut app := App{}\n\n\tmut ctx := gg.new_context(\n\t\twidth:        800\n\t\theight:       600\n\t\twindow_title: 'SVGG Example'\n\t\tbg_color:     gx.light_blue\n\t\tinit_fn:      app.init\n\t\tframe_fn:     app.frame\n\t)\n\tctx.run()\n}\n\nfn (mut a App) init(mut ctx gg.Context) {\n\ta.img = svgg.create_svg_image(mut ctx, './23.svg', svgg.RasterizeCfg{})\n}\n\nfn (mut a App) frame(mut ctx gg.Context) {\n\tctx.begin()\n\tctx.draw_image(0, 0, a.img.width, a.img.height, a.img)\n\tctx.end()\n}\n```\n\n## License\n\nThis project is licensed under the MIT License.\n\nIt includes code from memononen/nanosvg, which is released under the Zlib license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAvocadocs%2Fsvgg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAvocadocs%2Fsvgg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAvocadocs%2Fsvgg/lists"}