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
3 // found in the LICENSE file.
5 #ifndef UI_GFX_PAINT_VECTOR_ICON_H_
6 #define UI_GFX_PAINT_VECTOR_ICON_H_
8 #include "base/basictypes.h"
9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/gfx/gfx_export.h"
11 #include "ui/gfx/image/image_skia.h"
16 enum class VectorIconId
;
18 // Draws a vector icon identified by |id| onto |canvas| at (0, 0). |dip_size|
19 // is the length of a single edge of the square icon, in device independent
20 // pixels. |color| is used as the fill.
21 GFX_EXPORT
void PaintVectorIcon(Canvas
* canvas
,
26 // Creates an ImageSkia which will render the icon on demand.
27 GFX_EXPORT ImageSkia
CreateVectorIcon(VectorIconId id
,
31 #if defined(GFX_VECTOR_ICONS_UNSAFE) || defined(GFX_IMPLEMENTATION)
32 // Takes a string of the format expected of .icon files and renders onto
33 // a canvas. This should only be used as a debugging aid and should never be
34 // used in production code.
35 GFX_EXPORT ImageSkia
CreateVectorIconFromSource(const std::string
& source
,
42 #endif // UI_GFX_PAINT_VECTOR_ICON_H_