Skip to content

Conversation

@BillMerryman
Copy link
Contributor

The method fillCircleHelper is inconsistent with the drawCircleHelper method. The brief for fillCircleHelper suggests it can render quarter circle segments while only capable of rendering half circles, while the brief for drawCircleHelper inaccurately states it only supports two mask bits while actually supporting four, one for each quadrant.

This PR addresses these issues by creating an overload of fillCircleHelper to draw each corner independently. A boolean is added to the signature of the overloaded method (useLegacy) that, when true, uses the existing version of fillCircleHelper. When false, it uses a version of the code that is consistent with drawCircleHelper, at the cost of being slightly less efficient (four calls to writeFastVLine instead of two). This approach avoids breaking existing clients. The briefs for fillCircleHelper and drawCircleHelper have also been corrected to more accurately reflect their functionality.

@BillMerryman
Copy link
Contributor Author

@ladyada for review.

@ladyada
Copy link
Member

ladyada commented Nov 6, 2025

i really dislike anything with "bool useLegacy" - figure out another way?

@BillMerryman
Copy link
Contributor Author

@ladyada I originally just modified fillCircleHelper itself, and updated fillCircle and fillRoundRect to account for the changes. Would you be comfortable with that approach?

@ladyada
Copy link
Member

ladyada commented Nov 6, 2025

question: does this even really matter? what is the impact/can you just change the comments?

@BillMerryman
Copy link
Contributor Author

@ladyada The problem is that the fillCircleHelper method doesn't draw quarter circles like the drawCircleHelper method. It only draws half circles. The brief for it says 'Quarter-circle drawer with fill' but it doesn't draw quarter circles, only half circles, left and right. My overload does draw individual quarter circles, just like the drawCircleHelper method does. It draws them filled.

@BillMerryman
Copy link
Contributor Author

@ladyada I could take the bool out of the signature and rename the method 'fillQuarterCircleHelper'?

@ladyada
Copy link
Member

ladyada commented Nov 6, 2025

lets just change the documentation - why mess with the code if it isnt needed

@BillMerryman
Copy link
Contributor Author

@ladyada How do you draw a filled quarter circle? Like just the top left quadrant of a circle?

@BillMerryman
Copy link
Contributor Author

@ladyada This method is needed as it adds functionality (the ability to fill quarter circles) that does not exist in the current implementation.

@BillMerryman
Copy link
Contributor Author

@ladyada I'm going to close this PR and open two new ones. One to correct the documentation, the other to add a method that can actually fill quarter circles.

@BillMerryman BillMerryman closed this by deleting the head repository Nov 7, 2025
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.

2 participants