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…



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

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
  • Hey Ivan.

    I have a working example f drawing here for you


    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.

    Patrick van Zadel

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

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


    — answered October 18th 2010 by Ivan Mathy
    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.