OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SKIA_H_ | 5 #ifndef UI_GFX_CANVAS_SKIA_H_ |
6 #define UI_GFX_CANVAS_SKIA_H_ | 6 #define UI_GFX_CANVAS_SKIA_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/string16.h" | 10 #include "base/string16.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 // end with Int. If you need to use methods provided by the superclass | 27 // end with Int. If you need to use methods provided by the superclass |
28 // you'll need to do a conversion. In particular you'll need to use | 28 // you'll need to do a conversion. In particular you'll need to use |
29 // macro SkIntToScalar(xxx), or if converting from a scalar to an integer | 29 // macro SkIntToScalar(xxx), or if converting from a scalar to an integer |
30 // SkScalarRound. | 30 // SkScalarRound. |
31 // | 31 // |
32 // A handful of methods in this class are overloaded providing an additional | 32 // A handful of methods in this class are overloaded providing an additional |
33 // argument of type SkXfermode::Mode. SkXfermode::Mode specifies how the | 33 // argument of type SkXfermode::Mode. SkXfermode::Mode specifies how the |
34 // source and destination colors are combined. Unless otherwise specified, | 34 // source and destination colors are combined. Unless otherwise specified, |
35 // the variant that does not take a SkXfermode::Mode uses a transfer mode | 35 // the variant that does not take a SkXfermode::Mode uses a transfer mode |
36 // of kSrcOver_Mode. | 36 // of kSrcOver_Mode. |
37 class CanvasSkia : public skia::PlatformCanvas, | 37 class UI_API CanvasSkia : public skia::PlatformCanvas, public Canvas { |
38 public Canvas { | |
39 public: | 38 public: |
40 enum TruncateFadeMode { | 39 enum TruncateFadeMode { |
41 TruncateFadeTail, | 40 TruncateFadeTail, |
42 TruncateFadeHead, | 41 TruncateFadeHead, |
43 TruncateFadeHeadAndTail, | 42 TruncateFadeHeadAndTail, |
44 }; | 43 }; |
45 | 44 |
46 // Creates an empty Canvas. Callers must use initialize before using the | 45 // Creates an empty Canvas. Callers must use initialize before using the |
47 // canvas. | 46 // canvas. |
48 CanvasSkia(); | 47 CanvasSkia(); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 int x, int y, int w, int h, | 178 int x, int y, int w, int h, |
180 int flags); | 179 int flags); |
181 #endif | 180 #endif |
182 | 181 |
183 DISALLOW_COPY_AND_ASSIGN(CanvasSkia); | 182 DISALLOW_COPY_AND_ASSIGN(CanvasSkia); |
184 }; | 183 }; |
185 | 184 |
186 } // namespace gfx; | 185 } // namespace gfx; |
187 | 186 |
188 #endif // UI_GFX_CANVAS_SKIA_H_ | 187 #endif // UI_GFX_CANVAS_SKIA_H_ |
OLD | NEW |