Search code examples
javajfreechart

In JFreeChart, what is a winding rule?


In JFreeChart, what is a winding rule?

What significance are its values?

There is no javadoc or example for its usage that could be found.


Solution

  • As suggested here, a winding rule applies to determining the interior of a path, typically for filling or intersecting. Because a GeneralPath can have one of two different winding rules, ShapeUtils must include it in the corresponding implementation of equal(), seen here. Similarly, SerialUtils must include the attribute when serializing a GeneralPath, as seen here.