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

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

Issue 23926019: Stateful PathRenderer implementation (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: clean up 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 | « no previous file | include/gpu/GrContext.h » ('j') | src/gpu/GrPathRenderer.h » ('J')
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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 this contour, to specify the 1st control point of a cubic curve 452 this contour, to specify the 1st control point of a cubic curve
453 @param dx2 The amount to add to the x-coordinate of the last point on 453 @param dx2 The amount to add to the x-coordinate of the last point on
454 this contour, to specify the 2nd control point of a cubic curve 454 this contour, to specify the 2nd control point of a cubic curve
455 @param dy2 The amount to add to the y-coordinate of the last point on 455 @param dy2 The amount to add to the y-coordinate of the last point on
456 this contour, to specify the 2nd control point of a cubic curve 456 this contour, to specify the 2nd control point of a cubic curve
457 @param dx3 The amount to add to the x-coordinate of the last point on 457 @param dx3 The amount to add to the x-coordinate of the last point on
458 this contour, to specify the end point of a cubic curve 458 this contour, to specify the end point of a cubic curve
459 @param dy3 The amount to add to the y-coordinate of the last point on 459 @param dy3 The amount to add to the y-coordinate of the last point on
460 this contour, to specify the end point of a cubic curve 460 this contour, to specify the end point of a cubic curve
461 */ 461 */
462 void rCubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, 462 void rCubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
463 SkScalar x3, SkScalar y3); 463 SkScalar x3, SkScalar y3);
464 464
465 /** Append the specified arc to the path as a new contour. If the start of 465 /** Append the specified arc to the path as a new contour. If the start of
466 the path is different from the path's current last point, then an 466 the path is different from the path's current last point, then an
467 automatic lineTo() is added to connect the current contour to the start 467 automatic lineTo() is added to connect the current contour to the start
468 of the arc. However, if the path is empty, then we call moveTo() with 468 of the arc. However, if the path is empty, then we call moveTo() with
469 the first point of the arc. The sweep angle is treated mod 360. 469 the first point of the arc. The sweep angle is treated mod 360.
470 470
471 @param oval The bounding oval defining the shape and size of the arc 471 @param oval The bounding oval defining the shape and size of the arc
472 @param startAngle Starting angle (in degrees) where the arc begins 472 @param startAngle Starting angle (in degrees) where the arc begins
473 @param sweepAngle Sweep angle (in degrees) measured clockwise. This is 473 @param sweepAngle Sweep angle (in degrees) measured clockwise. This is
474 treated mod 360. 474 treated mod 360.
475 @param forceMoveTo If true, always begin a new contour with the arc 475 @param forceMoveTo If true, always begin a new contour with the arc
476 */ 476 */
477 void arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, 477 void arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
478 bool forceMoveTo); 478 bool forceMoveTo);
479 479
480 /** Append a line and arc to the current path. This is the same as the 480 /** Append a line and arc to the current path. This is the same as the
481 PostScript call "arct". 481 PostScript call "arct".
482 */ 482 */
483 void arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, 483 void arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
484 SkScalar radius); 484 SkScalar radius);
485 485
486 /** Append a line and arc to the current path. This is the same as the 486 /** Append a line and arc to the current path. This is the same as the
487 PostScript call "arct". 487 PostScript call "arct".
488 */ 488 */
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 @return true if the path describes a pair of nested rectangles 591 @return true if the path describes a pair of nested rectangles
592 */ 592 */
593 bool isNestedRects(SkRect rect[2], Direction dirs[2] = NULL) const; 593 bool isNestedRects(SkRect rect[2], Direction dirs[2] = NULL) const;
594 594
595 /** 595 /**
596 * Add a closed rectangle contour to the path 596 * Add a closed rectangle contour to the path
597 * @param rect The rectangle to add as a closed contour to the path 597 * @param rect The rectangle to add as a closed contour to the path
598 * @param dir The direction to wind the rectangle's contour. Cannot be 598 * @param dir The direction to wind the rectangle's contour. Cannot be
599 * kUnknown_Direction. 599 * kUnknown_Direction.
600 */ 600 */
601 void addRect(const SkRect& rect, Direction dir = kCW_Direction); 601 void addRect(const SkRect& rect, Direction dir = kCW_Direction);
602 602
603 /** 603 /**
604 * Add a closed rectangle contour to the path 604 * Add a closed rectangle contour to the path
605 * 605 *
606 * @param left The left side of a rectangle to add as a closed contour 606 * @param left The left side of a rectangle to add as a closed contour
607 * to the path 607 * to the path
608 * @param top The top of a rectangle to add as a closed contour to the 608 * @param top The top of a rectangle to add as a closed contour to the
609 * path 609 * path
610 * @param right The right side of a rectangle to add as a closed contour 610 * @param right The right side of a rectangle to add as a closed contour
611 * to the path 611 * to the path
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 void addArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle); 650 void addArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle);
651 651
652 /** 652 /**
653 * Add a closed round-rectangle contour to the path 653 * Add a closed round-rectangle contour to the path
654 * @param rect The bounds of a round-rectangle to add as a closed contour 654 * @param rect The bounds of a round-rectangle to add as a closed contour
655 * @param rx The x-radius of the rounded corners on the round-rectangle 655 * @param rx The x-radius of the rounded corners on the round-rectangle
656 * @param ry The y-radius of the rounded corners on the round-rectangle 656 * @param ry The y-radius of the rounded corners on the round-rectangle
657 * @param dir The direction to wind the rectangle's contour. Cannot be 657 * @param dir The direction to wind the rectangle's contour. Cannot be
658 * kUnknown_Direction. 658 * kUnknown_Direction.
659 */ 659 */
660 void addRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry, 660 void addRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry,
661 Direction dir = kCW_Direction); 661 Direction dir = kCW_Direction);
662 662
663 /** 663 /**
664 * Add a closed round-rectangle contour to the path. Each corner receives 664 * Add a closed round-rectangle contour to the path. Each corner receives
665 * two radius values [X, Y]. The corners are ordered top-left, top-right, 665 * two radius values [X, Y]. The corners are ordered top-left, top-right,
666 * bottom-right, bottom-left. 666 * bottom-right, bottom-left.
667 * @param rect The bounds of a round-rectangle to add as a closed contour 667 * @param rect The bounds of a round-rectangle to add as a closed contour
668 * @param radii Array of 8 scalars, 4 [X,Y] pairs for each corner 668 * @param radii Array of 8 scalars, 4 [X,Y] pairs for each corner
669 * @param dir The direction to wind the rectangle's contour. Cannot be 669 * @param dir The direction to wind the rectangle's contour. Cannot be
670 * kUnknown_Direction. 670 * kUnknown_Direction.
671 * Note: The radii here now go through the same constraint handling as the 671 * Note: The radii here now go through the same constraint handling as the
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 bool isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts, 1001 bool isRectContour(bool allowPartial, int* currVerb, const SkPoint** pts,
1002 bool* isClosed, Direction* direction) const; 1002 bool* isClosed, Direction* direction) const;
1003 1003
1004 friend class SkAutoPathBoundsUpdate; 1004 friend class SkAutoPathBoundsUpdate;
1005 friend class SkAutoDisableOvalCheck; 1005 friend class SkAutoDisableOvalCheck;
1006 friend class SkAutoDisableDirectionCheck; 1006 friend class SkAutoDisableDirectionCheck;
1007 friend class SkBench_AddPathTest; // perf test pathTo/reversePathTo 1007 friend class SkBench_AddPathTest; // perf test pathTo/reversePathTo
1008 }; 1008 };
1009 1009
1010 #endif 1010 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrContext.h » ('j') | src/gpu/GrPathRenderer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698