These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:21 pm Advanced search

canvas

Here you can discuss things related to HTML and the Web in general that do not fit in to other categories.

canvas

Postby anandgowda » Wed Oct 27, 2010 4:49 am

hi all,,

im new to html5 canvas...how to place buttons inside the canvas... please post the code..

with regards
anand
anandgowda
<h6>
 
Posts: 1
Joined: Wed Oct 27, 2010 4:35 am

Postby Alan » Tue Nov 02, 2010 4:29 pm

You probably shouldn't put your buttons in a canvas (although you could put canvas in your buttons).

If you want to create buttons on a canvas, the solution really depends on how they should look and behave. The only general answer I can offer is that it involves drawing stuff (possibly after "wiping" the canvas by filling it with a solid colour) and listening for mouse events.

Of course you could also do crazy things like rendering the buttons off-screen and using Data URIs and CSS to change the (background) image sources of elements on the page in response to input events.
Alan
<h5>
 
Posts: 18
Joined: Sun Oct 31, 2010 2:16 pm
Location: Cologne, Germany


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests