| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 * | 104 * |
| 105 * Mathematical details: | 105 * Mathematical details: |
| 106 * This bevel follows the only quadratic bezier curve whose start point
is at (w, 0, 0), | 106 * This bevel follows the only quadratic bezier curve whose start point
is at (w, 0, 0), |
| 107 * control point is at (0, 0, 0), and end point is at (0, 0, h). | 107 * control point is at (0, 0, 0), and end point is at (0, 0, h). |
| 108 */ | 108 */ |
| 109 kRoundedIn | 109 kRoundedIn |
| 110 }; | 110 }; |
| 111 /** Returns a normal source that generates a bevel for the given shape. UNIM
PLEMENTED: Will | 111 /** Returns a normal source that generates a bevel for the given shape. UNIM
PLEMENTED: Will |
| 112 return straight-up normals only. | 112 return straight-up normals only. |
| 113 | 113 |
| 114 @param type the type of bevel to add | 114 @param type the type of bevel to add. |
| 115 @param width the width of the bevel, in source space. Must be positive
. | 115 @param width the width of the bevel, in source space. Must be positive
. |
| 116 @param height the height of the plateau, in source space. Can be positi
ve, negative, | 116 @param height the height of the plateau, in source space. Can be positi
ve, negative, |
| 117 or zero. A negative height means the simulated bevels slo
pe downwards. | 117 or zero. A negative height means the simulated bevels slo
pe downwards. |
| 118 */ | 118 */ |
| 119 static sk_sp<SkNormalSource> MakeBevel(BevelType, SkScalar width, SkScalar h
eight); | 119 static sk_sp<SkNormalSource> MakeBevel(BevelType, SkScalar width, SkScalar h
eight); |
| 120 | 120 |
| 121 SK_DEFINE_FLATTENABLE_TYPE(SkNormalSource) | 121 SK_DEFINE_FLATTENABLE_TYPE(SkNormalSource) |
| 122 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() | 122 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 #endif | 125 #endif |
| OLD | NEW |