mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-20 14:05:09 +00:00
change stroke example
This commit is contained in:
@@ -87,7 +87,7 @@ class TextFill extends Component{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: not supported
|
// TODO: iOS not support text stroke with pattern
|
||||||
class TextStroke extends Component{
|
class TextStroke extends Component{
|
||||||
static title = 'Stroke the text';
|
static title = 'Stroke the text';
|
||||||
render() {
|
render() {
|
||||||
@@ -101,12 +101,11 @@ class TextStroke extends Component{
|
|||||||
<Stop offset="0%" stopColor="#000" stopOpacity="1" />
|
<Stop offset="0%" stopColor="#000" stopOpacity="1" />
|
||||||
</LinearGradient>
|
</LinearGradient>
|
||||||
</Defs>
|
</Defs>
|
||||||
<Rect x="0" y="0" width="200" height="60" fill="blue" />
|
|
||||||
<Text
|
<Text
|
||||||
stroke="url(#grad)"
|
stroke="url(#grad)"
|
||||||
strokeWidth="4"
|
strokeWidth="2"
|
||||||
fill="none"
|
fill="none"
|
||||||
fontSize="20"
|
fontSize="30"
|
||||||
fontWeight="bold"
|
fontWeight="bold"
|
||||||
x="100"
|
x="100"
|
||||||
y="20"
|
y="20"
|
||||||
@@ -155,7 +154,7 @@ const icon = <Svg
|
|||||||
>字</Text>
|
>字</Text>
|
||||||
</Svg>;
|
</Svg>;
|
||||||
|
|
||||||
const samples = [TextExample, TextRotate, TextFill, TextPath];
|
const samples = [TextExample, TextRotate, TextStroke, TextFill, TextPath];
|
||||||
|
|
||||||
export {
|
export {
|
||||||
icon,
|
icon,
|
||||||
|
|||||||
Reference in New Issue
Block a user