OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "SkPathParts.h" | 10 #include "SkPathParts.h" |
11 #include "SkAnimateMaker.h" | 11 #include "SkAnimateMaker.h" |
12 #include "SkDrawMatrix.h" | 12 #include "SkDrawMatrix.h" |
13 #include "SkDrawRectangle.h" | 13 #include "SkDrawRectangle.h" |
14 #include "SkDrawPath.h" | 14 #include "SkDrawPath.h" |
15 | 15 |
16 SkPathPart::SkPathPart() : fPath(NULL) { | 16 SkPathPart::SkPathPart() : fPath(nullptr) { |
17 } | 17 } |
18 | 18 |
19 void SkPathPart::dirty() { | 19 void SkPathPart::dirty() { |
20 fPath->dirty(); | 20 fPath->dirty(); |
21 } | 21 } |
22 | 22 |
23 SkDisplayable* SkPathPart::getParent() const { | 23 SkDisplayable* SkPathPart::getParent() const { |
24 return fPath; | 24 return fPath; |
25 } | 25 } |
26 | 26 |
27 bool SkPathPart::setParent(SkDisplayable* parent) { | 27 bool SkPathPart::setParent(SkDisplayable* parent) { |
28 SkASSERT(parent != NULL); | 28 SkASSERT(parent != nullptr); |
29 if (parent->isPath() == false) | 29 if (parent->isPath() == false) |
30 return true; | 30 return true; |
31 fPath = (SkDrawPath*) parent; | 31 fPath = (SkDrawPath*) parent; |
32 return false; | 32 return false; |
33 } | 33 } |
34 | 34 |
35 // MoveTo | 35 // MoveTo |
36 #if SK_USE_CONDENSED_INFO == 0 | 36 #if SK_USE_CONDENSED_INFO == 0 |
37 | 37 |
38 const SkMemberInfo SkMoveTo::fInfo[] = { | 38 const SkMemberInfo SkMoveTo::fInfo[] = { |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 | 298 |
299 const SkMemberInfo SkAddPath::fInfo[] = { | 299 const SkMemberInfo SkAddPath::fInfo[] = { |
300 SK_MEMBER(matrix, Matrix), | 300 SK_MEMBER(matrix, Matrix), |
301 SK_MEMBER(path, Path) | 301 SK_MEMBER(path, Path) |
302 }; | 302 }; |
303 | 303 |
304 #endif | 304 #endif |
305 | 305 |
306 DEFINE_GET_MEMBER(SkAddPath); | 306 DEFINE_GET_MEMBER(SkAddPath); |
307 | 307 |
308 SkAddPath::SkAddPath() : matrix(NULL), path(NULL) { | 308 SkAddPath::SkAddPath() : matrix(nullptr), path(nullptr) { |
309 } | 309 } |
310 | 310 |
311 bool SkAddPath::add() { | 311 bool SkAddPath::add() { |
312 SkASSERT (path != NULL); | 312 SkASSERT (path != nullptr); |
313 if (matrix) | 313 if (matrix) |
314 fPath->fPath.addPath(path->fPath, matrix->getMatrix()); | 314 fPath->fPath.addPath(path->fPath, matrix->getMatrix()); |
315 else | 315 else |
316 fPath->fPath.addPath(path->fPath); | 316 fPath->fPath.addPath(path->fPath); |
317 return false; | 317 return false; |
318 } | 318 } |
OLD | NEW |