vml編輯器

<HTML xmlns:v>
<HEAD>
<META http-equiv="Content-Type" content="text/html; Charset=gb2312">
<META name="GENERATOR" content="網絡程序員伴侶(Lshdic)2004">
<META name="GENERATORDOWNLOADADDRESS" content="http://www.lshdic.com/downlshdic.asp">
<META NAME="KEYWORDS" CONTENT="Vml圖像畫板">
<title>藍麗網 - Vml圖像畫板.2003.9</title>
<STYLE>
v\:*{behavior:url(#default#VML);}?? /*聲明V為VML變量*/
a{text-Decoration:none;color:white}
a:hover{text-Decoration:underline;color:yellow;}
td{font-size:12px;color:white}
.bon1{border-bottom:1 solid eeeeee;border-right:1 solid eeeeee;border-left:1 solid gray;border-top:1 solid gray;background-color:#619CE7;color:yellow;width:54}
.bon2{border-bottom:1 solid gray;border-right:1 solid gray;border-left:1 solid eeeeee;border-top:1 solid eeeeee;background-color:#619CE7;color:white;width:54}
</STYLE>
</HEAD>
<BODY οncοntextmenu='return false' style='margin:1;cursor:default' vlink=#3732CD link='#3732CD' onselectstart='if(event.srcElement.tagName!="TEXTAREA"&&event.srcElement.tagName!="INPUT")return false' onhelp='if(help.style.display=="none"){bangzhu.click()}else{guanbibangzhu.click()};return false'>
<v:Line style='position:absolute;z-index:2000;display:none' id='line1'>? <!--鋼筆可視化-->
<v:Stroke dashstyle='shortdash'/>
</v:line>
<v:arc startangle='-200' endangle='30' style='position:absolute;z-index:2000;display:none' id='arc1'>? <!--弧形可視化-->
<v:Stroke dashstyle='shortdash'/>
</v:arc>
<v:Oval style='position:absolute;z-index:2000;display:none' id='oval1'>? <!--圓形可視化-->
<v:Stroke dashstyle='shortdash'/>
</v:oval>
<v:rect style='position:absolute;z-index:2000;display:none' id='rect1'>? <!--長方形可視化-->
<v:Stroke dashstyle='shortdash'/>
</v:rect>
<v:roundrect style='position:absolute;z-index:2000;display:none' id='roundrect1'>? <!--圓鋸形可視化-->
<v:Stroke dashstyle='shortdash'/>
</v:roundrect>
<span style='position:absolute;z-index:2000;display:none' id='wenzi1'>?? <!--插入文字可視化-->
<textarea id='txt1' style='border:1 solid black;width:300;height:100'></textarea><br>
<center>字體:<select style="width:100;" id=wenziziti οnchange='gengxinwenzi.click()'><option selected>宋體<option>黑體<option>隸書<option>幼圓<option>楷體_GB2312<option>仿宋_GB2312<option>華文中宋<option>華文行楷<option>華文新魏<option>華文細黑<option>華文彩云<option>方正姚體<option>方正舒體<option>Wingdings<option>Wingdings 2<option>Wingdings 3<option>Webdings<option>System<option>@宋體<option>@黑體<option>@隸書<option>@幼圓<option>@楷體_GB2312<option>@仿宋_GB2312<option>@華文中宋<option>@華文行楷<option>@華文新魏<option>@華文細黑<option>@華文彩云<option>@方正姚體<option>@方正舒體<option>@System</select>有無邊框<input type='checkbox' id='wenzibiankuang'><br>
顏色:<input type='text' style='border:1 solid black;width:50;height:17;' value='#000000' οnmοusedοwn='colortab.style.left=event.x-50;colortab.style.top=event.y+this.offsetHeight;rndcolor(this.id)' id='wenziyanse' οnmοusemοve='gengxinwenzi.click()'>背景:<input type='text' style='border:1 solid black;width:50;height:17;' value='#FFFFFF' οnmοusedοwn='colortab.style.left=event.x-50;colortab.style.top=event.y+this.offsetHeight;rndcolor(this.id)' id='wenzibeijing' οnmοusemοve='gengxinwenzi.click()'>大小:<select style="width:50;" id=wenzidaxiao οnchange='gengxinwenzi.click()'><option selected>12<script>for(i=1;i<101;i++)document.write("<option>"+i)</script></select><br>
<input type='button' value='瀏覽更新' class="bon2" οnclick="txt1.style.color=wenziyanse.value;txt1.style.backgroundColor=wenzibeijing.value;txt1.style.fontSize=wenzidaxiao.options[wenzidaxiao.selectedIndex].text;txt1.style.fontFamily=wenziziti.options[wenziziti.selectedIndex].text;" id='gengxinwenzi'><input type='button' value='插入' class="bon2" οnclick="charuwenzi()"><input type='button' value='取消' class="bon2" οnclick="wenzi1.style.display='none'">
</span>
<span style='position:absolute;z-index:2000;display:none' id='tupian1'>?? <!--插入圖片可視化-->
<input type='file' id='file1' style='width:400'><br>
<center><select id='duibi'><option selected>默認對比度<script>for(i=0;i<101;i++)document.write("<option>"+i)</script></select><select id='secai'><option selected>默認色彩度<script>for(i=0;i<9.9;i+=0.1)document.write("<option>"+new Number(i).toFixed(1))</script><option>10</select><select id=liangdu><option>默認亮度<script>for(i=-0.5;i<0.6;i+=0.1)document.write("<option>"+new Number(i).toFixed(1))</script></select><input type='checkbox' οnclick="duibi.disabled=this.checked;secai.disabled=this.checked;liangdu.disabled=this.checked" id=heibai><label for='heibai'>黑白效果</label><br>
<input type='button' value='插入' class="bon2" οnclick="charutupian()">
</span>
<span style='position:absolute;z-index:2000;display:none' id='gaoji1'>?? <!--高級改可視化-->
<textarea id='txt2' style='border:1 solid black;width:400;height:150'></textarea><br>
<center><input type='button' value='修改' class="bon2" οnclick="gaojiobj.outerHTML=txt2.value;gaojiobj=null;gaoji1.style.display='none'">
</span>
<span style='position:absolute;z-index:2000;display:none' id='yuandaima'>?? <!--所有原代碼-->
<textarea id='txt3' style='border:1 solid black;width:600;height:400'></textarea><br>
<center><input type='button' value='復制' class="bon2" οnclick="window.clipboardData.setData('text',txt3.value);alert('已將數據復制到系統剪切板')"> <input type='button' value='更新修改' class="bon2" οnclick="div1.innerHTML=txt3.value;yuandaima.style.display='none'"> <input type='button' value='取消' class="bon2" οnclick="yuandaima.style.display='none'">
</span>
<span style='position:absolute;z-index:2000;display:none' id='menu1'>??? <!--彈出菜單-->
<input type=button class=bon2 value=置前 οnclick='zz+=1;thisobj.style.zIndex=zz;menu1.style.display="none"'><br>
<input type=button class=bon2 value=置后 οnclick='zz2-=1;thisobj.style.zIndex=zz2;menu1.style.display="none"'><br>
<input type=button class=bon2 value=復制 οnclick='div1.innerHTML+=thisobj.outerHTML;alert("復制完成,請使用選移功能拖動");menu1.style.display="none"' id=fuzhi><br>
<input type=button class=bon2 value=刪除 οnclick='thisobj.outerHTML="";menu1.style.display="none"' id=shanchu><br>
</span>
<iframe id=web src="about:blank" style="display:none"></iframe>? <!--實現保存-->
<span style='position:absolute;z-index:2000;display:none' id='help'>?? <!--幫助信息-->
<textarea readonly='true' style='border:1 solid black;width:700;height:400'>
VML圖像畫板.2003.9(操作幫助及功能簡介)

目前最強的網頁VML(網頁矢量圖形標記語言)編輯工具之一,VML學習者的最佳學習工具
能夠完成基本的三維網頁的設計,做圖及圖形處理功能2003.9版相對2003版有了較強的提高(原作者今后有時間會去強化)
基本的畫筆、圖形處理、全局工具在右方,點選后在畫板內使用鼠標左鍵應用
可將畫板內VML代碼圖形保存為文件,亦可通過“修改原代碼”實現“打開文件”等功能
新增功能:
快捷鍵:CTRL+Z=撤消,CTRL+Y=反撤消,上下左右鍵=上下左右移,CTRL+上=放大,CTRL+下=縮小,F1=幫助
誤操作:關于繪圖時單擊及鼠標彈起時,如果未移動鼠標,不會在生成垃圾代碼
記憶點1:2003版就有的PLAYLINE繪圖功能,可惜不完善,僅能完成右下方向的繪圖
記憶點2:2003.9版最新增加的連續線段繪圖功能,支持8個方向的連續LINE線段,可惜僅為線段不支持背景
圖片:就2003.8版新增加了針對JPG等靜態圖像的對比度,亮度調節的輔助設計功能等
文字化:將圖形以文字填充,實現具有軌跡路線效果的文字

VML圖像畫板.2003.9(版權信息)

原作者:風云舞
主? 頁:<a href="http://www.lshdic.com" target="_blank">http://www.lshdic.com</a>
最新版:可登陸主頁查看
發布于:2003年9月1日
版? 本:2003.9(第三版)
問? 題:任何VML技術問題可以登陸<a href="http://www.lshdic.com/bbs進行討論" target="_blank">http://www.lshdic.com/bbs進行討論</a>
授? 權:授權給任何個人使用、應用,自由DHTML代碼,可任意修改學習、轉載、強化,作者制作本作品出發點是為了提高用戶的VML編程水準、開拓一個先例,因而未加密及方便參考僅采用一頁代碼,為此,未經原作者同意請不要將VML圖像畫板任何版本用于其他商業用途,侵我版權毀我及作品名譽,公開于網站、軟件發布及其他應用請保留原作者的這些聲明(但可以追加其他信息,如修改者各項授權信息等)
</textarea><br>
<center><input type='button' value='關閉幫助' class="bon2" οnclick="help.style.display='none'" id=guanbibangzhu>
</span>
<TABLE cellspacing=0 cellpadding=3 width=770 align=center bgcolor='#619CE7' style='border-right:3 dashed green;border-left:3 dashed #4735B0;border-top:1 solid blue;border-bottom:gray' id=allform1>
<tr align=center οnmοuseοver='if(event.srcElement.tagName=="TD"&&event.srcElement.width==70)event.srcElement.bgColor="aaaaaa"' οnmοuseοut='if(event.srcElement.tagName=="TD")event.srcElement.bgColor=""' style='cursor:hand'><td width=70 id=toptd1 οnclick="yuandaima.x=event.x;yuandaima.y=event.y;txt3.value=div1.innerHTML.replace(/>/g,'>\n').replace(/ = /g,'=').replace(/\: /g,':').replace(/\; /g,';');yuandaima.style.display=''">
修改原代碼</td><td width=70 οnclick="web.document.write('<HTML xmlns:v>\n<HEAD>\n<META http-equiv=Content-Type content=text/html;charset=gb2312>\n<TITLE>我的杰作</TITLE>\n<META name=Gemeratpr content=藍麗VML圖形編輯器>\n<META name=GemeratprHomePage content=http://www.lshdic.com>\n<STYLE>\nv\\:*{behavior:url(#default#VML);}\n</STYLE>\n</HEAD>\n<BODY>\n'+div1.innerHTML+'\n</BODY>\n</HTML>');web.document.execCommand('SaveAs',false,'我的杰作')">保存為文件</td><td width=70 οnclick="if(this.innerText=='最大化視圖'){div1.style.width=document.body.offsetWidth-150;div1.style.height=document.body.offsetHeight-35;this.innerText='恢復視圖'}else{div1.style.width=650;div1.style.height='100%';this.innerText='最大化視圖'}">最大化視圖</td><td width=70 οnclick="help.x=event.x;help.y=event.y;help.style.display=''" id=bangzhu>操作幫助</td><td width=60> </td><td width=60> </td><td align=right>原作:風云舞,藍麗程序員網絡:<a href='http://www.lshdic.com' target='_blank'><a href="http://www.lshdic.com" target="_blank">http://www.lshdic.com</a></a>
</td></tr><tr>
<td width=100% colspan=10 height=500>
<table cellspacing=0 cellpadding=0 height=100%%><tr><td width=660>

<div style='width:650;height:100%;background-color:white;border:1 solid gray;color:black;' id=div1></div>
</td><td>
<div style='width:110;height:100%;'>
<center><b>畫筆選擇</b><br>
<button class=bon2 id=huabi>選移<button class=bon2 id=huabi>調大小<button class=bon2 id=huabi>弧形</button><button class=bon1 id=huabi>鋼筆</button><button class=bon2 id=huabi>記憶點1</button><button class=bon2 id=huabi>圓型</button><button class=bon2 id=huabi>長方型</button><button class=bon2 id=huabi>圓矩型</button><button class=bon2 id=huabi>文字</button><button class=bon2 id=huabi>圖片</button><button class=bon2 id=huabi>填充</button><button class=bon2 id=huabi>立體</button><button class=bon2 id=huabi>邊框</button><button class=bon2 id=huabi>高級</button><button class=bon2 id=huabi>記憶點2</button><button class=bon2 id=huabi>文字化</button><br>
<b>畫筆基本參數</b><br>
筆邊粗度 <select style="width:54;" id=bibiancudu><option selected>1<script>for(i=2;i<101;i++)document.write("<option>"+i)</script></select><br>
畫筆顏色 <input style='border:1 solid black;width:54;height:17;' value='#000000' id=huabiyanse οnmοusedοwn='colortab.style.left=event.x-50;colortab.style.top=event.y+this.offsetHeight;rndcolor(this.id)'><br>
畫筆背景 <input style='border:1 solid black;width:54;height:17;' value='#FFFFFF' id=huabibeijing οnmοusedοwn='colortab.style.left=event.x-50;colortab.style.top=event.y+this.offsetHeight;rndcolor(this.id)'><br>
X Y 坐標 <input disabled='true' type='text' value='0,0' id='zuobiao' style='border:1 solid black;width:54;height:17;'><br>
<span id=tianchong1 style='display:none'>
<b> <br>填充基本參數</b><br>
普通背景 <input style='border:1 solid black;width:54;height:17;' value='' id=tianchongbeijing οnmοusedοwn='colortab.style.left=event.x-50;colortab.style.top=event.y+this.offsetHeight;rndcolor(this.id)'><br>使用漸變背景<input type='checkbox' id='usejianbian'><br>
漸變色一 <input style='border:1 solid black;width:50;height:17;color:red' value='#FF0000' id=jianbianse1 οnmοusedοwn='colortab.style.left=event.x-50;colortab.style.top=event.y+this.offsetHeight;rndcolor(this.id)'>
<br>漸變色二 <input style='border:1 solid black;width:50;height:17;' value='#FFFFFF' id=jianbianse2 οnmοusedοwn='colortab.style.left=event.x-50;colortab.style.top=event.y+this.offsetHeight;rndcolor(this.id)'><br>
上下漸變 <input type=radio name='jianbianyangshi' checked><br>
斜向漸變 <input type=radio name='jianbianyangshi'>
</span>
<span id=liti1 style='display:none'>
<b> <br>立體基本參數</b><br>
后向伸展 <select style="width:54;" id=houxiangshenzhan><option selected>20<script>for(i=0;i<101;i++)document.write("<option>"+i)</script></select><br>
<br>前向伸展 <select style="width:54;" id=qianxiangshenzhan><option selected>0<script>for(i=1;i<101;i++)document.write("<option>"+i)</script></select><br>
偏移左邊 <select style="width:54;" id=pianyizuobian><option selected>0<script>for(i=1;i<101;i++)document.write("<option>"+i)</script></select><br>
偏移上邊 <select style="width:54;" id=pianyishangbian><option selected>0<script>for(i=1;i<101;i++)document.write("<option>"+i)</script></select><br>
立體顏色 <input style='border:1 solid black;width:54;height:17;' value='' id=litiyanse? οnmοusedοwn='colortab.style.left=event.x-50;colortab.style.top=event.y+this.offsetHeight;rndcolor(this.id)'><br>
</span>
<span id=biankuang1 style='display:none'>
<b> <br>邊框基本參數</b><br>
邊框粗度 <select style="width:54;" id=biankuangcudu><option selected>1<script>for(i=0;i<101;i++)document.write("<option>"+i)</script></select><br>
<br>邊框樣式 <select style="width:54;" id=biankuangyangshi><option selected>none<option>dash<option>dashdot<option>dot<option>longdash<option>longdashdot<option>shortdash<option>shortdashdot<option>shortdashdotdot<option>longdashdotdot<option>shortdot</select><br>
起點尖頭 <select style="width:54;" id=qidianjiantou><option selected>none<option>block<option>classic<option>diamond<option>open<option>oval</select><br>
終點尖頭 <select style="width:54;" id=zhongdianjiantou><option selected>none<option>block<option>classic<option>diamond<option>open<option>oval</select><br>
邊框顏色 <input style='border:1 solid black;width:54;height:17;' value='' id=biankuangyanse?? οnmοusedοwn='colortab.style.left=event.x-50;colortab.style.top=event.y+this.offsetHeight;rndcolor(this.id)'><br>
</span>
<center><b>全局工具</b><br>
<input type='button' value='撤消' οnclick='if(youbiao>0){div1.innerHTML=chexiao[youbiao];youbiao-=1;fanchexiao1=2}' class=bon2 id=chexiaock><input type='button' value='反撤消' οnclick='if(youbiao<chexiao.length-fanchexiao1){youbiao+=fanchexiao1;fanchexiao1=1;div1.innerHTML=chexiao[youbiao];}' class=bon2 id=fanchexiaock><br>
<input type='button' value='放大' οnclick='for(i=0;i<div1.all.length;i++){try{div1.all[i].style.left=parseInt(div1.all[i].style.left)-5;div1.all[i].style.top=parseInt(div1.all[i].style.top)-5;div1.all[i].style.width=parseInt(div1.all[i].style.width)+10;div1.all[i].style.height=parseInt(div1.all[i].style.height)+10;}catch(e){}}' class=bon2 id=fangda><input type='button' value='縮小' οnclick='for(i=0;i<div1.all.length;i++){try{div1.all[i].style.left=parseInt(div1.all[i].style.left)+5;div1.all[i].style.top=parseInt(div1.all[i].style.top)+5;div1.all[i].style.width=parseInt(div1.all[i].style.width)-10;div1.all[i].style.height=parseInt(div1.all[i].style.height)-10;}catch(e){}}' class=bon2 id=suoxiao><br>
<input type='button' value='左移' οnclick='for(i=0;i<div1.all.length;i++){try{div1.all[i].style.left=parseInt(div1.all[i].style.left)-10;}catch(e){}}' class=bon2 id=zuoyi><input type='button' value='右移' οnclick='for(i=0;i<div1.all.length;i++){try{div1.all[i].style.left=parseInt(div1.all[i].style.left)+10;}catch(e){}}' class=bon2 id=youyi><br>
<input type='button' value='上移' οnclick='for(i=0;i<div1.all.length;i++){try{div1.all[i].style.top=parseInt(div1.all[i].style.top)-10;}catch(e){}}' class=bon2 id=shangyi><input type='button' value='下移' οnclick='for(i=0;i<div1.all.length;i++){try{div1.all[i].style.top=parseInt(div1.all[i].style.top)+10;}catch(e){}}' class=bon2 id=xiayi><br>
</div>
</td></tr></table>
</td></tr>
</table>
<table cellspacing=0 cellpadding=0 style='position:absolute;width:100;height:100;display:none;background-color:red;z-index:3000' id='colortab'><tr><td id='colorid'></td></tr></table>
<script language='jscript'>
var bi=4??? //定義當前使用的畫筆工具,3為鉛筆
var color1='#000000',color2='#000000',size1=0? //定義缺剩的畫筆顏色及畫筆填充顏色和筆邊粗度
var xx=0,yy=0,zz=1000? //定義缺剩的X及Y坐標
var isok=false? //區分畫筆起點是否在DIV內,超出范圍則無效
var moveobj=null,ckleft=0,cktop=0,ckwid=0,ckhei=0,ckto=""? //被移動物件、調整大小物件的引用
var poly1=null,oldvalue="",oldx=0,oldy=0? //為了完成記憶點,創建一個可折式線段
var gaojiobj=null? //為了完成“高級”功能,綁定被修改對象
var thisobj=null?? //為了完成各種基本編輯功能,如“置前”“復制”“刪除”等
var zz2=1000????????? //為完成“置后”功能,zz2為負數
var huxingtixing=false? //如果為false則ALERT()提醒弧形使用高級修改,否則不提醒
var chexiao=new Array(),youbiao=0,fanchexiao1=2? //定義一個存儲撤消內容的數組以及位移游標,fanchexiao1為0時+2,否則+1
function div1.onmousedown(){
div1.setCapture();color1=huabiyanse.value;color2=huabibeijing.value;isok=true;size1=bibiancudu.options[bibiancudu.selectedIndex].text
xx=event.x;yy=event.y;zz+=1
for(i=0;i<huabi.length;i++){if(huabi[i].className=="bon1"){bi=i+1;break}}
line1.strokecolor=color1;line1.strokeweight=size1;oval1.strokeweight=size1;oval1.strokecolor=color1
oval1.fillcolor=color2;rect1.strokeweight=size1;rect1.strokecolor=color1
rect1.fillcolor=color2;roundrect1.strokeweight=size1;roundrect1.strokecolor=color1
roundrect1.fillcolor=color2;arc1.strokeweight=size1;arc1.strokecolor=color1
arc1.fillcolor=color2;
if(event.button==1){
switch(bi){
case 1:? //選移
if(event.srcElement.parentElement.id=="div1"){moveobj=event.srcElement;ckleft=xx-parseInt(moveobj.style.left);cktop=yy-parseInt(moveobj.style.top)}
break;
case 2:? //調大小
if(event.srcElement.parentElement.id=="div1"){moveobj=event.srcElement;
ckleft=parseInt(moveobj.style.left);cktop=parseInt(moveobj.style.top);ckwid=moveobj.offsetWidth;ckhei=moveobj.offsetHeight}
break;
case 3:? //弧形
arc1.style.left=event.x;arc1.style.top=event.y;arc1.style.width=0;arc1.style.height=0;arc1.style.display="";
break;
case 4:? //鋼筆
line1.style.left=event.x;line1.style.top=event.y;line1.to="0,0";line1.style.display=""
break;
case 5:? //記憶點
if(poly1==null){
oldx=xx;oldy=yy
poly1=div1.appendChild(document.createElement("<v:polyline points='0 0 0 0' style='position:absolute;z-index:"+zz+";left:"+xx+";top:"+yy+";' strokecolor='"+color1+"' strokeweight='"+size1+"' fillcolor='"+color2+"'/>"))
}
if(oldx-tempx<1&&oldy-tempy<1)oldvalue=poly1.points.value.replace(/,/g,' ')
break;
case 6:? //圓形
oval1.style.left=event.x;oval1.style.top=event.y;oval1.style.width=0;oval1.style.height=0;oval1.style.display=""
break;
case 7:? //長方形
rect1.style.left=event.x;rect1.style.top=event.y;rect1.style.width=0;rect1.style.height=0;rect1.style.display=""
break;
case 8:? //圓矩形
roundrect1.style.left=event.x;roundrect1.style.top=event.y;roundrect1.style.width=0;roundrect1.style.height=0;roundrect1.style.display=""
break;
case 9:? //文字
wenzi1.style.left=event.x;wenzi1.style.top=event.y;wenzi1.style.display=""
break;
case 10:? //圖片
tupian1.style.left=event.x;tupian1.style.top=event.y;tupian1.style.display=""
break;
case 15:? //記憶點2
oldx=xx;oldy=yy
poly1=div1.appendChild(document.createElement("<v:line to='0,0' style='position:absolute;z-index:"+zz+";left:"+xx+";top:"+yy+";' strokecolor='"+color1+"' strokeweight='"+size1+"'/>"))
}
}}
function div1.onmousemove(){
tempx=event.x;tempy=event.y;temp1=0;temp2=0
zuobiao.value=tempx-allform1.offsetLeft-8+","+parseInt(tempy-toptd1.offsetHeight-7)
if(bi==5&&poly1!=null){?? //記憶點
if(oldx-tempx<0&&oldy-tempy<0)poly1.points.value=oldvalue+" "+(tempx-oldx)+" "+(tempy-oldy)
}else if(bi==15&&poly1!=null){?? //記憶點2
poly1.to=(tempx-xx)+","+(tempy-yy)
}
if(event.button==1){
switch(bi){
case 1:? //選移
if(moveobj!=null){moveobj.style.left=tempx-ckleft;moveobj.style.top=tempy-cktop}
break;
case 2:? //調大小
if(moveobj!=null){
if(moveobj.tagName!="line"){
if(tempx>ckleft){moveobj.style.width=tempx-ckleft}else{moveobj.style.left=tempx;moveobj.style.width=ckleft-tempx}
if(tempy>cktop){moveobj.style.height=tempy-cktop}else{moveobj.style.top=tempy;moveobj.style.height=cktop-tempy}
}else{moveobj.to=parseInt(tempx-ckleft)+","+parseInt(tempy-cktop);if(ckto=="")ckto=parseInt(tempx-ckleft)+","+parseInt(tempy-cktop);}
}
break;
case 3:? //弧形
if(tempx-xx<0){arc1.style.left=tempx;arc1.style.width=(xx-tempx)}else{arc1.style.width=(tempx-xx)}
if(tempy-yy<0){arc1.style.top=tempy;arc1.style.height=(yy-tempy)}else{arc1.style.height=(tempy-yy)}
break;
case 4:? //鋼筆
line1.to=(tempx-xx)+","+(tempy-yy)
break;
case 6:? //圓形
if(tempx-xx<0){oval1.style.left=tempx;oval1.style.width=(xx-tempx)}else{oval1.style.width=(tempx-xx)}
if(tempy-yy<0){oval1.style.top=tempy;oval1.style.height=(yy-tempy)}else{oval1.style.height=(tempy-yy)}
break;
case 7:? //長方形
if(tempx-xx<0){rect1.style.left=tempx;rect1.style.width=(xx-tempx)}else{rect1.style.width=(tempx-xx)}
if(tempy-yy<0){rect1.style.top=tempy;rect1.style.height=(yy-tempy)}else{rect1.style.height=(tempy-yy)}
break;
case 8:? //圓矩形
if(tempx-xx<0){roundrect1.style.left=tempx;roundrect1.style.width=(xx-tempx)}else{roundrect1.style.width=(tempx-xx)}
if(tempy-yy<0){roundrect1.style.top=tempy;roundrect1.style.height=(yy-tempy)}else{roundrect1.style.height=(tempy-yy)}
break;
}}}
function div1.onmouseup(){
savechexiao()
document.releaseCapture();if(isok==false){forerr();return false};isok=false;menu1.style.display='none'
tempx=event.x;tempy=event.y;divwid=div1.offsetWidth;divhei=div1.offsetHeight
if(tempx>allform1.offsetLeft+divwid+5||tempx<allform1.offsetLeft+5){forerr();return alert("X坐標越界")}
if(tempy>allform1.offsetTop+toptd1.offsetHeight+divhei+5||tempy<allform1.offsetTop+toptd1.offsetHeight+5){forerr();return alert("Y坐標越界")}
if(event.button==2&&bi==5&&poly1!=null){
poly1.points.value=oldvalue;oldvalue="";poly1=null;
}else if(event.srcElement.parentElement.id=="div1"&&event.button==2){menu1.style.left=tempx;menu1.style.top=tempy;menu1.style.display='';thisobj=event.srcElement}
else if(event.button==2&&bi==15&&poly1!=null){
poly1.outerHTML="";poly1=null
}
if(event.button==1){
switch(bi){
case 1:? //選移
if(moveobj!=null&&parseInt(moveobj.style.left)<allform1.offsetLeft+5){forerr();return alert("被移動物體X1超出界限")}
if(moveobj!=null&&parseInt(moveobj.style.left)+moveobj.offsetWidth-2>allform1.offsetLeft+divwid+5){forerr();return alert("被移動物體X2超出界限")}
if(moveobj!=null&&parseInt(moveobj.style.top)<allform1.offsetTop+toptd1.offsetHeight+5){forerr();return alert("被移動物體Y1超出界限")}
if(moveobj!=null&&parseInt(moveobj.style.top)+moveobj.offsetHeight-2>allform1.offsetTop+toptd1.offsetHeight+divhei+3){forerr();return alert("被移動物體Y2超出界限")}
moveobj=null
break;
case 2:? //調大小
moveobj=null;ckto=""
break;
case 3:? //弧形
arc1.style.display='none';
if (Math.abs(tempx-xx)<=1||Math.abs(tempy-yy)<=1)return false
div1.appendChild(document.createElement("<v:arc startangle='-200' endangle='30' style='position:absolute;z-index:"+zz+";left:"+arc1.style.left+";top:"+arc1.style.top+";width:"+arc1.style.width+";height:"+arc1.style.height+";' strokecolor='"+color1+"' strokeweight='"+size1+"' fillcolor='"+color2+"'/>"))
if(huxingtixing==false){huxingtixing=true;alert("弧形已繪出,調整弧度 startangle='-200' endangle='30' 請使用“高級”")}
break;
case 4:? //鋼筆
line1.style.display="none"
if (Math.abs(tempx-xx)<=1||Math.abs(tempy-yy)<=1)return false
div1.appendChild(document.createElement("<v:line style='position:absolute;z-index:"+zz+";left:"+xx+";top:"+yy+";' to='"+(event.x-xx)+","+(event.y-yy)+"' strokecolor='"+color1+"' strokeweight='"+size1+"'/>"))
break;
case 6:? //圓形
oval1.style.display="none"
if (Math.abs(tempx-xx)<=1||Math.abs(tempy-yy)<=1)return false
div1.appendChild(document.createElement("<v:oval style='position:absolute;z-index:"+zz+";left:"+oval1.style.left+";top:"+oval1.style.top+";width:"+oval1.style.width+";height:"+oval1.style.height+";' strokecolor='"+color1+"' strokeweight='"+size1+"' fillcolor='"+color2+"'/>"))
break;
case 7:? //長方形
rect1.style.display="none"
if (Math.abs(tempx-xx)<=1||Math.abs(tempy-yy)<=1)return false
div1.appendChild(document.createElement("<v:rect style='position:absolute;z-index:"+zz+";left:"+rect1.style.left+";top:"+rect1.style.top+";width:"+rect1.style.width+";height:"+rect1.style.height+";' strokecolor='"+color1+"' strokeweight='"+size1+"' fillcolor='"+color2+"'/>"))
break;
case 8:? //圓矩形
roundrect1.style.display="none"
if (Math.abs(tempx-xx)<=1||Math.abs(tempy-yy)<=1)return false
div1.appendChild(document.createElement("<v:roundrect style='position:absolute;z-index:"+zz+";left:"+roundrect1.style.left+";top:"+roundrect1.style.top+";width:"+roundrect1.style.width+";height:"+roundrect1.style.height+";' strokecolor='"+color1+"' strokeweight='"+size1+"' fillcolor='"+color2+"'/>"))
break;
case 11:? //漸變
if(event.srcElement.parentElement.id=="div1"){
if(!usejianbian.checked){event.srcElement.fillcolor=tianchongbeijing.value}else{
temp1=jianbianyangshi[0].checked?'gradient':'gradientradial'
temp2=event.srcElement.innerHTML.replace(/<v\:fill .*<\/v:fill>/gi,'')
event.srcElement.innerHTML=temp2+"<v:fill color='"+jianbianse2.value+"' color2='"+jianbianse1.value+"' type='"+temp1+"'/>"
}}
break;
case 12:? //立體
if(event.srcElement.parentElement.id=="div1"){
temp2=event.srcElement.innerHTML.replace(/<v\:extrusion .*<\/v:extrusion>/gi,'')
event.srcElement.innerHTML=temp2+"<v:Extrusion on='t' color='"+litiyanse.value+"' backdepth='"+houxiangshenzhan.options[houxiangshenzhan.selectedIndex].text+"' foredepth='"+qianxiangshenzhan.options[qianxiangshenzhan.selectedIndex].text+"' rotationangle='"+pianyishangbian.options[pianyishangbian.selectedIndex].text+","+pianyizuobian.options[pianyizuobian.selectedIndex].text+"'/>"
}
break;
case 13:? //邊框
if(event.srcElement.parentElement.id=="div1"){
temp2=event.srcElement.innerHTML.replace(/<v\:stroke .*<\/v:stroke>/gi,'')
event.srcElement.innerHTML=temp2+"<v:Stroke dashstyle='"+biankuangyangshi.options[biankuangyangshi.selectedIndex].text+"' startarrow='"+qidianjiantou.options[qidianjiantou.selectedIndex].text+"' endarrow='"+zhongdianjiantou.options[zhongdianjiantou.selectedIndex].text+"'/>"
event.srcElement.strokecolor=biankuangyanse.value
biankuangcudu.options[biankuangcudu.selectedIndex].text=='0'?event.srcElement.stroked=false:event.srcElement.strokeweight=biankuangcudu.options[biankuangcudu.selectedIndex].text
}
break;
case 14:? //高級
if(event.srcElement.parentElement.id=="div1"){
gaojiobj=event.srcElement
txt2.value=event.srcElement.outerHTML.replace(/>/g,">\n").replace(/ = /g,"=").replace(/\: /g,":").replace(/\; /g,";");gaoji1.style.left=event.x;gaoji1.style.top=event.y;gaoji1.style.display=''
}
break;
case 16:? //文字化
if(event.srcElement.parentElement.id=="div1"){
str1=prompt("請輸入一段用于圖形軌跡填充的文字(推薦使用英文),字大小依據筆邊粗度,字顏色請使用高級直接添加<v:fill></v:fill>修改","")
if(!str1)return false;if(str1=='')return false
if(str1.indexOf("'")!=-1)return alert("輸入的文字中不可含有違禁符號 ' 單引號")
temp2=event.srcElement.innerHTML.replace(/<v\:path .*<\/v:path>/gi,'').replace(/<v\:textpath .*<\/v:textpath>/gi,'')
parseInt(bibiancudu.options[bibiancudu.selectedIndex].text)<10?str11=10:str11=bibiancudu.options[bibiancudu.selectedIndex].text
event.srcElement.innerHTML=temp2+"<v:path textpathok='True'/>\n<v:textpath on='True' style='font-size:"+str11+";' string='"+str1+"'/>"
}
break;
}}}
function savechexiao(){
youbiao+=1;chexiao[youbiao]=div1.innerHTML
}
function rndcolor(theobjis){
colortab.style.display="";colorid.innerHTML="";str1="<table cellspacing=0 cellpadding=0>";
for(r=0;r<10;r++){str1+="<tr>"
for(i=0;i<10;i++){
tempcolor1=Math.round(Math.random()*255).toString(16)+Math.round(Math.random()*255).toString(16)+Math.round(Math.random()*255).toString(16);while(tempcolor1.length<6){tempcolor1+=Math.round(Math.random()*9)}
str1+="<td style='width:10;height:10;background-color:#"+tempcolor1+";' οnclick="+theobjis+".value='#"+tempcolor1+"';"+theobjis+".style.color='#"+tempcolor1+"';colortab.style.display='none'></td>"
}str1+="</tr>"}
colorid.innerHTML=str1+"</table>"
}
function document.onmouseup(){
if(event.srcElement.tagName=="BUTTON"){
event.srcElement.blur();div1.focus();if(event.srcElement.className=="bon1"||event.button!=1)return true;
for(i=0;i<huabi.length;i++)huabi[i].className="bon2"
event.srcElement.className="bon1";
if(huabi[10].className=="bon1"){tianchong1.style.display='';tianchongbeijing.value=tianchongbeijing.value==''?huabibeijing.value:tianchongbeijing.value}else{tianchong1.style.display='none';}
if(huabi[11].className=="bon1"){liti1.style.display='';litiyanse.value=litiyanse.value==''?huabibeijing.value:litiyanse.value}else{liti1.style.display='none';}
if(huabi[12].className=="bon1"){biankuang1.style.display='';biankuangyanse.value=biankuangyanse.value==''?huabiyanse.value:biankuangyanse.value}else{biankuang1.style.display='none';}
if(poly1!=null){?? //清除記憶點
if(poly1.tagName=="polyline"){poly1.points.value=oldvalue;oldvalue="";poly1=null;}else{poly1.outerHTML="";oldvalue="";poly1=null;}
}
wenzi1.style.display='none';tupian1.style.display='none';gaoji1.style.display='none';menu1.style.display='none'
}}
function forerr(){
if(moveobj!=null&&bi==1){moveobj.style.left=xx-ckleft;moveobj.style.top=yy-cktop;ckleft=0;cktop=0;moveobj=null}
if(moveobj!=null&&bi==2){
if(moveobj.tagName!="line"){moveobj.style.left=ckleft;moveobj.style.top=cktop;moveobj.style.width=ckwid;moveobj.style.height=ckhei;}else{moveobj.to=ckto;}
ckleft=0;cktop=0;ckwid=0;ckhei=0;ckto="";moveobj=null
}
line1.style.display='none';oval1.style.display='none';rect1.style.display='none';roundrect1.style.display='none';arc1.style.display='none'
}
function charuwenzi(){?? //插入文字
if(txt1.value=="")return alert('請先輸入文字,在點擊插入')
wenzibiankuang.checked==true?thebiankuang="border:1 solid black;":thebiankuang=""
var newtxt=document.createElement("<span style='position:absolute;z-index:"+zz+";left:"+xx+";top:"+yy+";color:"+wenziyanse.value+";background-color:"+wenzibeijing.value+";font-size:"+wenzidaxiao.options[wenzidaxiao.selectedIndex].text+";font-family:"+wenziziti.options[wenziziti.selectedIndex].text+";"+thebiankuang+"'></span>");newtxt.innerText=txt1.value
div1.appendChild(newtxt);wenzi1.style.display='none'
}
function charutupian(){?? //插入圖片
if(file1.value=="")return alert('請先輸入圖片路徑(<a href="HTTP://或FILE:///" target="_blank">HTTP://或FILE:///</a>)格式,在點擊插入')
if(file1.value.indexOf("'")>-1)return alert("圖片地址不可以含有違禁字符 ' 單引號")
str1=""
if(heibai.checked==true){str1=" grayscale='true'"}else{
if(duibi.options[duibi.selectedIndex].text!='默認對比度')str1=" gain='"+duibi.options[duibi.selectedIndex].text+"'"
if(secai.options[secai.selectedIndex].text!='默認色彩度')str1=" gamma='"+secai.options[secai.selectedIndex].text+"'"
if(liangdu.options[liangdu.selectedIndex].text!='默認亮度')str1=" blacklevel='"+liangdu.options[liangdu.selectedIndex].text+"'"
}
var newtxt=document.createElement("<v:Image style='position:absolute;z-index:"+zz+";left:"+xx+";top:"+yy+";width:100;height:100' src='"+file1.value+"'"+str1+"/>");
div1.appendChild(newtxt);tupian1.style.display='none'
}
function document.onkeydown(){?? //實現各種快捷鍵
if(event.srcElement.tagName!='TEXTAREA'){
event.ctrlKey&&event.keyCode==90?chexiaock.click():
event.ctrlKey&&event.keyCode==89?fanchexiaock.click():
event.ctrlKey&&event.keyCode==38?fangda.click():
event.ctrlKey&&event.keyCode==40?suoxiao.click():
!event.ctrlKey&&event.keyCode==37?zuoyi.click():
!event.ctrlKey&&event.keyCode==38?shangyi.click():
!event.ctrlKey&&event.keyCode==39?youyi.click():
!event.ctrlKey&&event.keyCode==40?xiayi.click():str1=1
}}
</script>

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/388333.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/388333.shtml
英文地址,請注明出處:http://en.pswp.cn/news/388333.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

對數據倉庫進行數據建模_確定是否可以對您的數據進行建模

對數據倉庫進行數據建模Some data sets are just not meant to have the geospatial representation that can be clustered. There is great variance in your features, and theoretically great features as well. But, it doesn’t mean is statistically separable.某些數…

15 并發編程-(IO模型)

一、IO模型介紹 1、阻塞與非阻塞指的是程序的兩種運行狀態 阻塞&#xff1a;遇到IO就發生阻塞&#xff0c;程序一旦遇到阻塞操作就會停在原地&#xff0c;并且立刻釋放CPU資源 非阻塞&#xff08;就緒態或運行態&#xff09;&#xff1a;沒有遇到IO操作&#xff0c;或者通過某種…

arduino消息服務器,在C(Arduino IDE)中將API鏈接消息解析為服務器(示例代碼)

我正在使用Arduino IDE來編程我的微控制器&#xff0c;它有一個內置的Wi-Fi芯片(ESP8266 NodeMCU)&#xff0c;它連接到我的互聯網路由器&#xff0c;然后有一個特定的IP(就像192.168.1.5)。所以我想通過添加到鏈接的消息發送命令(和數據)&#xff0c;然后鏈接變為&#xff1a;…

不提拔你,就是因為你只想把工作做好

2019獨角獸企業重金招聘Python工程師標準>>> 我有個朋友&#xff0c;他30出頭&#xff0c;在500強公司做技術經理。他戴無邊眼鏡&#xff0c;穿一身土黃色的夾克&#xff0c;下面是一條常年不洗的牛仔褲加休閑皮鞋&#xff0c;典型技術高手范。 三 年前&#xff0c;…

python內置函數多少個_每個數據科學家都應該知道的10個Python內置函數

python內置函數多少個Python is the number one choice of programming language for many data scientists and analysts. One of the reasons of this choice is that python is relatively easier to learn and use. More importantly, there is a wide variety of third pa…

C#使用TCP/IP與ModBus進行通訊

C#使用TCP/IP與ModBus進行通訊1. ModBus的 Client/Server模型 2. 數據包格式及MBAP header (MODBUS Application Protocol header) 3. 大小端轉換 4. 事務標識和緩沖清理 5. 示例代碼 0. MODBUS MESSAGING ON TCP/IP IMPLEMENTATION GUIDE 下載地址&#xff1a;http://www.modb…

Hadoop HDFS常用命令

1、查看hdfs文件目錄 hadoop fs -ls / 2、上傳文件 hadoop fs -put 文件路徑 目標路徑 在瀏覽器查看:namenodeIP:50070 3、下載文件 hadoop fs -get 文件路徑 保存路徑 4、設置副本數量 -setrep 轉載于:https://www.cnblogs.com/chaofan-/p/9742633.html

SAP UI 搜索分頁技術

搜索分頁技術往往和另一個術語Lazy Loading&#xff08;懶加載&#xff09;聯系起來。今天由Jerry首先介紹S/4HANA&#xff0c;CRM Fiori和S4CRM應用里的UI搜索分頁的實現原理。后半部分由SAP成都研究院菜園子小哥王聰向您介紹Twitter的懶加載實現。 關于王聰的背景介紹&#x…

萬彩錄屏服務器不穩定,萬彩錄屏 云服務器

萬彩錄屏 云服務器 內容精選換一換內網域名是指僅在VPC內生效的虛擬域名&#xff0c;無需購買和注冊&#xff0c;無需備案。云解析服務提供的內網域名功能&#xff0c;可以讓您在VPC中擁有權威DNS&#xff0c;且不會將您的DNS記錄暴露給互聯網&#xff0c;解析性能更高&#xf…

針對數據科學家和數據工程師的4條SQL技巧

SQL has become a common skill requirement across industries and job profiles over the last decade.在過去的十年中&#xff0c;SQL已成為跨行業和職位描述的通用技能要求。 Companies like Amazon and Google will often demand that their data analysts, data scienti…

C# 讀取CAD文件縮略圖(DWG文件)

//C# 讀取CAD文件縮略圖&#xff08;DWG文件&#xff09; 楊航收集技術資料&#xff0c;分享給大家 //2010-09-04 16:34:58| 分類&#xff1a; C# |字號 訂閱//在不使用任務插件的情況下讀取DWG文件的縮略圖&#xff0c;以便在沒有安裝AutoCAD的計算機上瀏覽。using System;u…

全排列算法實現

版權聲明&#xff1a;本文為博主原創文章&#xff0c;未經博主允許不得轉載。 https://blog.csdn.net/summerxiachen/article/details/605796231.全排列的定義和公式&#xff1a; 從n個數中選取m&#xff08;m<n&#xff09;個數按照一定的順序進行排成一個列&#xff0c;叫…

14.并發容器之ConcurrentHashMap(JDK 1.8版本)

1.ConcurrentHashmap簡介 在使用HashMap時在多線程情況下擴容會出現CPU接近100%的情況&#xff0c;因為hashmap并不是線程安全的&#xff0c;通常我們可以使用在java體系中古老的hashtable類&#xff0c;該類基本上所有的方法都采用synchronized進行線程安全的控制&#xff0c;…

modbus注意幾點

1、 在利用Modbus通訊的過程中&#xff0c;遇到這樣一個問題&#xff0c;即浮點數的傳輸問題。因為一般浮點數都是32位&#xff0c;而Modbus總線中只能傳輸最多16位的數據。解決方法&#xff1a;可以利用兩個整形數傳送一個浮點數&#xff08;即將一個32位的二進制數分割成兩個…

服務器虛擬化網口,服務器安裝虛擬網口

服務器安裝虛擬網口 內容精選換一換Atlas 800 訓練服務器(型號 9010)安裝上架、服務器基礎參數配置、安裝操作系統等操作請參見《Atlas 800 訓練服務器 用戶指南 (型號9010)》。Atlas 800 訓練服務器(型號 9010)適配操作系統如表1所示。請參考表2下載驅動和固件包。Atlas 800 訓…

芒果云接嗎_芒果糯米飯是生產力的關鍵嗎?

芒果云接嗎Would you like to know how your mood impact your sleep and how your parents influence your happiness levels?您想知道您的心情如何影響您的睡眠以及您的父母如何影響您的幸福感嗎&#xff1f; Become a data nerd, and track it!成為數據書呆子&#xff0c;…

hdoj4283 You Are the One

題意&#xff1a;每個人出場時獲得等待時間*值的unhappy值。有個棧換出場順序。問怎樣最小&#xff1f; 一開始的時候覺得在中間取斷點&#xff0c;dp[i][j]表示區間全出場后的最小值。那么dp[i][j]dp[i][k]dp[k1][j]&#xff0c;但這樣是不行的。因為有可能最優解是[i][k]只出…

laravel-admin 開發 bootstrap-treeview 擴展包

laravel-admin 擴展開發文檔https://laravel-admin.org/doc... 效果圖&#xff1a; 開發過程&#xff1a; 1、先創建Laravel項目&#xff0c;并集成laravel-admin&#xff0c;教程&#xff1a; http://note.youdao.com/notesh... 2、生成開發擴展包 php artisan admin:extend c…

怎么看服務器上jdk安裝位置,查看云服務器jdk安裝路徑

查看云服務器jdk安裝路徑 內容精選換一換用戶可以在公有云MRS集群以外的節點上使用客戶端&#xff0c;在使用客戶端前需要安裝客戶端。如果集群外的節點已安裝客戶端且只需要更新客戶端&#xff0c;請使用安裝客戶端的用戶例如root。針對MRS 3.x之前版本的集群&#xff0c;需要…