mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-20 14:05:09 +00:00
fix clip bug
This commit is contained in:
@@ -49,6 +49,14 @@ class ClipPathAttr extends Component{
|
||||
height="100"
|
||||
fill="url(#grad)"
|
||||
clipPath="M50,5L20,99L95,39L5,39L80,99z"
|
||||
onStartShouldSetResponder={() => alert("1111111")}
|
||||
/>
|
||||
<Rect
|
||||
x="40%"
|
||||
y="0"
|
||||
width="20%"
|
||||
height="20%"
|
||||
fill="pink"
|
||||
/>
|
||||
</Svg>;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/**
|
||||
* Sample React Native App
|
||||
* https://github.com/facebook/react-native
|
||||
* Sample React Native App for react-native-svg library
|
||||
* https://github.com/magicismight/react-native-svg/tree/master/Example
|
||||
*/
|
||||
'use strict';
|
||||
import React, {Component} from 'react';
|
||||
|
||||
import {
|
||||
AppRegistry,
|
||||
StyleSheet,
|
||||
@@ -15,8 +17,6 @@ import {
|
||||
Easing
|
||||
} from 'react-native';
|
||||
|
||||
import React, {Component} from 'react';
|
||||
|
||||
import {
|
||||
Svg,
|
||||
Circle,
|
||||
@@ -108,7 +108,7 @@ const styles = StyleSheet.create({
|
||||
|
||||
const names = ['Svg', 'Stroking', 'Path', 'Line', 'Rect', 'Polygon', 'Polyline', 'Circle', 'Ellipse', 'G', 'Text', 'Use', 'Symbol', 'Gradients', 'Clipping', 'Image'];
|
||||
|
||||
class ArtSvgExample extends Component {
|
||||
class SvgExample extends Component {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.state = {
|
||||
@@ -239,7 +239,7 @@ class ArtSvgExample extends Component {
|
||||
</View>
|
||||
</Animated.Modal>
|
||||
<Text style={styles.welcome}>
|
||||
SVG by ART!
|
||||
SVG library for React Native
|
||||
</Text>
|
||||
<ScrollView
|
||||
style={styles.content}
|
||||
@@ -251,4 +251,4 @@ class ArtSvgExample extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
AppRegistry.registerComponent('ArtSvgExample', () => ArtSvgExample);
|
||||
AppRegistry.registerComponent('ArtSvgExample', () => SvgExample);
|
||||
|
||||
Reference in New Issue
Block a user