| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_GFX_CANVAS_H_ | 5 #ifndef UI_GFX_CANVAS_H_ |
| 6 #define UI_GFX_CANVAS_H_ | 6 #define UI_GFX_CANVAS_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // All methods that take integer arguments (as is used throughout views) | 31 // All methods that take integer arguments (as is used throughout views) |
| 32 // end with Int. If you need to use methods provided by SkCanvas, you'll | 32 // end with Int. If you need to use methods provided by SkCanvas, you'll |
| 33 // need to do a conversion. In particular you'll need to use |SkIntToScalar()|, | 33 // need to do a conversion. In particular you'll need to use |SkIntToScalar()|, |
| 34 // or if converting from a scalar to an integer |SkScalarRound()|. | 34 // or if converting from a scalar to an integer |SkScalarRound()|. |
| 35 // | 35 // |
| 36 // A handful of methods in this class are overloaded providing an additional | 36 // A handful of methods in this class are overloaded providing an additional |
| 37 // argument of type SkXfermode::Mode. SkXfermode::Mode specifies how the | 37 // argument of type SkXfermode::Mode. SkXfermode::Mode specifies how the |
| 38 // source and destination colors are combined. Unless otherwise specified, | 38 // source and destination colors are combined. Unless otherwise specified, |
| 39 // the variant that does not take a SkXfermode::Mode uses a transfer mode | 39 // the variant that does not take a SkXfermode::Mode uses a transfer mode |
| 40 // of kSrcOver_Mode. | 40 // of kSrcOver_Mode. |
| 41 class UI_EXPORT Canvas { | 41 class GFX_EXPORT Canvas { |
| 42 public: | 42 public: |
| 43 enum TruncateFadeMode { | 43 enum TruncateFadeMode { |
| 44 TruncateFadeTail, | 44 TruncateFadeTail, |
| 45 TruncateFadeHead, | 45 TruncateFadeHead, |
| 46 TruncateFadeHeadAndTail, | 46 TruncateFadeHeadAndTail, |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 // Specifies the alignment for text rendered with the DrawStringInt method. | 49 // Specifies the alignment for text rendered with the DrawStringInt method. |
| 50 enum { | 50 enum { |
| 51 TEXT_ALIGN_LEFT = 1 << 0, | 51 TEXT_ALIGN_LEFT = 1 << 0, |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 | 478 |
| 479 skia::RefPtr<skia::PlatformCanvas> owned_canvas_; | 479 skia::RefPtr<skia::PlatformCanvas> owned_canvas_; |
| 480 SkCanvas* canvas_; | 480 SkCanvas* canvas_; |
| 481 | 481 |
| 482 DISALLOW_COPY_AND_ASSIGN(Canvas); | 482 DISALLOW_COPY_AND_ASSIGN(Canvas); |
| 483 }; | 483 }; |
| 484 | 484 |
| 485 } // namespace gfx | 485 } // namespace gfx |
| 486 | 486 |
| 487 #endif // UI_GFX_CANVAS_H_ | 487 #endif // UI_GFX_CANVAS_H_ |
| OLD | NEW |