Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use NSGeometry types from Foundation #404

Closed
MaxDesiatov opened this issue May 14, 2021 · 0 comments · Fixed by #411
Closed

Use NSGeometry types from Foundation #404

MaxDesiatov opened this issue May 14, 2021 · 0 comments · Fixed by #411
Assignees
Labels
bug Something isn't working

Comments

@MaxDesiatov
Copy link
Collaborator

Describe the bug
CGRect and other related types created in Tokamak aren't the same as Foundation types and can't be passed to functions/types expecting Foundation types.

We should be using types declared in https://github.com/apple/swift-corelibs-foundation/blob/eec4b26deee34edb7664ddd9c1222492a399d122/Sources/Foundation/NSGeometry.swift instead of rolling our own versions. I've tried that at some point, but that broke our SVG rendering. We need to cover that with tests and do a safe migration to the original Foundation's version.

@MaxDesiatov MaxDesiatov added the bug Something isn't working label May 14, 2021
@MaxDesiatov MaxDesiatov self-assigned this May 14, 2021
MaxDesiatov added a commit that referenced this issue Jun 19, 2021
Resolves #404.

This also allows us to write more tests that are source-compatible with SwiftUI.

* Use `CGFloat`, `CGPoint`, `CGRect` from Foundation

* Fix GTK build

* Fix macOS build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

1 participant