Function

HarfBuzz-0.0HarfBuzzdraw_lineSince 14.2.0

  • Emits a tapered line segment as a filled trapezoid. w0 and w1 are the full stroke widths at the start and end points respectively; they may differ for a tapered stroke or match for a uniform one. Pass NaN for w1 to use w0 (uniform stroke) without repeating the value.

    With #HB_DRAW_LINE_CAP_SQUARE each endpoint is extended along the line direction by half its local stroke width, so four hb_draw_line() calls form a closed rectangle without gaps at the corners.

    Parameters

    • dfuncs: draw_funcs_t

      draw functions

    • draw_data: null

      associated draw data passed by the caller

    • st: draw_state_t

      current draw state

    • x0: number

      start X coordinate

    • y0: number

      start Y coordinate

    • w0: number

      stroke width at the start

    • x1: number

      end X coordinate

    • y1: number

      end Y coordinate

    • w1: number

      stroke width at the end

    • cap: draw_line_cap_t

      end-cap shape (butt or square)

    Returns void

    14.2.0