JAVASCRIPT   42

canvas0.js

Guest on 31st August 2021 09:56:26 AM

  1. function cnvInit(trg){
  2.   var canvas = document.getElementById(trg);
  3.   var ctx = canvas.getContext('2d');
  4.   return ctx;
  5. }
  6.  
  7. function rtg(ct,x,y,w,h,fl){
  8.    ct.fillStyle=fl;
  9.    ct.fillRect(x,y,w,h);
  10. }

Raw Paste


Login or Register to edit or fork this paste. It's free.