| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PAINT_VECTOR_ICON_H_ | 5 #ifndef UI_GFX_PAINT_VECTOR_ICON_H_ |
| 6 #define UI_GFX_PAINT_VECTOR_ICON_H_ | 6 #define UI_GFX_PAINT_VECTOR_ICON_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "third_party/skia/include/core/SkColor.h" | 9 #include "third_party/skia/include/core/SkColor.h" |
| 10 #include "ui/gfx/gfx_export.h" | 10 #include "ui/gfx/gfx_export.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 size_t dip_size, | 28 size_t dip_size, |
| 29 SkColor color); | 29 SkColor color); |
| 30 | 30 |
| 31 // As above, but also paints a badge defined by |badge_id| on top of the icon. | 31 // As above, but also paints a badge defined by |badge_id| on top of the icon. |
| 32 // The badge uses the same canvas size and default color as the icon. | 32 // The badge uses the same canvas size and default color as the icon. |
| 33 GFX_EXPORT ImageSkia CreateVectorIconWithBadge(VectorIconId id, | 33 GFX_EXPORT ImageSkia CreateVectorIconWithBadge(VectorIconId id, |
| 34 size_t dip_size, | 34 size_t dip_size, |
| 35 SkColor color, | 35 SkColor color, |
| 36 VectorIconId badge_id); | 36 VectorIconId badge_id); |
| 37 | 37 |
| 38 // Creates a "primary UI" icon, i.e. one which is very often visible in the UI |
| 39 // and has been hand-tweaked to look good at a specific size at 1x and 2x scale |
| 40 // factors. The size is taken from the icon's canvas dimensions. |
| 41 GFX_EXPORT ImageSkia CreatePrimaryVectorIcon(VectorIconId id, SkColor color); |
| 42 |
| 38 #if defined(GFX_VECTOR_ICONS_UNSAFE) || defined(GFX_IMPLEMENTATION) | 43 #if defined(GFX_VECTOR_ICONS_UNSAFE) || defined(GFX_IMPLEMENTATION) |
| 39 // Takes a string of the format expected of .icon files and renders onto | 44 // Takes a string of the format expected of .icon files and renders onto |
| 40 // a canvas. This should only be used as a debugging aid and should never be | 45 // a canvas. This should only be used as a debugging aid and should never be |
| 41 // used in production code. | 46 // used in production code. |
| 42 GFX_EXPORT ImageSkia CreateVectorIconFromSource(const std::string& source, | 47 GFX_EXPORT ImageSkia CreateVectorIconFromSource(const std::string& source, |
| 43 size_t dip_size, | 48 size_t dip_size, |
| 44 SkColor color); | 49 SkColor color); |
| 45 #endif | 50 #endif |
| 46 | 51 |
| 47 } // namespace gfx | 52 } // namespace gfx |
| 48 | 53 |
| 49 #endif // UI_GFX_PAINT_VECTOR_ICON_H_ | 54 #endif // UI_GFX_PAINT_VECTOR_ICON_H_ |
| OLD | NEW |