简体   繁体   中英

Find the direction of SVG path

Is there any way to find out the direction of svg path elements ie clockwise or counterclockwise.

I have d path of semi circle.For example, path: "M-75 0A75 75 0 1 0 75 0Z"

Another example: M2,2 Q8,2 8,8z

Help me find out its direction or for any svg paths.Suggestions please.

Look at the specification

A   75  75   0                  1                0         75  0
    rx  ry   x-axis-rotation   large-arc-flag sweep-flag    x  y

sweep flag 0 corresponds to CCW direction

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM