Chemical Data Processing Library Python API - Version 1.1.1
Static Public Attributes | List of all members
CDPL.Vis.Path2D.FillRule Class Reference

Specifies which method to use for filling closed shapes described by the Path2D object. More...

+ Inheritance diagram for CDPL.Vis.Path2D.FillRule:

Static Public Attributes

int EVEN_ODD = 0
 Specifies that the path has to be filled using the odd even fill rule. More...
 
int WINDING = 1
 Specifies that the path has to be filled using the non-zero winding rule. More...
 

Detailed Description

Specifies which method to use for filling closed shapes described by the Path2D object.

Member Data Documentation

◆ EVEN_ODD

int CDPL.Vis.Path2D.FillRule.EVEN_ODD = 0
static

Specifies that the path has to be filled using the odd even fill rule.

With this rule, the question whether a point is inside the shape can be answered by the following method: Draw a horizontal line from the point to a location outside the shape, and count the number of intersections. If the number of intersections is an odd number, the point is inside the shape.

◆ WINDING

int CDPL.Vis.Path2D.FillRule.WINDING = 1
static

Specifies that the path has to be filled using the non-zero winding rule.

With this rule, the question whether a point is inside the shape can be answered by the following method: Draw a horizontal line from the point to a location outside the shape. Determine whether the direction of the line at each intersection point is up or down. The winding number is determined by summing the direction of each intersection. If the number is non-zero, the point is inside the shape.