From 221f1df29a4764af13f6917d044fba4dc5c006a0 Mon Sep 17 00:00:00 2001 From: hyperandroid Date: Tue, 24 Jan 2012 23:34:28 +0100 Subject: [PATCH] 01/24/2012 *0.2 Build 48* -------------------------- * Fixed Path.applyAsPath which failed to execute. * Fixed Path.applyAsPath which wasn't applying the mask properly. --- build/caat-box2d-min.js | 6 ++-- build/caat-box2d.js | 6 ++-- build/caat-css-min.js | 16 +++++----- build/caat-css.js | 23 +++++++------- build/caat-min.js | 26 ++++++++-------- build/caat.js | 30 ++++++++++--------- changelog | 6 ++++ documentation/jsdoc/files.html | 2 +- documentation/jsdoc/index.html | 2 +- documentation/jsdoc/symbols/CAAT.Actor.html | 2 +- .../jsdoc/symbols/CAAT.ActorContainer.html | 2 +- .../jsdoc/symbols/CAAT.AudioManager.html | 2 +- .../jsdoc/symbols/CAAT.B2DBodyActor.html | 2 +- .../jsdoc/symbols/CAAT.B2DCircularBody.html | 2 +- .../jsdoc/symbols/CAAT.B2DPolygonBody.html | 2 +- documentation/jsdoc/symbols/CAAT.Bezier.html | 8 ++--- .../jsdoc/symbols/CAAT.CatmullRom.html | 2 +- .../jsdoc/symbols/CAAT.Color.RGB.html | 2 +- documentation/jsdoc/symbols/CAAT.Color.html | 2 +- documentation/jsdoc/symbols/CAAT.Curve.html | 8 ++--- .../jsdoc/symbols/CAAT.CurvePath.html | 12 ++------ .../jsdoc/symbols/CAAT.Director.html | 2 +- documentation/jsdoc/symbols/CAAT.Font.html | 2 +- documentation/jsdoc/symbols/CAAT.IMActor.html | 2 +- documentation/jsdoc/symbols/CAAT.IMBump.html | 2 +- .../jsdoc/symbols/CAAT.IMPlasma.html | 2 +- .../jsdoc/symbols/CAAT.IMRotoZoom.html | 2 +- .../jsdoc/symbols/CAAT.ImagePreloader.html | 2 +- .../jsdoc/symbols/CAAT.ImageProcessor.html | 2 +- .../jsdoc/symbols/CAAT.Interpolator.html | 2 +- .../jsdoc/symbols/CAAT.InterpolatorActor.html | 2 +- .../jsdoc/symbols/CAAT.KeyEvent.html | 2 +- .../jsdoc/symbols/CAAT.LinearPath.html | 2 +- documentation/jsdoc/symbols/CAAT.Matrix3.html | 2 +- .../jsdoc/symbols/CAAT.MatrixStack.html | 2 +- .../jsdoc/symbols/CAAT.MouseEvent.html | 2 +- documentation/jsdoc/symbols/CAAT.Path.html | 2 +- .../jsdoc/symbols/CAAT.PathActor.html | 2 +- .../jsdoc/symbols/CAAT.PathSegment.html | 2 +- documentation/jsdoc/symbols/CAAT.Point.html | 2 +- .../jsdoc/symbols/CAAT.Rectangle.html | 2 +- documentation/jsdoc/symbols/CAAT.Scene.html | 2 +- .../jsdoc/symbols/CAAT.ShapeActor.html | 2 +- .../jsdoc/symbols/CAAT.SpriteImage.html | 2 +- .../jsdoc/symbols/CAAT.StarActor.html | 2 +- .../jsdoc/symbols/CAAT.TextActor.html | 2 +- .../jsdoc/symbols/CAAT.TimerTask.html | 2 +- documentation/jsdoc/symbols/CAAT.html | 2 +- ...AT.modules.CircleManager.PackedCircle.html | 2 +- ...les.CircleManager.PackedCircleManager.html | 2 +- .../symbols/CAAT.modules.CircleManager.html | 2 +- .../symbols/CAAT.modules.LocalStorage.html | 2 +- documentation/jsdoc/symbols/CAAT.modules.html | 2 +- documentation/jsdoc/symbols/Function.html | 2 +- documentation/jsdoc/symbols/_global_.html | 2 +- ...rs_ibon_js_CAAT_src_model_director.js.html | 4 +-- src/math/bezier.js | 8 ++--- src/model/actor.js | 7 +++-- src/model/director.js | 5 ++-- src/path/path.js | 4 +-- 60 files changed, 132 insertions(+), 127 deletions(-) diff --git a/build/caat-box2d-min.js b/build/caat-box2d-min.js index 4d322594..77c40d4f 100644 --- a/build/caat-box2d-min.js +++ b/build/caat-box2d-min.js @@ -22,11 +22,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Version: 0.2 build: 39 +Version: 0.2 build: 48 Created on: -DATE: 2012-01-23 -TIME: 23:11:00 +DATE: 2012-01-24 +TIME: 23:32:25 */ diff --git a/build/caat-box2d.js b/build/caat-box2d.js index 834cf5ee..579e7063 100644 --- a/build/caat-box2d.js +++ b/build/caat-box2d.js @@ -21,11 +21,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Version: 0.2 build: 40 +Version: 0.2 build: 49 Created on: -DATE: 2012-01-23 -TIME: 23:11:22 +DATE: 2012-01-24 +TIME: 23:32:49 */ diff --git a/build/caat-css-min.js b/build/caat-css-min.js index d2d52e27..13d24bfc 100644 --- a/build/caat-css-min.js +++ b/build/caat-css-min.js @@ -22,15 +22,15 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Version: 0.2 build: 39 +Version: 0.2 build: 48 Created on: -DATE: 2012-01-23 -TIME: 23:11:00 +DATE: 2012-01-24 +TIME: 23:32:25 */ -var CAAT=CAAT||{};Function.prototype.bind=Function.prototype.bind||function(){var a=this,b=Array.prototype.slice.call(arguments),c=b.shift();return function(){return a.apply(c,b.concat(Array.prototype.slice.call(arguments)))}};CAAT.__CSS__=1;CAAT.__CSS__=1;CAAT.__CSS__=1;CAAT.__CSS__=1;CAAT.__CSS__=1;CAAT.__CSS__=1;CAAT.__CSS__=1;CAAT.__CSS__=1;CAAT.__CSS__=1;(function(){CAAT.BrowserDetect=function(){this.init();return this};CAAT.BrowserDetect.prototype={browser:"",version:0,OS:"",init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS"},searchString:function(a){for(var b=0;b=0&&b=0;b--){var c=this.childrenList[b],d=new CAAT.Point(a.x,a.y,0),c=c.findActorAtPosition(d);if(null!==c)return c}return this},resetStats:function(){this.statistics.size_total=0;this.statistics.size_active=0;this.statistics.draws=0},render:function(a){this.time+=a;this.animate(this,a);CAAT.DEBUG&&this.resetStats();var b=this.childrenList.length,c,d,e,f=this.ctx;if(this.glEnabled){this.gl.clear(this.gl.COLOR_BUFFER_BIT| -this.gl.DEPTH_BUFFER_BIT);for(c=this.uvIndex=this.coordsIndex=0;c=this.dirtyRects.length)for(b=0;b<32;b++)this.dirtyRects.push(new CAAT.Rectangle);b=this.dirtyRects[this.dirtyRectsIndex];b.x=a.x;b.y=a.y;b.x1=a.x1;b.y1=a.y1;b.width=a.width;b.height=a.height; this.cDirtyRects.push(b)}},renderToContext:function(a,b){if(b.isInAnimationFrame(this.time)){a.globalAlpha=1;a.globalCompositeOperation="source-over";a.clearRect(0,0,this.width,this.height);a.setTransform(1,0,0,0,1,0);var c=this.ctx,d=this.crc;this.ctx=this.crc=a;a.save();var e=this.worldModelViewMatrix;this.worldModelViewMatrix=new CAAT.Matrix;this.wdirty=true;b.animate(this,b.time);if(b.onRenderStart)b.onRenderStart(b.time);b.paintActor(this,b.time);if(b.onRenderEnd)b.onRenderEnd(b.time);this.worldModelViewMatrix= @@ -273,7 +273,7 @@ this.points[0].y;this.length=Math.sqrt(a*a+b*b);this.bbox.setEmpty();this.bbox.u startCurvePosition:function(){return this.points[0]},getPosition:function(a){if(a>1||a<0)a%=1;a<0&&(a=1+a);this.newPosition.set(this.points[0].x+(this.points[1].x-this.points[0].x)*a,this.points[0].y+(this.points[1].y-this.points[0].y)*a);return this.newPosition},initialPositionX:function(){return this.points[0].x},finalPositionX:function(){return this.points[1].x},paint:function(a,b){var c=a.crc;c.save();c.strokeStyle=this.color;c.beginPath();c.moveTo(this.points[0].x,this.points[0].y);c.lineTo(this.points[1].x, this.points[1].y);c.stroke();if(b)c.globalAlpha=0.5,c.fillStyle="#7f7f00",c.beginPath(),c.arc(this.points[0].x,this.points[0].y,CAAT.Curve.prototype.HANDLE_SIZE/2,0,2*Math.PI,false),c.arc(this.points[1].x,this.points[1].y,CAAT.Curve.prototype.HANDLE_SIZE/2,0,2*Math.PI,false),c.fill();c.restore()},numControlPoints:function(){return 2},getControlPoint:function(a){if(0===a)return this.points[0];else if(1===a)return this.points[1]},getContour:function(){var a=[];a.push(this.getPosition(0).clone());a.push(this.getPosition(1).clone()); return a}};extend(CAAT.LinearPath,CAAT.PathSegment)})(); -(function(){CAAT.CurvePath=function(){CAAT.CurvePath.superclass.constructor.call(this);this.newPosition=new CAAT.Point(0,0,0);return this};CAAT.CurvePath.prototype={curve:null,newPosition:null,applyAsPath:function(a,b){this.curve.applyAsPath(a,b);return this},setPoint:function(a,b){this.curve&&this.curve.setPoint(a,b)},setPoints:function(a){var b=new CAAT.Bezier;b.setPoints(a);this.curve=b;return this},setQuadric:function(a,b,c,d,e,f){var g=new CAAT.Bezier;g.setQuadric(a,b,c,d,e,f);this.curve=g;this.updatePath(); +(function(){CAAT.CurvePath=function(){CAAT.CurvePath.superclass.constructor.call(this);this.newPosition=new CAAT.Point(0,0,0);return this};CAAT.CurvePath.prototype={curve:null,newPosition:null,applyAsPath:function(a){this.curve.applyAsPath(a);return this},setPoint:function(a,b){this.curve&&this.curve.setPoint(a,b)},setPoints:function(a){var b=new CAAT.Bezier;b.setPoints(a);this.curve=b;return this},setQuadric:function(a,b,c,d,e,f){var g=new CAAT.Bezier;g.setQuadric(a,b,c,d,e,f);this.curve=g;this.updatePath(); return this},setCubic:function(a,b,c,d,e,f,g,h){var i=new CAAT.Bezier;i.setCubic(a,b,c,d,e,f,g,h);this.curve=i;this.updatePath();return this},updatePath:function(){this.curve.update();this.length=this.curve.getLength();this.curve.getBoundingBox(this.bbox);return this},getPosition:function(a){if(a>1||a<0)a%=1;a<0&&(a=1+a);this.curve.solve(this.newPosition,a);return this.newPosition},getPositionFromLength:function(a){this.curve.solve(this.newPosition,a/this.length);return this.newPosition},initialPositionX:function(){return this.curve.coordlist[0].x}, finalPositionX:function(){return this.curve.coordlist[this.curve.coordlist.length-1].x},paint:function(a,b){this.curve.drawHandles=b;a.ctx.strokeStyle=this.color;this.curve.paint(a)},numControlPoints:function(){return this.curve.coordlist.length},getControlPoint:function(a){return this.curve.coordlist[a]},endCurvePosition:function(){return this.curve.endCurvePosition()},startCurvePosition:function(){return this.curve.startCurvePosition()},getContour:function(a){for(var b=[],c=0;c<=a;c++)b.push({x:c/ a,y:this.getPosition(c/a).y});return b}};extend(CAAT.CurvePath,CAAT.PathSegment,null)})(); diff --git a/build/caat-css.js b/build/caat-css.js index 404e105b..d927840f 100644 --- a/build/caat-css.js +++ b/build/caat-css.js @@ -21,11 +21,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Version: 0.2 build: 40 +Version: 0.2 build: 49 Created on: -DATE: 2012-01-23 -TIME: 23:11:22 +DATE: 2012-01-24 +TIME: 23:32:49 */ @@ -1810,7 +1810,7 @@ var cp1= proxy( this.coordlist[index]= point; } }, - applyAsPath : function( ctx ) { + applyAsPath : function( director ) { } }; })(); @@ -1833,12 +1833,12 @@ var cp1= proxy( cubic: false, - applyAsPath : function( ctx ) { + applyAsPath : function( director ) { var cc= this.coordlist; if ( this.cubic ) { - ctx.bezierCurveTo( + director.ctx.bezierCurveTo( cc[1].x, cc[1].y, cc[2].x, @@ -1847,7 +1847,7 @@ var cp1= proxy( cc[3].y ); } else { - ctx.quadraticCurveTo( + director.ctx.quadraticCurveTo( cc[1].x, cc[1].y, cc[2].x, @@ -8096,6 +8096,7 @@ var cp1= proxy( if ( this.dirtyRectsEnabled ) { ctx.beginPath(); +ctx.rect(0,0,120,40); var dr= this.cDirtyRects; for( i=0; i=0&&bc)c=a[f].x;if(a[f].ye)e=a[f].y}a=this.AABB;a.x=b;a.y=d;a.x1=c;a.y1=e;a.width=c-b;a.height=e-d;return this},paintActor:function(a,b){if(!this.visible)return true;var c=a.ctx;this.frameAlpha=this.parent?this.parent.frameAlpha*this.alpha:1;c.globalAlpha=this.frameAlpha;a.modelViewMatrix.transformRenderingContextSet(c);c.save();this.worldModelViewMatrix.transformRenderingContext(c);this.clip&&(c.beginPath(),this.clipPath?this.clipPath.applyAsPath(a): -c.rect(0,0,this.width,this.height),c.clip());this.paint(a,b);c.restore();return true},__paintActor:function(a,b){if(!this.visible)return true;var c=a.ctx;this.frameAlpha=this.alpha;var d=this.worldModelViewMatrix.matrix;c.setTransform(d[0],d[3],d[1],d[4],d[2],d[5],this.frameAlpha);this.paint(a,b);return true},paintActorGL:function(a){this.frameAlpha=this.parent.frameAlpha*this.alpha;if(this.glEnabled&&this.visible)if(this.glNeedsFlush(a)){a.glFlush();this.glSetShader(a);if(!this.__uv)this.__uv=new Float32Array(8); +4;f++){if(a[f].xc)c=a[f].x;if(a[f].ye)e=a[f].y}a=this.AABB;a.x=b;a.y=d;a.x1=c;a.y1=e;a.width=c-b;a.height=e-d;return this},paintActor:function(a,b){if(!this.visible)return true;var c=a.ctx;this.frameAlpha=this.parent?this.parent.frameAlpha*this.alpha:1;c.globalAlpha=this.frameAlpha;a.modelViewMatrix.transformRenderingContextSet(c);this.worldModelViewMatrix.transformRenderingContext(c);this.clip&&(c.beginPath(),this.clipPath?this.clipPath.applyAsPath(a): +c.rect(0,0,this.width,this.height),c.clip());this.paint(a,b);return true},__paintActor:function(a,b){if(!this.visible)return true;var c=a.ctx;this.frameAlpha=this.alpha;var d=this.worldModelViewMatrix.matrix;c.setTransform(d[0],d[3],d[1],d[4],d[2],d[5],this.frameAlpha);this.paint(a,b);return true},paintActorGL:function(a){this.frameAlpha=this.parent.frameAlpha*this.alpha;if(this.glEnabled&&this.visible)if(this.glNeedsFlush(a)){a.glFlush();this.glSetShader(a);if(!this.__uv)this.__uv=new Float32Array(8); if(!this.__vv)this.__vv=new Float32Array(12);this.setGLCoords(this.__vv,0);this.setUV(this.__uv,0);a.glRender(this.__vv,12,this.__uv)}else{var b=a.coordsIndex;this.setGLCoords(a.coords,b);a.coordsIndex=b+12;this.setUV(a.uv,a.uvIndex);a.uvIndex+=8}},setGLCoords:function(a,b){var c=this.viewVertices;a[b++]=c[0].x;a[b++]=c[0].y;a[b++]=0;a[b++]=c[1].x;a[b++]=c[1].y;a[b++]=0;a[b++]=c[2].x;a[b++]=c[2].y;a[b++]=0;a[b++]=c[3].x;a[b++]=c[3].y;a[b++]=0},setUV:function(a,b){this.backgroundImage.setUV(a,b)}, glNeedsFlush:function(a){return this.getTextureGLPage()!==a.currentTexturePage?true:this.frameAlpha!==a.currentOpacity?true:false},glSetShader:function(a){var b=this.getTextureGLPage();b!==a.currentTexturePage&&a.setGLTexturePage(b);this.frameAlpha!==a.currentOpacity&&a.setGLCurrentOpacity(this.frameAlpha)},endAnimate:function(){return this},initialize:function(a){if(a)for(var b in a)this[b]=a[b];return this},setClip:function(a,b){this.clip=a;this.clipPath=b;return this},cacheAsBitmap:function(a){var a= a||0,b=document.createElement("canvas");b.width=this.width;b.height=this.height;var c=b.getContext("2d");this.paintActor({ctx:c,crc:c,modelViewMatrix:new CAAT.Matrix},a);this.setBackgroundImage(b);return this},setAsButton:function(a,b,c,d,e,f){this.setBackgroundImage(a,true);this.iNormal=b||0;this.iOver=c||b;this.iPress=d||b;this.iDisabled=e||b;this.fnOnClick=f;this.enabled=true;this.setSpriteIndex(b);this.setEnabled=function(a){this.enabled=a;this.setSpriteIndex(this.enabled?this.iNormal:this.iDisabled)}; this.actionPerformed=function(){this.enabled&&null!==this.fnOnClick&&this.fnOnClick(this)};this.mouseEnter=function(){this.enabled&&(this.dragging?this.setSpriteIndex(this.iPress):this.setSpriteIndex(this.iOver),CAAT.setCursor("pointer"))};this.mouseExit=function(){this.enabled&&(this.setSpriteIndex(this.iNormal),CAAT.setCursor("default"))};this.mouseDown=function(){this.enabled&&this.setSpriteIndex(this.iPress)};this.mouseUp=function(){if(this.enabled)this.setSpriteIndex(this.iNormal),this.dragging= false};this.mouseClick=function(){};this.mouseDrag=function(){if(this.enabled)this.dragging=true};this.setButtonImageIndex=function(a,b,c,d){this.iNormal=a;this.iOver=b;this.iPress=c;this.iDisabled=d;this.setSpriteIndex(this.iNormal);return this};return this}};if(CAAT.NO_PERF)CAAT.Actor.prototype.paintActor=CAAT.Actor.prototype.__paintActor})(); (function(){CAAT.ActorContainer=function(a){CAAT.ActorContainer.superclass.constructor.call(this);this.childrenList=[];this.pendingChildrenList=[];if(typeof a!=="undefined")this.addHint=a,this.boundingBox=new CAAT.Rectangle;return this};CAAT.ActorContainer.AddHint={CONFORM:1};CAAT.ActorContainer.prototype={childrenList:null,activeChildren:null,pendingChildrenList:null,addHint:0,boundingBox:null,runion:new CAAT.Rectangle,drawScreenBoundingBox:function(a,b){if(this.inFrame){for(var c=this.childrenList, -d=0;d=this.childrenList.length)b=this.childrenList.length; a.parent=this;a.dirty=true;this.childrenList.splice(b,0,a);return this},findChild:function(a){for(var b=this.childrenList,c=0,d=b.length,c=0;c=0;b--){var c=this.childrenList[b],d=new CAAT.Point(a.x, a.y,0),c=c.findActorAtPosition(d);if(null!==c)return c}return this},destroy:function(){for(var a=this.childrenList,b=a.length-1;b>=0;b--)a[b].destroy();CAAT.ActorContainer.superclass.destroy.call(this);return this},getNumChildren:function(){return this.childrenList.length},getNumActiveChildren:function(){return this.activeChildren.length},getChildAt:function(a){return this.childrenList[a]},setZOrder:function(a,b){var c=this.findChild(a);if(-1!==c){var d=this.childrenList;if(b!==c)if(b>=d.length)d.splice(c, @@ -199,8 +199,8 @@ this.glTextureManager=null;if(this.imagesCache){var e=[];for(d=0;d=0;b--){var c=this.childrenList[b],d=new CAAT.Point(a.x,a.y,0),c=c.findActorAtPosition(d);if(null!==c)return c}return this},resetStats:function(){this.statistics.size_total=0;this.statistics.size_active=0;this.statistics.draws=0},render:function(a){this.time+=a;this.animate(this,a);CAAT.DEBUG&&this.resetStats();var b=this.childrenList.length,c,d,e,f=this.ctx;if(this.glEnabled){this.gl.clear(this.gl.COLOR_BUFFER_BIT| -this.gl.DEPTH_BUFFER_BIT);for(c=this.uvIndex=this.coordsIndex=0;c=this.dirtyRects.length)for(b=0;b<32;b++)this.dirtyRects.push(new CAAT.Rectangle);b=this.dirtyRects[this.dirtyRectsIndex];b.x=a.x;b.y=a.y;b.x1=a.x1;b.y1=a.y1;b.width=a.width;b.height=a.height; this.cDirtyRects.push(b)}},renderToContext:function(a,b){if(b.isInAnimationFrame(this.time)){a.globalAlpha=1;a.globalCompositeOperation="source-over";a.clearRect(0,0,this.width,this.height);a.setTransform(1,0,0,0,1,0);var c=this.ctx,d=this.crc;this.ctx=this.crc=a;a.save();var e=this.worldModelViewMatrix;this.worldModelViewMatrix=new CAAT.Matrix;this.wdirty=true;b.animate(this,b.time);if(b.onRenderStart)b.onRenderStart(b.time);b.paintActor(this,b.time);if(b.onRenderEnd)b.onRenderEnd(b.time);this.worldModelViewMatrix= @@ -295,7 +295,7 @@ this.points[0].y;this.length=Math.sqrt(a*a+b*b);this.bbox.setEmpty();this.bbox.u startCurvePosition:function(){return this.points[0]},getPosition:function(a){if(a>1||a<0)a%=1;a<0&&(a=1+a);this.newPosition.set(this.points[0].x+(this.points[1].x-this.points[0].x)*a,this.points[0].y+(this.points[1].y-this.points[0].y)*a);return this.newPosition},initialPositionX:function(){return this.points[0].x},finalPositionX:function(){return this.points[1].x},paint:function(a,b){var c=a.crc;c.save();c.strokeStyle=this.color;c.beginPath();c.moveTo(this.points[0].x,this.points[0].y);c.lineTo(this.points[1].x, this.points[1].y);c.stroke();if(b)c.globalAlpha=0.5,c.fillStyle="#7f7f00",c.beginPath(),c.arc(this.points[0].x,this.points[0].y,CAAT.Curve.prototype.HANDLE_SIZE/2,0,2*Math.PI,false),c.arc(this.points[1].x,this.points[1].y,CAAT.Curve.prototype.HANDLE_SIZE/2,0,2*Math.PI,false),c.fill();c.restore()},numControlPoints:function(){return 2},getControlPoint:function(a){if(0===a)return this.points[0];else if(1===a)return this.points[1]},getContour:function(){var a=[];a.push(this.getPosition(0).clone());a.push(this.getPosition(1).clone()); return a}};extend(CAAT.LinearPath,CAAT.PathSegment)})(); -(function(){CAAT.CurvePath=function(){CAAT.CurvePath.superclass.constructor.call(this);this.newPosition=new CAAT.Point(0,0,0);return this};CAAT.CurvePath.prototype={curve:null,newPosition:null,applyAsPath:function(a,b){this.curve.applyAsPath(a,b);return this},setPoint:function(a,b){this.curve&&this.curve.setPoint(a,b)},setPoints:function(a){var b=new CAAT.Bezier;b.setPoints(a);this.curve=b;return this},setQuadric:function(a,b,c,d,e,f){var g=new CAAT.Bezier;g.setQuadric(a,b,c,d,e,f);this.curve=g;this.updatePath(); +(function(){CAAT.CurvePath=function(){CAAT.CurvePath.superclass.constructor.call(this);this.newPosition=new CAAT.Point(0,0,0);return this};CAAT.CurvePath.prototype={curve:null,newPosition:null,applyAsPath:function(a){this.curve.applyAsPath(a);return this},setPoint:function(a,b){this.curve&&this.curve.setPoint(a,b)},setPoints:function(a){var b=new CAAT.Bezier;b.setPoints(a);this.curve=b;return this},setQuadric:function(a,b,c,d,e,f){var g=new CAAT.Bezier;g.setQuadric(a,b,c,d,e,f);this.curve=g;this.updatePath(); return this},setCubic:function(a,b,c,d,e,f,g,h){var i=new CAAT.Bezier;i.setCubic(a,b,c,d,e,f,g,h);this.curve=i;this.updatePath();return this},updatePath:function(){this.curve.update();this.length=this.curve.getLength();this.curve.getBoundingBox(this.bbox);return this},getPosition:function(a){if(a>1||a<0)a%=1;a<0&&(a=1+a);this.curve.solve(this.newPosition,a);return this.newPosition},getPositionFromLength:function(a){this.curve.solve(this.newPosition,a/this.length);return this.newPosition},initialPositionX:function(){return this.curve.coordlist[0].x}, finalPositionX:function(){return this.curve.coordlist[this.curve.coordlist.length-1].x},paint:function(a,b){this.curve.drawHandles=b;a.ctx.strokeStyle=this.color;this.curve.paint(a)},numControlPoints:function(){return this.curve.coordlist.length},getControlPoint:function(a){return this.curve.coordlist[a]},endCurvePosition:function(){return this.curve.endCurvePosition()},startCurvePosition:function(){return this.curve.startCurvePosition()},getContour:function(a){for(var b=[],c=0;c<=a;c++)b.push({x:c/ a,y:this.getPosition(c/a).y});return b}};extend(CAAT.CurvePath,CAAT.PathSegment,null)})(); diff --git a/build/caat.js b/build/caat.js index 0ad67f9e..03ed2710 100644 --- a/build/caat.js +++ b/build/caat.js @@ -21,11 +21,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Version: 0.2 build: 40 +Version: 0.2 build: 49 Created on: -DATE: 2012-01-23 -TIME: 23:11:22 +DATE: 2012-01-24 +TIME: 23:32:48 */ @@ -1809,7 +1809,7 @@ var cp1= proxy( this.coordlist[index]= point; } }, - applyAsPath : function( ctx ) { + applyAsPath : function( director ) { } }; })(); @@ -1832,12 +1832,12 @@ var cp1= proxy( cubic: false, - applyAsPath : function( ctx ) { + applyAsPath : function( director ) { var cc= this.coordlist; if ( this.cubic ) { - ctx.bezierCurveTo( + director.ctx.bezierCurveTo( cc[1].x, cc[1].y, cc[2].x, @@ -1846,7 +1846,7 @@ var cp1= proxy( cc[3].y ); } else { - ctx.quadraticCurveTo( + director.ctx.quadraticCurveTo( cc[1].x, cc[1].y, cc[2].x, @@ -6328,7 +6328,6 @@ var cp1= proxy( ctx.globalAlpha= this.frameAlpha; director.modelViewMatrix.transformRenderingContextSet( ctx ); - ctx.save(); this.worldModelViewMatrix.transformRenderingContext(ctx); @@ -6344,8 +6343,6 @@ var cp1= proxy( this.paint(director, time); - ctx.restore(); - return true; }, /** @@ -6759,6 +6756,8 @@ var cp1= proxy( } var ctx= director.ctx; + + ctx.save(); CAAT.ActorContainer.superclass.paintActor.call(this,director,time); if ( !this.isGlobalAlpha ) { @@ -6771,6 +6770,8 @@ var cp1= proxy( } } + ctx.restore(); + return true; }, __paintActor : function(director, time ) { @@ -9153,6 +9154,7 @@ var cp1= proxy( if ( this.dirtyRectsEnabled ) { ctx.beginPath(); +ctx.rect(0,0,120,40); var dr= this.cDirtyRects; for( i=0; i/User
- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:05:00 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:19 GMT+0100 (CET)
\ No newline at end of file diff --git a/documentation/jsdoc/index.html b/documentation/jsdoc/index.html index 791ec31c..9f521952 100644 --- a/documentation/jsdoc/index.html +++ b/documentation/jsdoc/index.html @@ -564,7 +564,7 @@

