<!--
{
  "availability" : [
    "iOS: 3.2.0 -",
    "iPadOS: 3.2.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreText",
  "identifier" : "/documentation/CoreText/CTLineDraw(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Text"
    ],
    "preciseIdentifier" : "c:@F@CTLineDraw"
  },
  "title" : "CTLineDraw(_:_:)"
}
-->

# CTLineDraw(_:_:)

Draws a complete line.

```
func CTLineDraw(_ line: CTLine, _ context: CGContext)
```

## Parameters

`line`

The line to draw.

`context`

The context into which the line is drawn.

## Discussion

This is a convenience function because the line could be drawn run-by-run by getting the glyph runs, getting the glyphs out of them, and calling a function such as <doc://com.apple.documentation/documentation/CoreGraphics/CGContextShowGlyphsAtPositions>. This call can leave the graphics context in any state and does not flush the context after the draw operation.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)