ios - Flex Degrafa's bezier spline under AIR 3.9 -


i have mobile flex project running on ios has been using degrafa's library in order use bezierspline class. purpose able draw directly on screen, collection of points given user gesture converted bezier curve using library.

however, app has been crashing displaying page containing @ least 1 of these curves. don't error, stacktrace or anything, app killed , i'm taken ios desktop. apparently error occurring somewhere inside .draw() function of bezierspline class.

also, i've noticed occuring on release versions of app, either through appstore (looks didn't notice it) or through release package deployed on ipad. working fine in emulator or debug package directly on device. since haven't made release packages time, i'm not sure modification may have caused this. thing know i've updated flash builder 4.7 , air 3.9 (which required other features of project).

so have 3 questions:

  • in case can app crash in release mode , not in debug mode? code remains same.

  • has ever encountered kind of issue using degrafa , bezierspline class?

  • may caused upgrading air latest 3.9 version?

edit: i've tested exact same code under android device, curve displaying correctly, occuring when deployed on ios device.

i ended implementing helpful example written lee burrows here. here need in single call:

static public function getpoint(t:number, points:array):point     {         var x:number = 0;         var y:number = 0;         var n:uint = points.length-1;         var factn:number = factoral(n);          (var i:uint=0;i<=n;i++)         {             //calc binominal coefficent             var b:number = factn/(factoral(i)*factoral(n-i));             //calc powers             var k:number = math.pow(1-t, n-i)*math.pow(t, i);             //add weighted points totals             x += b*k*points[i].x;             y += b*k*points[i].y;         }          return new point(x, y);     }      static private function factoral(value:uint):number     {         if (value==0) return 1;          var total:number = value;         while (--value>1)             total *= value;          return total;     } 

a sample code using class available @ link above.

the drawback of solution have handle manually curve smoothness defining amount of lines curve made of (by changing "t" incrementation). define incrementation dynamically depending of amount of control points, or distance between them.

anyway more enough problem had, hope helps else.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -