VML绘制圆角矩形的方法

来源:互联网 发布:网络劫持什么意思 编辑:程序博客网 时间:2024/06/05 16:05

this.drawRoundRect =function(left,top,right,bottom,color,fillColor,arcsize,weight,opacity){
  if(!color) {
   color ="blue";
  }
  if(!arcsize) {
   arcsize =0.15;
  }
  if(!weight) {
   weight =1;
  }
  if(!opacity) {
   opacity =100;
  }
  if(left > right) {
   var temp =left;
   left =right;
   right =temp;
  }
  if(top > bottom) {
   var temp =top;
   top =bottom;
   bottom =temp;
  }
  var theString = "
  if(fillColor) {
   theString +="' fillcolor='"+fillColor;
  } else {
    theString +="' filled='false";
  }
  theString +="'  strokeweight='"+weight+"'/>";
  return theString;
 }

原创粉丝点击