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

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

Issue 2142033002: Factor code to rotate a canvas about a point. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move to canvas. Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 7
8 #ifndef SkCanvas_DEFINED 8 #ifndef SkCanvas_DEFINED
9 #define SkCanvas_DEFINED 9 #define SkCanvas_DEFINED
10 10
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 @param dy The distance to translate in Y 412 @param dy The distance to translate in Y
413 */ 413 */
414 void translate(SkScalar dx, SkScalar dy); 414 void translate(SkScalar dx, SkScalar dy);
415 415
416 /** Preconcat the current matrix with the specified scale. 416 /** Preconcat the current matrix with the specified scale.
417 @param sx The amount to scale in X 417 @param sx The amount to scale in X
418 @param sy The amount to scale in Y 418 @param sy The amount to scale in Y
419 */ 419 */
420 void scale(SkScalar sx, SkScalar sy); 420 void scale(SkScalar sx, SkScalar sy);
421 421
422 /** Preconcat the current matrix with the specified rotation. 422 /** Preconcat the current matrix with the specified rotation about the origi n.
423 @param degrees The amount to rotate, in degrees 423 @param degrees The amount to rotate, in degrees
424 */ 424 */
425 void rotate(SkScalar degrees); 425 void rotate(SkScalar degrees);
426 426
427 /** Preconcat the current matrix with the specified rotation about a given p oint.
428 @param degrees The amount to rotate, in degrees
429 @param px The x coordinate of the point to rotate about.
430 @param py The y coordinate of the point to rotate about.
431 */
432 void rotate(SkScalar degrees, SkScalar px, SkScalar py);
433
427 /** Preconcat the current matrix with the specified skew. 434 /** Preconcat the current matrix with the specified skew.
428 @param sx The amount to skew in X 435 @param sx The amount to skew in X
429 @param sy The amount to skew in Y 436 @param sy The amount to skew in Y
430 */ 437 */
431 void skew(SkScalar sx, SkScalar sy); 438 void skew(SkScalar sx, SkScalar sy);
432 439
433 /** Preconcat the current matrix with the specified matrix. 440 /** Preconcat the current matrix with the specified matrix.
434 @param matrix The matrix to preconcatenate with the current matrix 441 @param matrix The matrix to preconcatenate with the current matrix
435 */ 442 */
436 void concat(const SkMatrix& matrix); 443 void concat(const SkMatrix& matrix);
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 1605
1599 class SkCanvasClipVisitor { 1606 class SkCanvasClipVisitor {
1600 public: 1607 public:
1601 virtual ~SkCanvasClipVisitor(); 1608 virtual ~SkCanvasClipVisitor();
1602 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1609 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1603 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; 1610 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0;
1604 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1611 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1605 }; 1612 };
1606 1613
1607 #endif 1614 #endif
OLDNEW
« no previous file with comments | « gm/typeface.cpp ('k') | samplecode/SampleApp.cpp » ('j') | src/core/SkCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698