Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




What is the difference between Canvas and SVG graphics?(ASP.NET HTML 5 interview questions with answers)

Note :- If you see the previous two questions both canvas and SVG can draw graphics on the browser. So in this question interviewer wants to know when will you use what.


SVG

Canvas

Here’s it’s like draw and remember. In other words any shape drawn by using SVG can be remembered and manipulated and browser can render it again.

Canvas is like draw and forget. Once something is drawn you cannot access that pixel and manipulate it.

SVG is good for creating graphics like CAD software’s where once something is drawn the user wants to manipulate it.

Canvas is good for draw and forget scenarios like animation and games.

This is slow as it needs to remember the co-ordinates for later manipulations.

This is faster as there is no intention of remembering things later.

We can have event handler associated with the drawing object.

Here we cannot associate event handlers with drawing objects as we do not have reference of them.

Resolution independent.

Resolution dependent.


Do visit www.questpond.com which provides 600 interview questions on ASP.NET , Design pattern , UML , SQL Server , ADO.NET and lot more. Below is an awesome video which talks about how questions are asked in .NET and C# interviews.
  

Helpful Website Url
http://www.questpond.com/
Share this article   |    Print    |    Article read by 7112 times
Author:
Shivprasad koirala Koirala
I am a Microsoft MVP for ASP/ASP.NET and currently a CEO of a small E-learning company in India. We are very much active in making training videos , writing books and corporate trainings. Do visit my site http://www.questpond.com for .NET, C# , design pattern , WCF , Silverlight , LINQ , ASP.NET , ADO.NET , Sharepoint , UML , SQL Server training and Interview questions and answers
Related Articles: No related article
Related Interview Questions: No related interview question