50 TOP Objective SVG Questions and Answers pdf

41. How to draw a close ended polygon in SVG?
'polygon' tag of SVG is used to draw a polygon. Following is the commonly used attribute -
points - List of points to make up a polygon.

Example:
<polygon
points = "150,75 258,137.5 258,262.5 150,325 42,262.6 42,137.5"
stroke = "black"
stroke-width = "3"
fill = "rgb(121,0,121)">

42. How to draw a open ended polygon in SVG?
'polyline' tag of SVG is used to draw a open ended polygon. Following is the commonly used attribute -
points - List of points to make up a polygon.

Example:
<polyline
points = "150,75 258,137.5 258,262.5 150,325 42,262.6 42,137.5"
stroke = "black"
stroke-width = "3"
fill = "none">

43. How to draw a free flow path in SVG?
'path' tag of SVG is used to draw a free flow path. Following is the commonly used attribute -
d - path data,usually a set of commands like moveto, lineto etc.

Example:
<path
d = "M 100 100 L 300 100 L 200 300 z"
stroke = "black"
stroke-width = "3"
fill = "rgb(121,0,121)">

44. Which command of path element moves cursor from one point to another point?
M command of path element move from one point to another point.

45. Which command of path element creates a line?
L command of path element creates a line.

Read More Questions:
SVG Interview Questions Part1
SVG Interview Questions Part2
SVG Interview Questions Part3
SVG Interview Questions Part4
SVG Interview Questions Part5

0 comments: