mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-20 14:05:09 +00:00
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.
20 lines
390 B
Objective-C
20 lines
390 B
Objective-C
/**
|
|
* Copyright (c) 2015-present, Horcrux.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the MIT-style license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#import "RNSVGContainer.h"
|
|
#import "RNSVGGroup.h"
|
|
#import "RNSVGSvgView.h"
|
|
|
|
@interface RNSVGClipPath : RNSVGGroup
|
|
|
|
- (BOOL)isSimpleClipPath;
|
|
|
|
@end
|