function XOMan(innerc, outerc, editor,num){
this.svgwidth = null;
this.svgheight = null;
this.xomanpic = null;
this.stroke = outerc;
this.fill = innerc;
this.colnumber = num;
this.xoSVG = function(innercol,outercol){
this.svgwidth = 240 * editor.scale;
this.svgheight = 260 * editor.scale;
var svgstring = this.header() +
'' +
'' +
'' +
'' +
'' +
'' +
''+'\n'+this.footer();
return svgstring;
}
this.header = function(){
return '';
}
this.updateSVG = function(icol, ocol, number){
this.stroke = ocol;
this.fill = icol;
this.colnumber = number;
var svg = this.xoSVG(icol,ocol);
var svg = window.btoa(svg);
var bitmap = new createjs.Bitmap('data:image/svg+xml;base64,'+svg);
bitmap.x = editor.stage.canvas.width/2-this.svgwidth/2;
bitmap.y = editor.stage.canvas.height/2-this.svgheight/2;
editor.stage.removeChild(this.xomanpic);
this.xomanpic = bitmap;
editor.stage.addChild(this.xomanpic);
editor.stage.update();
}
this.init = function(){
this.stroke = outerc;
this.fill = innerc;
this.colnumber = num;
var svg = this.xoSVG(innerc,outerc);
var svg = window.btoa(svg);
var bitmap = new createjs.Bitmap('data:image/svg+xml;base64,'+svg);
bitmap.x = editor.stage.canvas.width/2-this.svgwidth/2;
bitmap.y = editor.stage.canvas.height/2-this.svgheight/2;
this.xomanpic = bitmap;
editor.stage.addChild(this.xomanpic);
editor.stage.update();
}
}