UNPKG

@flyskywhy/react-native-gcanvas

Version:

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

9 lines (6 loc) 197 B
ctx.fillStyle = '#000000'; ctx.fillRect(0, 0, c.width, c.height); ctx.strokeStyle = 'rgba(255,0,0,1.0)'; ctx.lineWidth = 5*ratio; ctx.rect(10*ratio, 10*ratio, 100*ratio, 100*ratio) ctx.stroke();