                     
                     buf += y0 * width
                     
+                    let winding: T = d.sign == .plus ? 1 : -1
+                    
+                    @inline(__always)
                     func _drawLoop(_ range: CountableClosedRange<Int>, _ x0: Double, _ dx0: Double, _ x1: Double, _ dx1: Double, body: (Int, Int) -> Bool) {
                         
                         let (min_x, min_dx, max_x, max_dx) = mid_x < q1.x ? (x0, dx0, x1, dx1) : (x1, dx1, x0, dx0)
                         
                         var _min_x = min_x
                         var _max_x = max_x
-                        
-                        let winding: T = d.sign == .plus ? 1 : -1
                         
                         for y in range {
                             if _min_x < _max_x {


import Foundation

private func _cubic(_ p0: Point, _ p1: Point, _ p2: Point, _ p3: Point, drawQuad: (Point, Point, Point) -> Void, drawCubic: (Point, Point, Point, Vector, Vector, Vector) -> Void) {
    
    let q1 = 3 * (p1 - p0)

            return
        }
        
        @inline(__always)
        func loop(_ p0: Point, _ p1: Point, _ p2: Point, body: (Int, Int) -> Bool) {
            
            _loop(p0, p1, p2, width: width, height: height, stencil: &stencil, body: body)
        }
        
        @inline(__always)
        func triangle(_ p0: Point, _ p1: Point, _ p2: Point) {
            
            loop(p0, p1, p2) { _ in true }
        }
        
        @inline(__always)
        func quad(_ p0: Point, _ p1: Point, _ p2: Point) {
            
            if let transform = SDTransform(from: p0, p1, p2, to: Point(x: 0, y: 0), Point(x: 0.5, y: 0), Point(x: 1, y: 1)) {
