File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes How to check canvas is empty or not in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to check canvas is empty or not in javascript" Watch "How to check canvas is empty or not in javascript" New topic
Author

How to check canvas is empty or not in javascript

pravin rasal
Ranch Hand

Joined: Jul 27, 2011
Posts: 63
How do I check if there is a data or something is drawn on a canvas?

I have this <canvas id="my_canvas"></canvas>

element and i wanted to check if my canvas has something drawn on it.
Kavisha Paranamana
Greenhorn

Joined: Jul 30, 2011
Posts: 25
I am not sure if this works in HTML 5 elements. But how about having a jquery test as below? :


Kavisha Paranamana - Homepage
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to check canvas is empty or not in javascript