fn intersect_impl<S: Simd>(
simd: S,
path_1: PathDataRef<'_>,
path_2: PathDataRef<'_>,
target: &mut StripStorage,
)Expand description
The implementation of the clipping algorithm using sparse strips. Conceptually, it is relatively simple: We iterate over each strip and fill region of the two paths in lock step and determine all overlaps between the two. For each overlap, we proceed depending on what kind of region we have in the first path and the second one.
- In case we have two fill regions, the overlap region will also be filled.
- In case we have one strip and one fill region, the overlap region will copy the alpha mask of the strip region.
- Finally, if we have two strip regions, we combine the alpha masks of both.
- All regions that are not filled in either path are simply ignored.
This is all that this method does. It just looks more complicated as the logic for iterating in lock step is a bit tricky.