{"id":23221059,"url":"https://github.com/aptacode/blazorcanvas","last_synced_at":"2025-08-19T10:32:18.330Z","repository":{"id":43162534,"uuid":"327070060","full_name":"Aptacode/BlazorCanvas","owner":"Aptacode","description":"A high performance dotnet 7 blazor wrapper around the HTML5 Canvas","archived":false,"fork":false,"pushed_at":"2022-12-30T17:35:57.000Z","size":25051,"stargazers_count":16,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-27T03:41:37.585Z","etag":null,"topics":["aptacode","blazor","blazor-webassembly","canvas","dotnet","dotnet7","drawing","graphics","html5-canvas","performance-blazor-wrapper","timmoth"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aptacode.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}},"created_at":"2021-01-05T17:25:24.000Z","updated_at":"2023-12-07T02:30:19.000Z","dependencies_parsed_at":"2023-01-31T12:15:21.004Z","dependency_job_id":null,"html_url":"https://github.com/Aptacode/BlazorCanvas","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aptacode%2FBlazorCanvas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aptacode%2FBlazorCanvas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aptacode%2FBlazorCanvas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aptacode%2FBlazorCanvas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aptacode","download_url":"https://codeload.github.com/Aptacode/BlazorCanvas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230345973,"owners_count":18211999,"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":["aptacode","blazor","blazor-webassembly","canvas","dotnet","dotnet7","drawing","graphics","html5-canvas","performance-blazor-wrapper","timmoth"],"created_at":"2024-12-18T22:15:12.218Z","updated_at":"2024-12-18T22:15:12.767Z","avatar_url":"https://github.com/Aptacode.png","language":"C#","readme":"\u003cp align=\"center\"\u003e\n   \u003cdiv style=\"width:640;height:320\"\u003e\n       \u003cimg style=\"width: inherit\" src=\"https://raw.githubusercontent.com/Aptacode/BlazorCanvas/main/Resources/Images/Banner.jpg\"\u003e\n\u003c/div\u003e\n\u003c/p\u003e\n\nA high performance blazor wrapper around the HTML5 Canvas utilizing unmarshalled JS calls\n\n[![demo](https://github.com/Aptacode/BlazorCanvas/actions/workflows/demo.yml/badge.svg)](https://aptacode.github.io/BlazorCanvas/)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/249116ea839b4c689cada11bbc89ab0b)](https://www.codacy.com/gh/Aptacode/BlazorCanvas/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=Aptacode/BlazorCanvas\u0026amp;utm_campaign=Badge_Grade)\n[![code metrics](https://github.com/Aptacode/BlazorCanvas/actions/workflows/metrics.yml/badge.svg)](https://github.com/Aptacode/BlazorCanvas/blob/main/CODE_METRICS.md)\n[![nuget](https://img.shields.io/nuget/v/Aptacode.BlazorCanvas.svg?style=flat\u0026color=brightgreen)](https://www.nuget.org/packages/Aptacode.BlazorCanvas/)\n![last commit](https://img.shields.io/github/last-commit/Aptacode/BlazorCanvas?style=flat\u0026cacheSeconds=86000\u0026color=brightgreen)\n[![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)\n\n\n[![NuGet](https://img.shields.io/nuget/v/Aptacode.BlazorCanvas.svg?style=flat)](https://www.nuget.org/packages/Aptacode.BlazorCanvas/)\n![last commit](https://img.shields.io/github/last-commit/Aptacode/BlazorCanvas?style=flat-square\u0026cacheSeconds=86000)\n\n## Usage\n### RazorComponent.razor\n#### Setup your canvas element\n```html\n\u003cBlazorCanvas @ref=\"Canvas\"\u003e\n    \u003ccanvas width=\"100\" height=\"100\"\u003e\u003c/canvas\u003e\n\u003c/BlazorCanvas\u003e\n```\n\n### RazorComponent.razor.cs\n#### Draw to the canvas!\n```csharp\n    protected BlazorCanvas Canvas { get; set; }\n    protected override async Task OnInitializedAsync()\n    {\n        using var timer = new PeriodicTimer(TimeSpan.FromMilliseconds(15));\n        while (await timer.WaitForNextTickAsync())\n        {\n            await Draw();\n        }\n    }\n \n   protected async Task Draw()\n   {\n      if (!Canvas.Ready)\n      {\n         return;\n      }\n      \n      //Clear\n      Canvas.ClearRect(0, 0, Width, Height);\n      \n      //Draw Ellipse\n      Canvas.LineWidth(2);\n      Canvas.StrokeStyle(\"blue\");\n      Canvas.FillStyle(\"green\");\n      Canvas.Ellipse(40, 40, 30, 30, (float)Math.PI, 0, 2 * (float)Math.PI);\n      Canvas.Stroke();\n      Canvas.Fill();\n   }\n\n  #endregion\n ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faptacode%2Fblazorcanvas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faptacode%2Fblazorcanvas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faptacode%2Fblazorcanvas/lists"}