Function

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:05:00 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:19 GMT+0100 (CET)
\ No newline at end of file diff --git a/documentation/jsdoc/symbols/CAAT.Actor.html b/documentation/jsdoc/symbols/CAAT.Actor.html index 2c48c4f4..6f4972a9 100644 --- a/documentation/jsdoc/symbols/CAAT.Actor.html +++ b/documentation/jsdoc/symbols/CAAT.Actor.html @@ -4570,7 +4570,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:56 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:15 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.ActorContainer.html b/documentation/jsdoc/symbols/CAAT.ActorContainer.html index 2d61cd5c..ed4a8e76 100644 --- a/documentation/jsdoc/symbols/CAAT.ActorContainer.html +++ b/documentation/jsdoc/symbols/CAAT.ActorContainer.html @@ -1418,7 +1418,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:57 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:15 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.AudioManager.html b/documentation/jsdoc/symbols/CAAT.AudioManager.html index 4e5b6399..08f781ba 100644 --- a/documentation/jsdoc/symbols/CAAT.AudioManager.html +++ b/documentation/jsdoc/symbols/CAAT.AudioManager.html @@ -1127,7 +1127,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:57 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:15 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.B2DBodyActor.html b/documentation/jsdoc/symbols/CAAT.B2DBodyActor.html index bcbade88..56482583 100644 --- a/documentation/jsdoc/symbols/CAAT.B2DBodyActor.html +++ b/documentation/jsdoc/symbols/CAAT.B2DBodyActor.html @@ -1227,7 +1227,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:57 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:15 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.B2DCircularBody.html b/documentation/jsdoc/symbols/CAAT.B2DCircularBody.html index 10154667..e30c6810 100644 --- a/documentation/jsdoc/symbols/CAAT.B2DCircularBody.html +++ b/documentation/jsdoc/symbols/CAAT.B2DCircularBody.html @@ -632,7 +632,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:57 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:16 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.B2DPolygonBody.html b/documentation/jsdoc/symbols/CAAT.B2DPolygonBody.html index 3c6fa682..af78c7cd 100644 --- a/documentation/jsdoc/symbols/CAAT.B2DPolygonBody.html +++ b/documentation/jsdoc/symbols/CAAT.B2DPolygonBody.html @@ -714,7 +714,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:57 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:16 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.Bezier.html b/documentation/jsdoc/symbols/CAAT.Bezier.html index 7603abc6..c7c52b62 100644 --- a/documentation/jsdoc/symbols/CAAT.Bezier.html +++ b/documentation/jsdoc/symbols/CAAT.Bezier.html @@ -351,7 +351,7 @@

  -
