| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #include "SkIntersections.h" | 7 #include "SkIntersections.h" |
| 8 #include "SkLineParameters.h" | 8 #include "SkLineParameters.h" |
| 9 #include "SkPathOpsCubic.h" | 9 #include "SkPathOpsCubic.h" |
| 10 #include "SkPathOpsQuad.h" | 10 #include "SkPathOpsQuad.h" |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 * c = C | 333 * c = C |
| 334 */ | 334 */ |
| 335 void SkDQuad::SetABC(const double* quad, double* a, double* b, double* c) { | 335 void SkDQuad::SetABC(const double* quad, double* a, double* b, double* c) { |
| 336 *a = quad[0]; // a = A | 336 *a = quad[0]; // a = A |
| 337 *b = 2 * quad[2]; // b = 2*B | 337 *b = 2 * quad[2]; // b = 2*B |
| 338 *c = quad[4]; // c = C | 338 *c = quad[4]; // c = C |
| 339 *b -= *c; // b = 2*B - C | 339 *b -= *c; // b = 2*B - C |
| 340 *a -= *b; // a = A - 2*B + C | 340 *a -= *b; // a = A - 2*B + C |
| 341 *b -= *c; // b = 2*B - 2*C | 341 *b -= *c; // b = 2*B - 2*C |
| 342 } | 342 } |
| 343 |
| 344 #ifdef SK_DEBUG |
| 345 void SkDQuad::dump() { |
| 346 SkDebugf("{{"); |
| 347 int index = 0; |
| 348 do { |
| 349 fPts[index].dump(); |
| 350 SkDebugf(", "); |
| 351 } while (++index < 2); |
| 352 fPts[index].dump(); |
| 353 SkDebugf("}}\n"); |
| 354 } |
| 355 #endif |
| OLD | NEW |