Skip to content

Create overload of fillCircleHelper to be consistent with drawCircleHelper - #485

Closed
BillMerryman wants to merge 3 commits into
adafruit:masterfrom
BillMerryman:create-alt-fillCircleHelper
Closed

Create overload of fillCircleHelper to be consistent with drawCircleHelper#485
BillMerryman wants to merge 3 commits into
adafruit:masterfrom
BillMerryman:create-alt-fillCircleHelper

Conversation

@BillMerryman

Copy link
Copy Markdown
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 BillMerryman closed this by deleting the head repository Nov 1, 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.

1 participant