Skip to content
This repository was archived by the owner on Dec 1, 2025. It is now read-only.
This repository was archived by the owner on Dec 1, 2025. It is now read-only.

feat: 新增react-native-clippath的CAPI版本适配 #8

@tyBrave

Description

@tyBrave

Feature Request

请描述你的想法或需求。此 issue 为您提供一个向维护者展示或提出想法的平台 -- 如果您可以提交一个 PR 的话就更好了。

Please describe your idea. This issue should serve for you to present or pitch an idea to the maintainers - but remember that it would be better if you were to submit a PR instead.

Why it is needed

请告诉我们更多关于您为何希望添加这个功能的背景和原因。

将react-native-clippath库适配CAPI版本

Possible implementation

如果您可以从技术角度描述这个新功能如何工作,它依赖哪些代码等,这会对我们很有帮助。
新增以下属性支持

Name description type default
svgKey Each view must have a different key string ""
d The shape, defined by a series of commands string ""
viewBox defines the position and dimension, in user space Array[number] (4) undefined
align the aligment string xMidYMid
aspect aspect ratio string meet
fillRule determines what side of a path is inside a shape string nonzero
strokeWidth defines the thickness of a line (mobile) number 1
strokeCap line cap (mobile) string 'butt'
strokeJoin line join (mobile) string 'miter'
strokeMiter control the behavior of miter (mobile) number 4
strokeStart the start (mobile) number 0
strokeEnd the end (mobile) number 1

Transform


The percentageValue property refers to the fact that the Origin will be multiplied by the size of the view.

Name type default
translateZ number (zIndex) 0
transX number 0
transY number 0
transPercentageValue boolean false
rot number 0
rotOx number 0
rotOy number 0
rotPercentageValue boolean false
sc number 1
scX number 1
scY number 1
scO number 0
scOx number 0
scOy number 0
scPercentageValue boolean false

Code sample

如果可行的话,请用展示新代码是如何工作的。

import {ClipPathView , ClipPathViewH } from 'react-native-clippathview'

// TODO: What to do with the module?
<ClipPathView style={{backgroundColor:'green'}}

    d={myPath}
    viewBox={myViewBox}
    
    

>

    <View >
        <Text style={{color:'white'}}>hello world</Text>
    </View>
    
</ClipPathView>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions