Skip to content

How to use stroke in a paragraph, or achieve a similar effect to stroke="purple" using other methods? #2271

Answered by andrew-azzuu
xiaoosnggao asked this question in Q&A
Discussion options

You must be logged in to vote

I've been looking for a method of doing this too and the best solution I can come up with is to add multiple shadows on the group layer as so:

let blurLevel = 2;
<Group
    origin={{ y: a.calculatedDimensions.height / 2, x: width / 2 }}
    matrix={a.matrix}
    layer={<Paint blendMode={a.blendMode === 'none'? undefined : a.blendMode} opacity={opacity_dv}>
        <Shadow dx={5} dy={5} color={'purple'} blur={blurLevel}></Shadow>
        <Shadow dx={-5} dy={5} color={'purple'} blur={blurLevel}></Shadow>
        <Shadow dx={-5} dy={-5} color={'purple'} blur={blurLevel}></Shadow>
        <Shadow dx={5} dy={-5} color={'purple'} blur={blurLevel}></Shadow>
    </Paint>}
    opacity={opacity_dv}…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@andrew-azzuu
Comment options

Answer selected by xiaoosnggao
Comment options

You must be logged in to vote
1 reply
@vadimshahray
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants