nEeeonDraw: modified sketching app for the eeeNote

Discussion in 'Asus (Android)' started by neonnoodle, Jan 19, 2012.

Thread Status:
Not open for further replies.
  1. neonnoodle

    neonnoodle Pen Pal - Newbie

    Messages:
    62
    Likes Received:
    15
    Trophy Points:
    16
    Hi guys!

    Let me just preface this by saying that before trying to do this, I had never written a line of C++ in my life, and I had to pretty much stumble my way through this by following tutorials and reverse-engineering other people's work. Please forgive me for not knowing what I'm doing.

    I took Peter's adapted GaintMP source code and made the following changes, based on things which I wanted in a sketching program for the eeeNote, which I'm gonna call nEeeonDraw :eek:

    - Most of the tools in the original code are now commented out. So, no line tool, no rectangle, etc.
    - Instead, there are 3 main drawing tools:
    -- a blue sketching pencil, which is pressure-sensitive to both opacity and width
    -- a black sketching pencil, also variable opacity and width
    -- a black brush tool, which simulates ink and is variable width only.
    -- an eraser, which is variable opacity
    - I put the "Clear image" function in its own menu (instead of right next to save!) to prevent the tragic and un-undo-able likelihood of accidentally clearing your image when you meant to save it
    - I put all the tools in a top toolbar, leaving a large canvas area for drawing.

    The blue pencil tool draws in pure cyan. So, once you import your PNGs back to the computer, you can either drop out the cyan completely in other software, or you can turn the cyan to gray and get a nice two-tone grayscale image.

    Here is a drawing with just blue pencil/black pencil tools:
    [​IMG]

    Here's a drawing with blue pencil and brush:
    [​IMG]

    Desaturated in other software:
    [​IMG]

    Cyan removed in other software:
    [​IMG]

    In conclusion, even though there's nothing with layers yet, I think these features give you a little bit of freedom to sketch a preliminary drawing, then go back and either pencil it in black or ink it, and remove the sketch afterward.

    BUGS:
    - "View> View option dock" causes program to quit.

    Download:
    http://dl.dropbox.com/u/4247698/nEeeonDraw
     
  2. BlacKnight

    BlacKnight Scribbler - Standard Member

    Messages:
    184
    Likes Received:
    0
    Trophy Points:
    31
    Hi neonnoodle

    For someone who "had never written a line of C++" I think you've done a fantastic job :) This is the first Eee Note software I've seen where the pencil tool behaves anything like a pencil. I think your work-around of using a different colour instead of layering is very clever.

    Are you planning to take it any further?
     
  3. neonnoodle

    neonnoodle Pen Pal - Newbie

    Messages:
    62
    Likes Received:
    15
    Trophy Points:
    16
    Thank you! I wish I could put in an undo system, but that level of programming is beyond me.

    What I really, really, REALLY want for Christmas is a simple frame-by-frame animation program!!! Unfortunately, the only candidate, Pencil, can't seem to be compiled for ARM devices because of some sort of issue where you can't use qreal or double or some other kind of variable.

    I just want something simple! But there appears to be nothing out there yet...
     
  4. Jamie-B

    Jamie-B Scribbler - Standard Member

    Messages:
    260
    Likes Received:
    31
    Trophy Points:
    41
    Neon, this looks gorgeous. I can see how much use you'd get out of a fully-fledged animation program (and had been interested in one before); your dog construction is brilliant, you seem like you're a good animator. I'll try nEeeonDraw out once my SD card reader arrives - or sooner, if it is added to a Qt Package Manager repository.

    Having only done simple programming, I don't have a grasp on the difficulty in creating a layer system. Do you think it's within reach as a goal? As you point out, though, undo would be the more immediate priority. I do hope a good programmer can get on board with you. Seriously good job, man! I have the utmost of respect for what you've managed.
     
  5. martin8x8

    martin8x8 Pen Pal - Newbie

    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    5
    This is a great drawing app!
    Thanks a lot!!!!
    Martin
     
  6. purplepeopledesign

    purplepeopledesign Scribbler - Standard Member

    Messages:
    359
    Likes Received:
    0
    Trophy Points:
    31
    First, let me say that I haven't programmed anything since using BASIC on an Apple II+ in high school, but the linear logic you learn never really gets lost.

    So that said, wouldn't the simplest way to create an undo command be to save a version of the image in a history file after every command.... then put that history up for the user to select a previous restore point. And since that uses a lot of memory quickly, you can limit that history to maybe 10 previous commands.

    :)ensen.
     
  7. Jamie-B

    Jamie-B Scribbler - Standard Member

    Messages:
    260
    Likes Received:
    31
    Trophy Points:
    41
    That would be simple, but saving around 100kB after every stroke seems like it would give you perceptible slowdown. May make it too frustrating to use in practice.
     
  8. purplepeopledesign

    purplepeopledesign Scribbler - Standard Member

    Messages:
    359
    Likes Received:
    0
    Trophy Points:
    31
    The "file" need not be written to disk, especially since machines have plenty of RAM. If storing a bitmap is too memory intensive, a lossless compression could be used which would take advantage of the really power CPU in late-model machines. Moreover, if you really want to be memory efficient, then only the parts of the image that change could be saved, but again that's at the cost of processing.

    And even then, I cannot think of one program for which the undo even seems like a burden on either CPU or memory.

    :)ensen.
     
  9. whazzup

    whazzup Scribbler - Standard Member

    Messages:
    531
    Likes Received:
    32
    Trophy Points:
    41
    Hi neonnoodle,

    This is great! Now, I used cuteexplorer to run the app in my eee note, and i was wondering whether someone can update the dvt to install it properly.

    Looking through the apps folder in the Fullinstall archive, I've also went ahead and created a simple icon. I've taken the liberty of renaming the app to EeeDraw in the icon, since the eee note doesn't have a drawing app anyway.

    But of course, you did the work, so the final decision of the app's name lies with you. If you like to use the icon but wants the name changed, just drop me a note.

    259x261
    [​IMG]

    97x97
    [​IMG]
     
  10. whazzup

    whazzup Scribbler - Standard Member

    Messages:
    531
    Likes Received:
    32
    Trophy Points:
    41
    also, is there a way to display the cursor dot when the pen is hovering?
     
Thread Status:
Not open for further replies.

Share This Page