Re: Using paintweb to draw on HTML pages?

37 views
Skip to first unread message

Mihai Sucan

unread,
Jan 26, 2012, 4:57:46 AM1/26/12
to Kiran Bellare, pain...@googlegroups.com
Hello Kiran!

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
of the page is made. However, this only works for privileged JavaScript
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!

Best regards,
Mihai

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
> an
> image that can be emailed or shared? Can this be easily done via the JS
> object?
>
> thanks,
> Kiran

Reply all
Reply to author
Forward
0 new messages