Home
last modified time | relevance | path

Searched refs:stroke (Results 1 - 25 of 73) sorted by relevance

123

/third_party/skia/src/gpu/tessellate/shaders/
H A DGrStrokeTessellationShader.cpp19 const SkStrokeRec& stroke, in GrStrokeTessellationShader()
29 , fStroke(stroke) in GrStrokeTessellationShader()
41 // pts 0..3 define the stroke as a cubic bezier. If p3.y is infinity, then it's a conic in GrStrokeTessellationShader()
55 // pts 0..3 define the stroke as a cubic bezier. If p3.y is infinity, then it's a conic in GrStrokeTessellationShader()
58 // An empty stroke (p0==p1==p2==p3) is a special case that denotes a circle, or in GrStrokeTessellationShader()
59 // 180-degree point stroke. in GrStrokeTessellationShader()
173 // Compute the location and tangent direction of the stroke edge with the integral id in emitTessellationCode()
323 if (!shader.stroke().isHairlineStyle()) { in emitTessellationCode()
359 const auto& stroke = shader.stroke(); in setData() local
15 GrStrokeTessellationShader(const GrShaderCaps& shaderCaps, Mode mode, PatchAttribs attribs, const SkMatrix& viewMatrix, const SkStrokeRec& stroke, SkPMColor4f color, int8_t maxParametricSegments_log2) GrStrokeTessellationShader() argument
[all...]
H A DGrStrokeTessellationShader_InstancedImpl.cpp19 SkPaint::Join joinType = shader.stroke().getJoin(); in onEmitCode()
107 if (shader.stroke().isHairlineStyle()) { in onEmitCode()
119 // Find how many parametric segments this stroke requires. in onEmitCode()
136 // The stroke is a point. This special case tells us to draw a stroke-width circle as a in onEmitCode()
137 // 180 degree point stroke instead. in onEmitCode()
152 if (shader.stroke().getJoin() == SkPaint::kRound_Join || shader.hasDynamicStroke()) { in onEmitCode()
162 // The stroke section needs at least two edges. Don't assign more to the join than in onEmitCode()
223 // actually come from the section of our strip that belongs to the stroke.) in onEmitCode()
234 // for seaming with the previous stroke in onEmitCode()
[all...]
/third_party/skia/gm/
H A Dcrbug_996140.cpp27 * 10: ctx.stroke();
59 SkPaint stroke; in DEF_SIMPLE_GM_BG() local
60 stroke.setColor(SK_ColorBLUE); in DEF_SIMPLE_GM_BG()
61 stroke.setStrokeWidth(1.f); in DEF_SIMPLE_GM_BG()
62 stroke.setStyle(SkPaint::kStroke_Style); in DEF_SIMPLE_GM_BG()
63 stroke.setAntiAlias(true); in DEF_SIMPLE_GM_BG()
76 // 10: ctx.stroke(); (NOT NEEDED TO REPRODUCE FAILING RED CIRCLE) in DEF_SIMPLE_GM_BG()
77 canvas->drawPath(path, stroke); in DEF_SIMPLE_GM_BG()
H A Dskbug_257.cpp133 SkPaint stroke; in DEF_SIMPLE_GM() local
134 stroke.setStyle(SkPaint::kStroke_Style); in DEF_SIMPLE_GM()
135 stroke.setStrokeWidth(5); in DEF_SIMPLE_GM()
136 stroke.setColor(SK_ColorCYAN); in DEF_SIMPLE_GM()
137 canvas->drawCircle(size / 2, size / 2, size / 2 - 10, stroke); in DEF_SIMPLE_GM()
138 canvas->drawCircle(3 * size / 2, size / 2, size / 2 - 10, stroke); in DEF_SIMPLE_GM()
139 canvas->drawCircle(size / 2, 384, size / 2 - 10, stroke); in DEF_SIMPLE_GM()
H A Dcroppedrects.cpp51 SkPaint stroke; variable
52 stroke.setStyle(SkPaint::kStroke_Style);
53 stroke.setStrokeWidth(kStrokeWidth);
54 stroke.setColor(0xff008800);
55 srcCanvas->drawRect(kSrcImageClip.makeInset(kStrokeWidth / 2, kStrokeWidth / 2), stroke);
/third_party/skia/src/gpu/tessellate/
H A DTessellation.h92 static float GetJoinType(const SkStrokeRec& stroke) { in GetJoinType() argument
93 switch (stroke.getJoin()) { in GetJoinType()
96 case SkPaint::kMiter_Join: SkASSERT(stroke.getMiter() >= 0); return stroke.getMiter(); in GetJoinType()
107 void set(const SkStrokeRec& stroke) { in set()
108 fRadius = stroke.getWidth() * .5f; in set()
109 fJoinType = GetJoinType(stroke); in set()
H A DStrokeHardwareTessellator.cpp82 // Will a stroke with the given number of parametric segments and a worst-case rotation of 180
87 // Will a worst-case 180-degree stroke with the given number of parametric segments, and a
92 // Will a stroke with the given number of parametric segments and a worst-case rotation of 360
97 // Will a worst-case 360-degree stroke with the given number of parametric segments, and a
107 // current stroke radius, in the event that there are also enough radial segments to rotate in updateTolerances()
141 void updateDynamicStroke(const SkStrokeRec& stroke) { in updateDynamicStroke() argument
143 fDynamicStroke.set(stroke); in updateDynamicStroke()
213 // Writes out the given stroke patch exactly as provided, without chopping or checking the
221 // The first stroke doesn't have a previous join (yet). If the current contour ends up in writePatchTo()
223 // first stroke unti in writePatchTo()
244 writeClose(SkPoint contourEndpoint, const SkMatrix& viewMatrix, const SkStrokeRec& stroke) writeClose() argument
266 writeCaps(SkPoint contourEndpoint, const SkMatrix& viewMatrix, const SkStrokeRec& stroke) writeCaps() argument
720 const SkStrokeRec& stroke = pathStrokeList->fStroke; prepare() local
733 const SkStrokeRec& stroke = pathStroke->fStroke; prepare() local
[all...]
H A DStrokeFixedCountTessellator.cpp31 // will just add enough additional segments to handle a worst-case 180 degree stroke.)
52 // Updates the dynamic stroke state that we will write out with each instance.
53 void updateDynamicStroke(const SkStrokeRec& stroke) { in updateDynamicStroke() argument
56 fDynamicStroke.set(stroke); in updateDynamicStroke()
116 // point. The stroke iterator tells us the new value to use for the previous control point.
122 // Draws a circle whose diameter is equal to the stroke width. We emit circles at cusp points
126 // The shader interprets an empty stroke + empty join as a special case that denotes a in writeCircle()
127 // circle, or 180-degree point stroke. in writeCircle()
135 // We deferred the first stroke because we didn't know the previous control point to use in finishContour()
173 // this stroke unti in writeStroke()
263 const SkStrokeRec& stroke = pathStrokeList->fStroke; prepare() local
277 const SkStrokeRec& stroke = pathStroke->fStroke; prepare() local
[all...]
/third_party/skia/experimental/c-api-example/
H A Dskia-c-example.c48 sk_paint_t* stroke = sk_paint_new(); in draw() local
49 sk_paint_set_color(stroke, sk_color_set_argb(0xFF, 0xFF, 0x00, 0x00)); in draw()
50 sk_paint_set_antialias(stroke, true); in draw()
51 sk_paint_set_stroke(stroke, true); in draw()
52 sk_paint_set_stroke_width(stroke, 5.0f); in draw()
61 sk_canvas_draw_path(canvas, path, stroke); in draw()
73 sk_paint_delete(stroke); in draw()
/third_party/skia/src/gpu/
H A DGrUtil.cpp71 const SkStrokeRec& stroke = style.strokeRec(); in GrIsStrokeHairlineOrEquivalent() local
72 if (stroke.isHairlineStyle()) { in GrIsStrokeHairlineOrEquivalent()
78 return stroke.getStyle() == SkStrokeRec::kStroke_Style && in GrIsStrokeHairlineOrEquivalent()
79 SkDrawTreatAAStrokeAsHairline(stroke.getWidth(), matrix, outCoverage); in GrIsStrokeHairlineOrEquivalent()
/third_party/skia/src/gpu/ops/
H A DTessellationPathRenderer.cpp80 // Don't bother with stroke stencilling or inverse fills yet. The Skia API doesn't support in onGetStencilSupport()
81 // clipping by a stroke, and the stencilling code already knows how to invert a fill. in onGetStencilSupport()
128 // Outset the viewport to pad for the stroke width. in onDrawPath()
129 const SkStrokeRec& stroke = args.fShape->style().strokeRec(); in onDrawPath() local
131 if (stroke.isHairlineStyle()) { in onDrawPath()
133 // find the inflation of an equivalent stroke in device space with a width of 1. in onDrawPath()
134 inflationRadius = SkStrokeRec::GetInflationRadius(stroke.getJoin(), in onDrawPath()
135 stroke.getMiter(), in onDrawPath()
136 stroke.getCap(), 1); in onDrawPath()
138 inflationRadius = stroke in onDrawPath()
149 const SkStrokeRec& stroke = args.fShape->style().strokeRec(); onDrawPath() local
[all...]
H A DAALinearizingConvexPathRenderer.cpp38 // The thicker the stroke, the harder it is to produce high-quality results using tessellation. For
39 // the time being, we simply drop back to software rendering above this stroke width.
362 const SkStrokeRec& stroke = args.fShape->style().strokeRec(); in onCanDrawPath() local
364 if (stroke.getStyle() == SkStrokeRec::kStroke_Style || in onCanDrawPath()
365 stroke.getStyle() == SkStrokeRec::kStrokeAndFill_Style) { in onCanDrawPath()
369 SkScalar strokeWidth = args.fViewMatrix->getMaxScale() * stroke.getWidth(); in onCanDrawPath()
370 if (strokeWidth < 1.0f && stroke.getStyle() == SkStrokeRec::kStroke_Style) { in onCanDrawPath()
375 stroke.getJoin() == SkPaint::Join::kRound_Join) { in onCanDrawPath()
380 if (stroke.getStyle() != SkStrokeRec::kFill_Style) { in onCanDrawPath()
402 const SkStrokeRec& stroke in onDrawPath() local
[all...]
H A DStrokeRectOp.cpp33 // supported when using an AA stroke.
34 inline bool allowed_stroke(const SkStrokeRec& stroke, GrAA aa, bool* isMiter) { in allowed_stroke() argument
35 SkASSERT(stroke.getStyle() == SkStrokeRec::kStroke_Style || in allowed_stroke()
36 stroke.getStyle() == SkStrokeRec::kHairline_Style); in allowed_stroke()
38 if (!stroke.getWidth()) { in allowed_stroke()
42 if (stroke.getJoin() == SkPaint::kBevel_Join) { in allowed_stroke()
46 if (stroke.getJoin() == SkPaint::kMiter_Join) { in allowed_stroke()
47 *isMiter = stroke.getMiter() >= SK_ScalarSqrt2; in allowed_stroke()
109 const SkStrokeRec& stroke, in Make()
112 if (!allowed_stroke(stroke, GrA in Make()
105 Make(GrRecordingContext* context, GrPaint&& paint, const SkMatrix& viewMatrix, const SkRect& rect, const SkStrokeRec& stroke, GrAAType aaType) Make() argument
127 NonAAStrokeRectOp(GrProcessorSet* processorSet, const SkPMColor4f& color, Helper::InputFlags inputFlags, const SkMatrix& viewMatrix, const SkRect& rect, const SkStrokeRec& stroke, GrAAType aaType) NonAAStrokeRectOp() argument
438 Make(GrRecordingContext* context, GrPaint&& paint, const SkMatrix& viewMatrix, const SkRect& rect, const SkStrokeRec& stroke) Make() argument
938 Make(GrRecordingContext* context, GrPaint&& paint, GrAAType aaType, const SkMatrix& viewMatrix, const SkRect& rect, const SkStrokeRec& stroke) Make() argument
[all...]
H A DStrokeTessellateOp.cpp42 const SkPath& path, const SkStrokeRec& stroke, in StrokeTessellateOp()
47 , fPathStrokeList(path, stroke, paint.getColor4f()) in StrokeTessellateOp()
56 float r = stroke.getInflationRadius(); in StrokeTessellateOp()
62 float r = SkStrokeRec::GetInflationRadius(stroke.getJoin(), stroke.getMiter(), in StrokeTessellateOp()
63 stroke.getCap(), 1); in StrokeTessellateOp()
117 // The paths have different stroke properties. We will need to enable dynamic stroke if we in onCombineIfPossible()
41 StrokeTessellateOp(GrAAType aaType, const SkMatrix& viewMatrix, const SkPath& path, const SkStrokeRec& stroke, GrPaint&& paint) StrokeTessellateOp() argument
H A DGrOvalOpFactory.cpp50 * operates in a space normalized by the circle radius (outer radius in the case of a stroke)
69 static GrGeometryProcessor* Make(SkArenaAlloc* arena, bool stroke, bool clipPlane, in Make() argument
73 return new (ptr) CircleGeometryProcessor(stroke, clipPlane, isectPlane, unionPlane, in Make()
104 CircleGeometryProcessor(bool stroke, bool clipPlane, bool isectPlane, bool unionPlane, in CircleGeometryProcessor() argument
108 , fStroke(stroke) { in CircleGeometryProcessor()
123 SkASSERT(stroke); in CircleGeometryProcessor()
265 bool stroke = d->fRandom->nextBool();
266 bool roundCaps = stroke ? d->fRandom->nextBool() : false;
272 return CircleGeometryProcessor::Make(d->allocator(), stroke, clipPlane, isectPlane,
448 // Compute coverage from outer/inner edges of the stroke
[all...]
/third_party/libabigail/src/
H A Dabg-viz-svg.cc142 std::string strip = R"_delimiter_(<path stroke="black" stroke-width="1" d="M __x __y1 L __x __y2"/>
194 std::string rect_strip = R"_delimiter_(<rect x="__x" y="__y" fill="__color" stroke="__color" stroke-width="1" width="__width" height="__height"/>
/third_party/skia/docs/examples/
H A DColor_Wheel.cpp6 const float stroke = scale * 3 / 64; in REG_FIDDLE() local
11 canvas->drawCircle({0, 0}, (scale - stroke) * 0.5f, SkPaint(SkColors::kWhite)); in REG_FIDDLE()
22 sweep.setStrokeWidth(stroke); in REG_FIDDLE()
24 canvas->drawCircle({0, 0}, (scale - stroke) * 0.5f, sweep); in REG_FIDDLE()
H A Dskpaint_xfer.cpp43 SkPaint stroke, src, dst; in REG_FIDDLE() local
44 stroke.setStyle(SkPaint::kStroke_Style); in REG_FIDDLE()
83 canvas->drawRect(rect, stroke); in REG_FIDDLE()
/third_party/skia/bench/
H A DRectBench.cpp18 static DEFINE_double(strokeWidth, -1.0, "If set, use this stroke width in RectBench.");
33 RectBench(int shift, int stroke = 0, bool aa = true, bool perspective = false) in RectBench()
35 , fStroke(stroke) in RectBench()
198 OvalBench(int shift, int stroke = 0) : RectBench(shift, stroke) {} in OvalBench()
208 RRectBench(int shift, int stroke = 0) : RectBench(shift, stroke) {} in RRectBench()
H A DTessellateBench.cpp265 SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle); in make_simple_cubic_path()
266 stroke.setStrokeStyle(8); in make_simple_cubic_path()
267 stroke.setStrokeParams(SkPaint::kButt_Cap, SkPaint::kMiter_Join, 4); in make_simple_cubic_path()
268 return {{path, stroke, SK_PMColor4fWHITE}}; in make_simple_cubic_path()
313 SkStrokeRec stroke(SkStrokeRec::kFill_InitStyle); in make_motionmark_paths()
314 // The number of paths with a given stroke width in the MotionMark bench gets cut in half in make_motionmark_paths()
315 // every time the stroke width increases by 1. in make_motionmark_paths()
317 stroke.setStrokeStyle(strokeWidth); in make_motionmark_paths()
318 stroke.setStrokeParams(SkPaint::kButt_Cap, SkPaint::kBevel_Join, 0); in make_motionmark_paths()
319 pathStrokes.emplace_back(path, stroke, SK_PMColor4fWHIT in make_motionmark_paths()
[all...]
/third_party/skia/experimental/graphite/src/
H A DDrawList.h59 // NOTE: Only represents the stroke or hairline styles; stroke-and-fill must be handled higher up.
157 // NOTE: All path rendering functions, e.g. [fill|stroke|...]Path() that take a Shape
179 const StrokeParams& stroke,
184 // TODO: fill[R]Rect, stroke[R]Rect (will need to support per-edge aa and arbitrary quads)
209 const StrokeParams* stroke) in Draw()
216 , fStrokeParams(stroke ? skstd::optional<StrokeParams>(*stroke) : skstd::nullopt) {} in Draw()
/third_party/skia/modules/pathkit/tests/
H A Dpathops.spec.js35 <path stroke=black fill=white stroke-width=0.01 d="${expectedPath.toSVGString()}"></path>
39 <path stroke=black fill=white stroke-width=0.01 d="${actualPath.toSVGString()}"></path>
/third_party/skia/src/core/
H A DSkStroke.cpp48 stroke has more than the optimal number of quadratics and lines */
118 struct SkQuadConstruct { // The state of the quad stroke under construction.
214 kSplit_ResultType, // the caller should split the quad stroke in two
216 kQuad_ResultType, // the caller should (continue to try to) add a quad stroke
272 ResultType strokeCloseEnough(const SkPoint stroke[3], const SkPoint ray[2],
725 /* If the stroke consists of a moveTo followed by a degenerate curve, treat it
763 /* If the stroke consists of a moveTo followed by a degenerate curve, treat it
904 // Find the intersection of the stroke tangents to construct a stroke quad.
905 // Return whether the stroke i
[all...]
/third_party/skia/src/xps/
H A DSkXPSDevice.cpp1077 const bool stroke = (SkPaint::kFill_Style != paint.getStyle()); in rect_must_be_pathed() local
1081 (stroke && ( in rect_must_be_pathed()
1090 HRESULT SkXPSDevice::createXpsRect(const SkRect& rect, BOOL stroke, BOOL fill, in createXpsRect() argument
1098 return this->createXpsQuad(points, stroke, fill, xpsRect); in createXpsRect()
1101 BOOL stroke, BOOL fill, variable
1126 stroke, stroke, stroke,
1136 HRM((*xpsQuad)->SetIsClosed(stroke), "Could not set quad close.");
1155 //If trying to paint with a stroke, ignor in drawPaint()
1213 BOOL stroke = FALSE; internalDrawRect() local
1263 close_figure(const SkTDArray<XPS_SEGMENT_TYPE>& segmentTypes, const SkTDArray<FLOAT>& segmentData, const SkTDArray<BOOL>& segmentStrokes, BOOL stroke, BOOL fill, IXpsOMGeometryFigure* figure, IXpsOMGeometryFigureCollection* figures) close_figure() argument
1292 addXpsPathGeometry( IXpsOMGeometryFigureCollection* xpsFigures, BOOL stroke, BOOL fill, const SkPath& path) addXpsPathGeometry() argument
1449 shadePath(IXpsOMPath* shadedPath, const SkPaint& shaderPaint, const SkMatrix& matrix, BOOL* fill, BOOL* stroke) shadePath() argument
1560 BOOL stroke; drawPath() local
[all...]
/third_party/skia/platform_tools/android/apps/AndroidKit/src/main/java/org/skia/androidkit/
H A DPaint.java44 public Paint setStroke(boolean stroke) { in setStroke() argument
45 nSetStroke(mNativeInstance, stroke); in setStroke()
110 private static native void nSetStroke(long nativeInstance, boolean stroke); in nSetStroke() argument

Completed in 20 milliseconds

123