Preparing search index...

    Fill rule for closed path regions; determines which points are "inside" when fill contours overlap or self-intersect. Mirrors the SVG fill-rule attribute. Pass to VectorCompositeBuilder#addPath.

    Lens Scripting Version 370

    var builder = VectorCompositeBuilder.create(256, 256);
    var pathBuilder = VectorPathBuilder.create();
    pathBuilder.moveTo(new vec2(0, 0));
    pathBuilder.lineTo(new vec2(256, 0));
    pathBuilder.lineTo(new vec2(128, 256));
    var path = pathBuilder.build();
    // Even-odd leaves nested contours as holes; NonZero is the SVG default.
    builder.addPath(path, VectorPaint.solid(new vec4(1, 0, 0, 1)), VectorComposite.FillRule.EvenOdd);
    Index

    Enumeration Members

    Enumeration Members

    EvenOdd: number

    Even-odd rule. A point is inside the fill if a ray from that point crosses the path boundary an odd number of times. Useful for shapes with "holes" formed by nested contours.

    Lens Scripting Version 370

    NonZero: number

    Non-zero winding rule. A point is inside the fill if a ray from that point crosses the path boundary a non-zero net number of times (counting direction). This is the SVG default.

    Lens Scripting Version 370