| 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 void restoreToCount(int saveCount); | 454 void restoreToCount(int saveCount); |
| 455 | 455 |
| 456 /** Returns true if drawing is currently going to a layer (from saveLayer) | 456 /** Returns true if drawing is currently going to a layer (from saveLayer) |
| 457 * rather than to the root device. | 457 * rather than to the root device. |
| 458 */ | 458 */ |
| 459 virtual bool isDrawingToLayer() const; | 459 virtual bool isDrawingToLayer() const; |
| 460 | 460 |
| 461 /** Preconcat the current matrix with the specified translation | 461 /** Preconcat the current matrix with the specified translation |
| 462 @param dx The distance to translate in X | 462 @param dx The distance to translate in X |
| 463 @param dy The distance to translate in Y | 463 @param dy The distance to translate in Y |
| 464 returns true if the operation succeeded (e.g. did not overflow) | |
| 465 */ | 464 */ |
| 466 bool translate(SkScalar dx, SkScalar dy); | 465 void translate(SkScalar dx, SkScalar dy); |
| 467 | 466 |
| 468 /** Preconcat the current matrix with the specified scale. | 467 /** Preconcat the current matrix with the specified scale. |
| 469 @param sx The amount to scale in X | 468 @param sx The amount to scale in X |
| 470 @param sy The amount to scale in Y | 469 @param sy The amount to scale in Y |
| 471 returns true if the operation succeeded (e.g. did not overflow) | |
| 472 */ | 470 */ |
| 473 bool scale(SkScalar sx, SkScalar sy); | 471 void scale(SkScalar sx, SkScalar sy); |
| 474 | 472 |
| 475 /** Preconcat the current matrix with the specified rotation. | 473 /** Preconcat the current matrix with the specified rotation. |
| 476 @param degrees The amount to rotate, in degrees | 474 @param degrees The amount to rotate, in degrees |
| 477 returns true if the operation succeeded (e.g. did not overflow) | |
| 478 */ | 475 */ |
| 479 bool rotate(SkScalar degrees); | 476 void rotate(SkScalar degrees); |
| 480 | 477 |
| 481 /** Preconcat the current matrix with the specified skew. | 478 /** Preconcat the current matrix with the specified skew. |
| 482 @param sx The amount to skew in X | 479 @param sx The amount to skew in X |
| 483 @param sy The amount to skew in Y | 480 @param sy The amount to skew in Y |
| 484 returns true if the operation succeeded (e.g. did not overflow) | |
| 485 */ | 481 */ |
| 486 bool skew(SkScalar sx, SkScalar sy); | 482 void skew(SkScalar sx, SkScalar sy); |
| 487 | 483 |
| 488 /** Preconcat the current matrix with the specified matrix. | 484 /** Preconcat the current matrix with the specified matrix. |
| 489 @param matrix The matrix to preconcatenate with the current matrix | 485 @param matrix The matrix to preconcatenate with the current matrix |
| 490 @return true if the operation succeeded (e.g. did not overflow) | |
| 491 */ | 486 */ |
| 492 bool concat(const SkMatrix& matrix); | 487 void concat(const SkMatrix& matrix); |
| 493 | 488 |
| 494 /** Replace the current matrix with a copy of the specified matrix. | 489 /** Replace the current matrix with a copy of the specified matrix. |
| 495 @param matrix The matrix that will be copied into the current matrix. | 490 @param matrix The matrix that will be copied into the current matrix. |
| 496 */ | 491 */ |
| 497 void setMatrix(const SkMatrix& matrix); | 492 void setMatrix(const SkMatrix& matrix); |
| 498 | 493 |
| 499 /** Helper for setMatrix(identity). Sets the current matrix to identity. | 494 /** Helper for setMatrix(identity). Sets the current matrix to identity. |
| 500 */ | 495 */ |
| 501 void resetMatrix(); | 496 void resetMatrix(); |
| 502 | 497 |
| (...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1494 bool asROBitmap(SkBitmap*) const; | 1489 bool asROBitmap(SkBitmap*) const; |
| 1495 | 1490 |
| 1496 private: | 1491 private: |
| 1497 SkBitmap fBitmap; // used if peekPixels() fails | 1492 SkBitmap fBitmap; // used if peekPixels() fails |
| 1498 const void* fAddr; // NULL on failure | 1493 const void* fAddr; // NULL on failure |
| 1499 SkImageInfo fInfo; | 1494 SkImageInfo fInfo; |
| 1500 size_t fRowBytes; | 1495 size_t fRowBytes; |
| 1501 }; | 1496 }; |
| 1502 | 1497 |
| 1503 #endif | 1498 #endif |
| OLD | NEW |