_zlh.js 3.4 KB

123456
  1. // Licensed Materials - Property of IBM
  2. // IBM Cognos Products: rs
  3. // (C) Copyright IBM Corp. 2003, 2022.
  4. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  5. function _zlh(_lsn, _mzl, _xqm, _gal, _npf){this._rql=_mzl;this._zim=_xqm;this._qrl=document.createElement('canvas');this._qrl.height=_mzl;this._qrl.width=_xqm;this._qrl.id=_lsn;this._4hj=8;if(_gal){this._qrl.setAttribute('onmousedown', _gal);}if(_npf){this._qrl.setAttribute('onMouseOver', _npf);}};_zlh._98d=1;_zlh._ea2=2;_zlh._xw1=3;_zlh._bn5=4;_zlh.prototype._ejl=function(_69i, _sqj, _k89, _84c, _wvl, _wji, _2pm){if(_wvl){this._mnl(_69i, _sqj,(_wji||6), true, _k89, _84c);}else{var _48n=this._4hj;if(_k89==_zlh._xw1){var _b5n=[];_b5n.push(new _sgk(_69i[0].left, _69i[0].top-_48n/2));_b5n.push(new _sgk(_48n, _48n));this._onl(_b5n, _sqj);}if(!_wji){_wji=_sqj?3:1;}this._mnl(_69i, _sqj, _wji, true, _k89, _84c);var _u7n=_69i.length-1;if(_84c==_zlh._xw1){var _b5n=[];_b5n.push(new _sgk(_69i[_u7n].left-_48n, _69i[_u7n].top-_48n/2));_b5n.push(new _sgk(_48n, _48n));this._onl(_b5n, _sqj);}else if(_84c==_zlh._ea2){var _3mm=[];_3mm.push(new _sgk(_69i[_u7n].left-_48n, _69i[_u7n].top));_3mm.push(new _sgk(_69i[_u7n].left-_48n, _69i[_u7n].top-_48n/2));_3mm.push(new _sgk(_69i[_u7n].left, _69i[_u7n].top));_3mm.push(new _sgk(_69i[_u7n].left-_48n, _69i[_u7n].top+_48n/2));_3mm.push(new _sgk(_69i[_u7n].left-_48n, _69i[_u7n].top));this._zlk(_3mm, _sqj);}else if(_84c==_zlh._bn5){var _3mm=[];var _vyg=_48n*2;_3mm.push(new _sgk(0, 0-_vyg/2));_3mm.push(new _sgk(_48n, 0));_3mm.push(new _sgk(0, _vyg/2));_3mm.push(new _sgk(0, 0-_vyg/2));var _u6k=new _sgk(_69i[_u7n].left, _69i[_u7n].top);this._zlk(_3mm, _sqj, _u6k, _2pm);}}};_zlh.prototype._mnl=function(_69i,_sqj,_wji,_5xl,_k89,_84c){var _osi=this._qrl.getContext('2d');var _2dn=_osi.strokeStyle;_osi.strokeStyle=_9l8._9h8(_sqj?"--primary1":"--B");_osi.beginPath();var _mdn=_69i[0].left+',' + _69i[0].top;_osi.moveTo(_69i[0].left, _69i[0].top);for(var i=1; i<_69i.length; i++){_osi.lineTo(_69i[i].left, _69i[i].top);_mdn=_mdn+':' + _69i[i].left + ',' + _69i[i].top;}_osi.lineWidth=_wji;if(_5xl){_osi.stroke();}_osi.strokeStyle=_2dn;};_zlh.prototype._zlk=function(_qin,_sqj,_t3e,_2pm){var _osi=this._qrl.getContext('2d');if(_2pm||_t3e){_osi.save();if(_t3e){_osi.translate(_t3e.left, _t3e.top);}if(_2pm){_osi.rotate((360-_2pm)*Math.PI/180);} }var _2dn=_osi.fillStyle;_osi.fillStyle=_9l8._9h8(_sqj?"--primary1":"--B");_osi.beginPath();_osi.moveTo(_qin[0].left, _qin[0].top);for(var i=1; i<_qin.length; i++){_osi.lineTo(_qin[i].left, _qin[i].top);}_osi.fill();_osi.fillStyle=_2dn;if(_2pm||_t3e){_osi.restore();}};_zlh.prototype._onl=function(_69i,_sqj){var _osi=this._qrl.getContext('2d');var _2dn=_osi.fillStyle;_osi.fillStyle=_9l8._9h8(_sqj?"--primary1":"--B");_osi.fillRect(_69i[0].left, _69i[0].top, _69i[1].left, _69i[1].top);_osi.fillStyle=_2dn;};_zlh.prototype._8dm=function(_d6m){return _d6m.appendChild(this._qrl);};_zlh.prototype._1jk=function(_ntn,_otn){_ntn=Math.round(_ntn);_otn=Math.round(_otn);var _osi=this._qrl.getContext('2d');var delta=10;for(var x=_ntn-delta; x<=_ntn+delta; x++){for(var y=_otn-delta; y<=_otn+delta; y++){if(_osi.isPointInPath(x, y)){return true;}}}return false;};_zlh.prototype._bzm=function(){var _osi=this._qrl.getContext('2d');_osi.clearRect(0, 0, this._zim, this._rql);};_zlh.prototype._fdm=function(){if(this._qrl){delete this._qrl;}};