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

Unified Diff: ui/gfx/vector_icons.h

Issue 1231843002: Revert of Revert vector icon CLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge_aide_oobe_completion
Patch Set: Rebase. 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/vector_icons.h
diff --git a/ui/gfx/vector_icons.h b/ui/gfx/vector_icons.h
new file mode 100644
index 0000000000000000000000000000000000000000..1af6e8edc1f67e71f70930c64663d90d839dcb92
--- /dev/null
+++ b/ui/gfx/vector_icons.h
@@ -0,0 +1,53 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file provides defines needed by PaintVectorIcon and is implemented
+// by the generated file vector_icons.cc.
+
+#ifndef UI_GFX_VECTOR_ICONS_H_
+#define UI_GFX_VECTOR_ICONS_H_
+
+#include "third_party/skia/include/core/SkScalar.h"
+
+namespace gfx {
+
+enum class VectorIconId;
+
+// The size of a single side of the square canvas to which path coordinates
+// are relative, in device independent pixels.
+const int kReferenceSizeDip = 48;
+
+// A path command; each correlates to an SVG path command.
+enum CommandType {
+ MOVE_TO,
+ R_MOVE_TO,
+ LINE_TO,
+ R_LINE_TO,
+ H_LINE_TO,
+ R_H_LINE_TO,
+ V_LINE_TO,
+ R_V_LINE_TO,
+ R_CUBIC_TO,
+ CIRCLE,
+ CLOSE,
+ END
+};
+
+// A POD that describes either a path command or an argument for it.
+struct PathElement {
+ PathElement(CommandType value) : type(value) {}
+ PathElement(SkScalar value) : arg(value) {}
+
+ union {
+ CommandType type;
+ SkScalar arg;
+ };
+};
+
+// Returns an array of path commands and arguments, terminated by END.
+const PathElement* GetPathForVectorIcon(VectorIconId id);
+
+} // namespace gfx
+
+#endif // UI_GFX_VECTOR_ICONS_H_
« 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