applyAsPath(ctx) +
applyAsPath(director)
@@ -512,7 +512,7 @@

- applyAsPath(ctx) + applyAsPath(director)
@@ -528,7 +528,7 @@

Parameters:
- ctx + director
@@ -1022,7 +1022,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:57 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:16 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.CatmullRom.html b/documentation/jsdoc/symbols/CAAT.CatmullRom.html index aef0c251..8bd596e4 100644 --- a/documentation/jsdoc/symbols/CAAT.CatmullRom.html +++ b/documentation/jsdoc/symbols/CAAT.CatmullRom.html @@ -597,7 +597,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:57 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:16 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.Color.RGB.html b/documentation/jsdoc/symbols/CAAT.Color.RGB.html index a104d13b..4fd148ab 100644 --- a/documentation/jsdoc/symbols/CAAT.Color.RGB.html +++ b/documentation/jsdoc/symbols/CAAT.Color.RGB.html @@ -470,7 +470,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:57 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:16 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.Color.html b/documentation/jsdoc/symbols/CAAT.Color.html index 911b2eb9..dd79855f 100644 --- a/documentation/jsdoc/symbols/CAAT.Color.html +++ b/documentation/jsdoc/symbols/CAAT.Color.html @@ -694,7 +694,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:57 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:16 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.Curve.html b/documentation/jsdoc/symbols/CAAT.Curve.html index d15124c5..2b4660fb 100644 --- a/documentation/jsdoc/symbols/CAAT.Curve.html +++ b/documentation/jsdoc/symbols/CAAT.Curve.html @@ -349,7 +349,7 @@

  -
