Loading

Quipoin Menu

Learn • Practice • Grow

html / Transformation in SVG
interview

Q1. How do you apply transformations in SVG?
Use the transform attribute: transform="translate(50,50) rotate(45) scale(2)"

Q2. What does translate() do in SVG?
translate(x,y) moves the element x units right and y units down from original position.

Q3. How does rotate work in SVG?
rotate(angle) rotates around origin. rotate(angle, cx, cy) rotates around specified point.

Q4. What does scale() do?
scale(sx,sy) multiplies coordinates by sx horizontally and sy vertically.

Q5. Can you combine multiple transformations?
Yes, separate with spaces: transform="translate(50,50) rotate(45) scale(2)" applies in order.