OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrPath_DEFINED | 8 #ifndef GrPath_DEFINED |
9 #define GrPath_DEFINED | 9 #define GrPath_DEFINED |
10 | 10 |
11 #include "GrResource.h" | 11 #include "GrResource.h" |
12 #include "SkRect.h" | 12 #include "SkRect.h" |
| 13 #include "SkStrokeRec.h" |
13 | 14 |
14 class GrPath : public GrResource { | 15 class GrPath : public GrResource { |
15 public: | 16 public: |
16 SK_DECLARE_INST_COUNT(GrPath); | 17 SK_DECLARE_INST_COUNT(GrPath); |
17 | 18 |
18 GrPath(GrGpu* gpu, bool isWrapped) : INHERITED(gpu, isWrapped) {} | 19 GrPath(GrGpu* gpu, bool isWrapped, const SkStrokeRec& stroke) |
| 20 : INHERITED(gpu, isWrapped), |
| 21 fStroke(stroke) { |
| 22 } |
19 | 23 |
20 const SkRect& getBounds() const { return fBounds; } | 24 const SkRect& getBounds() const { return fBounds; } |
21 | 25 |
| 26 const SkStrokeRec& getStroke() const { return fStroke; } |
| 27 |
22 protected: | 28 protected: |
23 SkRect fBounds; | 29 SkRect fBounds; |
| 30 SkStrokeRec fStroke; |
24 | 31 |
25 private: | 32 private: |
26 typedef GrResource INHERITED; | 33 typedef GrResource INHERITED; |
27 }; | 34 }; |
28 | 35 |
29 #endif | 36 #endif |
OLD | NEW |