1 | /* |
2 | * Copyright 2019 Google Inc. |
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 SkTileModes_DEFINED |
9 | #define SkTileModes_DEFINED |
10 | |
11 | #include "include/core/SkTypes.h" |
12 | |
13 | enum class SkTileMode { |
14 | /** |
15 | * Replicate the edge color if the shader draws outside of its |
16 | * original bounds. |
17 | */ |
18 | kClamp, |
19 | |
20 | /** |
21 | * Repeat the shader's image horizontally and vertically. |
22 | */ |
23 | kRepeat, |
24 | |
25 | /** |
26 | * Repeat the shader's image horizontally and vertically, alternating |
27 | * mirror images so that adjacent images always seam. |
28 | */ |
29 | kMirror, |
30 | |
31 | /** |
32 | * Only draw within the original domain, return transparent-black everywhere else. |
33 | */ |
34 | kDecal, |
35 | |
36 | kLastTileMode = kDecal, |
37 | }; |
38 | |
39 | static constexpr int kSkTileModeCount = static_cast<int>(SkTileMode::kLastTileMode) + 1; |
40 | |
41 | #endif |
42 | |