| OLD | NEW |
| 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 void restoreToCount(int saveCount); | 433 void restoreToCount(int saveCount); |
| 434 | 434 |
| 435 /** Returns true if drawing is currently going to a layer (from saveLayer) | 435 /** Returns true if drawing is currently going to a layer (from saveLayer) |
| 436 * rather than to the root device. | 436 * rather than to the root device. |
| 437 */ | 437 */ |
| 438 virtual bool isDrawingToLayer() const; | 438 virtual bool isDrawingToLayer() const; |
| 439 | 439 |
| 440 /** Preconcat the current matrix with the specified translation | 440 /** Preconcat the current matrix with the specified translation |
| 441 @param dx The distance to translate in X | 441 @param dx The distance to translate in X |
| 442 @param dy The distance to translate in Y | 442 @param dy The distance to translate in Y |
| 443 returns true if the operation succeeded (e.g. did not overflow) | |
| 444 */ | 443 */ |
| 445 bool translate(SkScalar dx, SkScalar dy); | 444 void translate(SkScalar dx, SkScalar dy); |
| 446 | 445 |
| 447 /** Preconcat the current matrix with the specified scale. | 446 /** Preconcat the current matrix with the specified scale. |
| 448 @param sx The amount to scale in X | 447 @param sx The amount to scale in X |
| 449 @param sy The amount to scale in Y | 448 @param sy The amount to scale in Y |
| 450 returns true if the operation succeeded (e.g. did not overflow) | |
| 451 */ | 449 */ |
| 452 bool scale(SkScalar sx, SkScalar sy); | 450 void scale(SkScalar sx, SkScalar sy); |
| 453 | 451 |
| 454 /** Preconcat the current matrix with the specified rotation. | 452 /** Preconcat the current matrix with the specified rotation. |
| 455 @param degrees The amount to rotate, in degrees | 453 @param degrees The amount to rotate, in degrees |
| 456 returns true if the operation succeeded (e.g. did not overflow) | |
| 457 */ | 454 */ |
| 458 bool rotate(SkScalar degrees); | 455 void rotate(SkScalar degrees); |
| 459 | 456 |
| 460 /** Preconcat the current matrix with the specified skew. | 457 /** Preconcat the current matrix with the specified skew. |
| 461 @param sx The amount to skew in X | 458 @param sx The amount to skew in X |
| 462 @param sy The amount to skew in Y | 459 @param sy The amount to skew in Y |
| 463 returns true if the operation succeeded (e.g. did not overflow) | |
| 464 */ | 460 */ |
| 465 bool skew(SkScalar sx, SkScalar sy); | 461 void skew(SkScalar sx, SkScalar sy); |
| 466 | 462 |
| 467 /** Preconcat the current matrix with the specified matrix. | 463 /** Preconcat the current matrix with the specified matrix. |
| 468 @param matrix The matrix to preconcatenate with the current matrix | 464 @param matrix The matrix to preconcatenate with the current matrix |
| 469 @return true if the operation succeeded (e.g. did not overflow) | |
| 470 */ | 465 */ |
| 471 bool concat(const SkMatrix& matrix); | 466 void concat(const SkMatrix& matrix); |
| 472 | 467 |
| 473 /** Replace the current matrix with a copy of the specified matrix. | 468 /** Replace the current matrix with a copy of the specified matrix. |
| 474 @param matrix The matrix that will be copied into the current matrix. | 469 @param matrix The matrix that will be copied into the current matrix. |
| 475 */ | 470 */ |
| 476 void setMatrix(const SkMatrix& matrix); | 471 void setMatrix(const SkMatrix& matrix); |
| 477 | 472 |
| 478 /** Helper for setMatrix(identity). Sets the current matrix to identity. | 473 /** Helper for setMatrix(identity). Sets the current matrix to identity. |
| 479 */ | 474 */ |
| 480 void resetMatrix(); | 475 void resetMatrix(); |
| 481 | 476 |
| (...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1465 bool asROBitmap(SkBitmap*) const; | 1460 bool asROBitmap(SkBitmap*) const; |
| 1466 | 1461 |
| 1467 private: | 1462 private: |
| 1468 SkBitmap fBitmap; // used if peekPixels() fails | 1463 SkBitmap fBitmap; // used if peekPixels() fails |
| 1469 const void* fAddr; // NULL on failure | 1464 const void* fAddr; // NULL on failure |
| 1470 SkImageInfo fInfo; | 1465 SkImageInfo fInfo; |
| 1471 size_t fRowBytes; | 1466 size_t fRowBytes; |
| 1472 }; | 1467 }; |
| 1473 | 1468 |
| 1474 #endif | 1469 #endif |
| OLD | NEW |