OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkNormalSource_DEFINED | 8 #ifndef SkNormalSource_DEFINED |
9 #define SkNormalSource_DEFINED | 9 #define SkNormalSource_DEFINED |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
62 N.normalize(); | 62 N.normalize(); |
63 The +Z axis is thus encoded in RGB as (127, 127, 255) while the -Z axis is | 63 The +Z axis is thus encoded in RGB as (127, 127, 255) while the -Z axis is |
64 (127, 127, 0). | 64 (127, 127, 0). |
65 */ | 65 */ |
66 static sk_sp<SkNormalSource> MakeFromNormalMap(sk_sp<SkShader> map, const Sk Matrix& ctm); | 66 static sk_sp<SkNormalSource> MakeFromNormalMap(sk_sp<SkShader> map, const Sk Matrix& ctm); |
67 | 67 |
68 /** Returns a normal source that provides straight-up normals only (0, 0, 1) . | 68 /** Returns a normal source that provides straight-up normals only (0, 0, 1) . |
69 */ | 69 */ |
70 static sk_sp<SkNormalSource> MakeFlat(); | 70 static sk_sp<SkNormalSource> MakeFlat(); |
71 | 71 |
72 enum class BevelType { | |
egdaniel
2016/07/14 17:23:30
Can you add comment on what these different BevelT
dvonbeck
2016/07/19 23:00:13
Do you know if I can change my source file's encod
egdaniel
2016/07/19 23:31:26
I wouldn't change the encoding. Just describe in m
dvonbeck
2016/07/22 15:08:22
Done.
| |
73 kLinear, | |
74 kRoundedOut, | |
75 kRoundedIn | |
76 }; | |
77 /** Returns a normal source that generates a bevel for the given shape. UNIM PLEMENTED: Will | |
78 return straight-up normals only. | |
79 | |
80 @param type the type of bevel to add | |
81 @param width the width of the bevel, in source space | |
82 @param height the height of the plateau, in source space | |
83 */ | |
84 static sk_sp<SkNormalSource> MakeBevel(BevelType, SkScalar width, SkScalar h eight); | |
egdaniel
2016/07/14 17:23:30
We need more info in the comments here. What happe
dvonbeck
2016/07/22 15:08:22
Done.
| |
85 | |
72 SK_DEFINE_FLATTENABLE_TYPE(SkNormalSource) | 86 SK_DEFINE_FLATTENABLE_TYPE(SkNormalSource) |
73 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() | 87 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() |
74 }; | 88 }; |
75 | 89 |
76 #endif | 90 #endif |
OLD | NEW |