Reputation: 73
How do I draw a rectangle on an already drawn circle(hole) by using javascript in asp.net (C#). I have drawn my circle as a bitmap in the page. The rectangle should be drawn on the mousemove event.
Upvotes: 1
Views: 335
Reputation: 153
Write the following code in img tag:
<img name="picture" src="Images/circle.jpg" alt="My Image"
onmouseover="document.picture.src=image2.src"
onmouseout="document.picture.src=image1.src" />
and the required javascript is :
<script language="Javascript" type="text/javascript">
image1 = new Image
image1.src = "Images/circle.jpg"
image2 = new Image
image2.src = "Images/squre.jpg"
</script>
Upvotes: 1