You can draw the page into a canvas using the canvas.drawImage() method.
You can pass a window object and the web page will be drawn - a screenshot
code. Normal web pages which run JS do not have privileges to make "screen
captures" of their own page, nor other pages.
Firefox extensions, for example, allow you to use drawImage() to capture a
web page. Then PaintWeb could be used to draw on top of the page. You can
also highlight and clip the image as desired.
For email-based sharing you need a web service built with PaintWeb that
makes it possible to persistently save images on the server. The web
service would then be able to give you a link back to your image, so you
can share it via email or IM.
I hope the above helps!
Le Thu, 26 Jan 2012 01:55:44 +0200, Kiran Bellare
<kiran....@gmail.com> a écrit:
> Question reg Paintweb and HTML5 - it seems like paintweb is limited to
> drawing on top of images.
> How can i extend it to draw a rectangle highlight on top of HTML content
> (regular Web pages that may contain text, images and videos)?
> - Not sure if the HTML5 canvas can be drawn on top of HTML content?
> Also, how do i clip the highlighted rectangular area of the Web page as
> image that can be emailed or shared? Can this be easily done via the JS