Class CTLine

All Implemented Interfaces:
AutoCloseable

public class CTLine
extends CFType
  • Constructor Details

    • CTLine

      protected CTLine()
  • Method Details

    • getWidth

      public double getWidth()
      Since:
      Available in iOS 3.2 and later.
    • getAscent

      public double getAscent()
      Since:
      Available in iOS 3.2 and later.
    • getDescent

      public double getDescent()
      Since:
      Available in iOS 3.2 and later.
    • getLeading

      public double getLeading()
      Since:
      Available in iOS 3.2 and later.
    • getPrimaryOffset

      public double getPrimaryOffset​(long charIndex)
      Since:
      Available in iOS 3.2 and later.
    • getSecondaryOffset

      public double getSecondaryOffset​(long charIndex)
      Since:
      Available in iOS 3.2 and later.
    • getClassTypeID

      public static long getClassTypeID()
    • create

      public static CTLine create​(NSAttributedString attrString)
    • createTruncatedLine

      public CTLine createTruncatedLine​(double width, CTLineTruncationType truncationType, CTLine truncationToken)
    • createJustifiedLine

      public CTLine createJustifiedLine​(double justificationFactor, double justificationWidth)
    • getGlyphCount

      public long getGlyphCount()
    • getGlyphRuns

      public List<CTRun> getGlyphRuns()
    • getStringRange

      public CFRange getStringRange()
    • getPenOffset

      public double getPenOffset​(double flushFactor, double flushWidth)
    • draw

      public void draw​(CGContext context)
    • getTypographicBounds

      protected double getTypographicBounds​(MachineSizedFloatPtr ascent, MachineSizedFloatPtr descent, MachineSizedFloatPtr leading)
    • getBounds

      public CGRect getBounds​(CTLineBoundsOptions options)
    • getTrailingWhitespaceWidth

      public double getTrailingWhitespaceWidth()
    • getImageBounds

      public CGRect getImageBounds​(CGContext context)
    • getStringIndex

      public long getStringIndex​(CGPoint position)
    • getOffset

      protected double getOffset​(long charIndex, MachineSizedFloatPtr secondaryOffset)
    • enumerateCaretOffsets

      public void enumerateCaretOffsets​(VoidBlock4<Double,​Long,​Boolean,​BooleanPtr> block)
      Since:
      Available in iOS 9.0 and later.