mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-19 21:45:10 +00:00
Add polyline strokeLinecap strokeLinejoin example
This commit is contained in:
@@ -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
|
||||
height="20"
|
||||
width="20"
|
||||
@@ -69,7 +88,7 @@ const icon = <Svg
|
||||
/>
|
||||
</Svg>;
|
||||
|
||||
const samples = [PolylineExample, StraightLines, PolylineFill];
|
||||
const samples = [PolylineExample, StraightLines, PolylineFill, PolylineFillStroke];
|
||||
|
||||
export {
|
||||
icon,
|
||||
|
||||
@@ -51,10 +51,7 @@ export default class {
|
||||
};
|
||||
|
||||
scale = (x, y) => {
|
||||
if (y == null) {
|
||||
y = x;
|
||||
}
|
||||
return this.transform(x, 0, 0, y, 0, 0);
|
||||
return this.transform(x, 0, 0, y == null ? x : y, 0, 0);
|
||||
};
|
||||
|
||||
rotate = (deg, x, y) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"name": "react-native-svg",
|
||||
"description": "react native svg library",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user