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

Swizzeling, .With & other Misc Extensions for Rects #50

Open
Eregerog opened this issue Jul 3, 2019 · 0 comments
Open

Swizzeling, .With & other Misc Extensions for Rects #50

Eregerog opened this issue Jul 3, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@Eregerog
Copy link
Contributor

Eregerog commented Jul 3, 2019

While I'm not so sure about swizzeling, being able to easily modfiy&copy a rect is something that could help a lot.

Here are a few examples:
var indentedRect = rect.WithX(x => x - 15).WithWidth(w => w - 15);
The above example would be easier with a method that "splits / indents" a rect:
var indentedRect = rect.IndentRight(15); // This code would behave the same as the one from above
Swizzeling could work like this, but it doesn't seem so useful:
var transposedRect = rect.yxhw; //Switches x and y and width and height

@XDracam XDracam added the enhancement New feature or request label Jul 4, 2019
@XDracam XDracam added this to Accepted in CoreLibrary Todos Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
CoreLibrary Todos
  
Accepted
Development

No branches or pull requests

2 participants