Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Drawing, and save the picture

Hi; I'm looking for a way to draw, in a white box (one color, like black), and to save the drawing in the photo album, or in a database…

I've seen someone did it in a Titanium powered app, so i guess it's possible…

If you have code samples, it would be great…

Thanks;

Ivan.

— asked October 16th 2010 by Ivan Mathy
  • draw
  • iphone
0 Comments

3 Answers

  • I have been Researching on that a couple of months back….Guess you have two options..

    1. create a custom module to do the painting stuff….

    2.use a html canvas(webview)and handle the touch events….(i have seen a working code example on this very forum).

    and to store it as an image just use the toImage method of the window…

    — answered October 17th 2010 by Satta Ravi
    permalink
    0 Comments
  • Hey Ivan.

    I have a working example f drawing here for you

    http://developer.appcelerator.com/question/67671/touch-events-through-webviews

    The megaupload link has a project you can import.
    It doesn't have a save feature yet cause I didn't look at it yet.
    It is a webview drawing app cause using titanium is nearly impossible without a module.
    Seeing as i'm no pro in Obj-C I can't make it.
    I know mr. Haynie has a Ti.Paint module but that will be released in the marketplace which has no launch date set.

    So I guess it's either this webview version or wait for the marketplace.

    Regards,
    Patrick van Zadel

    — answered October 18th 2010 by Patrick van Zadel
    permalink
    0 Comments
  • Thanks you, I'll take a look.

    Do you know more about the marketplace? I've never read anything about it…

    Ivan.

    — answered October 18th 2010 by Ivan Mathy
    permalink
    1 Comment
    • The marketplace arrives or should arrive Q1 2011 now according to the last screencast thingy

      — commented November 1st 2010 by Patrick van Zadel
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.