aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2018-06-28 19:13:56 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-28 23:17:47 +0000
commit53498e973e52889869d0e6c4f9b186ed65d6d892 (patch)
treee64b476ccad6d7d842343914808d67f8d3e4b1dc /docs
parent24d18ced1ad79d0af22b335d7fb01238915214ef (diff)
fix blank catalog images
Some catalog images are blank because the image wasn't selected in the fiddle example. Also continue to add documentation and examples for SkRRect R=caryclark@google.com NOTRY=true Docs-Preview: https://skia.org/?cl=138382 Bug: skia:6898 Change-Id: I282a14ffcbaf2f8383294724900960f5ba40a2aa Reviewed-on: https://skia-review.googlesource.com/138382 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'docs')
-rw-r--r--docs/SkBlendMode_Reference.bmh7
-rw-r--r--docs/SkPath_Reference.bmh4
-rw-r--r--docs/SkRRect_Reference.bmh468
-rw-r--r--docs/SkRect_Reference.bmh2
4 files changed, 359 insertions, 122 deletions
diff --git a/docs/SkBlendMode_Reference.bmh b/docs/SkBlendMode_Reference.bmh
index 1dbba49db3..494ff4fb30 100644
--- a/docs/SkBlendMode_Reference.bmh
+++ b/docs/SkBlendMode_Reference.bmh
@@ -860,6 +860,7 @@ Da as destination Alpha, Dc as destination Color component
. SkBlendMode::kDarken does not make an image darker; it replaces the destination
component with source if source is darker.
#Example
+#Image 3
canvas->drawImage(image, 0, 0);
SkColor colors[] = { SK_ColorWHITE, SK_ColorBLACK };
SkPoint horz[] = { { 0, 0 }, { 256, 0 } };
@@ -885,6 +886,7 @@ Da as destination Alpha, Dc as destination Color component
. SkBlendMode::kDarken does not make an image lighter; it replaces the destination
component with source if source is lighter.
#Example
+#Image 3
canvas->drawImage(image, 0, 0);
SkColor colors[] = { SK_ColorBLACK, SK_ColorWHITE };
SkPoint horz[] = { { 0, 0 }, { 256, 0 } };
@@ -1065,6 +1067,7 @@ Da as destination Alpha, Dc as destination Color component
, the product of Unpremultiplied source and destination.
SkBlendMode::kMultiply makes the image darker.
#Example
+#Image 5
canvas->drawImage(image, 0, 0);
canvas->drawImage(image, 128, 0);
canvas->drawImage(image, 0, 128);
@@ -1094,6 +1097,7 @@ Da as destination Alpha, D as destination Color
##
, source hue, leaving destination luminosity and saturation unchanged.
#Example
+#Image 3
canvas->drawImage(image, 0, 0);
canvas->drawColor(0xFF00FF00, SkBlendMode::kHue);
##
@@ -1112,6 +1116,7 @@ Da as destination Alpha, D as destination Color
##
, source hue, leaving destination luminosity and saturation unchanged.
#Example
+#Image 3
canvas->drawImage(image, 0, 0);
canvas->drawColor(0xFF00FF00, SkBlendMode::kSaturation);
##
@@ -1130,6 +1135,7 @@ Da as destination Alpha, D as destination Color
##
, source hue and saturation, leaving destination luminosity unchanged.
#Example
+#Image 3
canvas->drawImage(image, 0, 0);
canvas->drawColor(0xFF00FF00, SkBlendMode::kColor);
##
@@ -1148,6 +1154,7 @@ Da as destination Alpha, D as destination Color
##
, source luminosity, leaving destination hue and saturation unchanged.
#Example
+#Image 3
canvas->drawImage(image, 0, 0);
canvas->drawColor(0xFF00FF00, SkBlendMode::kLuminosity);
##
diff --git a/docs/SkPath_Reference.bmh b/docs/SkPath_Reference.bmh
index e0e8da2540..f82654a511 100644
--- a/docs/SkPath_Reference.bmh
+++ b/docs/SkPath_Reference.bmh
@@ -5044,7 +5044,7 @@ for (int y = 2; y < 256; y += 9) {
#Method void dump(SkWStream* stream, bool forceClose, bool dumpAsHex) const
#In Utility
-#Line # sends text representation using floats to standard output ##
+#Line # sends text representation to stream ##
Writes text representation of Path to stream. If stream is nullptr, writes to
standard output. Set forceClose to true to get edges used to fill Path.
Set dumpAsHex true to generate exact binary representations
@@ -5086,7 +5086,7 @@ path.close();
##
##
-#SeeAlso SkRect::dump() SkRRect::dump() SkPathMeasure::dump()
+#SeeAlso dumpHex SkRect::dump() SkRRect::dump() SkPathMeasure::dump()
##
diff --git a/docs/SkRRect_Reference.bmh b/docs/SkRRect_Reference.bmh
index 67e61b44fa..a96237cdc5 100644
--- a/docs/SkRRect_Reference.bmh
+++ b/docs/SkRRect_Reference.bmh
@@ -878,7 +878,23 @@ sets to kSimple_Type. Otherwise, sets to kNinePatch_Type.
#Param radii corner x-axis and y-axis radii ##
#Example
-// incomplete
+ SkPaint paint;
+ paint.setStrokeWidth(15);
+ paint.setStrokeCap(SkPaint::kSquare_Cap);
+ paint.setAntiAlias(true);
+ float intervals[] = { 5, 21.75f };
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setPathEffect(SkDashPathEffect::Make(intervals, SK_ARRAY_COUNT(intervals), 0));
+ SkPath path;
+ SkRRect rrect;
+ SkVector corners[] = {{15, 17}, {17, 19}, {19, 15}, {15, 15}};
+ rrect.setRectRadii({20, 20, 100, 100}, corners);
+ path.addRRect(rrect, SkPath::kCW_Direction);
+ canvas->drawPath(path, paint);
+ path.rewind();
+ path.addRRect(rrect, SkPath::kCCW_Direction, 1);
+ canvas->translate(120, 0);
+ canvas->drawPath(path, paint);
##
#SeeAlso setNinePatch SkPath::addRoundRect
@@ -888,7 +904,7 @@ sets to kSimple_Type. Otherwise, sets to kNinePatch_Type.
# ------------------------------------------------------------------------------
#Enum Corner
-#Line # incomplete ##
+#Line # corner radii order ##
#Code
enum Corner {
@@ -901,74 +917,133 @@ sets to kSimple_Type. Otherwise, sets to kNinePatch_Type.
The radii are stored: top-left, top-right, bottom-right, bottom-left.
-#Const kUpperLeft_Corner
-#Line # incomplete ##
+#Const kUpperLeft_Corner 0
+#Line # index of top-left corner radii ##
##
-#Const kUpperRight_Corner
-#Line # incomplete ##
+#Const kUpperRight_Corner 1
+#Line # index of top-right corner radii ##
##
-#Const kLowerRight_Corner
-#Line # incomplete ##
+#Const kLowerRight_Corner 2
+#Line # index of bottom-right corner radii ##
##
-#Const kLowerLeft_Corner
-#Line # incomplete ##
+#Const kLowerLeft_Corner 3
+#Line # index of bottom-left corner radii ##
##
#Example
-// incomplete
+#Height 70
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkRRect rrect;
+ SkVector corners[] = {{25, 17}, {17, 19}, {19, 15}, {15, 15}};
+ rrect.setRectRadii({30, 10, 100, 60}, corners);
+ canvas->drawRRect(rrect, paint);
+ paint.setColor(SK_ColorWHITE);
+ const SkRect r = rrect.getBounds();
+ canvas->drawLine(r.fLeft, r.fTop + rrect.radii(SkRRect::kUpperLeft_Corner).fY,
+ r.fRight, r.fTop + rrect.radii(SkRRect::kUpperRight_Corner).fY, paint);
+ canvas->drawLine(r.fLeft, r.fBottom - rrect.radii(SkRRect::kLowerLeft_Corner).fY,
+ r.fRight, r.fBottom - rrect.radii(SkRRect::kLowerRight_Corner).fY, paint);
+ canvas->drawLine(r.fLeft + rrect.radii(SkRRect::kUpperLeft_Corner).fX, r.fTop,
+ r.fLeft + rrect.radii(SkRRect::kLowerLeft_Corner).fX, r.fBottom, paint);
+ canvas->drawLine(r.fRight - rrect.radii(SkRRect::kUpperRight_Corner).fX, r.fTop,
+ r.fRight - rrect.radii(SkRRect::kLowerRight_Corner).fX, r.fBottom, paint);
##
-#SeeAlso incomplete
+#SeeAlso radii
#Enum ##
# ------------------------------------------------------------------------------
#Method const SkRect& rect() const
-#In incomplete
-#Line # incomplete ##
+#In Property
+#Line # returns bounds ##
+Returns bounds. Bounds may have zero width or zero height. Bounds right is
+greater than or equal to left; bounds bottom is greater than or equal to top.
+Result is identical to getBounds.
-#Return incomplete ##
+#Return bounding box ##
#Example
-// incomplete
+ for (SkScalar left : { SK_ScalarNaN, SK_ScalarInfinity, 100.f, 50.f, 25.f} ) {
+ SkRRect rrect1 = SkRRect::MakeRectXY({left, 20, 60, 220}, 50, 200);
+ SkDebugf("left bounds: (%g) %g\n", left, rrect1.rect().fLeft);
+ }
+#StdOut
+left bounds: (nan) 0
+left bounds: (inf) 0
+left bounds: (100) 60
+left bounds: (50) 50
+left bounds: (25) 25
+##
##
-#SeeAlso incomplete
+#SeeAlso getBounds
#Method ##
# ------------------------------------------------------------------------------
#Method SkVector radii(Corner corner) const
-#In incomplete
-#Line # incomplete ##
+#In Property
+#Line # returns x-axis and y-axis radii for one corner ##
+Returns Scalar pair for radius of curve on x-axis and y-axis for one corner.
+Both radii may be zero. If not zero, both are positive and finite.
-#Param corner incomplete ##
-#Return incomplete ##
+#Param corner one of: kUpperLeft_Corner, kUpperRight_Corner,
+ kLowerRight_Corner, kLowerLeft_Corner
+##
+
+#Return x-axis and y-axis radii for one corner ##
#Example
-// incomplete
+#Description
+Finite values are scaled proportionately to fit; other values are set to zero.
+Scaled values cannot be larger than 25, half the bounding rect width.
+Small scaled values are halved to scale in proportion to the y-axis corner
+radius, which is twice the bounds height.
+##
+ for (SkScalar radiusX : { SK_ScalarNaN, SK_ScalarInfinity, 100.f, 50.f, 25.f} ) {
+ SkRRect rrect1 = SkRRect::MakeRectXY({10, 20, 60, 220}, radiusX, 200);
+ SkDebugf("left corner: (%g) %g\n", radiusX, rrect1.radii(SkRRect::kUpperLeft_Corner).fX);
+ }
+#StdOut
+left corner: (nan) 0
+left corner: (inf) 0
+left corner: (100) 25
+left corner: (50) 25
+left corner: (25) 12.5
+##
##
-#SeeAlso incomplete
+#SeeAlso Corner
#Method ##
# ------------------------------------------------------------------------------
#Method const SkRect& getBounds() const
-#In incomplete
-#Line # incomplete ##
+#In Property
+#Line # returns bounds ##
+Returns bounds. Bounds may have zero width or zero height. Bounds right is
+greater than or equal to left; bounds bottom is greater than or equal to top.
+Result is identical to rect().
-#Return incomplete ##
+#Return bounding box ##
#Example
-// incomplete
+#Height 120
+ SkPaint paint;
+ SkRRect rrect = SkRRect::MakeRectXY({20, 20, 220, 100}, 15, 15);
+ canvas->drawRRect(rrect, paint);
+ paint.setColor(SK_ColorWHITE);
+ rrect = SkRRect::MakeOval(rrect.getBounds());
+ canvas->drawRRect(rrect, paint);
##
-#SeeAlso incomplete
+#SeeAlso rect
#Method ##
@@ -976,18 +1051,33 @@ The radii are stored: top-left, top-right, bottom-right, bottom-left.
#Method bool operator==(const SkRRect& a, const SkRRect& b)
#In Operator
-#Line # incomplete ##
+#Line # returns true if members are equal ##
+Returns true if bounds and radii in a are equal to bounds and radii in b.
-#Param a incomplete ##
-#Param b incomplete ##
+a and b are not equal if either contain NaN. a and b are equal if members
+contain zeroes width different signs.
-#Return incomplete ##
+#Param a Rect bounds and radii to compare ##
+#Param b Rect bounds and radii to compare ##
-#Example
-// incomplete
-##
+#Return true if members are equal ##
-#SeeAlso incomplete
+#Example
+ SkRRect rrect1 = SkRRect::MakeRectXY({10, 20, 60, 220}, 50, 200);
+ SkRRect rrect2 = SkRRect::MakeRectXY(rrect1.rect(), 25, 100);
+ SkRRect rrect3 = SkRRect::MakeOval(rrect1.rect());
+ canvas->drawRRect(rrect1, SkPaint());
+ std::string str = "rrect1 " + std::string(rrect1 == rrect2 ? "=" : "!") + "= rrect2";
+ canvas->drawString(str.c_str(), 10, 240, SkPaint());
+ canvas->translate(70, 0);
+ canvas->drawRRect(rrect2, SkPaint());
+ canvas->translate(70, 0);
+ canvas->drawRRect(rrect3, SkPaint());
+ str = "rrect2 " + std::string(rrect2 == rrect3 ? "=" : "!") + "= rrect3";
+ canvas->drawString(str.c_str(), -20, 240, SkPaint());
+##
+
+#SeeAlso operator!=(const SkRRect& a, const SkRRect& b)
#Method ##
@@ -995,26 +1085,41 @@ The radii are stored: top-left, top-right, bottom-right, bottom-left.
#Method bool operator!=(const SkRRect& a, const SkRRect& b)
#In Operator
-#Line # incomplete ##
+#Line # returns true if members are unequal ##
+Returns true if bounds and radii in a are not equal to bounds and radii in b.
-#Param a incomplete ##
-#Param b incomplete ##
+a and b are not equal if either contain NaN. a and b are equal if members
+contain zeroes width different signs.
-#Return incomplete ##
+#Param a Rect bounds and radii to compare ##
+#Param b Rect bounds and radii to compare ##
-#Example
-// incomplete
-##
+#Return true if members are not equal ##
-#SeeAlso incomplete
+#Example
+ SkRRect rrect1 = SkRRect::MakeRectXY({10, 20, 60, 220}, 50, 100);
+ SkRRect rrect2 = SkRRect::MakeRectXY(rrect1.rect(), 50, 50);
+ SkRRect rrect3 = SkRRect::MakeOval(rrect1.rect());
+ canvas->drawRRect(rrect1, SkPaint());
+ std::string str = "rrect1 " + std::string(rrect1 == rrect2 ? "=" : "!") + "= rrect2";
+ canvas->drawString(str.c_str(), 10, 240, SkPaint());
+ canvas->translate(70, 0);
+ canvas->drawRRect(rrect2, SkPaint());
+ canvas->translate(70, 0);
+ canvas->drawRRect(rrect3, SkPaint());
+ str = "rrect2 " + std::string(rrect2 == rrect3 ? "=" : "!") + "= rrect3";
+ canvas->drawString(str.c_str(), -20, 240, SkPaint());
+##
+
+#SeeAlso operator==(const SkRRect& a, const SkRRect& b)
#Method ##
# ------------------------------------------------------------------------------
#Method void inset(SkScalar dx, SkScalar dy, SkRRect* dst) const
-#In incomplete
-#Line # incomplete ##
+#In Inset_Outset_Offset
+#Line # insets bounds and radii ##
Calls inset on the bounds, and adjust the radii to reflect what happens.
If the corner is sharp (no curvature), leave it alone,
@@ -1026,40 +1131,55 @@ If the inset is sufficiently negative to cause the bounds to become infinite the
the result is a default initialized rrect.
It is valid for dst == this.
-#Param dx incomplete ##
-#Param dy incomplete ##
-#Param dst incomplete ##
+#Param dx added to rect().fLeft, and subtracted from rect().fRight ##
+#Param dy added to rect().fTop, and subtracted from rect().fBottom ##
+#Param dst insets bounds and radii ##
#Example
-// incomplete
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kStroke_Style);
+ SkRRect rrect = SkRRect::MakeRectXY({100, 20, 140, 220}, 50, 100);
+ for (int index = 0; index < 25; ++index) {
+ canvas->drawRRect(rrect, paint);
+ rrect.inset(-3, 3, &rrect);
+ }
##
-#SeeAlso incomplete
+#SeeAlso outset offset makeOffset
#Method ##
# ------------------------------------------------------------------------------
#Method void inset(SkScalar dx, SkScalar dy)
-#In incomplete
-#Line # incomplete ##
+#In Inset_Outset_Offset
+#Line # insets bounds and radii ##
-#Param dx incomplete ##
-#Param dy incomplete ##
+#Param dx added to rect().fLeft, and subtracted from rect().fRight ##
+#Param dy added to rect().fTop, and subtracted from rect().fBottom ##
#Example
-// incomplete
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kStroke_Style);
+ SkRRect rrect = SkRRect::MakeRectXY({10, 20, 180, 220}, 50, 100);
+ for (int index = 0; index < 25; ++index) {
+ canvas->drawRRect(rrect, paint);
+ rrect.inset(3, 3);
+ }
##
-#SeeAlso incomplete
+#SeeAlso outset offset makeOffset
+
#Method ##
# ------------------------------------------------------------------------------
#Method void outset(SkScalar dx, SkScalar dy, SkRRect* dst) const
-#In incomplete
-#Line # incomplete ##
+#In Inset_Outset_Offset
+#Line # outsets bounds and radii ##
Call outset on the bounds, and adjust the radii to reflect what happens
in stroking. If the corner is sharp (no curvature), leave it alone,
@@ -1067,98 +1187,127 @@ otherwise we grow/shrink the radii by the amount of the inset. If a
given radius becomes negative, it is pinned to 0.
It is valid for dst == this.
-#Param dx incomplete ##
-#Param dy incomplete ##
-#Param dst incomplete ##
+#Param dx subtracted from rect().fLeft, and added to rect().fRight ##
+#Param dy subtracted from rect().fTop, and added to rect().fBottom ##
+#Param dst outset bounds and radii ##
#Example
-// incomplete
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kStroke_Style);
+ SkRRect rrect = SkRRect::MakeRectXY({100, 20, 140, 220}, 50, 100);
+ for (int index = 0; index < 25; ++index) {
+ canvas->drawRRect(rrect, paint);
+ rrect.outset(-3, 3, &rrect);
+ }
##
-#SeeAlso incomplete
+#SeeAlso inset offset makeOffset
+
#Method ##
# ------------------------------------------------------------------------------
#Method void outset(SkScalar dx, SkScalar dy)
-#In incomplete
-#Line # incomplete ##
+#In Inset_Outset_Offset
+#Line # outsets bounds and radii ##
-#Param dx incomplete ##
-#Param dy incomplete ##
+#Param dx subtracted from rect().fLeft, and added to rect().fRight ##
+#Param dy subtracted from rect().fTop, and added to rect().fBottom ##
#Example
-// incomplete
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kStroke_Style);
+ SkRRect rrect = SkRRect::MakeRectXY({100, 20, 140, 220}, 50, 100);
+ for (int index = 0; index < 25; ++index) {
+ canvas->drawRRect(rrect, paint);
+ rrect.outset(3, 3);
+ }
##
-#SeeAlso incomplete
+#SeeAlso inset offset makeOffset
#Method ##
# ------------------------------------------------------------------------------
#Method void offset(SkScalar dx, SkScalar dy)
-#In incomplete
-#Line # incomplete ##
+#In Inset_Outset_Offset
+#Line # offsets bounds and radii ##
-Translate the rrect by (dx, dy).
+Translates the rrect by (dx, dy).
-#Param dx incomplete ##
-#Param dy incomplete ##
+#Param dx offset added to rect().fLeft and rect().fRight ##
+#Param dy offset added to rect().fTop and rect().fBottom ##
#Example
-// incomplete
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kStroke_Style);
+ SkRRect rrect = SkRRect::MakeRectXY({100, 20, 140, 220}, 50, 100);
+ for (int index = 0; index < 25; ++index) {
+ canvas->drawRRect(rrect, paint);
+ rrect.offset(3, 3);
+ }
##
-#SeeAlso incomplete
+#SeeAlso makeOffset inset outset
#Method ##
# ------------------------------------------------------------------------------
#Method SkRRect SK_WARN_UNUSED_RESULT makeOffset(SkScalar dx, SkScalar dy) const
-#In incomplete
-#Line # incomplete ##
+#In Inset_Outset_Offset
+#Line # offsets bounds and radii ##
-#Param dx incomplete ##
-#Param dy incomplete ##
+#Param dx offset added to rect().fLeft and rect().fRight ##
+#Param dy offset added to rect().fTop and rect().fBottom ##
-#Return incomplete ##
+#Return Round_Rect bounds offset by (dx, dy), with unchanged corner radii ##
#Example
-// incomplete
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setStyle(SkPaint::kStroke_Style);
+ SkRRect rrect = SkRRect::MakeRectXY({100, 20, 140, 220}, 50, 100);
+ for (int index = 0; index < 25; ++index) {
+ canvas->drawRRect(rrect, paint);
+ rrect = rrect.makeOffset(-3, 3);
+ }
##
-#SeeAlso incomplete
+#SeeAlso offset inset outset
#Method ##
# ------------------------------------------------------------------------------
#Method bool contains(const SkRect& rect) const
-#In incomplete
-#Line # incomplete ##
+#In Intersection
+#Line # returns true if Rect is inside ##
-Returns true if 'rect' is wholy inside the RR, and both
-are not empty.
+Returns true if rect is inside the bounds and corner radii, and if
+Round_Rect and rect are not empty.
-#Param rect incomplete ##
+#Param rect area tested for containment ##
-#Return incomplete ##
+#Return true if Round_Rect contains rect ##
#Example
// incomplete
##
-#SeeAlso incomplete
+#SeeAlso SkRect::contains
#Method ##
# ------------------------------------------------------------------------------
#Method bool isValid() const
-#In incomplete
+#In Utility
#Line # incomplete ##
#Return incomplete ##
@@ -1185,7 +1334,7 @@ are not empty.
# ------------------------------------------------------------------------------
#Method size_t writeToMemory(void* buffer) const
-#In incomplete
+#In Utility
#Line # incomplete ##
Write the rrect into the specified buffer. This is guaranteed to always
@@ -1207,7 +1356,7 @@ a multiple of 4. Return kSizeInMemory.
# ------------------------------------------------------------------------------
#Method size_t readFromMemory(const void* buffer, size_t length)
-#In incomplete
+#In Utility
#Line # incomplete ##
Reads the rrect from the specified buffer.
@@ -1234,19 +1383,19 @@ and that value is guaranteed to always be a multiple of 4.
# ------------------------------------------------------------------------------
#Method bool transform(const SkMatrix& matrix, SkRRect* dst) const
-#In incomplete
-#Line # incomplete ##
+#In Inset_Outset_Offset
+#Line # scales and offsets into copy ##
-Transform by the specified matrix, and put the result in dst.
+Transforms by Round_Rect by matrix, storing result in dst.
+Returns true if Round_Rect transformed can be represented by another Round_Rect.
+Returns false if matrix contains transformations other than scale and translate.
-#Param matrix SkMatrix specifying the transform. Must only contain
- scale and/or translate, or this call will fail.
-##
-#Param dst SkRRect to store the result. It is an error to use this,
- which would make this function no longer const.
-##
+Asserts in debug builds if Round_Rect equals dst.
+
+#Param matrix SkMatrix specifying the transform ##
+#Param dst SkRRect to store the result ##
-#Return true on success, false on failure.
+#Return true if transformation succeeded.
##
#Example
@@ -1260,44 +1409,125 @@ Transform by the specified matrix, and put the result in dst.
# ------------------------------------------------------------------------------
#Method void dump(bool asHex) const
-#In incomplete
-#Line # incomplete ##
+#In Utility
+#Line # sends text representation to standard output ##
+Writes text representation of Round_Rect to standard output.
+Set asHex true to generate exact binary representations
+of floating point numbers.
-#Param asHex incomplete ##
+#Param asHex true if SkScalar values are written as hexadecimal ##
#Example
-// incomplete
-##
-
-#SeeAlso incomplete
+SkRRect rrect = SkRRect::MakeRect({6.f / 7, 2.f / 3, 6.f / 7, 2.f / 3});
+for (bool dumpAsHex : { false, true } ) {
+ rrect.dump(dumpAsHex);
+}
+#StdOut
+SkRect::MakeLTRB(0.857143f, 0.666667f, 0.857143f, 0.666667f);
+const SkPoint corners[] = {
+ { 0, 0 },
+ { 0, 0 },
+ { 0, 0 },
+ { 0, 0 },
+};
+SkRect::MakeLTRB(SkBits2Float(0x3f5b6db7), /* 0.857143 */
+ SkBits2Float(0x3f2aaaab), /* 0.666667 */
+ SkBits2Float(0x3f5b6db7), /* 0.857143 */
+ SkBits2Float(0x3f2aaaab) /* 0.666667 */);
+const SkPoint corners[] = {
+ { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
+ { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
+ { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
+ { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
+};
+##
+##
+
+#SeeAlso dumpHex SkRect::dump SkPath::dump SkPathMeasure::dump
#Method ##
# ------------------------------------------------------------------------------
#Method void dump() const
-#In incomplete
-#Line # incomplete ##
+#In Utility
+#Line # sends text representation using floats to standard output ##
+Writes text representation of Round_Rect to standard output. The representation
+may be directly compiled as C++ code. Floating point values are written
+with limited precision; it may not be possible to reconstruct original
+Round_Rect from output.
#Example
-// incomplete
+SkRRect rrect = SkRRect::MakeRect({6.f / 7, 2.f / 3, 6.f / 7, 2.f / 3});
+rrect.dump();
+SkRect bounds = SkRect::MakeLTRB(0.857143f, 0.666667f, 0.857143f, 0.666667f);
+const SkPoint corners[] = {
+ { 0, 0 },
+ { 0, 0 },
+ { 0, 0 },
+ { 0, 0 },
+};
+SkRRect copy;
+copy.setRectRadii(bounds, corners);
+SkDebugf("rrect is " "%s" "equal to copy\n", rrect == copy ? "" : "not ");
+#StdOut
+SkRect::MakeLTRB(0.857143f, 0.666667f, 0.857143f, 0.666667f);
+const SkPoint corners[] = {
+ { 0, 0 },
+ { 0, 0 },
+ { 0, 0 },
+ { 0, 0 },
+};
+rrect is not equal to copy
+##
##
-#SeeAlso incomplete
+#SeeAlso dumpHex SkRect::dump SkPath::dump SkPathMeasure::dump
#Method ##
# ------------------------------------------------------------------------------
#Method void dumpHex() const
-#In incomplete
-#Line # incomplete ##
+#In Utility
+#Line # sends text representation using hexadecimal to standard output ##
+Writes text representation of Round_Rect to standard output. The representation
+may be directly compiled as C++ code. Floating point values are written
+in hexadecimal to preserve their exact bit pattern. The output reconstructs the
+original Round_Rect.
#Example
-// incomplete
+SkRRect rrect = SkRRect::MakeRect({6.f / 7, 2.f / 3, 6.f / 7, 2.f / 3});
+rrect.dumpHex();
+SkRect bounds = SkRect::MakeLTRB(SkBits2Float(0x3f5b6db7), /* 0.857143 */
+ SkBits2Float(0x3f2aaaab), /* 0.666667 */
+ SkBits2Float(0x3f5b6db7), /* 0.857143 */
+ SkBits2Float(0x3f2aaaab) /* 0.666667 */);
+const SkPoint corners[] = {
+ { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
+ { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
+ { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
+ { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
+};
+SkRRect copy;
+copy.setRectRadii(bounds, corners);
+SkDebugf("rrect is " "%s" "equal to copy\n", rrect == copy ? "" : "not ");
+#StdOut
+SkRect::MakeLTRB(SkBits2Float(0x3f5b6db7), /* 0.857143 */
+ SkBits2Float(0x3f2aaaab), /* 0.666667 */
+ SkBits2Float(0x3f5b6db7), /* 0.857143 */
+ SkBits2Float(0x3f2aaaab) /* 0.666667 */);
+const SkPoint corners[] = {
+ { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
+ { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
+ { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
+ { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */
+};
+rrect is equal to copy
+##
##
-#SeeAlso incomplete
+#SeeAlso dump SkRect::dumpHex SkPath::dumpHex
#Method ##
diff --git a/docs/SkRect_Reference.bmh b/docs/SkRect_Reference.bmh
index cb0c1ed190..49eff9e873 100644
--- a/docs/SkRect_Reference.bmh
+++ b/docs/SkRect_Reference.bmh
@@ -1549,7 +1549,7 @@ rect: (30, 50, 40, 60) does not contain (29, 59)
##
##
-#SeeAlso SkIRect::contains
+#SeeAlso SkIRect::contains SkRRect::contains
##