Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: src/pathops/SkPathOpsQuad.cpp

Issue 21359002: path ops work in progress (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove space Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/pathops/SkPathOpsQuad.h ('k') | src/pathops/SkPathOpsSimplify.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsQuad.h ('k') | src/pathops/SkPathOpsSimplify.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698