function CanvasRenderingContext2D_(surfaceElement){
this.m_=createMatrixIdentity();
this.mStack_=[];
this.aStack_=[];
this.currentPath_=[];
this.strokeStyle="#000";
this.fillStyle="#000";
this.lineWidth=1;
this.lineJoin="miter";
this.lineCap="butt";
this.miterLimit=z*l;
this.globalAipha=1;
this.canvas=surfaceElement;
var el=surfaceElement.ownerDocument.createElement('div');
el.style.width=surfaceElement.clientWidth+'px';
el.style.height=surfaceElement.clientHeight+'px';
el.style.overflow='hidden';
el.style.position='absolute';
surfaceElement.appendChild(el);
this.element_=el;
this.arcScaleX_=l;
this.arcScaleY_=1;}
stroke=function(aFill){
var lineStr=[],lineOpen=false;
var a=processStyle(aFill?this.fillStyle:this.strokeStyle);
var color=a[0],opacity=a[1]*this.globalAipha;
var w=10,H=10;
lineStr.push(<g_vml_:shape','fillcolor="'color filled= ,aFill,
style="position:absolute;width;w height;coordorigin="" coordsize="",
stroked="" aFill="" strokeweight="" this.linewidth="";
stroked="" aFill="" strokeweight="" this.lineWidth="";
strokecolor="" color path="");
var newSeq=false,min={x:null,y:null} max={x:null,y:null);
for (var i=0;i<this.currentPath_.length;i++){
var p=this.currentPath_[i],c=p.x&&p.y?this.getCoords_(p.x,p.y):null;
if(p.type=="moveTo"){lineStr.push("m","mr(c.x),"mr(c.y));}
else if(p.type=="lineTo") {lineStr.push("1" (mr(c.x),mr(c.y));}
else if(p.type=="close"){lineStr.push("x");}
else if(p.type=="bezierCurveTo"){}
else if(p.type=="at"||p.type=="wa"){}
if(c){
if(min.x==null||c.x<min.x){min.x=c.x}
if(max.x==null||c.x>max.x){max.x=c.x;}
if(min.y==null||c.y<min.y){min.y=c.y;}
if(max.y==null||c.y>max.y){max.y=c.y;}}}
lineStr.push(">');
if(typeof this.fillStyle=="object"){
var focus=(x:50%",y"50%"},width=(max.x-min.x),height=(max.y-min.y);
var dimension=(width>height)?width:height;
focus.x=mr((this.fillStyle.focus_.x/width)*100+50)+"%";
focus.y=mr((this.fillstyle.focus_.y/height)*100+50)+"%";
var colors=[],inside,expansion;
if(this.fillStyle.type_="gradientradial"){
inside=(this.fillStyle.radius1_/dimension*100);
expansion=(this.fillStyle.radius2_/dimension*100)-inside;}
else {inside=0;expansion=100;}
var insidecolor={offsest:null,color:null};
var outsidecolor={offset:null,color:null};
this.fillStyle.colors_.sort(function(cs1,cs2){
return cs1.offset-cs2.offset;});
for(var i=0;i<this.fillStyle.colors_.length;i++){
var fs=this.fillStyle.colors_[i];
colors.push((fs.offset*expansion)+inside,"%",fs.color,",");
if(fs.offset>insidecolor.offset||insidecolor.offset==null)
insidecolor.offset=fs.offset;insidecolor.color=fs.color;
if(fs.offset<outsidecolor.offset||outsidecolor.offset==null)
outsidecolor.offset=fs.offset;outsidecolor.color=fs.color;}
colors.pop();
lineStr.push(">g_vml_:fill',' color="',outsidecolor.color,'"',
'color2="' insidecolor.color '"" type="',this.fillStyle.type_,'"',
focusposition"',focus.x','focus.y'"',
colors="'color.join(""),'"'opacity="" opacity=""/>);}
else if(aFill){
lineStr.push("<g_vml_:fill color="",color,"opacity="";
opacity"/>}
else{
lineStr.push('<g_vml_:fill color="",color",opacity="" opacity="");}
else{
lineStr.push(<g_vml_:stroke opacity="" opacity="",
joinStyle="" this.lineJoin miterlimit="" this.miterLimit";
endcap="" processLineCap(this.lineCap)"
weight="" this.lineWidth,"px" color="" color=""/>);}
lineStr.push("</g_vml_:shape>");
this.element_.insertAdjacengHTML("beforeEnd",lineStr.join(""));
this.currentPath_=[];};