Lines Matching full:ctx_
44 base.exportTo("tracing",function(){function e(c,a,b,d){this.ctx_=c;this.minRectSize_=a;this.maxMergeDist_=b;this.pallette_=d}e.prototype={y_:0,h_:0,merging_:!1,mergeStartX_:0,mergeCurRight_:0,setYandH:function(c,a){this.flush();this.y_=c;this.h_=a},fillRect:function(c,a,b){var d=c+a;a<this.minRectSize_?(d-this.mergeStartX_>this.maxMergeDist_&&this.flush(),this.merging_?(this.mergeCurRight_=d,this.mergedColorId=Math.max(this.mergedColorId,b)):(this.merging_=!0,this.mergeStartX_=c,this.mergeCurRight_=
45 d,this.mergedColorId=b)):(this.merging_&&this.flush(),this.ctx_.fillStyle=this.pallette_[b],this.ctx_.fillRect(c,this.y_,a,this.h_))},flush:function(){this.merging_&&(this.ctx_.fillStyle=this.pallette_[this.mergedColorId],this.ctx_.fillRect(this.mergeStartX_,this.y_,this.mergeCurRight_-this.mergeStartX_,this.h_),this.merging_=!1)}};return{FastRectRenderer:e}});"use strict";
51 this.canvas_=document.createElement("canvas");this.canvas_.className="timeline-canvas-based-track-canvas";this.canvasContainer_.appendChild(this.canvas_);this.ctx_=this.canvas_.getContext("2d")},detach:function(){this.viewport_&&(this.viewport_.removeEventListener("change",this.viewportChangeBoundToThis_),this.viewport_.removeEventListener("markersChange",this.viewportMarkersChangeBoundToThis_))},set headingWidth(c){this.headingDiv_.style.width=c},get heading(){return this.headingDiv_.textContent},
59 set slices(a){this.slices_=a||[];a||(this.visible=!1);this.invalidate()},get height(){return window.getComputedStyle(this).height},set height(a){this.style.height=a;this.invalidate()},labelWidth:function(a){var b=f[a];b||(b=this.ctx_.measureText(a).width,f[a]=b);return b+2},labelWidthWorld:function(a,b){return this.labelWidth(a)*b},redraw:function(){var b=this.ctx_,f=this.canvas_.width,g=this.canvas_.height;b.clearRect(0,0,f,g);var c=this.viewport_,e=c.xViewVectorToWorld(1),m=c.xViewToWorld(0),f=
99 a;this.updateVisibility_()},get selectedSamples(){return this.selectedSamples_},updateVisibility_:function(){this.visible=this.counter_&&this.categoryFilter_.matchCounter(this.counter_)},redraw:function(){var a=this.counter_,b=this.ctx_,d=this.canvas_.width,f=this.canvas_.height;b.clearRect(0,0,d,f);var c=this.viewport_,l=c.xViewVectorToWorld(1),h=c.xViewToWorld(0),d=c.xViewToWorld(d);c.drawUnderContent(b,h,d,f);var j=c.xViewVectorToWorld(1);b.save();c.applyTransformToCanvas(b);for(var k=a.numSeries,
124 d);a.lineTo(f,c);a.closePath();a.strokeStyle=e;a.stroke()},drawArrow_:function(a,b,d,f,c,e,h){this.drawLine_(a,b,d,f,c,h);var j=f-b,k=c-d,q=Math.sqrt(j*j+k*k),m=(q-10)/q,b=b+m*j,d=d+m*k,k=k/q*e,e=-(j/q)*e;a.beginPath();a.fillStyle=h;a.moveTo(b+k,d+e);a.lineTo(f,c);a.lineTo(b-k,d-e);a.lineTo(b+k,d+e);a.closePath();a.fill()},redraw:function(){var a=this.ctx_,b=this.canvas_.width,d=this.canvas_.height;a.clearRect(0,0,b,d);var f=this.viewport_;f.xViewVectorToWorld(1);for(var g=f.xViewToWorld(0),e=f.xViewToWorld(b),