Scanner is a refactored version of the freetype scanner
| 34 | |
| 35 | // Scanner is a refactored version of the freetype scanner |
| 36 | type Scanner struct { |
| 37 | // If false, the behavior is to use the even-odd winding fill |
| 38 | // rule during Rasterize. |
| 39 | UseNonZeroWinding bool |
| 40 | |
| 41 | // The Width of the Rasterizer. The height is implicit in len(cellIndex). |
| 42 | Width int |
| 43 | |
| 44 | // The current pen position. |
| 45 | A fixed.Point26_6 |
| 46 | |
| 47 | // The current cell and its area/coverage being accumulated. |
| 48 | Xi, Yi int |
| 49 | Area int |
| 50 | Cover int |
| 51 | |
| 52 | // The clip bounds of the scanner |
| 53 | Clip image.Rectangle |
| 54 | |
| 55 | // The saved cells. |
| 56 | Cell []Cell |
| 57 | |
| 58 | // Linked list of cells, one per row. |
| 59 | CellIndex []int |
| 60 | |
| 61 | // The spanner that we use. |
| 62 | Spanner Spanner |
| 63 | |
| 64 | // The bounds. |
| 65 | MinX, MinY, MaxX, MaxY fixed.Int26_6 |
| 66 | } |
| 67 | |
| 68 | // SpanFunc is the type of a span function |
| 69 | type SpanFunc func(yi, xi0, xi1 int, alpha uint32) |
nothing calls this directly
no outgoing calls
no test coverage detected