NamedPoint
Giving names to CGPoint values in CGRect
Install / Use
/learn @ollieatkinson/NamedPointREADME
NamedPoint
A package to provide names for points in a frame.
public enum NamedPoint: String, Codable, Hashable {
case topLeft, topCenter, topRight
case middleLeft, middleCenter, middleRight
case bottomLeft, bottomCenter, bottomRight
}
For example, just say .top(.left) or .topLeft and it will work on all platforms in all situations - we take care of the inconsistencies of for you.
let screen = CGRect(x: 0, y: 0, width: 3440, height: 1440)
let point = screen.point(at: .top(.right))
Quick Start
Include the dependency in your Package.swift file:
.package(url: "https://github.com/ollieatkinson/NamedPoint", .branch("master"))
Related Skills
node-connect
347.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
