Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

(NS | UI)EdgeInsets operators #82

Closed
indragiek opened this issue Aug 5, 2013 · 6 comments · Fixed by #86
Closed

(NS | UI)EdgeInsets operators #82

indragiek opened this issue Aug 5, 2013 · 6 comments · Fixed by #86

Comments

@indragiek
Copy link
Member

Related: github/Archimedes#17

Currently, RACSignal+RCLGeometryAdditions.h has -insetWidth:height: which isn't too useful for applying insets where top/bottom and left/right aren't equal. I propose a new operator, -inset: which accepts a signal that sends boxed NSEdgeInsets or UIEdgeInsets values and applies them to a CGRect.

I would be happy to implement this. Any thoughts?

@indragiek
Copy link
Member Author

Also: as I tried to poorly explain the the Archimedes issue, should there be any consideration to flippedness when dealing with operators that use edge insets? ie. Should it accept a flipped BOOL signal as a parameter and then transform the insets accordingly (flipping top/bottom) before applying them to the rect?

@jspahrsummers
Copy link
Member

👍 on an operator for this, but I would want a cross-platform answer to github/Archimedes#17 first.

should there be any consideration to flippedness when dealing with operators that use edge insets?

No, RCL globally assumes an unflipped coordinate system right now.

@indragiek
Copy link
Member Author

Unflipped as in a top left or bottom left origin? Unflipped seems ambiguous when dealing with both Mac and iOS :)

EDIT: Maybe you meant unflipped with respect to the platform, so bottom left on Mac and top left on iOS?

@jspahrsummers
Copy link
Member

Correct, unflipped per platform.

@indragiek
Copy link
Member Author

The Archimedes side of things has been implemented in github/Archimedes#18. Once this has been reviewed and merged I can start on these operators.

@jspahrsummers
Copy link
Member

@indragiek You can always feel free to open a PR that depends on another, even across repos. Just make sure the submodule is on the correct SHA for it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants