{"id":13995589,"url":"https://github.com/shaps80/SVGRenderer","last_synced_at":"2025-07-22T22:31:15.931Z","repository":{"id":69909874,"uuid":"128104636","full_name":"shaps80/SVGRenderer","owner":"shaps80","description":"An SVG renderer using the familiar GraphicsRenderer API.","archived":false,"fork":false,"pushed_at":"2018-04-19T23:30:55.000Z","size":228,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T11:04:59.838Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/shaps80.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}},"created_at":"2018-04-04T18:34:06.000Z","updated_at":"2024-09-06T09:38:09.000Z","dependencies_parsed_at":"2023-05-25T12:30:21.997Z","dependency_job_id":null,"html_url":"https://github.com/shaps80/SVGRenderer","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/shaps80/SVGRenderer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaps80%2FSVGRenderer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaps80%2FSVGRenderer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaps80%2FSVGRenderer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaps80%2FSVGRenderer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaps80","download_url":"https://codeload.github.com/shaps80/SVGRenderer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaps80%2FSVGRenderer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266585734,"owners_count":23952163,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-08-09T14:03:29.875Z","updated_at":"2025-07-22T22:31:15.538Z","avatar_url":"https://github.com/shaps80.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# SVGRenderer\n\n[![Carthage compatible](https://img.shields.io/badge/Carthage-✓-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Version](https://img.shields.io/cocoapods/v/SVGRenderer.svg?style=flat)](http://cocoapods.org/pods/SVGRenderer)\n[![License](https://img.shields.io/cocoapods/l/SVGRenderer.svg?style=flat)](http://cocoapods.org/pods/SVGRenderer)\n[![Language](https://img.shields.io/badge/language-swift_4.0-ff69b4.svg)](http://cocoadocs.org/docsets/SVGRenderer)\n[![Platform](https://img.shields.io/cocoapods/p/SVGRenderer.svg?style=flat)](http://cocoapods.org/pods/SVGRenderer)\n\nSVGRenderer is a cross-platform (iOS and macOS) library for making SVG's from paths in code.\n\n## Example\n\n\u003cimg src=\"image.png\" /\u003e\n\nMaking the SVG above is as easy as drawing a path with a familiar API:\n\n```swift\nlet string = SVGRenderer(size: CGSize(width: 50, height: 50)).svgString { context in\n    let frame = context.format.bounds\n    let path = context.cgContext\n            \n    path.move(to: NSPoint(x: frame.minX + 24.9, y: frame.minY + 6.5))\n    path.curve(to: NSPoint(x: frame.minX + 44.5, y: frame.minY + 20.63), controlPoint1: NSPoint(x: frame.minX + 24.89, y: frame.minY + 6.5), controlPoint2: NSPoint(x: frame.minX + 44.5, y: frame.minY + 20.63))\n    path.line(to: NSPoint(x: frame.minX + 37.01, y: frame.minY + 43.5))\n    path.line(to: NSPoint(x: frame.minX + 31.85, y: frame.minY + 43.5))\n    path.curve(to: NSPoint(x: frame.minX + 32.17, y: frame.minY + 41.39), controlPoint1: NSPoint(x: frame.minX + 32.06, y: frame.minY + 42.83), controlPoint2: NSPoint(x: frame.minX + 32.17, y: frame.minY + 42.12))\n    path.curve(to: NSPoint(x: frame.minX + 24.89, y: frame.minY + 34.17), controlPoint1: NSPoint(x: frame.minX + 32.17, y: frame.minY + 37.4), controlPoint2: NSPoint(x: frame.minX + 28.91, y: frame.minY + 34.17))\n    path.curve(to: NSPoint(x: frame.minX + 17.62, y: frame.minY + 41.39), controlPoint1: NSPoint(x: frame.minX + 20.87, y: frame.minY + 34.17), controlPoint2: NSPoint(x: frame.minX + 17.62, y: frame.minY + 37.4))\n    path.curve(to: NSPoint(x: frame.minX + 17.93, y: frame.minY + 43.5), controlPoint1: NSPoint(x: frame.minX + 17.62, y: frame.minY + 42.12), controlPoint2: NSPoint(x: frame.minX + 17.73, y: frame.minY + 42.83))\n    path.line(to: NSPoint(x: frame.minX + 12.77, y: frame.minY + 43.5))\n    path.line(to: NSPoint(x: frame.minX + 5.92, y: frame.minY + 20.63))\n    path.line(to: NSPoint(x: frame.minX + 24.89, y: frame.minY + 6.5))\n    path.line(to: NSPoint(x: frame.minX + 24.9, y: frame.minY + 6.5))\n    path.close()\n}\n    \nprint(string)\n```\n\n**Output**\n\n```svg\n\u003csvg width=\"50.0px\" height=\"50.0px\" viewBox=\"0.0 0.0 50.0 50.0\" xmlns=\"http://www.w3.org/2000/svg\"\u003e\n\u003c!-- Generator: SVGRenderer (1.0.0) - http://github.com/shaps80/SVGRenderer --\u003e\n\u003cpath fill=\"#7F7F7F\" fill-rule=\"nonzero\" d=\"M0.0,0.0 L0.0,0.0 L0.0,0.0 L0.0,0.0 Z M24.9,6.5 C24.89,6.5,44.5,20.63,44.5,20.63 L37.01,43.5 L31.85,43.5 C32.06,42.83,32.17,42.12,32.17,41.39 C32.17,37.4,28.91,34.17,24.89,34.17 C20.87,34.17,17.62,37.4,17.62,41.39 C17.62,42.12,17.73,42.83,17.93,43.5 L12.77,43.5 L5.92,20.63 L24.89,6.5 L24.9,6.5 Z M24.9,6.5\"\u003e\u003c/path\u003e\n\u003c/svg\u003e\n```\n\n## Getting Started\n\n### Installation\n\n**Cocoapods**\n\n```ruby\n`pod \"SVGRenderer\", \"1.0.0\"`\n```\n\n**Carthage**\n\n```ruby\ngithub \"shaps80/SVGRenderer\" ~\u003e 1.0.0\n```\n\n\u003e There are 2 example projects included in the repo. One for iOS and another for OSX.  \nSimply select the appropriate scheme, build and run.\n\n## Requirements\n\n* Swift 4.0+\n* iOS 8.0+\n* OSX 10.10+\n\n## Author\n\nShaps Benkau, shapsuk@me.com\n\n## License\n\nSVGRenderer is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaps80%2FSVGRenderer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaps80%2FSVGRenderer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaps80%2FSVGRenderer/lists"}