     drawLine(in: context, x: 60, y: 620, label: "dashStyle.pattern == [8, 7, 2, 7], dashStyle.phase == 0")
 }
 
-page.drawPath { context in
+page.draw { context in
     
     context.lineWidth = 30
     context.strokeColor = #colorLiteral(red: 0, green: 0.4980392157, blue: 0, alpha: 1)

    drawLine2(in: context, x: 60, y: 440, label: "LineCap.projectingSquare")
}

page.drawPath { context in
    
    context.lineWidth = 30
    context.strokeColor = #colorLiteral(red: 0, green: 0, blue: 0.4980392157, alpha: 1)
    
    context.lineJoin = .miter
    context.move(toX: 120, y: 300)
    context.line(toX: 160, y: 340)
    context.line(toX: 200, y: 300)
    context.strokePath()
    
    context.lineJoin = .round
    context.move(toX: 120, y: 195)
    context.line(toX: 160, y: 235)
    context.line(toX: 200, y: 195)
    context.strokePath()
    
    context.lineJoin = .bevel
    context.move(toX: 120, y: 90)
    context.line(toX: 160, y: 130)
    context.line(toX: 200, y: 90)
    context.strokePath()
}

page.drawPath { context in
    context.lineWidth = 2
    context.strokeColor = .black
    context.fillColor = #colorLiteral(red: 0.7529411765, green: 0, blue: 0, alpha: 1)
    
    drawRect(in: context, x: 300, y: 770, label: "Stroke")
    context.strokePath()
    
    drawRect(in: context, x: 300, y: 720, label: "Fill")
    context.fillPath()
    
    drawRect(in: context, x: 300, y: 670, label: "Fill and Stroke")
    context.fillPath(stroke: true)
    
    drawRect(in: context, x: 300, y: 620, label: "Clip Rectangle")
    context.strokePath()
}

page.drawPath { context in
    
    var point = Point(x: 330, y: 440)
    var point1 = Point(x: 430, y: 530)

    context.dashStyle = DashStyle(pattern: [3])!
    context.lineWidth = 0.5
    
    context.stroke(Path().moving(to: point).appendingLine(to: point1).moving(to: point2).appendingLine(to: point3))
    
    context.dashStyle = .straightLine
    context.lineWidth = 1.5
    
    context.stroke(Path().moving(to: point).appendingCurve(controlPoint1: point1, controlPoint2: point2, endPoint: point3))
}

document.display()
