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

Side by Side Diff: include/core/SkPath.h

Issue 863123005: share code between arcTo and addArc, update dox (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | src/core/SkPath.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 /* 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 #ifndef SkPath_DEFINED 10 #ifndef SkPath_DEFINED
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 @param dy2 The amount to add to the y-coordinate of the last point on 451 @param dy2 The amount to add to the y-coordinate of the last point on
452 this contour, to specify the 2nd control point of a cubic curve 452 this contour, to specify the 2nd control point of a cubic curve
453 @param dx3 The amount to add to the x-coordinate of the last point on 453 @param dx3 The amount to add to the x-coordinate of the last point on
454 this contour, to specify the end point of a cubic curve 454 this contour, to specify the end point of a cubic curve
455 @param dy3 The amount to add to the y-coordinate of the last point on 455 @param dy3 The amount to add to the y-coordinate of the last point on
456 this contour, to specify the end point of a cubic curve 456 this contour, to specify the end point of a cubic curve
457 */ 457 */
458 void rCubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, 458 void rCubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
459 SkScalar x3, SkScalar y3); 459 SkScalar x3, SkScalar y3);
460 460
461 /** Append the specified arc to the path as a new contour. If the start of 461 /**
462 the path is different from the path's current last point, then an 462 * Append the specified arc to the path. If the start of the arc is differe nt from the path's
463 automatic lineTo() is added to connect the current contour to the start 463 * current last point, then an automatic lineTo() is added to connect the c urrent contour
464 of the arc. However, if the path is empty, then we call moveTo() with 464 * to the start of the arc. However, if the path is empty, then we call mov eTo() with
465 the first point of the arc. The sweep angle is treated mod 360. 465 * the first point of the arc. The sweep angle is treated mod 360.
466 *
467 * @param oval The bounding oval defining the shape and size of the arc
468 * @param startAngle Starting angle (in degrees) where the arc begins
469 * @param sweepAngle Sweep angle (in degrees) measured clockwise. This is t reated mod 360.
470 * @param forceMoveTo If true, always begin a new contour with the arc
471 */
472 void arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, boo l forceMoveTo);
466 473
467 @param oval The bounding oval defining the shape and size of the arc 474 /**
468 @param startAngle Starting angle (in degrees) where the arc begins 475 * Append a line and arc to the current path. This is the same as the PostS cript call "arct".
469 @param sweepAngle Sweep angle (in degrees) measured clockwise. This is 476 */
470 treated mod 360. 477 void arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar radi us);
471 @param forceMoveTo If true, always begin a new contour with the arc
472 */
473 void arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
474 bool forceMoveTo);
475 478
476 /** Append a line and arc to the current path. This is the same as the 479 /** Append a line and arc to the current path. This is the same as the
477 PostScript call "arct". 480 PostScript call "arct".
478 */
479 void arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
480 SkScalar radius);
481
482 /** Append a line and arc to the current path. This is the same as the
483 PostScript call "arct".
484 */ 481 */
485 void arcTo(const SkPoint p1, const SkPoint p2, SkScalar radius) { 482 void arcTo(const SkPoint p1, const SkPoint p2, SkScalar radius) {
486 this->arcTo(p1.fX, p1.fY, p2.fX, p2.fY, radius); 483 this->arcTo(p1.fX, p1.fY, p2.fX, p2.fY, radius);
487 } 484 }
488 485
489 /** Close the current contour. If the current point is not equal to the 486 /** Close the current contour. If the current point is not equal to the
490 first point of the contour, a line segment is automatically added. 487 first point of the contour, a line segment is automatically added.
491 */ 488 */
492 void close(); 489 void close();
493 490
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 } 1035 }
1039 1036
1040 friend class SkAutoPathBoundsUpdate; 1037 friend class SkAutoPathBoundsUpdate;
1041 friend class SkAutoDisableOvalCheck; 1038 friend class SkAutoDisableOvalCheck;
1042 friend class SkAutoDisableDirectionCheck; 1039 friend class SkAutoDisableDirectionCheck;
1043 friend class SkBench_AddPathTest; // perf test reversePathTo 1040 friend class SkBench_AddPathTest; // perf test reversePathTo
1044 friend class PathTest_Private; // unit test reversePathTo 1041 friend class PathTest_Private; // unit test reversePathTo
1045 }; 1042 };
1046 1043
1047 #endif 1044 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698