1. Rahul Rana's Avatar
    I want the develope such type of applicattion by which I can open an image(jpg/png) on the andoid canvas and make a markup on it with the text like a rectangle, an arrow and after that I want to save that image on the storage media with these changes. I use all the basice function of the cavas class.
    plese help..............
    -Thanks In Advance
    11-29-2012 08:13 AM
  2. Shadowriver's Avatar
    I don't think there ready object in Android to do draw and manipulate something on canvas, personally i didn't play with it on Android yet so i'm not 100% sure, but this is how most canvases work... you need to draw everything for yourself

    I kind of not understand what you want to make, but im most common scenerios if oyu want to do something editable on canvas you need some array of your objects to draw and some function that will draw those object on canvas. Then do attach touch events (each android layout object can have OnTouch events binded) to canvas that will check what object is under your touch (check array of object in order from top to bottom and check if positions are matched) and then chage postion of object depending how finger moves. You will have to redraw canvas in each update made to object that will change, to reduce process keep bitmap off current content of canvas except object that being edited and draw updated object on top of it on each touch even that change something, if you have anything above layer with object you edit you will need extra bitmap for stuff that is above and draw it after updated object is draw. So i recommended you to create whole rendering class that will handle all of this that you can attach to any canvas on layout

    I hope i understand you right and that this will help you out ;] Also Google Android Developer if you looking which function to use etc. i assume you know the basics

    Also i think you post this in wrong section
    Rahul Rana likes this.
    11-29-2012 11:42 AM
  3. Shadowriver's Avatar
    Oh sorry you could actually create child of Canvas class and make it placable and working on layout without need of attaching, read how to make custom controls
    Rahul Rana likes this.
    11-29-2012 11:30 PM
  4. Rahul Rana's Avatar
    Thanx Shadowriver ..............
    I try to explain what i want to do..................
    I want to make an app in android by which user open an image on the canvas and set on the image markers like (rect, ovel etc) with the text and after that save the image with that changes so, I want to give the control of the markers to the user so that he/she can drag-drop and re-size the markers and after that image saved with these changes.
    can I do this with the canvas or not? if yes then please give me idea how, or if not then you can suggest other approach............

    Thank you.
    12-01-2012 06:50 AM
  5. Shadowriver's Avatar
    Well you can do that with canvas if you want but you would need to do everything for yourself and i already writed idea how, but you could also try to use android layout system, place text on image view and try to capture part of the screen where is the image, it would be easier this way
    Rahul Rana likes this.
    12-01-2012 09:33 AM

Similar Threads

  1. Can't charge and use kickstand at the same time?
    By zero neck in forum Verizon HTC Thunderbolt
    Replies: 72
    Last Post: 01-31-2011, 10:58 AM
  2. Replies: 32
    Last Post: 01-11-2011, 10:50 AM
  3. Installed ApeX RC2 over the weekend, now Chrome2Phone and Awesome Drop don't work.
    By PsychicRefugee in forum Motorola X Rooting, ROMs, and Hacks
    Replies: 3
    Last Post: 11-21-2010, 09:21 PM
  4. 5. Now you can go ahead and install the Stock Froyo rom.
    By Angmoe in forum Incredible Rooting, ROMs, and Hacks
    Replies: 10
    Last Post: 07-29-2010, 10:04 PM
  5. Replies: 4
    Last Post: 05-14-2010, 01:22 PM