This commit is contained in:
Hector Pardo 2023-04-22 17:09:42 -05:00
parent fb2112d945
commit bf1c94e8b2
1 changed files with 61 additions and 0 deletions

61
js/generar.js Normal file
View File

@ -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);
}