applyAsPath(ctx) +
applyAsPath(director)
@@ -506,7 +506,7 @@

- applyAsPath(ctx) + applyAsPath(director)
@@ -522,7 +522,7 @@

Parameters:
- ctx + director
@@ -969,7 +969,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:57 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:16 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.CurvePath.html b/documentation/jsdoc/symbols/CAAT.CurvePath.html index 228b39d6..8639b4db 100644 --- a/documentation/jsdoc/symbols/CAAT.CurvePath.html +++ b/documentation/jsdoc/symbols/CAAT.CurvePath.html @@ -351,7 +351,7 @@

  -
applyAsPath(director, ctx) +
applyAsPath(director)
@@ -548,7 +548,7 @@

- applyAsPath(director, ctx) + applyAsPath(director)
@@ -569,12 +569,6 @@

-
- ctx - -
-
- @@ -1205,7 +1199,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:57 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:16 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.Director.html b/documentation/jsdoc/symbols/CAAT.Director.html index b811a9e2..0c3e3538 100644 --- a/documentation/jsdoc/symbols/CAAT.Director.html +++ b/documentation/jsdoc/symbols/CAAT.Director.html @@ -4425,7 +4425,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:58 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:17 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.Font.html b/documentation/jsdoc/symbols/CAAT.Font.html index 2fb91211..29ff53aa 100644 --- a/documentation/jsdoc/symbols/CAAT.Font.html +++ b/documentation/jsdoc/symbols/CAAT.Font.html @@ -914,7 +914,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:58 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:17 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.IMActor.html b/documentation/jsdoc/symbols/CAAT.IMActor.html index 47adb51f..cfac53ce 100644 --- a/documentation/jsdoc/symbols/CAAT.IMActor.html +++ b/documentation/jsdoc/symbols/CAAT.IMActor.html @@ -553,7 +553,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:58 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:17 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.IMBump.html b/documentation/jsdoc/symbols/CAAT.IMBump.html index d4b98068..936a5fd1 100644 --- a/documentation/jsdoc/symbols/CAAT.IMBump.html +++ b/documentation/jsdoc/symbols/CAAT.IMBump.html @@ -819,7 +819,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:58 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:17 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.IMPlasma.html b/documentation/jsdoc/symbols/CAAT.IMPlasma.html index c62fd1ce..849a72c5 100644 --- a/documentation/jsdoc/symbols/CAAT.IMPlasma.html +++ b/documentation/jsdoc/symbols/CAAT.IMPlasma.html @@ -574,7 +574,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:58 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:17 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.IMRotoZoom.html b/documentation/jsdoc/symbols/CAAT.IMRotoZoom.html index d866d512..da727bbf 100644 --- a/documentation/jsdoc/symbols/CAAT.IMRotoZoom.html +++ b/documentation/jsdoc/symbols/CAAT.IMRotoZoom.html @@ -620,7 +620,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:58 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:17 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.ImagePreloader.html b/documentation/jsdoc/symbols/CAAT.ImagePreloader.html index 3d283a46..348c2a25 100644 --- a/documentation/jsdoc/symbols/CAAT.ImagePreloader.html +++ b/documentation/jsdoc/symbols/CAAT.ImagePreloader.html @@ -476,7 +476,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:58 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:17 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.ImageProcessor.html b/documentation/jsdoc/symbols/CAAT.ImageProcessor.html index 874dbb4c..5f833f1b 100644 --- a/documentation/jsdoc/symbols/CAAT.ImageProcessor.html +++ b/documentation/jsdoc/symbols/CAAT.ImageProcessor.html @@ -960,7 +960,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:58 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:17 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.Interpolator.html b/documentation/jsdoc/symbols/CAAT.Interpolator.html index bc3ba846..38016eb2 100644 --- a/documentation/jsdoc/symbols/CAAT.Interpolator.html +++ b/documentation/jsdoc/symbols/CAAT.Interpolator.html @@ -1355,7 +1355,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:58 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:17 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.InterpolatorActor.html b/documentation/jsdoc/symbols/CAAT.InterpolatorActor.html index 358f2170..07c5964b 100644 --- a/documentation/jsdoc/symbols/CAAT.InterpolatorActor.html +++ b/documentation/jsdoc/symbols/CAAT.InterpolatorActor.html @@ -615,7 +615,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:58 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:17 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.KeyEvent.html b/documentation/jsdoc/symbols/CAAT.KeyEvent.html index 6df40881..4a62d148 100644 --- a/documentation/jsdoc/symbols/CAAT.KeyEvent.html +++ b/documentation/jsdoc/symbols/CAAT.KeyEvent.html @@ -707,7 +707,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:58 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:17 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.LinearPath.html b/documentation/jsdoc/symbols/CAAT.LinearPath.html index 076b4dec..91453106 100644 --- a/documentation/jsdoc/symbols/CAAT.LinearPath.html +++ b/documentation/jsdoc/symbols/CAAT.LinearPath.html @@ -1079,7 +1079,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:58 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:17 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.Matrix3.html b/documentation/jsdoc/symbols/CAAT.Matrix3.html index 7c2efccf..7dfa7048 100644 --- a/documentation/jsdoc/symbols/CAAT.Matrix3.html +++ b/documentation/jsdoc/symbols/CAAT.Matrix3.html @@ -1615,7 +1615,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:58 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:17 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.MatrixStack.html b/documentation/jsdoc/symbols/CAAT.MatrixStack.html index 93c7213f..ae933d0b 100644 --- a/documentation/jsdoc/symbols/CAAT.MatrixStack.html +++ b/documentation/jsdoc/symbols/CAAT.MatrixStack.html @@ -624,7 +624,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:58 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:18 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.MouseEvent.html b/documentation/jsdoc/symbols/CAAT.MouseEvent.html index fac685b7..8a868669 100644 --- a/documentation/jsdoc/symbols/CAAT.MouseEvent.html +++ b/documentation/jsdoc/symbols/CAAT.MouseEvent.html @@ -651,7 +651,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:59 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:18 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.Path.html b/documentation/jsdoc/symbols/CAAT.Path.html index 6dea2771..36f7b807 100644 --- a/documentation/jsdoc/symbols/CAAT.Path.html +++ b/documentation/jsdoc/symbols/CAAT.Path.html @@ -2981,7 +2981,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:59 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:18 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.PathActor.html b/documentation/jsdoc/symbols/CAAT.PathActor.html index 1b950b3f..81270612 100644 --- a/documentation/jsdoc/symbols/CAAT.PathActor.html +++ b/documentation/jsdoc/symbols/CAAT.PathActor.html @@ -788,7 +788,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:59 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:18 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.PathSegment.html b/documentation/jsdoc/symbols/CAAT.PathSegment.html index d40b4be2..5a7b94d4 100644 --- a/documentation/jsdoc/symbols/CAAT.PathSegment.html +++ b/documentation/jsdoc/symbols/CAAT.PathSegment.html @@ -1147,7 +1147,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:59 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:18 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.Point.html b/documentation/jsdoc/symbols/CAAT.Point.html index 80232e30..4f53b991 100644 --- a/documentation/jsdoc/symbols/CAAT.Point.html +++ b/documentation/jsdoc/symbols/CAAT.Point.html @@ -1271,7 +1271,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:59 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:18 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.Rectangle.html b/documentation/jsdoc/symbols/CAAT.Rectangle.html index c2c37866..fcb8ac4b 100644 --- a/documentation/jsdoc/symbols/CAAT.Rectangle.html +++ b/documentation/jsdoc/symbols/CAAT.Rectangle.html @@ -845,7 +845,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:59 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:18 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.Scene.html b/documentation/jsdoc/symbols/CAAT.Scene.html index 3988fe2a..d0920050 100644 --- a/documentation/jsdoc/symbols/CAAT.Scene.html +++ b/documentation/jsdoc/symbols/CAAT.Scene.html @@ -1748,7 +1748,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:59 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:19 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.ShapeActor.html b/documentation/jsdoc/symbols/CAAT.ShapeActor.html index d2f77113..84a47a49 100644 --- a/documentation/jsdoc/symbols/CAAT.ShapeActor.html +++ b/documentation/jsdoc/symbols/CAAT.ShapeActor.html @@ -990,7 +990,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:59 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:19 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.SpriteImage.html b/documentation/jsdoc/symbols/CAAT.SpriteImage.html index a1d4ed46..8d07523e 100644 --- a/documentation/jsdoc/symbols/CAAT.SpriteImage.html +++ b/documentation/jsdoc/symbols/CAAT.SpriteImage.html @@ -1899,7 +1899,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:05:00 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:19 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.StarActor.html b/documentation/jsdoc/symbols/CAAT.StarActor.html index 46ccf416..6ea91b5c 100644 --- a/documentation/jsdoc/symbols/CAAT.StarActor.html +++ b/documentation/jsdoc/symbols/CAAT.StarActor.html @@ -1032,7 +1032,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:05:00 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:19 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.TextActor.html b/documentation/jsdoc/symbols/CAAT.TextActor.html index 38495bf2..75453e3a 100644 --- a/documentation/jsdoc/symbols/CAAT.TextActor.html +++ b/documentation/jsdoc/symbols/CAAT.TextActor.html @@ -1123,7 +1123,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:05:00 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:19 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.TimerTask.html b/documentation/jsdoc/symbols/CAAT.TimerTask.html index 3a13e6cf..c406b3d0 100644 --- a/documentation/jsdoc/symbols/CAAT.TimerTask.html +++ b/documentation/jsdoc/symbols/CAAT.TimerTask.html @@ -646,7 +646,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:05:00 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:19 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.html b/documentation/jsdoc/symbols/CAAT.html index f5095152..865cc547 100644 --- a/documentation/jsdoc/symbols/CAAT.html +++ b/documentation/jsdoc/symbols/CAAT.html @@ -1875,7 +1875,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:56 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:14 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.modules.CircleManager.PackedCircle.html b/documentation/jsdoc/symbols/CAAT.modules.CircleManager.PackedCircle.html index 5b335576..92d057d4 100644 --- a/documentation/jsdoc/symbols/CAAT.modules.CircleManager.PackedCircle.html +++ b/documentation/jsdoc/symbols/CAAT.modules.CircleManager.PackedCircle.html @@ -1025,7 +1025,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:59 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:18 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.modules.CircleManager.PackedCircleManager.html b/documentation/jsdoc/symbols/CAAT.modules.CircleManager.PackedCircleManager.html index d2048339..65943409 100644 --- a/documentation/jsdoc/symbols/CAAT.modules.CircleManager.PackedCircleManager.html +++ b/documentation/jsdoc/symbols/CAAT.modules.CircleManager.PackedCircleManager.html @@ -1054,7 +1054,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:59 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:18 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.modules.CircleManager.html b/documentation/jsdoc/symbols/CAAT.modules.CircleManager.html index 97fd5955..c78fbcfe 100644 --- a/documentation/jsdoc/symbols/CAAT.modules.CircleManager.html +++ b/documentation/jsdoc/symbols/CAAT.modules.CircleManager.html @@ -383,7 +383,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:59 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:18 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.modules.LocalStorage.html b/documentation/jsdoc/symbols/CAAT.modules.LocalStorage.html index 509ea58d..da9dc52a 100644 --- a/documentation/jsdoc/symbols/CAAT.modules.LocalStorage.html +++ b/documentation/jsdoc/symbols/CAAT.modules.LocalStorage.html @@ -568,7 +568,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:59 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:18 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/CAAT.modules.html b/documentation/jsdoc/symbols/CAAT.modules.html index d8531219..dd3642e6 100644 --- a/documentation/jsdoc/symbols/CAAT.modules.html +++ b/documentation/jsdoc/symbols/CAAT.modules.html @@ -476,7 +476,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:58 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:18 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/Function.html b/documentation/jsdoc/symbols/Function.html index 8b4442f8..31e66679 100644 --- a/documentation/jsdoc/symbols/Function.html +++ b/documentation/jsdoc/symbols/Function.html @@ -392,7 +392,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:05:00 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:19 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/_global_.html b/documentation/jsdoc/symbols/_global_.html index 3cd98957..6e4c48d8 100644 --- a/documentation/jsdoc/symbols/_global_.html +++ b/documentation/jsdoc/symbols/_global_.html @@ -712,7 +712,7 @@

- Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jan 23 2012 23:04:56 GMT+0100 (CET) + Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 24 2012 23:33:14 GMT+0100 (CET)
diff --git a/documentation/jsdoc/symbols/src/_Users_ibon_js_CAAT_src_model_director.js.html b/documentation/jsdoc/symbols/src/_Users_ibon_js_CAAT_src_model_director.js.html index 12b52488..5c11a07e 100644 --- a/documentation/jsdoc/symbols/src/_Users_ibon_js_CAAT_src_model_director.js.html +++ b/documentation/jsdoc/symbols/src/_Users_ibon_js_CAAT_src_model_director.js.html @@ -614,7 +614,7 @@ 607 608 if (c.isInAnimationFrame(this.time)) { 609 tt = c.time - c.start_time; -610 ctx.save(); +610 // ctx.save(); 611 612 if ( c.onRenderStart ) { 613 c.onRenderStart(tt); @@ -623,7 +623,7 @@ 616 if ( c.onRenderEnd ) { 617 c.onRenderEnd(tt); 618 } -619 ctx.restore(); +619 // ctx.restore(); 620 621 if (CAAT.DEBUGAABB) { 622 ctx.globalAlpha= 1; diff --git a/src/math/bezier.js b/src/math/bezier.js index 3283c260..d824ae01 100644 --- a/src/math/bezier.js +++ b/src/math/bezier.js @@ -176,7 +176,7 @@ this.coordlist[index]= point; } }, - applyAsPath : function( ctx ) { + applyAsPath : function( director ) { } }; })(); @@ -199,12 +199,12 @@ cubic: false, - applyAsPath : function( ctx ) { + applyAsPath : function( director ) { var cc= this.coordlist; if ( this.cubic ) { - ctx.bezierCurveTo( + director.ctx.bezierCurveTo( cc[1].x, cc[1].y, cc[2].x, @@ -213,7 +213,7 @@ cc[3].y ); } else { - ctx.quadraticCurveTo( + director.ctx.quadraticCurveTo( cc[1].x, cc[1].y, cc[2].x, diff --git a/src/model/actor.js b/src/model/actor.js index 0704c95e..4d458b89 100644 --- a/src/model/actor.js +++ b/src/model/actor.js @@ -1320,7 +1320,6 @@ ctx.globalAlpha= this.frameAlpha; director.modelViewMatrix.transformRenderingContextSet( ctx ); - ctx.save(); this.worldModelViewMatrix.transformRenderingContext(ctx); @@ -1336,8 +1335,6 @@ this.paint(director, time); - ctx.restore(); - return true; }, /** @@ -1752,6 +1749,8 @@ var ctx= director.ctx; + ctx.save(); + CAAT.ActorContainer.superclass.paintActor.call(this,director,time); if ( !this.isGlobalAlpha ) { this.frameAlpha= this.parent ? this.parent.frameAlpha : 1; @@ -1763,6 +1762,8 @@ } } + ctx.restore(); + return true; }, __paintActor : function(director, time ) { diff --git a/src/model/director.js b/src/model/director.js index 4ab46bb4..73e333d6 100644 --- a/src/model/director.js +++ b/src/model/director.js @@ -589,6 +589,7 @@ if ( this.dirtyRectsEnabled ) { ctx.beginPath(); +ctx.rect(0,0,120,40); var dr= this.cDirtyRects; for( i=0; i