Thứ Ba, 4 tháng 7, 2017

SVG Path Circle

    <circle cx="" cy="" r="" />

    <path d="
        M cx, cy
        m -r, 0
        a r,r 0 1,0 (r * 2),0
        a r,r 0 1,0 -(r * 2),0
    "/>

    ...or a bit shorter (merging the two moves) 

    <path d="
        M cx - r, cy
        a r,r 0 1,0 (r * 2),0
        a r,r 0 1,0 -(r * 2),0
    "/>


    Example
    <circle cx="100" cy="100" r="75" />

    <path d="
        M 100, 100
        m -75, 0
        a 75,75 0 1,0 150,0
        a 75,75 0 1,0 -150,0
    "/>



Không có nhận xét nào:

Đăng nhận xét