Flat, round, designer-friendly pseudo-3D engine for canvas & SVG
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

๐Ÿ›  SvgRenderer getPointString

+8 -5
+8 -5
js/svg-renderer.js
··· 24 24 return Math.round( num * 1000 ) / 1000; 25 25 }; 26 26 27 + function getPointString( point ) { 28 + return round( point.x ) + ',' + round( point.y ) + ' '; 29 + } 30 + 27 31 SvgRenderer.begin = function() {}; 28 32 29 33 SvgRenderer.move = function( svg, elem, point ) { 30 - return 'M' + round( point.x ) + ',' + round( point.y ); 34 + return 'M' + getPointString( point ); 31 35 }; 32 36 33 37 SvgRenderer.line = function( svg, elem, point ) { 34 - return 'L' + round( point.x ) + ',' + round( point.y ); 38 + return 'L' + getPointString( point ); 35 39 }; 36 40 37 41 SvgRenderer.bezier = function( svg, elem, cp0, cp1, end ) { 38 - return 'C' + round( cp0.x ) + ',' + round( cp0.y ) + 39 - ' ' + round( cp1.x ) + ',' + round( cp1.y ) + 40 - ' ' + round( end.x ) + ',' + round( end.y ); 42 + return 'C' + getPointString( cp0 ) + getPointString( cp1 ) + 43 + getPointString( end ); 41 44 }; 42 45 43 46 SvgRenderer.closePath = function(/* elem */) {