skia
    Preparing search index...

    Interface Paragraph

    See Paragraph.h for more information on this class. This is only available if Paragraph has been compiled in.

    interface Paragraph {
        _type: "Paragraph";
        delete(): void;
        deleteLater(): void;
        didExceedMaxLines(): boolean;
        getAlphabeticBaseline(): number;
        getClosestGlyphInfoAtCoordinate(dx: number, dy: number): GlyphInfo | null;
        getGlyphInfoAt(index: number): GlyphInfo | null;
        getGlyphPositionAtCoordinate(dx: number, dy: number): PositionWithAffinity;
        getHeight(): number;
        getIdeographicBaseline(): number;
        getLineMetrics(): LineMetrics[];
        getLineMetricsAt(lineNumber: number): LineMetrics | null;
        getLineNumberAt(index: number): number;
        getLongestLine(): number;
        getMaxIntrinsicWidth(): number;
        getMaxWidth(): number;
        getMinIntrinsicWidth(): number;
        getNumberOfLines(): number;
        getRectsForPlaceholders(): RectWithDirection[];
        getRectsForRange(
            start: number,
            end: number,
            hStyle: EmbindEnumEntity,
            wStyle: EmbindEnumEntity,
        ): RectWithDirection[];
        getShapedLines(): ShapedLine[];
        getWordBoundary(offset: number): URange;
        isAliasOf(other: any): boolean;
        isDeleted(): boolean;
        layout(width: number): void;
        unresolvedCodepoints(): number[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    _type: "Paragraph"

    Methods

    • Returns the information associated with the closest glyph at the specified paragraph coordinate, or null if the paragraph is empty.

      Parameters

      • dx: number
      • dy: number

      Returns GlyphInfo | null

    • Returns the information associated with the glyph at the specified UTF-16 offset within the paragraph's visible lines, or null if the index is out of bounds, or points to a codepoint that is logically after the last visible codepoint.

      Parameters

      • index: number

      Returns GlyphInfo | null

    • Returns the index of the glyph that corresponds to the provided coordinate, with the top left corner as the origin, and +y direction as down.

      Parameters

      • dx: number
      • dy: number

      Returns PositionWithAffinity

    • Returns the LineMetrics of the line at the specified line number, or null if the line number is out of bounds, or is larger than or equal to the specified max line number.

      Parameters

      • lineNumber: number

      Returns LineMetrics | null

    • Returns the line number of the line that contains the specified UTF-16 offset within the paragraph, or -1 if the index is out of bounds, or points to a codepoint that is logically after the last visible codepoint.

      Parameters

      • index: number

      Returns number

    • Returns the total number of visible lines in the paragraph.

      Returns number

    • Finds the first and last glyphs that define a word containing the glyph at index offset.

      Parameters

      • offset: number

      Returns URange

    • Lays out the text in the paragraph so it is wrapped to the given width.

      Parameters

      • width: number

      Returns void

    • When called after shaping, returns the glyph IDs which were not matched by any of the provided fonts.

      Returns number[]