linebender / piet

An abstraction for 2D graphics.
Apache License 2.0
1.24k stars 93 forks source link

mac: Create gradients with DeviceRGB colorspace #489

Closed jpochyla closed 2 years ago

jpochyla commented 2 years ago

This fixes the gradient coloring on Mac. I'm not exactly sure why just switching to CGColorSpace::create_device_rgb() doesn't help, but I had to also avoid CGColor entirely and compose the gradient from the color components.

cmyr commented 2 years ago

You'll need to update the piet-snapshots repo to include the new snapshots, there should be instructions in the CONTRIBUTING file (in this repo). :)