www.webdeveloper.com
Results 1 to 3 of 3

Thread: Drawing lines accurately over text

Hybrid View

  1. #1
    Join Date
    May 2013
    Posts
    3

    Drawing lines accurately over text

    I'm looking for the best techinique to draw lines accurately over monospaced text in a web page I am serving.
    The effect I was is like this:

    http://oi43.tinypic.com/ea5x1w.jpg

    The text should actually be text, so it is selectable, rather than just an image with text drawn in it.

    What is a good approach here? I'm aware of many javascript frameworks, e.g. http://artisanjs.com/, but nothing jumps out at me. I think the main issue is finding the exact proportions of the text so I know where to draw lines.

    Thanks.

  2. #2
    Join Date
    May 2013
    Posts
    3
    I've found this on Stackoverflow; does this look like a good approach?

    http://stackoverflow.com/questions/4...431801#7431801

  3. #3
    Join Date
    May 2013
    Posts
    3
    Also this:

    http://stackoverflow.com/questions/4.../442474#442474

    suggests using 'element.getBoundingClientRect():' which looks like the way forward.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles