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_IMAGE_IMAGE_SKIA_OPERATIONS_H_ | 5 #ifndef UI_GFX_IMAGE_IMAGE_SKIA_OPERATIONS_H_ |
6 #define UI_GFX_IMAGE_IMAGE_SKIA_OPERATIONS_H_ | 6 #define UI_GFX_IMAGE_IMAGE_SKIA_OPERATIONS_H_ |
7 | 7 |
8 #include "skia/ext/image_operations.h" | 8 #include "skia/ext/image_operations.h" |
9 #include "ui/gfx/color_utils.h" | 9 #include "ui/gfx/color_utils.h" |
10 #include "ui/gfx/gfx_export.h" | 10 #include "ui/gfx/gfx_export.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // Creates an image with drop shadow defined in |shadows| for |source|. | 86 // Creates an image with drop shadow defined in |shadows| for |source|. |
87 static ImageSkia CreateImageWithDropShadow(const ImageSkia& source, | 87 static ImageSkia CreateImageWithDropShadow(const ImageSkia& source, |
88 const ShadowValues& shadows); | 88 const ShadowValues& shadows); |
89 | 89 |
90 // Creates an image which is a rotation of the |source|. |rotation| is the | 90 // Creates an image which is a rotation of the |source|. |rotation| is the |
91 // amount of clockwise rotation in degrees. | 91 // amount of clockwise rotation in degrees. |
92 static ImageSkia CreateRotatedImage( | 92 static ImageSkia CreateRotatedImage( |
93 const ImageSkia& source, | 93 const ImageSkia& source, |
94 SkBitmapOperations::RotationAmount rotation); | 94 SkBitmapOperations::RotationAmount rotation); |
95 | 95 |
| 96 // Creates an icon by painting the second icon as a badge to the first one. |
| 97 // The second icon is in the right corner of the first icon. If the icon |
| 98 // is valid and the badge is not, the icon will be returned. |
| 99 static ImageSkia CreateIconWithBadge(const ImageSkia& icon, |
| 100 const ImageSkia& badge); |
| 101 |
96 private: | 102 private: |
97 ImageSkiaOperations(); // Class for scoping only. | 103 ImageSkiaOperations(); // Class for scoping only. |
98 }; | 104 }; |
99 | 105 |
100 } // namespace gfx | 106 } // namespace gfx |
101 | 107 |
102 #endif // UI_GFX_IMAGE_IMAGE_SKIA_OPERATIONS_H_ | 108 #endif // UI_GFX_IMAGE_IMAGE_SKIA_OPERATIONS_H_ |
OLD | NEW |