| OLD | NEW | 
|---|
|  | (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_ |  | 
| OLD | NEW | 
|---|