UNPKG

@flyskywhy/react-native-gcanvas

Version:

A C++ native canvas 2D/WebGL component based on gpu opengl glsl shader GCanvas

13 lines (12 loc) 275 B
// First path ctx.beginPath(); ctx.strokeStyle = 'blue'; ctx.moveTo(20 *ratio, 20*ratio); ctx.lineTo(200*ratio, 20*ratio); ctx.stroke(); // Second path ctx.beginPath(); ctx.strokeStyle = 'green'; ctx.moveTo(20*ratio, 20*ratio); ctx.lineTo(120*ratio,120*ratio); ctx.stroke();