b'\n_START_ARTICLE_\nCanvas elements\n_START_PARAGRAPH_\nCanvas (ang\xc4\xbcu: canvas \xe2\x80\x94 \xe2\x80\x98audekls\xe2\x80\x99) ir HTML 5 elements, kas paredz\xc4\x93ts skriptu valodas vizualiz\xc4\x81cijai, izmantojot 2d un bitmap att\xc4\x93lus.\n_START_SECTION_\nV\xc4\x93sture\n_START_PARAGRAPH_\nCanvas pirmatn\xc4\x93ji tika izveidots Apple lieto\xc5\xa1anai Mac OS X t\xc4\xabkla komponent\xc4\x93s ar Safari p\xc4\x81rl\xc5\xabkprogrammu. V\xc4\x93l\xc4\x81k tas tika piel\xc4\x81gots Gecko t\xc4\xabmek\xc4\xbca p\xc4\x81rl\xc5\xabkprogramm\xc4\x81m un Opera t\xc4\xabmek\xc4\xbca p\xc4\x81rl\xc5\xabkprogramm\xc4\x81m un standartiz\xc4\x93ts k\xc4\x81 WHATWG uz n\xc4\x81kam\xc4\x81s paaudzes t\xc4\xabkla tehnolo\xc4\xa3ij\xc4\x81m.\n_START_SECTION_\nPielietojums\n_START_PARAGRAPH_\nCanvas sast\xc4\x81v no z\xc4\xabm\xc4\x93jam\xc4\x81 apgabala, kas tiek uzst\xc4\x81d\xc4\xabts HTML kod\xc4\x81 ar augstumu un platumu. JavaScript kods sniedz piek\xc4\xbcuvi \xc5\xa1im apgabalam, \xc4\xbcaujot veidot dinamiski veidotu grafiku.\n_START_SECTION_\nParaugs\n_START_PARAGRAPH_\n\xc5\xa0is koda paraugs rada Canvas elementu html lap\xc4\x81:_NEWLINE_<canvas id="paraugs" width="320" height="240">_NEWLINE_Tavs t\xc4\xabkla p\xc4\x81rl\xc5\xabks neatbalsta HTML5 Canvas._NEWLINE_</canvas>_NEWLINE_Koda paraugs ar att\xc4\x93lu piec\xc4\x81s plakn\xc4\x93s_NEWLINE_<html><head><script type="text/javascript">var siena = new Image(); _NEWLINE_siena.src = \'gmet01.jpg\';function zimet(){var canvas = document.getElementById(\'Vietne\');var cimg = canvas.getContext("2d");if (canvas.getContext){var ctx = canvas.getContext(\'2d\');ctx.fillStyle = "#ffffff";ctx.fillRect(25,15,450,365);ctx.strokeStyle = "#fa4a4a";for (m = 0; m < 8; m++) { cimg.drawImage(siena, 0,8*m, 59,6,115-m*16,175+8*m,145+m*32,8);}for (m = 0; m <8; m++) { cimg.drawImage(siena, 0,8*m, 59,6,115-m*16,55-8*m,145+m*32,8); }for (m = 0; m <8; m++) { cimg.drawImage(siena, 8*m,0, 6,59,125-m*16,35-8*m,16,145+m*16); }for (m = 0; m <8; m++) { cimg.drawImage(siena, 8*m,0, 6,59,255+m*16,39-8*m,16,145+m*16); }cimg.drawImage( siena, 0,1, 59,59,135,55,120,120);ctx.fill();ctx.stroke();setTimeout(zimet,24);} else { }}</script></head><body onload="zimet();"><div> <canvas id="Vietne" width="580" height="450"></canvas></div></body> </html>'