Add polyline strokeLinecap strokeLinejoin example

This commit is contained in:
Horcrux
2016-04-24 00:24:15 +08:00
parent 1741f63b41
commit 7d37cde40d
3 changed files with 22 additions and 6 deletions

View File

@@ -57,6 +57,25 @@ class PolylineFill extends Component{
} }
} }
class PolylineFillStroke extends Component{
static title = 'Stroke Polyline with strokeLinecap and strokeLinejoin';
render() {
return <Svg
height="100"
width="100"
>
<Polyline
points="10,10 30,10 30,60 60,70 95,90"
fill="none"
stroke="blue"
strokeWidth="5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</Svg>;
}
}
const icon = <Svg const icon = <Svg
height="20" height="20"
width="20" width="20"
@@ -69,7 +88,7 @@ const icon = <Svg
/> />
</Svg>; </Svg>;
const samples = [PolylineExample, StraightLines, PolylineFill]; const samples = [PolylineExample, StraightLines, PolylineFill, PolylineFillStroke];
export { export {
icon, icon,

View File

@@ -51,10 +51,7 @@ export default class {
}; };
scale = (x, y) => { scale = (x, y) => {
if (y == null) { return this.transform(x, 0, 0, y == null ? x : y, 0, 0);
y = x;
}
return this.transform(x, 0, 0, y, 0, 0);
}; };
rotate = (deg, x, y) => { rotate = (deg, x, y) => {

View File

@@ -1,5 +1,5 @@
{ {
"version": "1.1.1", "version": "1.1.2",
"name": "react-native-svg", "name": "react-native-svg",
"description": "react native svg library", "description": "react native svg library",
"repository": { "repository": {