Repository navigation
feat: ctxFillRadialGradient fills canvas's two-circle radial gradient through CGContextDrawRadialGradient, through the current path or a rect, where a renderer had no radial fill to hand one to and drew every radial gradient flat - #121
Merged
Conversation
… through CGContextDrawRadialGradient, through the current path or a rect, where a renderer had no radial fill to hand one to and drew every radial gradient flat
This was referenced Oct 8, 2026
sidorares
added a commit
to sidorares/react-x11
that referenced
this pull request
Oct 9, 2026
…n a Mac and clipboard.write() copies an image there, where 2.47.0's range admitted no bridge with ctxFillRadialGradient or pasteboardWrite (#928) #926 draws canvas's two-circle radial gradient through ctxFillRadialGradient, and #892 puts every flavour of a clipboard.write() on the pasteboard through pasteboardWrite. Both calls are new in @windowkit/appkit 0.28.0 (windowkit/appkit#121, #119), and the range stayed at ^0.27.0, which on 0.x admits no 0.28. So every install of 2.47.0 resolves 0.27.0: createRadialGradient keeps the flat stand-in, and a write with more than text is refused, while the code that draws and copies them shipped. Found from react-x11-components' browser example, whose lockfile took 2.47.0 for its filter: blur() and still drew reactmelbourne.com's and melbcss.com's radial gradients flat on macOS. test/cocoa-radial-gradient.test.js already holds the real bridge to the gradient's colours, and skips where the bridge has no ctxFillRadialGradient, which is CI and 0.27.0: on a Mac it runs on 0.28.0 and passes. All 611 Cocoa tests pass on 0.28.0.
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.
react-x11's macOS context answered
createRadialGradientwith a linear gradient along no line, because the bridge had no radial fill to hand one to. Every radial gradient a page drew there came out flat, and<Html>drew none: melbcss.com's liquid glass theme lost the six orbs behind its cards, and the knob of its toggle.ctxFillRadialGradient(surface, x0, y0, r0, x1, y1, r1, stops, x?, y?, w?, h?)fills canvas's two-circle radial gradient throughCGContextDrawRadialGradient, whose two-circle model is canvas's, its end colours carried on past both circles as canvas extends them. LikectxFillLinearGradient, it fills the current path and keeps it, or the rect that follows the stops. The stop list and the clip are now shared by the two fills.test/radial-gradient.jschecks the start colour at the centre, the end colour at the end circle and past it, a mix halfway out, the rect form filling only its rect, the path form filling the path and keeping it, and circles off the middle moving the colours with them.The react-x11 side is sidorares/react-x11#926:
createRadialGradientuses this where the bridge has it, and keeps the flat stand-in where it does not.