From a560c4796f5b83a2e55cf564dc847ad6498164b0 Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Mon, 27 Nov 2017 10:44:06 -0500 Subject: bookmaker refresh Add support for more operator overloads. Add SkSurface, SkPoint, SkIPoint, SkIPoint16 docs. (SkImage doc skeleton added, but not really started.) Force recompile all examples. Docs-Preview: https://skia.org/?cl=67726 Bug: skia:6898 Change-Id: If9e2d23f79d5db64146dd22588f5cac970614b8a Reviewed-on: https://skia-review.googlesource.com/67726 Commit-Queue: Cary Clark Reviewed-by: Cary Clark --- docs/SkPaint_Reference.bmh | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'docs/SkPaint_Reference.bmh') diff --git a/docs/SkPaint_Reference.bmh b/docs/SkPaint_Reference.bmh index e9f568db59..8d3bd604c1 100644 --- a/docs/SkPaint_Reference.bmh +++ b/docs/SkPaint_Reference.bmh @@ -2504,18 +2504,18 @@ the following curve, the pair of curves meet at Stroke_Join. #Example #Height 200 - SkPaint paint; - paint.setStyle(SkPaint::kStroke_Style); - paint.setStrokeWidth(20); - SkPath path; - path.moveTo(30, 20); - path.lineTo(40, 40); - path.conicTo(70, 20, 100, 20, .707f); - for (SkPaint::Join j : { SkPaint::kMiter_Join, SkPaint::kRound_Join, SkPaint::kBevel_Join } ) { - paint.setStrokeJoin(j); - canvas->drawPath(path, paint); - canvas->translate(0, 70); - } + SkPaint paint; + paint.setStyle(SkPaint::kStroke_Style); + paint.setStrokeWidth(20); + SkPath path; + path.moveTo(30, 20); + path.lineTo(40, 40); + path.conicTo(70, 20, 100, 20, .707f); + for (SkPaint::Join j : { SkPaint::kMiter_Join, SkPaint::kRound_Join, SkPaint::kBevel_Join } ) { + paint.setStrokeJoin(j); + canvas->drawPath(path, paint); + canvas->translate(0, 70); + } ## #Enum Join @@ -3109,7 +3109,8 @@ If Paint has no Path_Effect, the path geometry is unaltered when filled or strok #Example void draw(SkCanvas* canvas) { SkPaint paint1, paint2; - paint1.setPathEffect(SkArcToPathEffect::Make(10)); + SkScalar intervals[] = {1, 2}; + paint1.setPathEffect(SkDashPathEffect::Make(intervals, SK_ARRAY_COUNT(intervals), 10)); SkDebugf("path effect unique: %s\n", paint1.getPathEffect()->unique() ? "true" : "false"); paint2.setPathEffect(paint1.refPathEffect()); SkDebugf("path effect unique: %s\n", paint1.getPathEffect()->unique() ? "true" : "false"); @@ -3476,7 +3477,7 @@ Mask_Filter and Rasterizer. SkRegion region; region.op( 10, 10, 50, 50, SkRegion::kUnion_Op); region.op( 10, 50, 90, 90, SkRegion::kUnion_Op); - paint.setImageFilter(SkImageFilter::MakeBlur(5.0f, 5.0f, nullptr)); + paint.setImageFilter(SkBlurImageFilter::Make(5.0f, 5.0f, nullptr)); canvas->drawRegion(region, paint); paint.setImageFilter(nullptr); paint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, 5)); @@ -3496,7 +3497,7 @@ Mask_Filter and Rasterizer. void draw(SkCanvas* canvas) { SkPaint paint; SkDebugf("nullptr %c= image filter\n", paint.getImageFilter() ? '!' : '='); - paint.setImageFilter(SkImageFilter::MakeBlur(kOuter_SkBlurStyle, 3, nullptr, nullptr)); + paint.setImageFilter(SkBlurImageFilter::Make(kOuter_SkBlurStyle, 3, nullptr, nullptr)); SkDebugf("nullptr %c= image filter\n", paint.getImageFilter() ? '!' : '='); } -- cgit v1.2.3