https://www.w3.org/TR/SVG11/masking.html#EstablishingANewClippingPath
The raw geometry of each child element exclusive of rendering properties such as ‘fill’, ‘stroke’, ‘stroke-width’ within a ‘clipPath’ conceptually defines a 1-bit mask (with the possible exception of anti-aliasing along the edge of the geometry) which represents the silhouette of the graphics associated with that element. Anything outside the outline of the object is masked out. If a child element is made invisible by ‘display’ or ‘visibility’ it does not contribute to the clipping path. When the ‘clipPath’ element contains multiple child elements, the silhouettes of the child elements are logically OR'd together to create a single silhouette which is then used to restrict the region onto which paint can be applied. Thus, a point is inside the clipping path if it is inside any of the children of the ‘clipPath’.
For a given graphics element, the actual clipping path used will be the intersection of the clipping path specified by its ‘clip-path’ property (if any) with any clipping paths on its ancestors, as specified by the ‘clip-path’ property on the ancestor elements, or by the ‘overflow’ property on ancestor elements which establish a new viewport. Also, see the discussion of the initial clipping path.)
Fixes issues highlighted by https://github.com/react-native-community/react-native-svg/issues/752
Fix https://github.com/react-native-community/react-native-svg/issues/280
Fix https://github.com/react-native-community/react-native-svg/issues/517
[android] Fix https://github.com/react-native-community/react-native-svg/issues/766
`Region.Op.REPLACE` is deprecated in API level 28
Replace with clipPath (Path path) to Intersect instead.
Check all children before current node itself.
Add shortcut check to return active node if `event` is null. Otherwise
it may return wrong node which have higher z-index value.
Remove hasGlyph helper and ligature tracking array.
Use single call to:
- CFAttributedStringCreate
- CTLineCreateWithAttributedString
and a call per bi-di/layout run to:
- CTRunGetGlyphs for glyphs
- CTFontGetAdvancesForGlyphs for advances
- CTRunGetStringIndices for indices of ligatures
And an efficient loop over the substituted characters of ligatures,
to make glyph context calls for incrementing the attribute indices.