{"id":15038928,"url":"https://github.com/david-livadaru/dlcoregraphics","last_synced_at":"2026-03-27T03:10:58.734Z","repository":{"id":56907603,"uuid":"82487356","full_name":"david-livadaru/DLCoreGraphics","owner":"david-livadaru","description":null,"archived":false,"fork":false,"pushed_at":"2018-03-25T12:14:50.000Z","size":88,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T15:16:45.399Z","etag":null,"topics":["carthage","cocoapods","coregraphics","ios","macos","swift-package-manager","swift4","tvos","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/david-livadaru.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":"2017-02-19T20:27:29.000Z","updated_at":"2018-03-30T02:17:06.000Z","dependencies_parsed_at":"2022-08-20T19:50:21.686Z","dependency_job_id":null,"html_url":"https://github.com/david-livadaru/DLCoreGraphics","commit_stats":null,"previous_names":["davidlivadaru/dlcoregraphics"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-livadaru%2FDLCoreGraphics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-livadaru%2FDLCoreGraphics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-livadaru%2FDLCoreGraphics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/david-livadaru%2FDLCoreGraphics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/david-livadaru","download_url":"https://codeload.github.com/david-livadaru/DLCoreGraphics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243428438,"owners_count":20289317,"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":["carthage","cocoapods","coregraphics","ios","macos","swift-package-manager","swift4","tvos","watchos"],"created_at":"2024-09-24T20:40:48.313Z","updated_at":"2025-12-28T12:30:53.277Z","avatar_url":"https://github.com/david-livadaru.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DLCoreGraphics\n\nA cross-platform framework which brings easy to use convenience properties, functions and overloaded operators.\n\n## Usage\n\nYou can import this module using:\n\n```swift\nimport DLCoreGraphics\n```\n\nA common operation is to round/ceil/floor a number while computing the layout of view. To simplify the work, these functions have been overloaded for `CGPoint`, `CGSize` and `CGRect`.\nSince we're doing layout for devices with different scales, it is helpful to the rounding operations based on the device's scale. Therefore, there are available 3 new functions: `screenRound`, `screenCeil` and `screenFloor`.\n\nFew examples of operators:\n\n```swift\nvar point = CGPoint(x: 10.0, y: 20.0)\nlet otherPoint = CGPoint(x: 40.0, y: 30.0)\npoint += otherPoint\n// point == CGPoint(x: 50.0, y: 50.0)\n```\n\n```swift\nlet size = CGSize(width: 100, height: 100.0)\nlet newSize = size * 3 \n// newSize == CGSize(width: 300, height: 300.0)\n```\n\nFinding the middle of right side of a rectangle\n\n```swift\nlet rectangle = CGRect(x: 10.0, y: 20.0, width: 100, height: 100.0)\nlet middle = rectanle.middle(forSide: .right)\n// middle == CGPoint(x: 110.0, y: 70.0)\n```\n\nAnd much more are available; check the framework for full details.\n\n## Installation\n\n### Supported Operating Systems\n\n* **macOS** 10.12 and later\n* **iOS** 10.0 and later\n* **watchOS** 3.0 and later\n* **tvOS** 10.0 and later\n\n### 1. [Carthage](https://github.com/Carthage/Carthage)\n\n```\ngithub \"davidlivadaru/DLCoreGraphics\"\n```\n\nIf you need the framework only for a single OS, then I propose to use `--platform [iOS|macOS|watchOS|tvOS]` specifier when your perform `carthage update`.\n\n### 2. [CocoaPods](https://github.com/CocoaPods/CocoaPods)\n\nAdd the dependency in your `Podfile`.\n\n```\npod 'DLCoreGraphics'\n```\n\n**Note**: Currently watchOS is not supported using CocoaPods, please use Carthage instead.\n\n### 3. [Swift Package Manager](https://swift.org/package-manager/)\n\nAdd the the following dependecy in your [`Package.swift`]((https://swift.org/package-manager/#example-usage)):\n\n```\ndependencies: [\n    .package(url: \"https://github.com/davidlivadaru/DLCoreGraphics.git\", .upToNextMajor(from: \"1.0.0\"))\n]\n```\n\nand update your target's dependencies: \n\n```\ntargets: [\n        .target(\n            name: \"YourTargetName\",\n            dependencies: [\"DLCoreGraphics\"])),\n    ]\n```\n\n## Contribution\n\nModule is covered by unit tests, however, bugs always slip through.\nIf you find a bug in the module create an [issue](https://github.com/davidlivadaru/DLCoreGraphics/issues).\n\nIf you want to contribute on fixing bugs or implementing new features then create a [pull request](https://github.com/davidlivadaru/DLCoreGraphics/pulls).\n\n## License\n\n**DLCoreGraphics** is released under MIT license. See [LICENSE](LICENSE) for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-livadaru%2Fdlcoregraphics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavid-livadaru%2Fdlcoregraphics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-livadaru%2Fdlcoregraphics/lists"}