-
Notifications
You must be signed in to change notification settings - Fork 981
Description
ScottPlot Version: 5.0.21
Question: Can a polygon be used as a mask?
I'm using ScottPlot to demonstrate how my colour library can be used with ScottPlot to generate the classic CIE xy chromaticity diagram, which was much easier than I expected 🎉
My approach is brute force: convert every coordinate inside that black boundary to an RGB colour and draw a line around it, and that works fine. The only downside is that it's expensive to calculate if a coordinate is within that black boundary or not. My library will support it but it takes a couple of minutes for a million points.
For demonstration purposes, it would be a lot quicker for me to plot all points and then use the black boundary polygon as a mask, with everything outside the boundary removed. Is this possible?
I'm not even sure if it's something that a plotting library should support, but thought it was worth asking in case I missed something!

