function sample(){
var sub=new svgpaint();
str="<svg width=\"500\" height=\"500\">";
str=str+paint("map.jpg",0,0,500,500);
str=str+sub.circle(475,475,10,"red");
str=str+sub.circle(475,25,10,"red");
str=str+sub.circle(25,25,10,"red");
str=str+sub.circle(25,475,10,"red");
for(s=1;s<10;s++){
str=str+sub.circle(475,460-42.5*s,10,"blue");
}
for(s=1;s<10;s++){
str=str+sub.circle(25,460-42.5*s,10,"blue");
}
for(s=1;s<10;s++){
str=str+sub.circle(460-42.5*s,25,10,"blue");
}
for(s=1;s<10;s++){
str=str+sub.circle(460-42.5*s,475,10,"blue");
}
str=str+"</svg>";
$("#memo").html(str);
}
function paint(im,x1,y1,w1,h1){
var str;
str="<image xlink:href=";
str=str+chop(im);
str=str+"x="+chop(x1)+" ";
str=str+"y="+chop(y1)+" ";
str=str+"width="+chop(w1)+" ";
str=str+"height="+chop(h1);
str=str+"/>"
return str;
}
function chop(str){
var strx;
strx="\""+str+"\"";
return strx;
}
最終更新:2016年11月21日 15:01