Flutter Engine
The Flutter Engine
third_party
skia
include
effects
SkDashPathEffect.h
Go to the documentation of this file.
1
/*
2
* Copyright 2006 The Android Open Source Project
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
8
#ifndef SkDashPathEffect_DEFINED
9
#define SkDashPathEffect_DEFINED
10
11
#include "
include/core/SkRefCnt.h
"
12
#include "
include/core/SkScalar.h
"
13
#include "
include/core/SkTypes.h
"
14
15
class
SkPathEffect
;
16
17
class
SK_API
SkDashPathEffect
{
18
public
:
19
/** intervals: array containing an even number of entries (>=2), with
20
the even indices specifying the length of "on" intervals, and the odd
21
indices specifying the length of "off" intervals. This array will be
22
copied in Make, and can be disposed of freely after.
23
count: number of elements in the intervals array
24
phase: offset into the intervals array (mod the sum of all of the
25
intervals).
26
27
For example: if intervals[] = {10, 20}, count = 2, and phase = 25,
28
this will set up a dashed path like so:
29
5 pixels off
30
10 pixels on
31
20 pixels off
32
10 pixels on
33
20 pixels off
34
...
35
A phase of -5, 25, 55, 85, etc. would all result in the same path,
36
because the sum of all the intervals is 30.
37
38
Note: only affects stroked paths.
39
*/
40
static
sk_sp<SkPathEffect>
Make
(
const
SkScalar
intervals[],
int
count
,
SkScalar
phase);
41
};
42
43
#endif
count
int count
Definition:
FontMgrTest.cpp:50
SK_API
#define SK_API
Definition:
SkAPI.h:35
SkRefCnt.h
SkScalar.h
SkTypes.h
SkDashPathEffect
Definition:
SkDashPathEffect.h:17
SkPathEffect
Definition:
SkPathEffect.h:35
sk_sp< SkPathEffect >
SkScalar
float SkScalar
Definition:
extension.cpp:12
SkMultiPictureDocument::Make
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
Definition:
SkMultiPictureDocument.cpp:150
Generated on Sun Jun 23 2024 21:56:02 for Flutter Engine by
1.9.4