Dashes returns the ith default dash pattern, wrapping if i is less than zero or greater than the max number of dash patters in the DefaultDashes slice.
(i int)
| 108 | // than the max number of dash patters |
| 109 | // in the DefaultDashes slice. |
| 110 | func Dashes(i int) []vg.Length { |
| 111 | n := len(DefaultDashes) |
| 112 | if i < 0 { |
| 113 | return DefaultDashes[i%n+n] |
| 114 | } |
| 115 | return DefaultDashes[i%n] |
| 116 | } |
no outgoing calls