OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef GrDashingEffect_DEFINED | 9 #ifndef GrDashingEffect_DEFINED |
10 #define GrDashingEffect_DEFINED | 10 #define GrDashingEffect_DEFINED |
11 | 11 |
12 #include "GrColor.h" | 12 #include "GrColor.h" |
13 #include "GrTypesPriv.h" | 13 #include "GrTypesPriv.h" |
14 #include "SkPathEffect.h" | 14 #include "SkPathEffect.h" |
15 | 15 |
16 class GrGpu; | 16 class GrGpu; |
17 class GrDrawState; | 17 class GrDrawState; |
18 class GrDrawTarget; | 18 class GrDrawTarget; |
19 class GrGeometryProcessor; | 19 class GrGeometryProcessor; |
20 class GrPaint; | 20 class GrPaint; |
21 class GrStrokeInfo; | 21 class GrStrokeInfo; |
22 | 22 |
23 class GrGLDashingEffect; | 23 class GrGLDashingEffect; |
24 class SkPath; | 24 class SkPath; |
25 | 25 |
26 namespace GrDashingEffect { | 26 namespace GrDashingEffect { |
27 bool DrawDashLine(GrGpu*, GrDrawTarget*, GrDrawState*, GrColor, const SkPoin
t pts[2], | 27 bool DrawDashLine(GrGpu*, GrDrawTarget*, GrDrawState*, GrColor, const SkMatr
ix& viewMatrix, |
28 const GrPaint& paint, const GrStrokeInfo& strokeInfo); | 28 const SkPoint pts[2], const GrPaint& paint, const GrStroke
Info& strokeInfo); |
29 | 29 |
30 enum DashCap { | 30 enum DashCap { |
31 kRound_DashCap, | 31 kRound_DashCap, |
32 kNonRound_DashCap, | 32 kNonRound_DashCap, |
33 }; | 33 }; |
34 | 34 |
35 /** | 35 /** |
36 * An effect that renders a dashed line. It is intended to be used as a cove
rage effect. | 36 * An effect that renders a dashed line. It is intended to be used as a cove
rage effect. |
37 * The effect is meant for dashed lines that only have a single on/off inter
val pair. | 37 * The effect is meant for dashed lines that only have a single on/off inter
val pair. |
38 * Bounding geometry is rendered and the effect computes coverage based on t
he fragment's | 38 * Bounding geometry is rendered and the effect computes coverage based on t
he fragment's |
39 * position relative to the dashed line. | 39 * position relative to the dashed line. |
40 */ | 40 */ |
41 GrGeometryProcessor* Create(GrColor, | 41 GrGeometryProcessor* Create(GrColor, |
42 GrPrimitiveEdgeType edgeType, | 42 GrPrimitiveEdgeType edgeType, |
43 const SkPathEffect::DashInfo& info, | 43 const SkPathEffect::DashInfo& info, |
44 SkScalar strokeWidth, | 44 SkScalar strokeWidth, |
45 DashCap cap, | 45 DashCap cap, |
46 const SkMatrix& localMatrix); | 46 const SkMatrix& localMatrix); |
47 } | 47 } |
48 | 48 |
49 #endif | 49 #endif |
OLD | NEW |