aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/SkPaint_Reference.bmh
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2017-11-27 10:44:06 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-27 16:12:56 +0000
commita560c4796f5b83a2e55cf564dc847ad6498164b0 (patch)
tree1e47f0055e1a19621046ecbc601e999e67c34465 /docs/SkPaint_Reference.bmh
parent56536c42f561f6d8902703a33cf178deb91f9d4d (diff)
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 <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com>
Diffstat (limited to 'docs/SkPaint_Reference.bmh')
-rw-r--r--docs/SkPaint_Reference.bmh31
1 files changed, 16 insertions, 15 deletions
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() ? '!' : '=');
}