SVG <polygon>
కోర్సు సిఫార్సులు:
<polygon>
SVG మల్టైల్యూజన్ - <polygon>
మెటీరియల్ కి ఉపయోగించబడుతుంది మరియు కనీసం మూడు కర్ణాలు కలిగిన చిత్రాలను సృష్టించడానికి ఉపయోగించబడుతుంది.
మల్టైల్యూజన్ గా రూపొందించబడినది, మరియు రూపం "మూసిన" (అన్ని రేఖలు ముక్తిలో పెరుగుతాయి).
Polygon పదం గ్రీకు భాషలో ఉంది. "Poly" అంటే "అనేకం", "gon" అంటే "కోణం".
ఉదా 1
ఇది SVG కోడ్:
<svg height="210" width="500"> మూడు కర్ణాలు కలిగిన మల్టైల్యూజన్ సృష్టిస్తుంది:
<polygon points="200,10 250,190 160,210" style="fill:lime;stroke:purple;stroke-width:1" />
- కోడ్ వివరణ:
points అట్రిబ్యూట్ ప్రతి మూలకం యొక్క x మరియు y కోణాలను నిర్వచిస్తుంది
ఉదా 2
ఇది SVG కోడ్:
క్రింది ఉదాహరణ నాలుగు కర్ణాలు కలిగిన మల్టైల్యూజన్ సృష్టిస్తుంది: <svg height="250" width="500">
<polygon points="220,10 300,210 170,250 123,234" style="fill:lime;stroke:purple;stroke-width:1" />
ఉదా 3 <polygon>
ఒక నక్షత్రాన్ని సృష్టించు మెటీరియల్ కి ఉపయోగించండి:
ఇది SVG కోడ్:
<svg height="210" width="500"> <polygon points="100,10 40,198 190,78 10,78 160,198" style="fill:lime;stroke:purple;stroke-width:5;fill-rule:nonzero;" />
ఉదా 4
fill-rule అట్రిబ్యూట్ ను మార్చండి: "evenodd"
:
ఇది SVG కోడ్:
<svg height="210" width="500"> <polygon points="100,10 40,198 190,78 10,78 160,198" style="fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;" />