use direction from isRect in strokeRect, and only stroke if it is closed
Review URL: https://codereview.appspot.com/6846086
git-svn-id: http://skia.googlecode.com/svn/trunk@6528 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkStroke.h b/src/core/SkStroke.h
index 5f0b475..4880516 100644
--- a/src/core/SkStroke.h
+++ b/src/core/SkStroke.h
@@ -1,4 +1,3 @@
-
/*
* Copyright 2006 The Android Open Source Project
*
@@ -6,16 +5,13 @@
* found in the LICENSE file.
*/
-
#ifndef SkStroke_DEFINED
#define SkStroke_DEFINED
+#include "SkPath.h"
#include "SkPoint.h"
#include "SkPaint.h"
-struct SkRect;
-class SkPath;
-
/** \class SkStroke
SkStroke is the utility class that constructs paths by stroking
geometries (lines, rects, ovals, roundrects, paths). This is
@@ -40,7 +36,11 @@
bool getDoFill() const { return SkToBool(fDoFill); }
void setDoFill(bool doFill) { fDoFill = SkToU8(doFill); }
- void strokeRect(const SkRect&, SkPath*) const;
+ /**
+ * Stroke the specified rect, winding it in the specified direction..
+ */
+ void strokeRect(const SkRect& rect, SkPath* result,
+ SkPath::Direction = SkPath::kCW_Direction) const;
void strokePath(const SkPath& path, SkPath*) const;
////////////////////////////////////////////////////////////////