Function

HarfBuzz-0.0HarfBuzzpaint_push_clip_path_startSince 14.2.0

  • Begin clipping to an arbitrary path. Returns an HarfBuzz.draw_funcs_t owned by the backend (the caller must not free it) that the caller uses to emit the clip outline via hb_draw_() calls, using the returned draw_data as the draw data. The returned draw funcs and draw data are only valid until the matching hb_paint_push_clip_path_end() call; no other paint calls should be made between start and end except hb_draw_() on the returned funcs. Finish the path with hb_paint_push_clip_path_end(); pop the clip later with hb_paint_pop_clip().

    Usage:

    hb_draw_funcs_t *df = hb_paint_push_clip_path_start (pf, pd, &dd);
    hb_draw_move_to (df, dd, NULL, ...);
    hb_draw_line_to (df, dd, NULL, ...);
    ...
    hb_draw_close_path (df, dd, NULL);
    hb_paint_push_clip_path_end (pf, pd);
    /* paint ops here are clipped to the emitted path */
    hb_paint_pop_clip (pf, pd);

    Parameters

    • funcs: paint_funcs_t

      paint functions

    • paint_data: null

      associated data passed by the caller

    Returns [draw_funcs_t, null]

    draw funcs that accumulate the clip path, or NULL if the backend does not implement arbitrary-path clipping.

    14.2.0