facebook

Drawing on a Panel with any help appreciated

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #336984 Reply

    cmvet
    Member

    Hello, new to the software and have been trying to figure out how to draw on a transparent panel over an image with the <canvas> javascript.

    Trying to develope a simple dental charting app that I can use out in the field. Ie; one page has a dental image. I want to draw a free hand line on top of that image. Have read the forums and the other post never got answered. I have been unsuccessful trying to get it working in the test center with the
    <script>
    var c=document.getElementById(“myCanvas”);
    var ctx=c.getContext(“2d”);
    ctx.fillStyle=”#FF0000″;
    ctx.fillRect(0,0,150,75);
    </script>

    This may not be the best way for me to go about this so any advice or suggestions on other methods would be greatly appreciated

    #337012

    WaylandDavis
    Member

    Hello cmvet,

    I was successful in using Raphael.js in getting it to work in MobiOne on the iPhone. It also works in the test center.

    I’ve attached a zip file with a complete project that lets you draw. I have other apps that I’ve created that allow you to use photos from the library or take a picture and then annotate it. I’m working on figuring out a way to capture all the annotation and make it part of the photo and then upload it to a server.

    These websites can help:
    http://net.tutsplus.com/tutorials/javascript-ajax/an-introduction-to-the-raphael-js-library/
    http://cancerbero.mbarreneche.com/raphaeltut/
    http://raphaeljs.com/

    Hope it helps.

    wildwex

    Attachments:
    You must be logged in to view attached files.
    #337015

    pbixdesign
    Member

    hi wildwex,

    thank you very much for the examples, I’m starting with the mobione, this helps me understand the process.

    you got to save the drawn image ?

    Pbix

    #337018

    WaylandDavis
    Member

    I haven’t built a way to save the drawn image. I’m working on another project where I will save the drawn image as a database-linked annotation to a photo and export both the photo and the linked annotation to a server for use by investigators. i.e., you put a “dot” on a spot on a photo of a car and then you can describe what’s behind the spot. Also, you can link other photos to that spot as in a close up of a car dent, blunt force trauma or other highlighted element.

    I will probably post a demo/training project in a week or so.

    Thanks, hope you can use the stuff I uploaded.

    wildwex

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Drawing on a Panel with any help appreciated

You must be logged in to post in the forum log in