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. Otherwise, if | |
99 // the badge is valid and the icon is not, the badge icon will be returned. | |
stevenjb
2016/08/09 16:59:32
This seems overly complex. An empty |badge| seems
Andra Paraschiv
2016/08/10 14:19:57
Done.
| |
100 static ImageSkia CreateIconWithBadge(const ImageSkia& icon, | |
101 const ImageSkia& badge); | |
102 | |
96 private: | 103 private: |
97 ImageSkiaOperations(); // Class for scoping only. | 104 ImageSkiaOperations(); // Class for scoping only. |
98 }; | 105 }; |
99 | 106 |
100 } // namespace gfx | 107 } // namespace gfx |
101 | 108 |
102 #endif // UI_GFX_IMAGE_IMAGE_SKIA_OPERATIONS_H_ | 109 #endif // UI_GFX_IMAGE_IMAGE_SKIA_OPERATIONS_H_ |
OLD | NEW |