OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 | 8 |
9 #include "SkEdge.h" | 9 #include "SkEdge.h" |
10 #include "SkFDot6.h" | 10 #include "SkFDot6.h" |
11 #include "SkMath.h" | 11 #include "SkMathPriv.h" |
12 | 12 |
13 /* | 13 /* |
14 In setLine, setQuadratic, setCubic, the first thing we do is to convert | 14 In setLine, setQuadratic, setCubic, the first thing we do is to convert |
15 the points into FDot6. This is modulated by the shift parameter, which | 15 the points into FDot6. This is modulated by the shift parameter, which |
16 will either be 0, or something like 2 for antialiasing. | 16 will either be 0, or something like 2 for antialiasing. |
17 | 17 |
18 In the float case, we want to turn the float into .6 by saying pt * 64, | 18 In the float case, we want to turn the float into .6 by saying pt * 64, |
19 or pt * 256 for antialiasing. This is implemented as 1 << (shift + 6). | 19 or pt * 256 for antialiasing. This is implemented as 1 << (shift + 6). |
20 | 20 |
21 In the fixed case, we want to turn the fixed into .6 by saying pt >> 10, | 21 In the fixed case, we want to turn the fixed into .6 by saying pt >> 10, |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 success = this->updateLine(oldx, oldy, newx, newy); | 470 success = this->updateLine(oldx, oldy, newx, newy); |
471 oldx = newx; | 471 oldx = newx; |
472 oldy = newy; | 472 oldy = newy; |
473 } while (count < 0 && !success); | 473 } while (count < 0 && !success); |
474 | 474 |
475 fCx = newx; | 475 fCx = newx; |
476 fCy = newy; | 476 fCy = newy; |
477 fCurveCount = SkToS8(count); | 477 fCurveCount = SkToS8(count); |
478 return success; | 478 return success; |
479 } | 479 } |
OLD | NEW |