Shape returns the ith default glyph shape, wrapping if i is less than zero or greater than the max number of GlyphDrawers in the DefaultGlyphShapes slice.
(i int)
| 70 | // than the max number of GlyphDrawers |
| 71 | // in the DefaultGlyphShapes slice. |
| 72 | func Shape(i int) draw.GlyphDrawer { |
| 73 | n := len(DefaultGlyphShapes) |
| 74 | if i < 0 { |
| 75 | return DefaultGlyphShapes[i%n+n] |
| 76 | } |
| 77 | return DefaultGlyphShapes[i%n] |
| 78 | } |
| 79 | |
| 80 | // DefaultDashes is a set of dash patterns used by |
| 81 | // the Dashes function. |
no outgoing calls
no test coverage detected