PDA

View Full Version : polygon در تگ svg ?



saeed7474
پنج شنبه 15 آبان 1393, 19:39 عصر
سلام دوستان
میشه svg زیر رو تفسیر کنید، من متوجه مختصات و نقاط نمیشم

<svg width="300" height="200">
<polygon points="100,10 40,198 190,78 10,78 160,198"
style="fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;" />
Sorry, your browser does not support inline SVG.
</svg>


خروجی هم ستاره هست

پیام حیاتی
جمعه 16 آبان 1393, 00:07 صبح
http://www.w3schools.com/svg/svg_inhtml.asp

saeed7474
جمعه 16 آبان 1393, 10:40 صبح
svg polygon هست اینجا
http://www.w3schools.com/svg/svg_polygon.asp
ولی خب درخصوص نقاط توضیحی نداده :متفکر:

پیام حیاتی
جمعه 16 آبان 1393, 13:41 عصر
توضیح نداده؟!!:اشتباه:
پس اینها چی هستن :


SVG Code explanation:


An SVG image begins with an <svg> element
The width and height attributes of the <svg> element define the width and height of the SVG image
The <circle> element is used to draw a circle
The cx and cy attributes define the x and y coordinates of the center of the circle. If cx and cy are omitted, the circle's center is set to (0, 0)
The r attribute defines the radius of the circle
The stroke and stroke-width attributes control how the outline of a shape appears. We set the outline of the circle to a 4px green "border"
The fill attribute refers to the color inside the circle. We set the fill color to yellow
The closing </svg> tag closes the SVG image

Note: Since SVG is written in XML, all elements must be properly closed!