summaryrefslogtreecommitdiffstats
path: root/ui/gfx/path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gfx/path.cc')
-rw-r--r--ui/gfx/path.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/ui/gfx/path.cc b/ui/gfx/path.cc
new file mode 100644
index 0000000..e456679
--- /dev/null
+++ b/ui/gfx/path.cc
@@ -0,0 +1,26 @@
+// Copyright (c) 2009 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.
+
+#include "gfx/path.h"
+
+#include "base/logging.h"
+
+namespace gfx {
+
+Path::Path()
+ : SkPath() {
+ moveTo(0, 0);
+}
+
+Path::Path(const Point* points, size_t count) {
+ DCHECK(count > 1);
+ moveTo(SkIntToScalar(points[0].x), SkIntToScalar(points[0].y));
+ for (size_t i = 1; i < count; ++i)
+ lineTo(SkIntToScalar(points[i].x), SkIntToScalar(points[i].y));
+}
+
+Path::~Path() {
+}
+
+} // namespace gfx