Fix psrose canvas fill (-B+g) being drawn max_radius times too small - #9146
Merged
Conversation
The do_fill block sized the canvas-fill circle as 2 * Ctrl->S.scale, but a few lines earlier Ctrl->S.scale was divided by max_radius, so it is no longer the plot radius in inches but inches per data unit. With -B+g<fill> and any -R0/<rmax>/... where rmax != 1 the fill circle came out max_radius times too small and was hidden behind the rose. Use the local variable diameter, which is set before that division and is what the frame-drawing block at the end of the module already uses. The half-circle clip rectangle in the same block had the same defect and is fixed too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
joa-quim
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Diagnosed and patched with Claude Code (Claude Opus 5).
Bug
The
do_fillblock sized the canvas-fill circle as2 * Ctrl->S.scale, but a few lines earlierCtrl->S.scalewas divided bymax_radius, so it is no longer the plot radius in inches but inches per data unit. With-B+g<fill>and any-R0/<rmax>/...wherermax != 1the fill circle came outmax_radiustimes too small and was hidden behind the rose.Use the local variable diameter, which is set before that division and is what the frame-drawing block at the end of the module already uses. The half-circle clip rectangle in the same block had the same defect and is fixed too.
Tested with this script
Without the fix the lightblue background is not visible at all.