第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

畫布source-in和source-out效果

畫布source-in和source-out效果

StupidFox 2017-03-28 21:54:18
var?can1=null; var?c1=null; var?img=null; //頁(yè)面加載 window.onload=function(){ ?can1=document.getElementById("canone"); ?c1=can1.getContext("2d"); ?c1.save(); ?img=document.getElementById("tulips"); ? ?var?btnAtop=document.getElementById("atop"); ?var?btnIn=document.getElementById("in"); ?var?btnOut=document.getElementById("out"); //按鈕 ?btnAtop.onclick=function(){ ??c1.restore(); ??c1.clearRect(0,0,can1.width,can1.height); ??c1.save(); ??source_atop(); ?} ?btnIn.onclick=function(){ ??c1.restore(); ??c1.clearRect(0,0,can1.width,can1.height); ??c1.save(); ??source_in(); ?} ?btnOut.onclick=function(){ ??c1.restore(); ??c1.clearRect(0,0,can1.width,can1.height); ??c1.save(); ??source_out(); ?} //source-atop function?source_atop(){ ?c1.fillStyle="pink"; ?c1.beginPath(); ?c1.arc(200,150,130,0,2*Math.PI); ?c1.closePath(); ?c1.fill(); ?c1.globalCompositeOperation="source-atop"; ?c1.drawImage(img,40,20,img.width*0.8,img.height*0.7); ?c1.fillStyle="#fff"; ?c1.font="18px?微軟雅黑"; ?c1.fillText("source-atop",160,255); } function?source_in(){ ?c1.fillStyle="pink"; ?c1.beginPath(); ?c1.arc(200,150,130,0,2*Math.PI); ?c1.closePath(); ?c1.fill(); ?c1.globalCompositeOperation="source-in"; ?c1.drawImage(img,40,20,img.width*0.8,img.height*0.7); ?c1.fillStyle="#fff"; ?c1.font="18px?微軟雅黑"; ?c1.fillText("source-in",160,255); } function?source_out(){ ?c1.fillStyle="pink"; ?c1.beginPath(); ?c1.arc(200,150,130,0,2*Math.PI); ?c1.closePath(); ?c1.fill(); ?c1.globalCompositeOperation="source-out"; ?c1.drawImage(img,40,20,img.width*0.8,img.height*0.7); ?c1.fillStyle="#fff"; ?c1.font="18px?微軟雅黑"; ?c1.fillText("source-out",160,255); }source_atop是正常的,但是in和out就出不來(lái)求幫忙看看是什么問題
查看完整描述

2 回答

?
北漂雪狼

TA貢獻(xiàn)4條經(jīng)驗(yàn) 獲得超1個(gè)贊

你這個(gè)沒有html,最好把那個(gè)也粘出來(lái)

查看完整回答
反對(duì) 回復(fù) 2017-03-31
  • 2 回答
  • 0 關(guān)注
  • 1728 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)