aspose 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
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply 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: 23
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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to check canvas is empty or not in javascript
 
Similar Threads
converting canvas pic to Jpeg
Image from Canvas
general(intermediate)
painting problems
clear screen in MIDP