{"id":30697561,"url":"https://github.com/richardpiazza/graphpoint","last_synced_at":"2025-09-02T09:12:57.059Z","repository":{"id":9674271,"uuid":"62965453","full_name":"richardpiazza/GraphPoint","owner":"richardpiazza","description":"A swift library for using the Cartesian Coordinate System in CGRect.","archived":false,"fork":false,"pushed_at":"2025-05-23T23:20:49.000Z","size":298,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-18T00:09:40.594Z","etag":null,"topics":["cartesian","cgrect","swift-extensions"],"latest_commit_sha":null,"homepage":"","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/richardpiazza.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":"2016-07-09T19:20:38.000Z","updated_at":"2025-05-23T23:20:17.000Z","dependencies_parsed_at":"2022-11-28T10:34:16.277Z","dependency_job_id":null,"html_url":"https://github.com/richardpiazza/GraphPoint","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/richardpiazza/GraphPoint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardpiazza%2FGraphPoint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardpiazza%2FGraphPoint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardpiazza%2FGraphPoint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardpiazza%2FGraphPoint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richardpiazza","download_url":"https://codeload.github.com/richardpiazza/GraphPoint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardpiazza%2FGraphPoint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273258929,"owners_count":25073820,"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-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["cartesian","cgrect","swift-extensions"],"created_at":"2025-09-02T09:12:52.497Z","updated_at":"2025-09-02T09:12:57.031Z","avatar_url":"https://github.com/richardpiazza.png","language":"Swift","readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"Resources/GraphPoint.png\" width=\"1000\" max-width=\"90%\" alt=\"GraphPoint\" /\u003e\n\u003c/p\u003e\n\nA Swift implementation of the \u003ca href=\"https://en.wikipedia.org/wiki/Cartesian_coordinate_system\"\u003eCartesian Coordinate System\u003c/a\u003e.\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Frichardpiazza%2FGraphPoint%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/richardpiazza/GraphPoint)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Frichardpiazza%2FGraphPoint%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/richardpiazza/GraphPoint)\n\n## Dependencies\n\n**GraphPoint** relies heavily on the **[Swift2D](https://github.com/richardpiazza/Swift2D)** library, which reimplements `Rect`, `Size`, and \n`Point` in a cross-platform, non-Foundation reliant way.\n\n## Usage\n\nThere are several key aspects to understand when using **GraphPoint**.\n\n### `CartesianPlane`\n\nA Cartesian plane is defined by two perpendicular number lines: the x-axis, which is horizontal, and the y-axis, which is vertical. Using these \naxes, we can describe any point in the plane using an ordered pair of numbers.\n\nIn **GraphPoint** ever rectangle is a cartesian plane with the origin at the center.\n\n### `CartesianFrame`\n\nA `Rect` contained within a `CartesianPlane` with an `origin` relative to the `cartesianOrigin` of the plane. For example:\n\n```swift\n// Visualize graph paper with axes extending 50 points in all four directions from the center of the paper.\nlet plane = CartesianPlan(size: Size(width: 100, height: 100))\n// A 10x10 piece of paper is placed on top of the graph paper; placed 40 points from both the top and left edges. \nlet rect = Rect(origin: Point(x: 40, y: 40), size: Size(width: 10, height: 10))\n// In relation to the graph, the smaller rectangle would have an 'origin' at (-10, 10).\nlet cartesianFrame = plane.rect(for: rect)\ncartesianFrame == Rect(origin: Point(x: -10, y: 10), size: Size(width: 10, height: 10))\n```\n\n### `CartesianPoint`\n\nA point within a `CartesianPlane`. The x \u0026 y coordinates of a `CartesianPoint` represent the offset from the planes 'origin' (0, 0).\n\n## Deprecations\n\nThe `CoreGraphics` aliases have been deprecated and replaced by their _Cartesian_ counterparts. These type-aliases and \n**GraphPointUI** will be removed in a future version.\n\n## Installation\n\n**GraphPoint** is distributed using the [Swift Package Manager](https://swift.org/package-manager). To install it into a project, add it as a \ndependency within your `Package.swift` manifest:\n\n```swift\nlet package = Package(\n    ...\n    dependencies: [\n        .package(url: \"https://github.com/richardpiazza/GraphPoint.git\", from: \"4.0.0\")\n    ],\n    ...\n)\n```\n\nThen import **GraphPoint** wherever you'd like to use it:\n\n```swift\nimport GraphPoint\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardpiazza%2Fgraphpoint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichardpiazza%2Fgraphpoint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardpiazza%2Fgraphpoint/lists"}