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

[WIP] iOS border updates: BorderEdges, BorderThickness, BorderDrawingStyle. #85

Closed
wants to merge 1 commit into from
Closed

[WIP] iOS border updates: BorderEdges, BorderThickness, BorderDrawingStyle. #85

wants to merge 1 commit into from

Conversation

winnicki
Copy link

Here are some iOS updates that are still a WIP (but pretty close). If you run the app and look at the bordered pancakes, you'll see that each edge is drawn separately and leaves room for the corner arcs. I'm struggling to get the math perfect for filling in the arcs. Have a a look at the top-left and top-right corners. They are almost working but that's not good enough of course. I'm having another look now but decided to submit this PR in case someone wants to help.

Updates are for the following:

  • BorderThickness is now of type Thickness so now each side can be of a specified thickness (I wanted this so when they're stacked vertically with no margin so they don't double up).

  • BorderEdges can be specified. This could be useful for maybe two-tone info or warning pancakes that just have a thick inside left border. It's an enum (Left, Right, Top, Bottom, All).

  • BorderDrawingStyle now works by drawing the borders inside, outside, or centred. Previously they were drawn centred as that is the default for UIBezierPath. This was causing the borders to be clipped for me when stacking pancakes.

If we can figure out the corner fills, then iOS can be finished pretty quickly. Android would need to be updated as well but should be easier to copy from iOS.

- Individual edge drawing, thickness, and centered/inside/outside updates.
@sthewissen
Copy link
Owner

I've taken a look at this, but definitely not a deep dive. That's why I also don't really have a lot of comments about it yet. I've also been a bit pre-occupied with some tweaks of my own in the vnext branch.

@winnicki winnicki closed this Apr 23, 2020
@winnicki winnicki reopened this Apr 23, 2020
@winnicki
Copy link
Author

I realized how I can simplify this to get it to work and I may have time this weekend.

@sthewissen
Copy link
Owner

That would be awesome! Also, not to pressure you or anything but I'm slowly contemplating restructuring this code at some point, as described in #93. Let's get it working first though, can always restructure after :D

@winnicki
Copy link
Author

winnicki commented May 6, 2020

@sthewissen I just started a new contract last week and I've had nothing left in the tank after working overtime. My thoughts are that supporting everything simultaneously is difficult. I nearly had it but couldn't get the corners filled in perfectly for some reason. If that can be debugged then it's good, but I was banging my head against the wall with it. Supporting BorderEdges and individual BorderThickness with inside/outside BorderDrawingStyle can be easily done without rounded corners. For example, a thick left bar and then rounded corners on the top/bottom right is np.

I would say go ahead and restructure your code in #93. You could easily just cherry pick my code in here for the individual border edges and inside / outside borders. Just separate that from the rounded corners code.

@winnicki winnicki closed this Aug 11, 2020
@winnicki winnicki deleted the ios-border-updates branch August 11, 2020 17:52
@sthewissen
Copy link
Owner

@winnicki

Let me at the very least say that I really appreciate your effort and interest in this. Even though this PR being open for months might not particularly show that. I had great plans towards v2.0 to include it but similar things like what you described have kept me from putting this in. Not enough gas left in the tank after work and other side projects :(

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

Successfully merging this pull request may close these issues.

None yet

2 participants