Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: ui/gfx/vector_icons.h

Issue 1228923002: Revert vector icon CLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge_aide_oobe_completion
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gfx/paint_vector_icon.cc ('k') | ui/gfx/vector_icons/aggregate_vector_icons.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 // This file provides defines needed by PaintVectorIcon and is implemented
6 // by the generated file vector_icons.cc.
7
8 #ifndef UI_GFX_VECTOR_ICONS_H_
9 #define UI_GFX_VECTOR_ICONS_H_
10
11 #include "third_party/skia/include/core/SkScalar.h"
12
13 namespace gfx {
14
15 enum class VectorIconId;
16
17 // The size of a single side of the square canvas to which path coordinates
18 // are relative, in device independent pixels.
19 const int kReferenceSizeDip = 48;
20
21 // A path command; each correlates to an SVG path command.
22 enum CommandType {
23 MOVE_TO,
24 R_MOVE_TO,
25 LINE_TO,
26 R_LINE_TO,
27 H_LINE_TO,
28 R_H_LINE_TO,
29 V_LINE_TO,
30 R_V_LINE_TO,
31 R_CUBIC_TO,
32 CIRCLE,
33 CLOSE,
34 END
35 };
36
37 // A POD that describes either a path command or an argument for it.
38 struct PathElement {
39 PathElement(CommandType value) : type(value) {}
40 PathElement(SkScalar value) : arg(value) {}
41
42 union {
43 CommandType type;
44 SkScalar arg;
45 };
46 };
47
48 // Returns an array of path commands and arguments, terminated by END.
49 const PathElement* GetPathForVectorIcon(VectorIconId id);
50
51 } // namespace gfx
52
53 #endif // UI_GFX_VECTOR_ICONS_H_
OLDNEW
« no previous file with comments | « ui/gfx/paint_vector_icon.cc ('k') | ui/gfx/vector_icons/aggregate_vector_icons.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698