1// [Blend2D]
2// 2D Vector Graphics Powered by a JIT Compiler.
3//
4// [License]
5// Zlib - See LICENSE.md file in the package.
6
7#ifndef BLEND2D_BLPATHSTROKE_P_H
8#define BLEND2D_BLPATHSTROKE_P_H
9
10#include "./blapi-internal_p.h"
11#include "./blgeometry_p.h"
12#include "./blpath_p.h"
13
14//! \cond INTERNAL
15//! \addtogroup blend2d_internal
16//! \{
17
18//! This is a sink that is used by path offsetting. This sink consumes both
19//! `a` and `b` offsets of the path. The sink will be called for each figure
20//! and is responsible for joining these paths. If the paths are not closed
21//! then the sink must insert start cap, then join `b`, and then insert end
22//! cap.
23//!
24//! The sink must also clean up the paths as this is not done by the offseter.
25//! The reason is that in case the `a` path is the output path you can just
26//! keep it and insert `b` path into it (clearing only `b` path after each
27//! call).
28typedef BLResult (BL_CDECL* BLPathStrokeSinkFunc)(BLPath* a, BLPath* b, BLPath* c, void* closure) BL_NOEXCEPT;
29
30BL_HIDDEN BLResult blPathStrokeInternal(
31 const BLPathView& input,
32 const BLStrokeOptions& options,
33 const BLApproximationOptions& approx,
34 BLPath* aPath,
35 BLPath* bPath,
36 BLPath* cPath,
37 BLPathStrokeSinkFunc sink, void* closure) noexcept;
38
39//! \}
40//! \endcond
41
42#endif // BLEND2D_BLPATHSTROKE_P_H
43