Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Finger Paint Libarary - add finger painting to your app with just one line of code!
Started by schroederapps Mar 21 2014 06:26 PM

10 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

schroederapps

[GLOBAL: userInfoPane.html]
schroederapps
  • Pro
  • PipPipPipPipPipPip
  • 141 posts
  • Jedi

Hi Everybody,
 
I recently decided to spruce up a bit of "finger painting" code I posted to the code exchange 2 years ago so that it is Graphics 2.0 compatible, and turn it into a module so that you can add it to an existing Corona project with just one line of code. I'm pretty pleased with the results. The code is free to download, modify, and use as you see fit. You can read about it and download fingerPaint.lua or a sample app that shows it in action at http://www.jasonschroeder.com/2014/03/21/finger-painting-in-corona-with-just-one-line-of-code/.

 

Here's a video preview of how it looks in use: 

 

The sample app (seen in the video) also makes use of a colorPicker library I'm pretty proud of that I'm going to make available next week on my site. Hope it comes in handy for some of you! :)

 

Have a good weekend,

Jason

Attached Files



[TOPIC: post.html]
#2

DavidRangel

[GLOBAL: userInfoPane.html]
DavidRangel
  • Corona Staff
  • 727 posts
  • Jedi

That's very cool Jason. You should consider adding it to the Code Exchange (code.coronalabs.com) with a link back to your site to give it a bit more visibility.



[TOPIC: post.html]
#3

schroederapps

[GLOBAL: userInfoPane.html]
schroederapps
  • Pro
  • PipPipPipPipPipPip
  • 141 posts
  • Jedi


[TOPIC: post.html]
#4

Gremlin Interactive™

[GLOBAL: userInfoPane.html]
Gremlin Interactive™
  • Enterprise
  • PipPipPipPipPipPip
  • 504 posts
  • Jedi

Nice work :)

[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Corona Staff
  • 8,527 posts
  • Jedi

Nicely done!



[TOPIC: post.html]
#6

schroederapps

[GLOBAL: userInfoPane.html]
schroederapps
  • Pro
  • PipPipPipPipPipPip
  • 141 posts
  • Jedi

Thanks, Gremlin & Rob! Hope this will come in handy for some folks out there. :)



[TOPIC: post.html]
#7

toga

[GLOBAL: userInfoPane.html]
toga
  • Starter
  • PipPipPip
  • 38 posts
  • Advanced Member

Great work,

sadly that the corona "Starters" can not use your great library because you use premium graphics features which are only available for Pro users.



[TOPIC: post.html]
#8

schroederapps

[GLOBAL: userInfoPane.html]
schroederapps
  • Pro
  • PipPipPipPipPipPip
  • 141 posts
  • Jedi

Hi Toga,

 

It's true, I did utilize APIs that are not included in the starter package, because I felt it provided the best "one line of code" experience, with lots of features built in (resizing a canvas, for example - and the color picker library, which uses newer techniques for drawing gradients and also blurs the screen when the picker loads), but the core functionality of drawing lines does not require any APIs that are not available for starters. If you wanted to, you could certainly pull out the relevant parts of the library for use with the starter version of Corona - but I understand if this is not as desirable as simply plugging in the library and dropping in one line of code. Sorry it wasn't more useful for you!

 

Best,

Jason



[TOPIC: post.html]
#9

toga

[GLOBAL: userInfoPane.html]
toga
  • Starter
  • PipPipPip
  • 38 posts
  • Advanced Member

Hi Jason,

you are right. It makes no sense to use only the "reduced" APIs if you are a Pro subscriber. For me writing apps is just a hobby without any income at the moment and therefore it is to expensive to buy a Pro licence.

But writing apps and always have to look which APIs i can use (or not) makes no fun. Therefore i am just looking for better alternatives than corona. Perhaps HTML5 or Unity or.....

 

Best,

Thomas 



[TOPIC: post.html]
#10

jen.looper

[GLOBAL: userInfoPane.html]
jen.looper
  • Enterprise
  • PipPipPipPipPipPip
  • 154 posts
  • Jedi

Jason, this is great! Thank you! I can see extending it to add an 'eraser' capability...super for coloring apps!



[TOPIC: post.html]
#11

tonygod

[GLOBAL: userInfoPane.html]
tonygod
  • Pro
  • PipPipPip
  • 39 posts
  • Advanced Member

Hi Jason, I had to discover a lot of the tips you mentioned when I first tried to create a drawing app that made use of a game controller.  It is encouraging to see that line.append() is working better now.  I will definitely try this out to see if I can get performance improvements.  Thank you for posting this!  

 

-Tony




[topic_controls]
[/topic_controls]