In development - Can show progress

I am working on a Vector Library that allows things like Arcs, segments, ellipses, polygons and most importantly, Flood Fill. The thing that I have missed in both CoronaSDK and xCode/Objective-C is FloodFill.

Here is an unoptimised proof of concept video showing flood fill working and the code to achieve the video that you see is

newVect = require("newVectors").init()  
  
newVect:setForeColor({255,255,0})  
newVect:polygon({{50,200},{70,0},{20,-90},{-90,20},{20,90},{-20,-20}})  
  
newVect:setForeColor({255,0,0})  
newVect:circle(50,50,30)  
  
newVect:setForeColor({255,255,255})  
newVect:rectangle(20,100,200,75)  
  
timer.performWithDelay(1000,function()  
 newVect:setForeColor({0,0,255})  
 newVect:floodfill(30,110)  
end)  
  
timer.performWithDelay(2000,function()  
 newVect:setForeColor({255,0,0})  
 newVect:floodfill(50,50)  
end)  
  
timer.performWithDelay(3000,function()  
 newVect:setForeColor({255,255,0})  
 newVect:floodfill(70,150)  
end)  

The video can be found here

Hope this could be of use to some developers… more cool stuff coming too…

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 15065 reply_id: 315065[/import]

WOW !!! this is cool Jayant. :slight_smile: [import]uid: 71210 topic_id: 15065 reply_id: 55800[/import]

Looks like a really cool proof of concept! How are you pulling this off? Are you rendering lots of lines for the flood? [import]uid: 27183 topic_id: 15065 reply_id: 55815[/import]

@don,
I am using

if not newVect:getPixel(x,y) then  
 newVect:setPixel(x,y)  
end  

the lines and the rect and the circles are all drawn by my routines, no the standard Lua/Corona display objects.

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 15065 reply_id: 55816[/import]

I’m guessing the performance isn’t all that great on device at the moment. :slight_smile: [import]uid: 27183 topic_id: 15065 reply_id: 55883[/import]

Wait a minute, wha??? newVectors, getPixel, setPixel… When did this happen??? I check the daily build logs from time to time, but I never saw this. Are there docs for this???

t [import]uid: 70134 topic_id: 15065 reply_id: 55907[/import]