From bf1c94e8b20ccb5eef9d826cdb67ecedbad5750f Mon Sep 17 00:00:00 2001 From: Hector Pardo Date: Sat, 22 Apr 2023 17:09:42 -0500 Subject: [PATCH] js --- js/generar.js | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 js/generar.js diff --git a/js/generar.js b/js/generar.js new file mode 100644 index 0000000..b81953e --- /dev/null +++ b/js/generar.js @@ -0,0 +1,61 @@ +var canvas1 = document.getElementById('canvas1') + +function gene(){ +nombrec = document.getElementById('nombrecomp').value +cargotb = document.getElementById('cargotrab').value +ungest = document.getElementById('unigest').value +ungest2 = document.getElementById('unigest2').value +direccomp = document.getElementById('direccompl').value +telex = document.getElementById('telext').value +corrl = document.getElementById('corrlab').value +wempr = document.getElementById('wempres').value + +canvas1 = document.getElementById('canvas1') +ctx1 = canvas1.getContext('2d') + +ctx1.clearRect(0, 0, 460, 148) + +bg = document.getElementById('imgbg') +ctx1.drawImage(bg, 0, 0, 460, 148) + +ctx1.font = 'bold 14px Arial' +ctx1.fillStyle = '#1550c4' +ctx1.textAlign = 'start' +ctx1.fillText(nombrec, 16, 32); + +ctx1.font = '13px Arial' +ctx1.fillStyle = '#1550c4' +ctx1.textAlign = 'start' +ctx1.fillText(cargotb, 16, 47); + +ctx1.font = 'bold 13px Arial' +ctx1.fillStyle = '#1550c4' +ctx1.textAlign = 'start' +ctx1.fillText(ungest, 16, 62); + +ctx1.font = 'bold 13px Arial' +ctx1.fillStyle = '#1550c4' +ctx1.textAlign = 'start' +ctx1.fillText(ungest2, 16, 77); + +ctx1.font = '11px Arial' +ctx1.fillStyle = '#1550c4' +ctx1.textAlign = 'start' +ctx1.fillText(direccomp, 32, 90); + +ctx1.font = '11px Arial' +ctx1.fillStyle = '#1550c4' +ctx1.textAlign = 'start' +ctx1.fillText(telex, 32, 105); + +ctx1.font = '11px Arial' +ctx1.fillStyle = '#1550c4' +ctx1.textAlign = 'start' +ctx1.fillText(corrl, 32, 119); + +ctx1.font = '11px Arial' +ctx1.fillStyle = '#1550c4' +ctx1.textAlign = 'start' +ctx1.fillText(wempr, 32, 134); + +} \ No newline at end of file