{"id":15655553,"url":"https://github.com/d2phap/dxcontrol","last_synced_at":"2025-04-15T22:50:30.748Z","repository":{"id":49792541,"uuid":"518079072","full_name":"d2phap/DXControl","owner":"d2phap","description":"🖌️ A WinForms hybrid control that supports Direct2D and GDI+ drawing","archived":false,"fork":false,"pushed_at":"2024-11-30T03:03:34.000Z","size":488,"stargazers_count":32,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T02:12:07.829Z","etag":null,"topics":["csharp","direct2d","direct2d-bitmap","direct2d-demo","direct2d1","directwrite","directx","dotnet","dotnet-core","gdi-plus","wic","win2d","windows-imaging-component","winforms"],"latest_commit_sha":null,"homepage":"","language":"C#","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/d2phap.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":"2022-07-26T13:45:42.000Z","updated_at":"2025-03-15T07:36:01.000Z","dependencies_parsed_at":"2024-01-05T12:23:35.156Z","dependency_job_id":"eeb89d9c-8a0d-4603-9359-b06536dc7e0c","html_url":"https://github.com/d2phap/DXControl","commit_stats":{"total_commits":88,"total_committers":1,"mean_commits":88.0,"dds":0.0,"last_synced_commit":"56c1a9b942516ddb41264f1ef64b15b8151b65b5"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d2phap%2FDXControl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d2phap%2FDXControl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d2phap%2FDXControl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d2phap%2FDXControl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d2phap","download_url":"https://codeload.github.com/d2phap/DXControl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249167434,"owners_count":21223505,"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":["csharp","direct2d","direct2d-bitmap","direct2d-demo","direct2d1","directwrite","directx","dotnet","dotnet-core","gdi-plus","wic","win2d","windows-imaging-component","winforms"],"created_at":"2024-10-03T12:59:46.421Z","updated_at":"2025-04-15T22:50:30.733Z","avatar_url":"https://github.com/d2phap.png","language":"C#","readme":"# D2Phap.DXControl\n- A WinForms control that supports drawing with Direct2D thanks to [WicNet](https://github.com/smourier/WicNet).\n- This control has been used in [ImageGlass](https://github.com/d2phap/ImageGlass) software since version 9.0.\n\n![Nuget](https://img.shields.io/nuget/dt/D2Phap.DXControl?color=%2300a8d6\u0026logo=nuget)\n\n\n## Resource links\n- Nuget package: [https://www.nuget.org/packages/D2Phap.DXControl](https://www.nuget.org/packages/D2Phap.DXControl)\n- Project url: [https://github.com/d2phap/DXControl](https://github.com/d2phap/DXControl)\n- About: [https://imageglass.org/about](https://imageglass.org/about)\n\n\n## Features\n- High performance drawing using Direct2D.\n- Names and types are exactly the same as the native concepts of Direct2D (interfaces, enums, structures, constants, methods, arguments, guids, etc...). So you can read the official documentation, use existing C/C++ samples, and start coding with .NET right away.\n- All native COM interfaces are generated as .NET (COM) interfaces, this makes .NET programming easier, but they are not strictly needed.\n- Option to use Software or Hardware render target\n- Supports animation drawing with Direct2D.\n\n## Requirements:\n- .NET 6.0, 7.0, 8.0\n\n## Installation\nRun the command\n```bash\nInstall-Package D2Phap.DXControl\n```\n\n\n## Example\n\n\n\u003cimg src=\"https://github.com/user-attachments/assets/837414d9-b342-487b-99c9-056b8a24205d\" width=\"500\" /\u003e\n\nDraws a rectangle, then moves it to the right side.\n\n```cs\nusing D2Phap.DXControl;\n\n// create a WinForms custom control that extends from DXCanvas\npublic class DemoCanvas : DXCanvas\n{\n    private RectangleF animatableRectangle = new(100, 100, 400, 200);\n\n    public DemoCanvas()\n    {\n        EnableAnimation = true;\n        UseHardwareAcceleration = true;\n    }\n\n    protected override void OnRender(DXGraphics g)\n    {\n        // draw a yellow rectangle with green border\n        g.FillRectangle(rectText, Color.FromArgb(100, Yellow));\n        g.DrawRectangle(rectText, Color.Green);\n    }\n\n    // Update frame logics for animation\n    protected override void OnFrame(FrameEventArgs e)\n    {\n        // animate the rectangle to the right\n        animatableRectangle.left++;\n    }\n}\n\n```\n\nSee Demo project for full details.\n\n## License\n[MIT](LICENSE)\n\n## Support this project\n- [GitHub sponsor](https://github.com/sponsors/d2phap)\n- [Patreon](https://www.patreon.com/d2phap)\n- [PayPal](https://www.paypal.me/d2phap)\n\nThanks for your gratitude and finance help!\n\n","funding_links":["https://github.com/sponsors/d2phap","https://www.patreon.com/d2phap","https://www.paypal.me/d2phap"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd2phap%2Fdxcontrol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd2phap%2Fdxcontrol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd2phap%2Fdxcontrol/lists"}