change stroke example

This commit is contained in:
Horcrux
2016-04-23 19:50:19 +08:00
parent 60191522fb
commit e2263e7f66

View File

@@ -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,