{"id":27770783,"url":"https://github.com/swiftkitz/graphicz","last_synced_at":"2025-04-29T21:16:53.681Z","repository":{"id":145087838,"uuid":"46330037","full_name":"SwiftKitz/Graphicz","owner":"SwiftKitz","description":"Light-weight, operator-overloading-free complements to CoreGraphics!","archived":false,"fork":false,"pushed_at":"2017-08-20T11:24:50.000Z","size":28,"stargazers_count":46,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-29T21:16:49.155Z","etag":null,"topics":["core-graphics","geometry","ios","macos","watchos"],"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/SwiftKitz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-11-17T07:19:55.000Z","updated_at":"2025-04-02T22:25:48.000Z","dependencies_parsed_at":"2024-01-02T20:57:59.718Z","dependency_job_id":"62e74f62-f03b-41db-b9a5-cc7740468979","html_url":"https://github.com/SwiftKitz/Graphicz","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/SwiftKitz%2FGraphicz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwiftKitz%2FGraphicz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwiftKitz%2FGraphicz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwiftKitz%2FGraphicz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SwiftKitz","download_url":"https://codeload.github.com/SwiftKitz/Graphicz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251582939,"owners_count":21612747,"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":["core-graphics","geometry","ios","macos","watchos"],"created_at":"2025-04-29T21:16:52.986Z","updated_at":"2025-04-29T21:16:53.674Z","avatar_url":"https://github.com/SwiftKitz.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  Graphicz :art:\n\u003ch6 align=\"center\"\u003e\n  Light-weight, operator-overloading-free complements to CoreGraphics!\n\u003c/h6\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Version\" src=\"https://img.shields.io/badge/version-prerelease-blue.svg\" /\u003e\n  \u003ca alt=\"Travis CI\" href=\"https://travis-ci.org/SwiftKitz/Graphicz\"\u003e\n    \u003cimg alt=\"Version\" src=\"https://travis-ci.org/SwiftKitz/Graphicz.svg?branch=master\" /\u003e\n  \u003c/a\u003e\n  \u003cimg alt=\"Swift\" src=\"https://img.shields.io/badge/swift-4.0-orange.svg\" /\u003e\n  \u003cimg alt=\"Platforms\" src=\"https://img.shields.io/badge/platform-ios%20%7C%20osx%20%7C%20watchos%20%7C%20tvos-lightgrey.svg\" /\u003e\n  \u003ca alt=\"Carthage Compatible\" href=\"https://github.com/SwiftKitz/Graphicz#carthage\"\u003e\n    \u003cimg alt=\"Carthage\" src=\"https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n_Even though I shipped it with my app, I still need to invest the time to set this up, and finalize the API. Contributors welcome!_\n\n## Highlights\n\n+ __Operator Overloading Free:__\u003cbr /\u003e\nIt's just an opinion, but this is a crucial difference.\n\n+ __Ready For Contributors:__\u003cbr /\u003e\nBasic additions to `CGRect` and other structs added to show contributors the way! PRs welcome! _(I certainly will be submitting some throughout my career)_\n\n+ __Full Test Coverage:__\u003cbr /\u003e\nThis library requires full test coverage in order to eliminate human error as much as possible.\n\n## Features\n\nYou can try them in the playground shipped with the framework!\n\n#### CGRect\n\n__Convenient properties:__\n\n```swift\nlet rect = CGRect(x: 10, y: 10, width: 80, height: 40)\nrect.center         // x: 50, y: 30\nrect.aspectRatio    // 2\n```\n\n__Update functions:__\n\n```swift\nvar newRect = rect.update(width: 60)\nnewRect.updateInPlace(x: 20)\nnewRect.updateInPlace(origin: CGPoint.zero)\n```\n\n__Edge functions:__\n\n```swift\nnewRect.insetEdges(left: 20)    // Push in the left edge\nnewRect.insetEdges(bottom: -5)  // Push down the bottom\n```\n\n#### CGVector\n\n__Convenient properties:__\n\n```swift\nlet vector = CGVector(dx: -5, dy: 0)\nvector.angle        // π\nvector.magnitude    // 5\n```\n\n__Convenient initializers:__\n\n```swift\nlet unitVector = CGVector(angle: .pi/2)\nunitVector.dx   // 0\nunitVector.dy   // 1\n```\n\n## Motivation\n\nEvery once in a while, one might find themself writing layout code manually. Auto layout may work for many, but for the rest of us, doing manual layout calculation is something we do regularly. It does become tedious very quickly, but with the help of such a convenient set of additions, things tend to get simpler and more fun, even.\n\n## Author\n\nMaz ([@Mazyod](http://twitter.com/mazyod))\n\n## License\n\nGraphicz is released under the MIT license. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftkitz%2Fgraphicz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswiftkitz%2Fgraphicz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftkitz%2Fgraphicz/lists"}