Flutter Engine
The Flutter Engine
SkPathUtils.h
Go to the documentation of this file.
1/*
2 * Copyright 2022 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7#ifndef SkPathUtils_DEFINED
8#define SkPathUtils_DEFINED
9
12
13class SkMatrix;
14class SkPaint;
15class SkPath;
16struct SkRect;
17
18namespace skpathutils {
19
20/** Returns the filled equivalent of the stroked path.
21
22 @param src SkPath read to create a filled version
23 @param paint SkPaint, from which attributes such as stroke cap, width, miter, and join,
24 as well as pathEffect will be used.
25 @param dst resulting SkPath; may be the same as src, but may not be nullptr
26 @param cullRect optional limit passed to SkPathEffect
27 @param resScale if > 1, increase precision, else if (0 < resScale < 1) reduce precision
28 to favor speed and size
29 @return true if the dst path was updated, false if it was not (e.g. if the path
30 represents hairline and cannot be filled).
31*/
33 const SkRect *cullRect, SkScalar resScale = 1);
34
36 const SkRect *cullRect, const SkMatrix &ctm);
37
39
40}
41
42#endif
#define SK_API
Definition: SkAPI.h:35
Definition: SkPath.h:59
const Paint & paint
Definition: color_source.cc:38
float SkScalar
Definition: extension.cpp:12
dst
Definition: cp.py:12
SK_API bool FillPathWithPaint(const SkPath &src, const SkPaint &paint, SkPath *dst, const SkRect *cullRect, SkScalar resScale=1)
Definition: SkPathUtils.cpp:23