{"id":30024999,"url":"https://github.com/lynx-family/skity","last_synced_at":"2026-01-27T11:05:34.749Z","repository":{"id":307459901,"uuid":"1023521018","full_name":"lynx-family/skity","owner":"lynx-family","description":"A lightweight 2D vector graphics engine focused on GPU rendering","archived":false,"fork":false,"pushed_at":"2026-01-21T09:56:18.000Z","size":19227,"stargazers_count":54,"open_issues_count":25,"forks_count":18,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-21T13:48:11.762Z","etag":null,"topics":["2d","2d-graphics","canvas2d","gpu","rendering","vector-graphics"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lynx-family.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-21T09:32:57.000Z","updated_at":"2026-01-21T09:56:23.000Z","dependencies_parsed_at":"2025-11-29T11:04:42.936Z","dependency_job_id":null,"html_url":"https://github.com/lynx-family/skity","commit_stats":null,"previous_names":["lynx-family/skity"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/lynx-family/skity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lynx-family%2Fskity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lynx-family%2Fskity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lynx-family%2Fskity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lynx-family%2Fskity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lynx-family","download_url":"https://codeload.github.com/lynx-family/skity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lynx-family%2Fskity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28812367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","2d-graphics","canvas2d","gpu","rendering","vector-graphics"],"created_at":"2025-08-06T07:42:35.701Z","updated_at":"2026-01-27T11:05:34.733Z","avatar_url":"https://github.com/lynx-family.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Skity\n\n[![Apache licesed](https://img.shields.io/badge/License-Apache--2.0-cyan?logo=apache)](https://github.com/lynx-family/skity/blob/main/LICENSE)\n[![codecov](https://codecov.io/github/lynx-family/skity/graph/badge.svg?token=QTK6TSRIHU)](https://codecov.io/github/lynx-family/skity)\n[![Testing](https://github.com/lynx-family/skity/actions/workflows/ci.yml/badge.svg)](https://github.com/lynx-family/skity/actions/workflows/ci.yml)\n\n`Skity` is an open-source 2D graphics library developed in C++. \nIt focuses on GPU rendering, providing developers with efficient graphics drawing and rendering capabilities. \nCurrently, Skity supports mainstream graphics APIs such as OpenGL, OpenGL ES, and Metal. \nMeanwhile, it offers a functional working software rendering backend as a fallback solution, ensuring stable graphics rendering in various environments.\n\n## Getting Started\n\n### Environment Setup\n\nThe project use [habitat](https://github.com/lynx-family/habitat) to manage dependencies.\nYou can install habitat by following the instructions on the habitat repository.\n\nAslo use [cmake](https://cmake.org/) to build project. Make sure you have installed cmake on your machine.\n\n### Build and Run\n\nFirst fetch sources from like this:\n\n```shell\n# fetch source\ngit clone git@github.com:lynx-family/skity.git\ncd skity\n# fetch binary dependency (ninja, gn .. etc)\n./tools/hab sync --target dev,module\n\n```\n\nThen build the project and example code like this:\n\n```shell\n# build\ncmake -B out/debug -DSKITY_EXAMPLE=ON -DCMAKE_BUILD_TYPE=Debug\ncmake --build out/debug\n\n# run the basic example\n./out/debug/example/case/basic_example gl\n\n```\n\nPass `SKITY_EXAMPLE=ON` to cmake to enable build example code. More options can visit [cmake/Options.cmake](./cmake/Options.cmake).\n\nMore details can visit [BUILD_AND_RUN.md](./docs/BUILD_AND_RUN.md).\n\n### Development\n\nThe code below shows how to create a `skity::GPUSurface` instance using [GLFW](https://www.glfw.org/) with OpenGL backend. The full code can look at [window_gl.cc](./example/common/gl/window_gl.cc)\n\n```c++\nGLFWwindow* window = glfwCreateWindow(800, 600, \"Demo\", nullptr, nullptr);\n\nstd::unique_ptr\u003cskity::GPUContext\u003e gpu_ctx = skity::GLContextCreate((void*)glfwGetProcAddress);\n\n// create a on-screen GPUSurface\nskity::GPUSurfaceDescriptorGL desc{};\ndesc.backend = skity::GPUBackendType::kOpenGL;\ndesc.width = 800;\ndesc.height = 600;\ndesc.sample_count = 4;\ndesc.content_scale = screen_scale_;\n\ndesc.surface_type = skity::GLSurfaceType::kFramebuffer;\ndesc.gl_id = 0; // render to screen\n\nauto surface = gpu_ctx-\u003eCreateSurface(\u0026desc);\n\nauto canvas = surface-\u003eLockCanvas();\n\n// canvas-\u003eDrawXXX();\n\n// submit render commands\ncanvas-\u003eFlush();\n\n// present surface contents\nsurface-\u003eFlush();\n\n// swap buffers to display\nglfwSwapBuffers(window);\n\n```\n\nMore details can visit [DEVELOPMENT.md](./docs/DEVELOPMENT.md).\n\n### Drawing Path\n\n```c++\n// paint controls the color and style when geometry is rendered\nskity::Paint paint;\npaint.setStyle(skity::Paint::kFill_Style);\npaint.setColor(skity::ColorSetRGB(0x42, 0x85, 0xF4));\n\n// create path\nskity::Path path;\npath.MoveTo(199, 34);\npath.LineTo(253, 143);\npath.LineTo(374, 160);\npath.LineTo(287, 244);\npath.LineTo(307, 365);\npath.LineTo(199, 309);\npath.LineTo(97, 365);\npath.LineTo(112, 245);\npath.LineTo(26, 161);\npath.LineTo(146, 143);\npath.Close();\n\ncanvas-\u003eDrawPath(path, paint);\n```\n\n### Blur Effect\n\nBy using [`MaskFilter`](./include/skity/effect/mask_filter.hpp), can make some **Post-processing** effect.\nThe code below shows how to apply a blur effect to the star path.\n\n```c++\npaint.SetMaskFilter(\n      skity::MaskFilter::MakeBlur(skity::BlurStyle::kNormal, 10.f));\n\ncanvas-\u003eDrawPath(path /* previouse created star path */, paint);\n\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./docs/resources/blur_star.png\"  width=\"300\"/\u003e\n\u003c/p\u003e\n\n\n\n## License\n\nSkity is licensed under the **Apache License, Version 2.0**. See the [LICENSE](./LICENSE) file for more details.\nWhen using Skity for development, please follow the license terms.\n\n## Credits\n\nSkity use the following third-party libraries.\nWe appreciate the efforts of the developers and the open-source community behind these projects.\n\n- [GLM](https://github.com/g-truc/glm) Used for math operations.\n- [Clipper2](https://github.com/AngusJohnson/Clipper2) Used for path calculation.\n- [FreeType](https://www.freetype.org/) Used for loading font and rasterizing text.\n- [nanopng](https://gitlab.com/TSnake41/nanopng) Used to make freetype as small as possible\n- [jsoncpp](https://github.com/open-source-parsers/jsoncpp) Used to parse json file.\n- [pugixml](https://github.com/zeux/pugixml) Used to parse xml file.\n- [fmt](https://github.com/fmtlib/fmt) Used for string formatting and logging.\n- [GLFW](https://www.glfw.org/) Used for window and input in example and test.\n- [googletest](https://github.com/google/googletest) Used for testing.\n- [google/benchmark](https://github.com/google/benchmark) Used for testing benchmark.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flynx-family%2Fskity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flynx-family%2Fskity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flynx-family%2Fskity/lists"}