aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--docs/SkImageInfo_Reference.bmh2
-rw-r--r--docs/SkRRect_Reference.bmh383
-rw-r--r--site/user/api/SkBlendMode_Reference.md2
-rw-r--r--site/user/api/SkImageInfo_Reference.md2
-rw-r--r--site/user/api/SkImage_Reference.md2
-rw-r--r--site/user/api/SkPaint_Reference.md6
-rw-r--r--site/user/api/SkPath_Reference.md2
-rw-r--r--site/user/api/SkRRect_Reference.md274
-rw-r--r--site/user/api/catalog.htm77
-rw-r--r--tools/bookmaker/bookmaker.cpp4
-rw-r--r--tools/bookmaker/includeParser.cpp4
-rw-r--r--tools/bookmaker/includeWriter.cpp4
12 files changed, 515 insertions, 247 deletions
diff --git a/docs/SkImageInfo_Reference.bmh b/docs/SkImageInfo_Reference.bmh
index c78f63b452..de866ee1e0 100644
--- a/docs/SkImageInfo_Reference.bmh
+++ b/docs/SkImageInfo_Reference.bmh
@@ -1132,7 +1132,7 @@ and green; and Color_Space, the range and linearity of colors.
#Method SkImageInfo()
#In Constructor
-#Line # creates with zero dimensions, kUnknown_SkColorType, kUnknown_SkAlphaType ##
+#Line # creates with zeroed dimensions, kUnknown_SkColorType, kUnknown_SkAlphaType ##
Creates an empty Image_Info with kUnknown_SkColorType, kUnknown_SkAlphaType,
a width and height of zero, and no Color_Space.
diff --git a/docs/SkRRect_Reference.bmh b/docs/SkRRect_Reference.bmh
index d6caebe166..67e61b44fa 100644
--- a/docs/SkRRect_Reference.bmh
+++ b/docs/SkRRect_Reference.bmh
@@ -53,62 +53,96 @@ If corner curves overlap, they are proportionally reduced to fit.
# ------------------------------------------------------------------------------
-#Method SkRRect() = default
+#Method SkRRect()
#In Constructor
-#Line # incomplete ##
+#Line # creates with zeroed bounds and corner radii ##
-Default initialized to a rrect at the origin with zero width and height.
+Initializes bounds at (0, 0), the origin, with zero width and height.
+Initializes corner radii to (0, 0), and sets type of kEmpty_Type.
-#Return incomplete ##
+#Return empty Round_Rect ##
#Example
-// incomplete
+#Height 60
+ SkRRect rrect;
+ SkPaint p;
+ p.setStyle(SkPaint::kStroke_Style);
+ p.setStrokeWidth(10);
+ canvas->drawRRect(rrect, p);
+ rrect.setRect({10, 10, 100, 50});
+ canvas->drawRRect(rrect, p);
##
-#SeeAlso incomplete
+#SeeAlso setEmpty isEmpty
#Method ##
# ------------------------------------------------------------------------------
-#Method SkRRect(const SkRRect& rrect) = default
+#Method SkRRect(const SkRRect& rrect)
#In Constructor
-#Line # incomplete ##
+#Line # copies bounds and corner radii ##
-#Param rrect incomplete ##
+Initializes to copy of rrect bounds and corner radii.
-#Return incomplete ##
+#Param rrect bounds and corner to copy ##
+
+#Return copy of rrect ##
+#Bug 8115
#Example
-// incomplete
+ SkRRect rrect = SkRRect::MakeRect({10, 10, 100, 50});
+ SkRRect rrect2(rrect);
+ rrect2.inset(20, 20);
+ SkPaint p;
+ p.setStyle(SkPaint::kStroke_Style);
+ p.setStrokeWidth(10);
+ canvas->drawRRect(rrect, p);
+ canvas->drawRRect(rrect2, p);
##
-#SeeAlso incomplete
+#SeeAlso operator=(const SkRRect& rrect) MakeRect
#Method ##
# ------------------------------------------------------------------------------
-#Method SkRRect& operator=(const SkRRect& rrect) = default
+#Method SkRRect& operator=(const SkRRect& rrect)
#In Operator
-#Line # incomplete ##
+#Line # copies bounds and corner radii ##
-#Param rrect incomplete ##
+Copies rrect bounds and corner radii.
-#Return incomplete ##
+#Param rrect bounds and corner to copy ##
+
+#Return copy of rrect ##
#Example
-// incomplete
+ SkRRect rrect = SkRRect::MakeRect({40, 40, 100, 70});
+ SkRRect rrect2 = rrect;
+ rrect2.inset(-20, -20);
+ SkPaint p;
+ p.setStyle(SkPaint::kStroke_Style);
+ p.setStrokeWidth(10);
+ canvas->drawRRect(rrect, p);
+ canvas->drawRRect(rrect2, p);
##
-#SeeAlso incomplete
+#SeeAlso SkRRect(const SkRRect& rrect) MakeRect
#Method ##
# ------------------------------------------------------------------------------
+#Subtopic Type
+#Line # specialization of Round_Rect geometry ##
+
+#PhraseDef list_of_rrect_types
+kEmpty_Type, kRect_Type, kOval_Type, kSimple_Type, kNinePatch_Type,
+kComplex_Type
+##
#Enum Type
-#Line # incomplete ##
+#Line # specialization of Round_Rect geometry ##
#Code
enum Type {
@@ -122,90 +156,141 @@ Default initialized to a rrect at the origin with zero width and height.
};
##
-Enum to capture the various possible subtypes of Round_Rect. Accessed
-by type(). The subtypes become progressively less restrictive.
+Type describes possible specializations of Round_Rect. Each Type is
+exclusive; a Round_Rect may only have one type.
+
+The enum members become progressively less restrictive; larger values of
+Type have more degrees of freedom than smaller values.
#Const kEmpty_Type
-#Line # incomplete ##
+#Line # zero width or height ##
Round_Rect has zero width or height. All radii are zero.
##
#Const kRect_Type
-#Line # incomplete ##
+#Line # non-zero width and height, and zeroed radii ##
Round_Rect has width and height. All radii are zero.
##
#Const kOval_Type
-#Line # incomplete ##
+#Line # non-zero width and height filled with radii ##
Round_Rect has width and height. All four x-radii are equal,
and at least half the width. All four y-radii are equal,
and at least half the height.
##
#Const kSimple_Type
-#Line # incomplete ##
+#Line # non-zero width and height with equal radii ##
Round_Rect has width and height. All four x-radii are equal and
greater than zero, and all four y-radii are equal and greater than
zero. Either x-radii are less than half the width, or y-radii is
less than half the height, or both.
##
#Const kNinePatch_Type
-#Line # incomplete ##
+#Line # non-zero width and height with axis-aligned radii ##
Round_Rect has width and height. Left x-radii are equal, top
y-radii are equal, right x-radii are equal, and bottom y-radii
-are equal. The radii do not descript a rect, oval, or simple type.
+are equal. The radii do not describe a rect, oval, or simple type.
The centers of the corner ellipses form an axis-aligned rectangle
that divides the Round_Rect into nine rectangular patches; an
interior rectangle, four edges, and four corners.
##
#Const kComplex_Type
-#Line # incomplete ##
+#Line # non-zero width and height with arbitrary radii ##
both radii are non-zero.
##
#Const kLastType = kComplex_Type
-#Line # incomplete ##
+#Line # largest Type value ##
##
#Example
-// incomplete
+#Height 128
+ struct Radii { SkVector data[4]; };
+ auto drawRRectType = [=](const SkRect& rect, const Radii& radii) {
+ SkRRect rrect;
+ rrect.setRectRadii(rect, radii.data);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ const char* typeStr[] = { "empty", "rect", "oval", "simple", "nine patch", "complex" };
+ paint.setTextAlign(SkPaint::kCenter_Align);
+ canvas->drawString(typeStr[(int) rrect.type()], rect.centerX(), rect.bottom() + 20, paint);
+ paint.setStyle(SkPaint::kStroke_Style);
+ canvas->drawRRect(rrect, paint);
+ };
+ drawRRectType({ 45, 30, 45, 30}, {{{ 5, 5}, { 5, 5}, { 5, 5}, { 5, 5}}});
+ drawRRectType({ 90, 10, 140, 30}, {{{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}}});
+ drawRRectType({160, 10, 210, 30}, {{{25, 10}, {25, 10}, {25, 10}, {25, 10}}});
+ drawRRectType({ 20, 80, 70, 100}, {{{ 5, 5}, { 5, 5}, { 5, 5}, { 5, 5}}});
+ drawRRectType({ 90, 80, 140, 100}, {{{ 5, 5}, {10, 5}, {10, 5}, { 5, 5}}});
+ drawRRectType({160, 80, 210, 100}, {{{ 5, 5}, {10, 5}, { 5, 5}, { 5, 5}}});
##
-#SeeAlso incomplete
+#SeeAlso Rect Path
#Enum ##
# ------------------------------------------------------------------------------
#Method Type getType() const
-#In incomplete
-#Line # incomplete ##
+#In Property
+#Line # returns Type ##
-Returns the RR's sub type.
+Returns Type, one of: #list_of_rrect_types#.
-#Return incomplete ##
+#Return Type ##
#Example
-// incomplete
+#Description
+rrect2 is not a Rect; inset() has made it empty.
+##
+ SkRRect rrect = SkRRect::MakeRect({10, 10, 100, 50});
+ SkRRect rrect2(rrect);
+ rrect2.inset(20, 20);
+ SkPaint p;
+ p.setStyle(SkPaint::kStroke_Style);
+ p.setStrokeWidth(10);
+ std::string str("Type ");
+ str += SkRRect::kRect_Type == rrect2.getType() ? "=" : "!";
+ str += "= SkRRect::kRect_Type";
+ canvas->drawString(str.c_str(), 20, 80, SkPaint());
+ canvas->drawRRect(rrect2, p);
##
-#SeeAlso incomplete
+#SeeAlso Type type
#Method ##
# ------------------------------------------------------------------------------
#Method Type type() const
-#In incomplete
-#Line # incomplete ##
+#In Property
+#Line # returns Type ##
-#Return incomplete ##
+Returns Type, one of: #list_of_rrect_types#.
+
+#Return Type ##
#Example
-// incomplete
+#Description
+inset() has made rrect2 empty.
+##
+ SkRRect rrect = SkRRect::MakeRect({10, 10, 100, 50});
+ SkRRect rrect2(rrect);
+ rrect2.inset(20, 20);
+ SkPaint p;
+ p.setStyle(SkPaint::kStroke_Style);
+ p.setStrokeWidth(10);
+ std::string str("Type ");
+ str += SkRRect::kEmpty_Type == rrect2.type() ? "=" : "!";
+ str += "= SkRRect::kEmpty_Type";
+ canvas->drawString(str.c_str(), 20, 80, SkPaint());
+ canvas->drawRRect(rrect2, p);
##
-#SeeAlso incomplete
+#SeeAlso Type getType
#Method ##
+#Subtopic Type ##
+
# ------------------------------------------------------------------------------
#Method inline bool isEmpty() const
@@ -533,6 +618,7 @@ otherwise, sets type to kEmpty_Type.
#Param rect bounds to set ##
#Example
+#Height 90
SkPaint paint;
SkRRect rrect = SkRRect::MakeRect({30, 10, 100, 60});
canvas->drawRRect(rrect, paint);
@@ -549,17 +635,29 @@ otherwise, sets type to kEmpty_Type.
#Method static SkRRect MakeEmpty()
#In Constructor
-#Line # incomplete ##
+#Line # creates with zeroed bounds and corner radii ##
-Makes an empty rrect at the origin with zero width and height.
+Initializes bounds at (0, 0), the origin, with zero width and height.
+Initializes corner radii to (0, 0), and sets type of kEmpty_Type.
-#Return incomplete ##
+#Return empty Round_Rect ##
#Example
-// incomplete
-##
-
-#SeeAlso incomplete
+#Height 90
+ SkRRect rrect = SkRRect::MakeEmpty();
+ SkRRect rrect2(rrect);
+ rrect2.inset(-20, -20);
+ SkPaint p;
+ p.setStyle(SkPaint::kStroke_Style);
+ p.setStrokeWidth(10);
+ std::string str("Type ");
+ str += SkRRect::kEmpty_Type == rrect2.type() ? "=" : "!";
+ str += "= SkRRect::kEmpty_Type";
+ canvas->drawString(str.c_str(), 20, 80, SkPaint());
+ canvas->drawRRect(rrect2, p);
+##
+
+#SeeAlso SkRRect() SkRect::MakeEmpty
#Method ##
@@ -567,94 +665,147 @@ Makes an empty rrect at the origin with zero width and height.
#Method static SkRRect MakeRect(const SkRect& r)
#In Constructor
-#Line # incomplete ##
+#Line # copies bounds and zeroes corner radii ##
-#Param r incomplete ##
+Initializes to copy of r bounds and zeroes corner radii.
-#Return incomplete ##
+#Param r bounds to copy ##
+
+#Return copy of r ##
#Example
-// incomplete
+#Height 70
+ SkPaint paint;
+ SkRRect rrect = SkRRect::MakeRect({30, 10, 100, 60});
+ canvas->drawRRect(rrect, paint);
+ rrect.setOval(rrect.getBounds());
+ paint.setColor(SK_ColorBLUE);
+ canvas->drawRRect(rrect, paint);
##
-#SeeAlso incomplete
+#SeeAlso setRect MakeOval MakeRectXY
#Method ##
# ------------------------------------------------------------------------------
#Method static SkRRect MakeOval(const SkRect& oval)
-#In incomplete
-#Line # incomplete ##
+#In Constructor
+#Line # creates Oval to fit bounds ##
-#Param oval incomplete ##
+Sets bounds to oval, x-axis radii to half oval.width(), and all y-axis radii
+to half oval.height(). If rect is empty, sets to kEmpty_Type.
+Otherwise, sets to kOval_Type.
-#Return incomplete ##
+#Param oval bounds of Oval ##
+
+#Return Oval ##
#Example
-// incomplete
+#Height 70
+ SkPaint paint;
+ SkRRect rrect = SkRRect::MakeOval({30, 10, 100, 60});
+ canvas->drawRRect(rrect, paint);
+ rrect.setRect(rrect.getBounds());
+ paint.setColor(SK_ColorBLUE);
+ paint.setBlendMode(SkBlendMode::kDifference);
+ canvas->drawRRect(rrect, paint);
##
-#SeeAlso incomplete
+#SeeAlso setOval MakeRect MakeRectXY
#Method ##
# ------------------------------------------------------------------------------
#Method static SkRRect MakeRectXY(const SkRect& rect, SkScalar xRad, SkScalar yRad)
-#In incomplete
-#Line # incomplete ##
+#In Constructor
+#Line # creates rounded rectangle ##
-#Param rect incomplete ##
-#Param xRad incomplete ##
-#Param yRad incomplete ##
+Sets to rounded rectangle with the same radii for all four corners.
+If rect is empty, sets to kEmpty_Type.
+Otherwise, if xRad and yRad are zero, sets to kRect_Type.
+Otherwise, if xRad is at least half rect.width() and yRad is at least half
+rect.height(), sets to kOval_Type.
+Otherwise, sets to kSimple_Type.
-#Return incomplete ##
+#Param rect bounds of rounded rectangle ##
+#Param xRad x-axis radius of corners ##
+#Param yRad y-axis radius of corners ##
+
+#Return rounded rectangle ##
#Example
-// incomplete
+#Height 70
+ SkPaint paint;
+ SkRRect rrect = SkRRect::MakeRectXY({30, 10, 100, 60}, 20, 20);
+ canvas->drawRRect(rrect, paint);
+ rrect.setRect(rrect.getBounds());
+ paint.setColor(SK_ColorBLUE);
+ paint.setBlendMode(SkBlendMode::kModulate);
+ canvas->drawRRect(rrect, paint);
##
-#SeeAlso incomplete
+#SeeAlso setRectXY
#Method ##
# ------------------------------------------------------------------------------
#Method void setOval(const SkRect& oval)
-#In incomplete
-#Line # incomplete ##
+#In Set
+#Line # replaces with Oval to fit bounds ##
-Sets Round_Rect to match the supplied oval. All x-radii will equal half the
-width and all y-radii will equal half the height.
+Sets bounds to oval, x-axis radii to half oval.width(), and all y-axis radii
+to half oval.height(). If rect is empty, sets to kEmpty_Type.
+Otherwise, sets to kOval_Type.
-#Param oval incomplete ##
+#Param oval bounds of Oval ##
#Example
-// incomplete
+#Height 70
+ SkPaint paint;
+ SkRRect rrect = SkRRect::MakeRectXY({30, 10, 100, 60}, 20, 20);
+ canvas->drawRRect(rrect, paint);
+ rrect.setOval(rrect.getBounds());
+ paint.setColor(SK_ColorWHITE);
+ paint.setBlendMode(SkBlendMode::kExclusion);
+ canvas->drawRRect(rrect, paint);
##
-#SeeAlso incomplete
+#SeeAlso MakeOval
#Method ##
# ------------------------------------------------------------------------------
#Method void setRectXY(const SkRect& rect, SkScalar xRad, SkScalar yRad)
-#In incomplete
-#Line # incomplete ##
+#In Set
+#Line # replaces with rounded rectangle ##
-Initializes Round_Rect with the same radii for all four corners.
+Sets to rounded rectangle with the same radii for all four corners.
+If rect is empty, sets to kEmpty_Type.
+Otherwise, if xRad or yRad is zero, sets to kRect_Type.
+Otherwise, if xRad is at least half rect.width() and yRad is at least half
+rect.height(), sets to kOval_Type.
+Otherwise, sets to kSimple_Type.
-#Param rect incomplete ##
-#Param xRad incomplete ##
-#Param yRad incomplete ##
+#Param rect bounds of rounded rectangle ##
+#Param xRad x-axis radius of corners ##
+#Param yRad y-axis radius of corners ##
#Example
-// incomplete
+#Height 70
+ SkPaint paint;
+ SkRRect rrect = SkRRect::MakeRectXY({30, 10, 100, 60}, 20, 20);
+ canvas->drawRRect(rrect, paint);
+ rrect.setRectXY(rrect.getBounds(), 5, 5);
+ paint.setColor(SK_ColorWHITE);
+ paint.setBlendMode(SkBlendMode::kExclusion);
+ canvas->drawRRect(rrect, paint);
##
-#SeeAlso incomplete
+#SeeAlso MakeRectXY SkPath::addRoundRect
#Method ##
@@ -662,41 +813,75 @@ Initializes Round_Rect with the same radii for all four corners.
#Method void setNinePatch(const SkRect& rect, SkScalar leftRad, SkScalar topRad,
SkScalar rightRad, SkScalar bottomRad)
-#In incomplete
-#Line # incomplete ##
+#In Set
+#Line # replaces with rounded rectangle ##
-Initializes Round_Rect with one radius per-side.
+Sets bounds to rect. Sets radii to (leftRad, topRad), (rightRad, topRad),
+(rightRad, bottomRad), (leftRad, bottomRad).
-#Param rect incomplete ##
-#Param leftRad incomplete ##
-#Param topRad incomplete ##
-#Param rightRad incomplete ##
-#Param bottomRad incomplete ##
+If rect is empty, sets to kEmpty_Type.
+Otherwise, if leftRad and rightRad are zero, sets to kRect_Type.
+Otherwise, if topRad and bottomRad are zero, sets to kRect_Type.
+Otherwise, if leftRad and rightRad are equal and at least half rect.width(), and
+topRad and bottomRad are equal at least half rect.height(), sets to kOval_Type.
+Otherwise, if leftRad and rightRad are equal, and topRad and bottomRad are equal,
+sets to kSimple_Type. Otherwise, sets to kNinePatch_Type.
+
+Nine patch refers to the nine parts defined by the radii: one center rectangle,
+four edge patches, and four corner patches.
+
+#Param rect bounds of rounded rectangle ##
+#Param leftRad left-top and left-bottom x-axis radius ##
+#Param topRad left-top and right-top y-axis radius ##
+#Param rightRad right-top and right-bottom x-axis radius ##
+#Param bottomRad left-bottom and right-bottom y-axis radius ##
#Example
-// incomplete
+#Height 70
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ SkRRect rrect;
+ rrect.setNinePatch({30, 10, 100, 60}, 10, 20, 20, 10);
+ 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 setRectRadii
#Method ##
# ------------------------------------------------------------------------------
#Method void setRectRadii(const SkRect& rect, const SkVector radii[4])
-#In incomplete
-#Line # incomplete ##
+#In Set
+#Line # replaces with rounded rectangle ##
-Initializes Round_Rect with potentially different radii for all four corners.
+Sets bounds to rect. Sets radii array for individual control of all for corners.
-#Param rect incomplete ##
-#Param radii incomplete ##
+If rect is empty, sets to kEmpty_Type.
+Otherwise, if one of each corner radii are zero, sets to kRect_Type.
+Otherwise, if all x-axis radii are equal and at least half rect.width(), and
+all y-axis radii are equal at least half rect.height(), sets to kOval_Type.
+Otherwise, if all x-axis radii are equal, and all y-axis radii are equal,
+sets to kSimple_Type. Otherwise, sets to kNinePatch_Type.
+
+#Param rect bounds of rounded rectangle ##
+#Param radii corner x-axis and y-axis radii ##
#Example
// incomplete
##
-#SeeAlso incomplete
+#SeeAlso setNinePatch SkPath::addRoundRect
#Method ##
diff --git a/site/user/api/SkBlendMode_Reference.md b/site/user/api/SkBlendMode_Reference.md
index 31fb82911b..d1bb465851 100644
--- a/site/user/api/SkBlendMode_Reference.md
+++ b/site/user/api/SkBlendMode_Reference.md
@@ -657,7 +657,7 @@ drawing source with destination opacity.
### Example
-<div><fiddle-embed name="3979c865bb482e6ef1fafc71e56bbb91"></fiddle-embed></div>
+<div><fiddle-embed name="b0833c18fe8b0eeaab9bd6d2160d272f"></fiddle-embed></div>
## <a name='Dst_In'>Dst In</a>
diff --git a/site/user/api/SkImageInfo_Reference.md b/site/user/api/SkImageInfo_Reference.md
index 743907ff54..0edfe5baf5 100644
--- a/site/user/api/SkImageInfo_Reference.md
+++ b/site/user/api/SkImageInfo_Reference.md
@@ -1284,7 +1284,7 @@ SkImageInfo can be constructed or initialized by these functions, including C++
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkImageInfo_empty_constructor'>SkImageInfo()</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates with zero dimensions, <a href='#kUnknown_SkColorType'>kUnknown_SkColorType</a>, <a href='#kUnknown_SkAlphaType'>kUnknown_SkAlphaType</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates with zeroed dimensions, <a href='#kUnknown_SkColorType'>kUnknown_SkColorType</a>, <a href='#kUnknown_SkAlphaType'>kUnknown_SkAlphaType</a></td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkImageInfo_makeAlphaType'>makeAlphaType</a></td>
diff --git a/site/user/api/SkImage_Reference.md b/site/user/api/SkImage_Reference.md
index e7e0f53189..eec6966d98 100644
--- a/site/user/api/SkImage_Reference.md
+++ b/site/user/api/SkImage_Reference.md
@@ -2300,7 +2300,7 @@ partial or full <a href='#Image'>Image</a>, or nullptr
### Example
-<div><fiddle-embed name="e100c543869fe8fd516ba69de79444ba"></fiddle-embed></div>
+<div><fiddle-embed name="93669037c9eb9d142e7776b9f936fa96"></fiddle-embed></div>
### See Also
diff --git a/site/user/api/SkPaint_Reference.md b/site/user/api/SkPaint_Reference.md
index 24c4f5d368..1bff17da88 100644
--- a/site/user/api/SkPaint_Reference.md
+++ b/site/user/api/SkPaint_Reference.md
@@ -3612,7 +3612,7 @@ Increments <a href='#SkPaint_setShader_shader'>shader</a> <a href='undocumented#
### Example
-<div><fiddle-embed name="4590fbf052659d6e629fbfd827081ae5"></fiddle-embed></div>
+<div><fiddle-embed name="77e64d5bae9b1ba037fd99252bb4aa58"></fiddle-embed></div>
---
@@ -3707,7 +3707,7 @@ Increments filter <a href='undocumented#Reference_Count'>Reference Count</a> by
### Example
-<div><fiddle-embed name="3979c865bb482e6ef1fafc71e56bbb91"></fiddle-embed></div>
+<div><fiddle-embed name="c7b786dc9b3501cd0eaba47494b6fa31"></fiddle-embed></div>
---
@@ -4018,7 +4018,7 @@ implementation.
### Example
-<div><fiddle-embed name="3979c865bb482e6ef1fafc71e56bbb91"></fiddle-embed></div>
+<div><fiddle-embed name="1a7a5062725139760962582f599f1b97"></fiddle-embed></div>
<a name='SkPaint_getTypeface'></a>
## getTypeface
diff --git a/site/user/api/SkPath_Reference.md b/site/user/api/SkPath_Reference.md
index b7796f1662..f213448922 100644
--- a/site/user/api/SkPath_Reference.md
+++ b/site/user/api/SkPath_Reference.md
@@ -5665,7 +5665,7 @@ non-zero, globally unique value
### Example
-<div><fiddle-embed name="3979c865bb482e6ef1fafc71e56bbb91">
+<div><fiddle-embed name="a0f166715d6479f91258d854e63e586d">
#### Example Output
diff --git a/site/user/api/SkRRect_Reference.md b/site/user/api/SkRRect_Reference.md
index 077838975e..c72c227aca 100644
--- a/site/user/api/SkRRect_Reference.md
+++ b/site/user/api/SkRRect_Reference.md
@@ -18,19 +18,19 @@ SkRRect related constants are defined by <code>enum</code>, <code>enum class</co
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_Type'>Type</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>specialization of <a href='#RRect'>Round Rect</a> geometry</td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kComplex_Type'>kComplex Type</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>non-zero width and height with arbitrary radii</td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kEmpty_Type'>kEmpty Type</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>zero width or height</td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kLastType'>kLastType</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>largest <a href='#SkRRect_Type'>Type</a> value</td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kLowerLeft_Corner'>kLowerLeft Corner</a></td>
@@ -42,19 +42,19 @@ SkRRect related constants are defined by <code>enum</code>, <code>enum class</co
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kNinePatch_Type'>kNinePatch Type</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>non-zero width and height with axis-aligned radii</td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kOval_Type'>kOval Type</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>non-zero width and height filled with radii</td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kRect_Type'>kRect Type</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>non-zero width and height, and zeroed radii</td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kSimple_Type'>kSimple Type</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>non-zero width and height with equal radii</td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_kSizeInMemory'>kSizeInMemory</a></td>
@@ -70,6 +70,19 @@ SkRRect related constants are defined by <code>enum</code>, <code>enum class</co
</tr>
</table>
+## <a name='Related_Function'>Related_Function</a>
+
+
+SkRRect global, <code>struct</code>, and <code>class</code> related member functions share a topic.
+<table style='border-collapse: collapse; width: 62.5em'>
+ <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Topic</th>
+<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_Type'>Type</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>specialization of <a href='#RRect'>Round Rect</a> geometry</td>
+ </tr>
+</table>
+
The <a href='#SkRRect'>SkRRect</a> class represents a rounded rect with a potentially different
radii for each corner. It does not have a constructor so must be
initialized with one of the initialization functions (e.g., <a href='#SkRRect_setEmpty'>setEmpty</a>,
@@ -104,6 +117,10 @@ If corner curves overlap, they are proportionally reduced to fit.
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#Operator'>Operators</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>operator overloading methods</td>
</tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#Related_Function'>Related Functions</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>similar member functions grouped together</td>
+ </tr>
</table>
@@ -116,27 +133,27 @@ SkRRect can be constructed or initialized by these functions, including C++ clas
<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeEmpty'>MakeEmpty</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates with zeroed bounds and corner radii</td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeOval'>MakeOval</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates <a href='undocumented#Oval'>Oval</a> to fit bounds</td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeRect'>MakeRect</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>copies bounds and zeroes corner radii</td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeRectXY'>MakeRectXY</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates rounded rectangle</td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_empty_constructor'>SkRRect()</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates with zeroed bounds and corner radii</td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_copy_const_SkRRect'>SkRRect(const SkRRect& rrect)</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>copies bounds and corner radii</td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_makeOffset'>makeOffset</a></td>
@@ -157,7 +174,7 @@ SkRRect operators inline class member functions with arithmetic equivalents.
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_copy_operator'>operator=(const SkRRect& rrect)</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>copies bounds and corner radii</td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_equal_operator'>operator==(const SkRRect& a, const SkRRect& b)</a></td>
@@ -174,19 +191,19 @@ SkRRect member functions read and modify the structure properties.
<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeEmpty'>MakeEmpty</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates with zeroed bounds and corner radii</td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeOval'>MakeOval</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates <a href='undocumented#Oval'>Oval</a> to fit bounds</td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeRect'>MakeRect</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>copies bounds and zeroes corner radii</td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_MakeRectXY'>MakeRectXY</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>creates rounded rectangle</td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_contains'>contains</a></td>
@@ -210,7 +227,7 @@ SkRRect member functions read and modify the structure properties.
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_getType'>getType</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='#SkRRect_Type'>Type</a></td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_height'>height</a></td>
@@ -278,11 +295,11 @@ SkRRect member functions read and modify the structure properties.
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_setNinePatch'>setNinePatch</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>replaces with rounded rectangle</td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_setOval'>setOval</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>replaces with <a href='undocumented#Oval'>Oval</a> to fit bounds</td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_setRect'>setRect</a></td>
@@ -290,11 +307,11 @@ SkRRect member functions read and modify the structure properties.
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_setRectRadii'>setRectRadii</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>replaces with rounded rectangle</td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_setRectXY'>setRectXY</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>replaces with rounded rectangle</td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_transform'>transform</a></td>
@@ -302,7 +319,7 @@ SkRRect member functions read and modify the structure properties.
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_type'>type</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>incomplete</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='#SkRRect_Type'>Type</a></td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRRect_width'>width</a></td>
@@ -318,22 +335,23 @@ SkRRect member functions read and modify the structure properties.
## SkRRect
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-<a href='#SkRRect'>SkRRect</a>() = default
+<a href='#SkRRect'>SkRRect</a>()
</pre>
-Default initialized to a rrect at the origin with zero width and height.
+Initializes bounds at (0, 0), the origin, with zero width and height.
+Initializes corner radii to (0, 0), and sets type of <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
### Return Value
-incomplete
+empty <a href='#RRect'>Round Rect</a>
### Example
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
+<div><fiddle-embed name="471e7aad0feaf9ec3a21757a317a64f5"></fiddle-embed></div>
### See Also
-incomplete
+<a href='#SkRRect_setEmpty'>setEmpty</a> <a href='#SkRRect_isEmpty'>isEmpty</a>
---
@@ -341,27 +359,29 @@ incomplete
## SkRRect
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-<a href='#SkRRect'>SkRRect</a>(const <a href='#SkRRect'>SkRRect</a>& rrect) = default
+<a href='#SkRRect'>SkRRect</a>(const <a href='#SkRRect'>SkRRect</a>& rrect)
</pre>
+Initializes to copy of <a href='#SkRRect_copy_const_SkRRect_rrect'>rrect</a> bounds and corner radii.
+
### Parameters
<table> <tr> <td><a name='SkRRect_copy_const_SkRRect_rrect'><code><strong>rrect</strong></code></a></td>
- <td>incomplete</td>
+ <td>bounds and corner to copy</td>
</tr>
</table>
### Return Value
-incomplete
+copy of <a href='#SkRRect_copy_const_SkRRect_rrect'>rrect</a>
### Example
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
+<div><fiddle-embed name="9be9adb06c26dac75a5a5a7c1ceca681"></fiddle-embed></div>
### See Also
-incomplete
+<a href='#SkRRect_copy_operator'>operator=(const SkRRect& rrect)</a> <a href='#SkRRect_MakeRect'>MakeRect</a>
---
@@ -369,30 +389,34 @@ incomplete
## operator=
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-<a href='#SkRRect'>SkRRect</a>& <a href='#SkRRect_copy_operator'>operator=(const SkRRect& rrect)</a> = default
+<a href='#SkRRect'>SkRRect</a>& <a href='#SkRRect_copy_operator'>operator=(const SkRRect& rrect)</a>
</pre>
+Copies <a href='#SkRRect_copy_operator_rrect'>rrect</a> bounds and corner radii.
+
### Parameters
<table> <tr> <td><a name='SkRRect_copy_operator_rrect'><code><strong>rrect</strong></code></a></td>
- <td>incomplete</td>
+ <td>bounds and corner to copy</td>
</tr>
</table>
### Return Value
-incomplete
+copy of <a href='#SkRRect_copy_operator_rrect'>rrect</a>
### Example
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
+<div><fiddle-embed name="94c298c404fff922ec53a3d7567852a2"></fiddle-embed></div>
### See Also
-incomplete
+<a href='#SkRRect_copy_const_SkRRect'>SkRRect(const SkRRect& rrect)</a> <a href='#SkRRect_MakeRect'>MakeRect</a>
---
+## <a name='Type'>Type</a>
+
## <a name='SkRRect_Type'>Enum SkRRect::Type</a>
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
@@ -407,8 +431,11 @@ incomplete
};
</pre>
-Enum to capture the various possible subtypes of <a href='#RRect'>Round Rect</a>. Accessed
-by <a href='#SkRRect_type'>type</a>. The subtypes become progressively less restrictive.
+<a href='#SkRRect_Type'>Type</a> describes possible specializations of <a href='#RRect'>Round Rect</a>. Each <a href='#SkRRect_Type'>Type</a> is
+exclusive; a <a href='#RRect'>Round Rect</a> may only have one type.
+
+The enum members become progressively less restrictive; larger values of
+<a href='#SkRRect_Type'>Type</a> have more degrees of freedom than smaller values.
### Constants
@@ -418,21 +445,21 @@ by <a href='#SkRRect_type'>type</a>. The subtypes become progressively less rest
<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kEmpty_Type'><code>SkRRect::kEmpty_Type</code></a></td>
- <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # incomplete ##</td>
+ <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # zero width or height ##</td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
<a href='#RRect'>Round Rect</a> has zero width or height. All radii are zero.
</td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kRect_Type'><code>SkRRect::kRect_Type</code></a></td>
- <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # incomplete ##</td>
+ <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # non-zero width and height, and zeroed radii ##</td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
<a href='#RRect'>Round Rect</a> has width and height. All radii are zero.
</td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kOval_Type'><code>SkRRect::kOval_Type</code></a></td>
- <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # incomplete ##</td>
+ <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # non-zero width and height filled with radii ##</td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
<a href='#RRect'>Round Rect</a> has width and height. All four x-radii are equal,
and at least half the width. All four y-radii are equal,
@@ -441,7 +468,7 @@ and at least half the height.
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kSimple_Type'><code>SkRRect::kSimple_Type</code></a></td>
- <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # incomplete ##</td>
+ <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # non-zero width and height with equal radii ##</td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
<a href='#RRect'>Round Rect</a> has width and height. All four x-radii are equal and
greater than zero, and all four y-radii are equal and greater than
@@ -451,11 +478,11 @@ less than half the height, or both.
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kNinePatch_Type'><code>SkRRect::kNinePatch_Type</code></a></td>
- <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # incomplete ##</td>
+ <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # non-zero width and height with axis-aligned radii ##</td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
<a href='#RRect'>Round Rect</a> has width and height. Left x-radii are equal, top
y-radii are equal, right x-radii are equal, and bottom y-radii
-are equal. The radii do not descript a rect, oval, or simple type.
+are equal. The radii do not describe a rect, oval, or simple type.
The centers of the corner ellipses form an axis-aligned rectangle
that divides the <a href='#RRect'>Round Rect</a> into nine rectangular patches; an
@@ -464,7 +491,7 @@ interior rectangle, four edges, and four corners.
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kComplex_Type'><code>SkRRect::kComplex_Type</code></a></td>
- <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # incomplete ##</td>
+ <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>#Line # non-zero width and height with arbitrary radii ##</td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
both radii are non-zero.
</td>
@@ -473,17 +500,17 @@ both radii are non-zero.
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRRect_kLastType'><code>SkRRect::kLastType</code></a></td>
<td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>= kComplex_Type</td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
-incomplete</td>
+largest Type value</td>
</tr>
</table>
### Example
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
+<div><fiddle-embed name="38a559936ea7c8d482098c189ee5c9b8"></fiddle-embed></div>
### See Also
-incomplete
+<a href='SkRect_Reference#Rect'>Rect</a> <a href='SkPath_Reference#Path'>Path</a>
<a name='SkRRect_getType'></a>
## getType
@@ -492,19 +519,21 @@ incomplete
<a href='#SkRRect_Type'>Type</a> <a href='#SkRRect_getType'>getType</a>() const
</pre>
-Returns the RR's sub type.
+Returns <a href='#SkRRect_Type'>Type</a>, one of: <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>, <a href='#SkRRect_kRect_Type'>kRect Type</a>, <a href='#SkRRect_kOval_Type'>kOval Type</a>, <a href='#SkRRect_kSimple_Type'>kSimple Type</a>, <a href='#SkRRect_kNinePatch_Type'>kNinePatch Type</a>,
+<a href='#SkRRect_kComplex_Type'>kComplex Type</a>.
### Return Value
-incomplete
+<a href='#SkRRect_Type'>Type</a>
### Example
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
+<div><fiddle-embed name="53634cc0794c0fa6c0c2b3ac4cc69490"><div>rrect2 is not a <a href='SkRect_Reference#Rect'>Rect</a>; <a href='#SkRRect_inset'>inset</a> has made it empty.
+</div></fiddle-embed></div>
### See Also
-incomplete
+<a href='#SkRRect_Type'>Type</a> <a href='#SkRRect_type'>type</a>
---
@@ -515,17 +544,21 @@ incomplete
<a href='#SkRRect_Type'>Type</a> <a href='#SkRRect_type'>type</a>() const
</pre>
+Returns <a href='#SkRRect_Type'>Type</a>, one of: <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>, <a href='#SkRRect_kRect_Type'>kRect Type</a>, <a href='#SkRRect_kOval_Type'>kOval Type</a>, <a href='#SkRRect_kSimple_Type'>kSimple Type</a>, <a href='#SkRRect_kNinePatch_Type'>kNinePatch Type</a>,
+<a href='#SkRRect_kComplex_Type'>kComplex Type</a>.
+
### Return Value
-incomplete
+<a href='#SkRRect_Type'>Type</a>
### Example
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
+<div><fiddle-embed name="02b03d651c4b5d18018c6f75fa88b8ce"><div><a href='#SkRRect_inset'>inset</a> has made rrect2 empty.
+</div></fiddle-embed></div>
### See Also
-incomplete
+<a href='#SkRRect_Type'>Type</a> <a href='#SkRRect_getType'>getType</a>
---
@@ -817,7 +850,7 @@ otherwise, sets type to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
### Example
-<div><fiddle-embed name="fc97ef7310473b9ba6dc7202efbebb3b"></fiddle-embed></div>
+<div><fiddle-embed name="3afc3ac9bebd1d7387822cc608571e82"></fiddle-embed></div>
### See Also
@@ -832,19 +865,20 @@ otherwise, sets type to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
static <a href='#SkRRect'>SkRRect</a> <a href='#SkRRect_MakeEmpty'>MakeEmpty</a>()
</pre>
-Makes an empty rrect at the origin with zero width and height.
+Initializes bounds at (0, 0), the origin, with zero width and height.
+Initializes corner radii to (0, 0), and sets type of <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
### Return Value
-incomplete
+empty <a href='#RRect'>Round Rect</a>
### Example
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
+<div><fiddle-embed name="c6c6be3b3c137226adbb5b5af9203d27"></fiddle-embed></div>
### See Also
-incomplete
+<a href='#SkRRect_empty_constructor'>SkRRect()</a> <a href='SkRect_Reference#SkRect_MakeEmpty'>SkRect::MakeEmpty</a>
---
@@ -855,24 +889,26 @@ incomplete
static <a href='#SkRRect'>SkRRect</a> <a href='#SkRRect_MakeRect'>MakeRect</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& r)
</pre>
+Initializes to copy of <a href='#SkRRect_MakeRect_r'>r</a> bounds and zeroes corner radii.
+
### Parameters
<table> <tr> <td><a name='SkRRect_MakeRect_r'><code><strong>r</strong></code></a></td>
- <td>incomplete</td>
+ <td>bounds to copy</td>
</tr>
</table>
### Return Value
-incomplete
+copy of <a href='#SkRRect_MakeRect_r'>r</a>
### Example
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
+<div><fiddle-embed name="5295b07fe4d2cdcd077979a9e19854d9"></fiddle-embed></div>
### See Also
-incomplete
+<a href='#SkRRect_setRect'>setRect</a> <a href='#SkRRect_MakeOval'>MakeOval</a> <a href='#SkRRect_MakeRectXY'>MakeRectXY</a>
---
@@ -883,24 +919,28 @@ incomplete
static <a href='#SkRRect'>SkRRect</a> <a href='#SkRRect_MakeOval'>MakeOval</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& oval)
</pre>
+Sets bounds to <a href='#SkRRect_MakeOval_oval'>oval</a>, x-axis radii to half <a href='#SkRRect_MakeOval_oval'>oval</a>.<a href='#SkRRect_width'>width</a>, and all y-axis radii
+to half <a href='#SkRRect_MakeOval_oval'>oval</a>.<a href='#SkRRect_height'>height</a>. If rect is empty, sets to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
+Otherwise, sets to <a href='#SkRRect_kOval_Type'>kOval Type</a>.
+
### Parameters
<table> <tr> <td><a name='SkRRect_MakeOval_oval'><code><strong>oval</strong></code></a></td>
- <td>incomplete</td>
+ <td>bounds of <a href='undocumented#Oval'>Oval</a></td>
</tr>
</table>
### Return Value
-incomplete
+<a href='undocumented#Oval'>Oval</a>
### Example
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
+<div><fiddle-embed name="0b99ee38fd154f769f6031242e02fa7a"></fiddle-embed></div>
### See Also
-incomplete
+<a href='#SkRRect_setOval'>setOval</a> <a href='#SkRRect_MakeRect'>MakeRect</a> <a href='#SkRRect_MakeRectXY'>MakeRectXY</a>
---
@@ -911,30 +951,37 @@ incomplete
static <a href='#SkRRect'>SkRRect</a> <a href='#SkRRect_MakeRectXY'>MakeRectXY</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& rect, <a href='undocumented#SkScalar'>SkScalar</a> xRad, <a href='undocumented#SkScalar'>SkScalar</a> yRad)
</pre>
+Sets to rounded rectangle with the same radii for all four corners.
+If rect is empty, sets to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
+Otherwise, if <a href='#SkRRect_MakeRectXY_xRad'>xRad</a> and <a href='#SkRRect_MakeRectXY_yRad'>yRad</a> are zero, sets to <a href='#SkRRect_kRect_Type'>kRect Type</a>.
+Otherwise, if <a href='#SkRRect_MakeRectXY_xRad'>xRad</a> is at least half rect.<a href='#SkRRect_width'>width</a> and <a href='#SkRRect_MakeRectXY_yRad'>yRad</a> is at least half
+rect.<a href='#SkRRect_height'>height</a>, sets to <a href='#SkRRect_kOval_Type'>kOval Type</a>.
+Otherwise, sets to <a href='#SkRRect_kSimple_Type'>kSimple Type</a>.
+
### Parameters
<table> <tr> <td><a name='SkRRect_MakeRectXY_rect'><code><strong>rect</strong></code></a></td>
- <td>incomplete</td>
+ <td>bounds of rounded rectangle</td>
</tr>
<tr> <td><a name='SkRRect_MakeRectXY_xRad'><code><strong>xRad</strong></code></a></td>
- <td>incomplete</td>
+ <td>x-axis radius of corners</td>
</tr>
<tr> <td><a name='SkRRect_MakeRectXY_yRad'><code><strong>yRad</strong></code></a></td>
- <td>incomplete</td>
+ <td>y-axis radius of corners</td>
</tr>
</table>
### Return Value
-incomplete
+rounded rectangle
### Example
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
+<div><fiddle-embed name="2b24a1247637cbc94f8b3c77d37ed3e2"></fiddle-embed></div>
### See Also
-incomplete
+<a href='#SkRRect_setRectXY'>setRectXY</a>
---
@@ -945,23 +992,24 @@ incomplete
void <a href='#SkRRect_setOval'>setOval</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& oval)
</pre>
-Sets <a href='#RRect'>Round Rect</a> to match the supplied <a href='#SkRRect_setOval_oval'>oval</a>. All x-radii will equal half the
-width and all y-radii will equal half the height.
+Sets bounds to <a href='#SkRRect_setOval_oval'>oval</a>, x-axis radii to half <a href='#SkRRect_setOval_oval'>oval</a>.<a href='#SkRRect_width'>width</a>, and all y-axis radii
+to half <a href='#SkRRect_setOval_oval'>oval</a>.<a href='#SkRRect_height'>height</a>. If rect is empty, sets to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
+Otherwise, sets to <a href='#SkRRect_kOval_Type'>kOval Type</a>.
### Parameters
<table> <tr> <td><a name='SkRRect_setOval_oval'><code><strong>oval</strong></code></a></td>
- <td>incomplete</td>
+ <td>bounds of <a href='undocumented#Oval'>Oval</a></td>
</tr>
</table>
### Example
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
+<div><fiddle-embed name="cf418af29cbab6243ac16aacd1217ffe"></fiddle-embed></div>
### See Also
-incomplete
+<a href='#SkRRect_MakeOval'>MakeOval</a>
---
@@ -972,28 +1020,33 @@ incomplete
void <a href='#SkRRect_setRectXY'>setRectXY</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& rect, <a href='undocumented#SkScalar'>SkScalar</a> xRad, <a href='undocumented#SkScalar'>SkScalar</a> yRad)
</pre>
-Initializes <a href='#RRect'>Round Rect</a> with the same radii for all four corners.
+Sets to rounded rectangle with the same radii for all four corners.
+If rect is empty, sets to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
+Otherwise, if <a href='#SkRRect_setRectXY_xRad'>xRad</a> or <a href='#SkRRect_setRectXY_yRad'>yRad</a> is zero, sets to <a href='#SkRRect_kRect_Type'>kRect Type</a>.
+Otherwise, if <a href='#SkRRect_setRectXY_xRad'>xRad</a> is at least half rect.<a href='#SkRRect_width'>width</a> and <a href='#SkRRect_setRectXY_yRad'>yRad</a> is at least half
+rect.<a href='#SkRRect_height'>height</a>, sets to <a href='#SkRRect_kOval_Type'>kOval Type</a>.
+Otherwise, sets to <a href='#SkRRect_kSimple_Type'>kSimple Type</a>.
### Parameters
<table> <tr> <td><a name='SkRRect_setRectXY_rect'><code><strong>rect</strong></code></a></td>
- <td>incomplete</td>
+ <td>bounds of rounded rectangle</td>
</tr>
<tr> <td><a name='SkRRect_setRectXY_xRad'><code><strong>xRad</strong></code></a></td>
- <td>incomplete</td>
+ <td>x-axis radius of corners</td>
</tr>
<tr> <td><a name='SkRRect_setRectXY_yRad'><code><strong>yRad</strong></code></a></td>
- <td>incomplete</td>
+ <td>y-axis radius of corners</td>
</tr>
</table>
### Example
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
+<div><fiddle-embed name="6ac569e40fb68c758319e85428b9ae95"></fiddle-embed></div>
### See Also
-incomplete
+<a href='#SkRRect_MakeRectXY'>MakeRectXY</a> <a href='SkPath_Reference#SkPath_addRoundRect'>SkPath::addRoundRect</a><sup><a href='SkPath_Reference#SkPath_addRoundRect_2'>[2]</a></sup>
---
@@ -1005,34 +1058,46 @@ void <a href='#SkRRect_setNinePatch'>setNinePatch</a>(const <a href='SkRect_Refe
<a href='undocumented#SkScalar'>SkScalar</a> bottomRad)
</pre>
-Initializes <a href='#RRect'>Round Rect</a> with one radius per-side.
+Sets bounds to rect. Sets radii to (<a href='#SkRRect_setNinePatch_leftRad'>leftRad</a>, <a href='#SkRRect_setNinePatch_topRad'>topRad</a>), (<a href='#SkRRect_setNinePatch_rightRad'>rightRad</a>, <a href='#SkRRect_setNinePatch_topRad'>topRad</a>),
+(<a href='#SkRRect_setNinePatch_rightRad'>rightRad</a>, <a href='#SkRRect_setNinePatch_bottomRad'>bottomRad</a>), (<a href='#SkRRect_setNinePatch_leftRad'>leftRad</a>, <a href='#SkRRect_setNinePatch_bottomRad'>bottomRad</a>).
+
+If rect is empty, sets to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
+Otherwise, if <a href='#SkRRect_setNinePatch_leftRad'>leftRad</a> and <a href='#SkRRect_setNinePatch_rightRad'>rightRad</a> are zero, sets to <a href='#SkRRect_kRect_Type'>kRect Type</a>.
+Otherwise, if <a href='#SkRRect_setNinePatch_topRad'>topRad</a> and <a href='#SkRRect_setNinePatch_bottomRad'>bottomRad</a> are zero, sets to <a href='#SkRRect_kRect_Type'>kRect Type</a>.
+Otherwise, if <a href='#SkRRect_setNinePatch_leftRad'>leftRad</a> and <a href='#SkRRect_setNinePatch_rightRad'>rightRad</a> are equal and at least half rect.<a href='#SkRRect_width'>width</a>, and
+<a href='#SkRRect_setNinePatch_topRad'>topRad</a> and <a href='#SkRRect_setNinePatch_bottomRad'>bottomRad</a> are equal at least half rect.<a href='#SkRRect_height'>height</a>, sets to <a href='#SkRRect_kOval_Type'>kOval Type</a>.
+Otherwise, if <a href='#SkRRect_setNinePatch_leftRad'>leftRad</a> and <a href='#SkRRect_setNinePatch_rightRad'>rightRad</a> are equal, and <a href='#SkRRect_setNinePatch_topRad'>topRad</a> and <a href='#SkRRect_setNinePatch_bottomRad'>bottomRad</a> are equal,
+sets to <a href='#SkRRect_kSimple_Type'>kSimple Type</a>. Otherwise, sets to <a href='#SkRRect_kNinePatch_Type'>kNinePatch Type</a>.
+
+Nine patch refers to the nine parts defined by the radii: one center rectangle,
+four edge patches, and four corner patches.
### Parameters
<table> <tr> <td><a name='SkRRect_setNinePatch_rect'><code><strong>rect</strong></code></a></td>
- <td>incomplete</td>
+ <td>bounds of rounded rectangle</td>
</tr>
<tr> <td><a name='SkRRect_setNinePatch_leftRad'><code><strong>leftRad</strong></code></a></td>
- <td>incomplete</td>
+ <td>left-top and left-bottom x-axis radius</td>
</tr>
<tr> <td><a name='SkRRect_setNinePatch_topRad'><code><strong>topRad</strong></code></a></td>
- <td>incomplete</td>
+ <td>left-top and right-top y-axis radius</td>
</tr>
<tr> <td><a name='SkRRect_setNinePatch_rightRad'><code><strong>rightRad</strong></code></a></td>
- <td>incomplete</td>
+ <td>right-top and right-bottom x-axis radius</td>
</tr>
<tr> <td><a name='SkRRect_setNinePatch_bottomRad'><code><strong>bottomRad</strong></code></a></td>
- <td>incomplete</td>
+ <td>left-bottom and right-bottom y-axis radius</td>
</tr>
</table>
### Example
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
+<div><fiddle-embed name="c4620df2eaba447b581688d3100053b1"></fiddle-embed></div>
### See Also
-incomplete
+<a href='#SkRRect_setRectRadii'>setRectRadii</a>
---
@@ -1043,15 +1108,22 @@ incomplete
void <a href='#SkRRect_setRectRadii'>setRectRadii</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& rect, const <a href='SkPoint_Reference#SkVector'>SkVector</a> radii[4])
</pre>
-Initializes <a href='#RRect'>Round Rect</a> with potentially different radii for all four corners.
+Sets bounds to rect. Sets radii array for individual control of all for corners.
+
+If rect is empty, sets to <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>.
+Otherwise, if one of each corner radii are zero, sets to <a href='#SkRRect_kRect_Type'>kRect Type</a>.
+Otherwise, if all x-axis radii are equal and at least half rect.<a href='#SkRRect_width'>width</a>, and
+all y-axis radii are equal at least half rect.<a href='#SkRRect_height'>height</a>, sets to <a href='#SkRRect_kOval_Type'>kOval Type</a>.
+Otherwise, if all x-axis radii are equal, and all y-axis radii are equal,
+sets to <a href='#SkRRect_kSimple_Type'>kSimple Type</a>. Otherwise, sets to <a href='#SkRRect_kNinePatch_Type'>kNinePatch Type</a>.
### Parameters
<table> <tr> <td><a name='SkRRect_setRectRadii_rect'><code><strong>rect</strong></code></a></td>
- <td>incomplete</td>
+ <td>bounds of rounded rectangle</td>
</tr>
<tr> <td><a name='SkRRect_setRectRadii_radii'><code><strong>radii</strong></code></a></td>
- <td>incomplete</td>
+ <td>corner x-axis and y-axis radii</td>
</tr>
</table>
@@ -1061,7 +1133,7 @@ Initializes <a href='#RRect'>Round Rect</a> with potentially different radii for
### See Also
-incomplete
+<a href='#SkRRect_setNinePatch'>setNinePatch</a> <a href='SkPath_Reference#SkPath_addRoundRect'>SkPath::addRoundRect</a><sup><a href='SkPath_Reference#SkPath_addRoundRect_2'>[2]</a></sup>
---
diff --git a/site/user/api/catalog.htm b/site/user/api/catalog.htm
index e1f9d3ef77..49f322a881 100644
--- a/site/user/api/catalog.htm
+++ b/site/user/api/catalog.htm
@@ -403,8 +403,7 @@
"code": "void draw(SkCanvas* canvas) {\n SkCanvas::SaveLayerRec rec1;\n SkCanvas::SaveLayerRec rec2(nullptr, nullptr, nullptr, 0);\n SkDebugf(\"rec1 %c= rec2\\n\", rec1.fBounds == rec2.fBounds\n && rec1.fPaint == rec2.fPaint\n && rec1.fBackdrop == rec2.fBackdrop\n && rec1.fSaveLayerFlags == rec2.fSaveLayerFlags ? '=' : '!');\n}",
"hash": "9b7fa2fe855642ffff6538829db15328",
"file": "SkCanvas_Reference",
- "name": "SkCanvas::SaveLayerRec::SaveLayerRec(const SkRect* bounds, const SkPaint* paint, const SkImageFilter* backdrop,
- SaveLayerFlags saveLayerFlags)",
+ "name": "SkCanvas::SaveLayerRec::SaveLayerRec(const SkRect* bounds, const SkPaint* paint, const SkImageFilter* backdrop, SaveLayerFlags saveLayerFlags)",
"stdout": "rec1 == rec2\\n"
},
"SkCanvas_copy_const_SkBitmap": {
@@ -7575,42 +7574,42 @@
"name": "SkRRect::Corner"
},
"SkRRect_MakeEmpty": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "code": "void draw(SkCanvas* canvas) {\n SkRRect rrect = SkRRect::MakeEmpty();\n SkRRect rrect2(rrect);\n rrect2.inset(-20, -20);\n SkPaint p;\n p.setStyle(SkPaint::kStroke_Style);\n p.setStrokeWidth(10);\n std::string str(\"Type \");\n str += SkRRect::kEmpty_Type == rrect2.type() ? \"=\" : \"!\"; \n str += \"= SkRRect::kEmpty_Type\";\n canvas->drawString(str.c_str(), 20, 80, SkPaint());\n canvas->drawRRect(rrect2, p);\n}",
"width": 256,
- "height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
+ "height": 90,
+ "hash": "c6c6be3b3c137226adbb5b5af9203d27",
"file": "SkRRect_Reference",
"name": "SkRRect::MakeEmpty"
},
"SkRRect_MakeOval": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkRRect rrect = SkRRect::MakeOval({30, 10, 100, 60});\n canvas->drawRRect(rrect, paint);\n rrect.setRect(rrect.getBounds());\n paint.setColor(SK_ColorBLUE);\n paint.setBlendMode(SkBlendMode::kDifference);\n canvas->drawRRect(rrect, paint);\n}",
"width": 256,
- "height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
+ "height": 70,
+ "hash": "0b99ee38fd154f769f6031242e02fa7a",
"file": "SkRRect_Reference",
"name": "SkRRect::MakeOval"
},
"SkRRect_MakeRect": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkRRect rrect = SkRRect::MakeRect({30, 10, 100, 60});\n canvas->drawRRect(rrect, paint);\n rrect.setOval(rrect.getBounds());\n paint.setColor(SK_ColorBLUE);\n canvas->drawRRect(rrect, paint);\n}",
"width": 256,
- "height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
+ "height": 70,
+ "hash": "5295b07fe4d2cdcd077979a9e19854d9",
"file": "SkRRect_Reference",
"name": "SkRRect::MakeRect"
},
"SkRRect_MakeRectXY": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkRRect rrect = SkRRect::MakeRectXY({30, 10, 100, 60}, 20, 20);\n canvas->drawRRect(rrect, paint);\n rrect.setRect(rrect.getBounds());\n paint.setColor(SK_ColorBLUE);\n paint.setBlendMode(SkBlendMode::kModulate);\n canvas->drawRRect(rrect, paint);\n}",
"width": 256,
- "height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
+ "height": 70,
+ "hash": "2b24a1247637cbc94f8b3c77d37ed3e2",
"file": "SkRRect_Reference",
"name": "SkRRect::MakeRectXY"
},
"SkRRect_Type": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "code": "void draw(SkCanvas* canvas) {\n struct Radii { SkVector data[4]; };\n auto drawRRectType = [=](const SkRect& rect, const Radii& radii) {\n SkRRect rrect;\n rrect.setRectRadii(rect, radii.data);\n SkPaint paint;\n paint.setAntiAlias(true);\n const char* typeStr[] = { \"empty\", \"rect\", \"oval\", \"simple\", \"nine patch\", \"complex\" };\n paint.setTextAlign(SkPaint::kCenter_Align);\n canvas->drawString(typeStr[(int) rrect.type()], rect.centerX(), rect.bottom() + 20, paint);\n paint.setStyle(SkPaint::kStroke_Style); \n canvas->drawRRect(rrect, paint);\n };\n drawRRectType({ 45, 30, 45, 30}, {{{ 5, 5}, { 5, 5}, { 5, 5}, { 5, 5}}});\n drawRRectType({ 90, 10, 140, 30}, {{{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}}});\n drawRRectType({160, 10, 210, 30}, {{{25, 10}, {25, 10}, {25, 10}, {25, 10}}});\n drawRRectType({ 20, 80, 70, 100}, {{{ 5, 5}, { 5, 5}, { 5, 5}, { 5, 5}}});\n drawRRectType({ 90, 80, 140, 100}, {{{ 5, 5}, {10, 5}, {10, 5}, { 5, 5}}});\n drawRRectType({160, 80, 210, 100}, {{{ 5, 5}, {10, 5}, { 5, 5}, { 5, 5}}});\n}",
"width": 256,
- "height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
+ "height": 128,
+ "hash": "38a559936ea7c8d482098c189ee5c9b8",
"file": "SkRRect_Reference",
"name": "SkRRect::Type"
},
@@ -7623,18 +7622,18 @@
"name": "SkRRect::contains()"
},
"SkRRect_copy_const_SkRRect": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "code": "void draw(SkCanvas* canvas) {\n SkRRect rrect = SkRRect::MakeRect({10, 10, 100, 50});\n SkRRect rrect2(rrect);\n rrect2.inset(20, 20);\n SkPaint p;\n p.setStyle(SkPaint::kStroke_Style);\n p.setStrokeWidth(10);\n canvas->drawRRect(rrect, p);\n canvas->drawRRect(rrect2, p);\n}",
"width": 256,
"height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
+ "hash": "9be9adb06c26dac75a5a5a7c1ceca681",
"file": "SkRRect_Reference",
"name": "SkRRect::SkRRect(const SkRRect& rrect)"
},
"SkRRect_copy_operator": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "code": "void draw(SkCanvas* canvas) {\n SkRRect rrect = SkRRect::MakeRect({40, 40, 100, 70});\n SkRRect rrect2 = rrect;\n rrect2.inset(-20, -20);\n SkPaint p;\n p.setStyle(SkPaint::kStroke_Style);\n p.setStrokeWidth(10);\n canvas->drawRRect(rrect, p);\n canvas->drawRRect(rrect2, p);\n}",
"width": 256,
"height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
+ "hash": "94c298c404fff922ec53a3d7567852a2",
"file": "SkRRect_Reference",
"name": "SkRRect::operator=(const SkRRect& rrect)"
},
@@ -7663,10 +7662,10 @@
"name": "SkRRect::dump_2"
},
"SkRRect_empty_constructor": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "code": "void draw(SkCanvas* canvas) {\n SkRRect rrect;\n SkPaint p;\n p.setStyle(SkPaint::kStroke_Style);\n p.setStrokeWidth(10);\n canvas->drawRRect(rrect, p);\n rrect.setRect({10, 10, 100, 50});\n canvas->drawRRect(rrect, p);\n}",
"width": 256,
- "height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
+ "height": 60,
+ "hash": "471e7aad0feaf9ec3a21757a317a64f5",
"file": "SkRRect_Reference",
"name": "SkRRect::SkRRect()"
},
@@ -7695,10 +7694,10 @@
"name": "SkRRect::getSimpleRadii"
},
"SkRRect_getType": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "code": "void draw(SkCanvas* canvas) {\n SkRRect rrect = SkRRect::MakeRect({10, 10, 100, 50});\n SkRRect rrect2(rrect);\n rrect2.inset(20, 20);\n SkPaint p;\n p.setStyle(SkPaint::kStroke_Style);\n p.setStrokeWidth(10);\n std::string str(\"Type \");\n str += SkRRect::kRect_Type == rrect2.getType() ? \"=\" : \"!\"; \n str += \"= SkRRect::kRect_Type\";\n canvas->drawString(str.c_str(), 20, 80, SkPaint());\n canvas->drawRRect(rrect2, p);\n}",
"width": 256,
"height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
+ "hash": "53634cc0794c0fa6c0c2b3ac4cc69490",
"file": "SkRRect_Reference",
"name": "SkRRect::getType"
},
@@ -7855,26 +7854,26 @@
"name": "SkRRect::setEmpty"
},
"SkRRect_setNinePatch": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setAntiAlias(true);\n SkRRect rrect;\n rrect.setNinePatch({30, 10, 100, 60}, 10, 20, 20, 10);\n canvas->drawRRect(rrect, paint);\n paint.setColor(SK_ColorWHITE);\n const SkRect r = rrect.getBounds();\n canvas->drawLine(r.fLeft, r.fTop + rrect.radii(SkRRect::kUpperLeft_Corner).fY,\n r.fRight, r.fTop + rrect.radii(SkRRect::kUpperRight_Corner).fY, paint);\n canvas->drawLine(r.fLeft, r.fBottom - rrect.radii(SkRRect::kLowerLeft_Corner).fY,\n r.fRight, r.fBottom - rrect.radii(SkRRect::kLowerRight_Corner).fY, paint);\n canvas->drawLine(r.fLeft + rrect.radii(SkRRect::kUpperLeft_Corner).fX, r.fTop,\n r.fLeft + rrect.radii(SkRRect::kLowerLeft_Corner).fX, r.fBottom, paint);\n canvas->drawLine(r.fRight - rrect.radii(SkRRect::kUpperRight_Corner).fX, r.fTop,\n r.fRight - rrect.radii(SkRRect::kLowerRight_Corner).fX, r.fBottom, paint);\n}",
"width": 256,
- "height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
+ "height": 70,
+ "hash": "c4620df2eaba447b581688d3100053b1",
"file": "SkRRect_Reference",
"name": "SkRRect::setNinePatch"
},
"SkRRect_setOval": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkRRect rrect = SkRRect::MakeRectXY({30, 10, 100, 60}, 20, 20);\n canvas->drawRRect(rrect, paint);\n rrect.setOval(rrect.getBounds());\n paint.setColor(SK_ColorWHITE);\n paint.setBlendMode(SkBlendMode::kExclusion);\n canvas->drawRRect(rrect, paint);\n}",
"width": 256,
- "height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
+ "height": 70,
+ "hash": "cf418af29cbab6243ac16aacd1217ffe",
"file": "SkRRect_Reference",
"name": "SkRRect::setOval"
},
"SkRRect_setRect": {
"code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkRRect rrect = SkRRect::MakeRect({30, 10, 100, 60});\n canvas->drawRRect(rrect, paint);\n rrect.setRect({60, 30, 120, 80});\n paint.setColor(SK_ColorBLUE);\n canvas->drawRRect(rrect, paint);\n}",
"width": 256,
- "height": 256,
- "hash": "fc97ef7310473b9ba6dc7202efbebb3b",
+ "height": 90,
+ "hash": "3afc3ac9bebd1d7387822cc608571e82",
"file": "SkRRect_Reference",
"name": "SkRRect::setRect"
},
@@ -7887,10 +7886,10 @@
"name": "SkRRect::setRectRadii"
},
"SkRRect_setRectXY": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkRRect rrect = SkRRect::MakeRectXY({30, 10, 100, 60}, 20, 20);\n canvas->drawRRect(rrect, paint);\n rrect.setRectXY(rrect.getBounds(), 5, 5);\n paint.setColor(SK_ColorWHITE);\n paint.setBlendMode(SkBlendMode::kExclusion);\n canvas->drawRRect(rrect, paint);\n}",
"width": 256,
- "height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
+ "height": 70,
+ "hash": "6ac569e40fb68c758319e85428b9ae95",
"file": "SkRRect_Reference",
"name": "SkRRect::setRectXY"
},
@@ -7903,10 +7902,10 @@
"name": "SkRRect::transform()"
},
"SkRRect_type": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "code": "void draw(SkCanvas* canvas) {\n SkRRect rrect = SkRRect::MakeRect({10, 10, 100, 50});\n SkRRect rrect2(rrect);\n rrect2.inset(20, 20);\n SkPaint p;\n p.setStyle(SkPaint::kStroke_Style);\n p.setStrokeWidth(10);\n std::string str(\"Type \");\n str += SkRRect::kEmpty_Type == rrect2.type() ? \"=\" : \"!\"; \n str += \"= SkRRect::kEmpty_Type\";\n canvas->drawString(str.c_str(), 20, 80, SkPaint());\n canvas->drawRRect(rrect2, p);\n}",
"width": 256,
"height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
+ "hash": "02b03d651c4b5d18018c6f75fa88b8ce",
"file": "SkRRect_Reference",
"name": "SkRRect::type()"
},
diff --git a/tools/bookmaker/bookmaker.cpp b/tools/bookmaker/bookmaker.cpp
index 58c73e663f..15598be95f 100644
--- a/tools/bookmaker/bookmaker.cpp
+++ b/tools/bookmaker/bookmaker.cpp
@@ -318,6 +318,7 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
// fRoot->fChildren.push_back(definition);
}
}
+ SkASSERT(string::npos == name.find('\n'));
definition->fName = name;
if (MarkType::kMethod == markType) {
if (string::npos != name.find(':', 0)) {
@@ -1837,6 +1838,9 @@ string BmhParser::methodName() {
saveState.restore();
}
// this->next();
+ if (string::npos != builder.find('\n')) {
+ builder.erase(std::remove(builder.begin(), builder.end(), '\n'), builder.end());
+ }
return uniqueRootName(builder, MarkType::kMethod);
}
diff --git a/tools/bookmaker/includeParser.cpp b/tools/bookmaker/includeParser.cpp
index fdaf0ccfe2..716d90afeb 100644
--- a/tools/bookmaker/includeParser.cpp
+++ b/tools/bookmaker/includeParser.cpp
@@ -278,6 +278,10 @@ bool IncludeParser::crossCheck(BmhParser& bmhParser) {
string paramName = className + "::";
paramName += string(token.fContentStart,
token.fContentEnd - token.fContentStart);
+ if (string::npos != paramName.find('\n')) {
+ paramName.erase(std::remove(paramName.begin(), paramName.end(), '\n'),
+ paramName.end());
+ }
def = root->find(paramName, RootDefinition::AllowParens::kYes);
if (!def && 0 == token.fName.find("operator")) {
string operatorName = className + "::";
diff --git a/tools/bookmaker/includeWriter.cpp b/tools/bookmaker/includeWriter.cpp
index cd67be0f5d..18beff4809 100644
--- a/tools/bookmaker/includeWriter.cpp
+++ b/tools/bookmaker/includeWriter.cpp
@@ -1465,6 +1465,10 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti
--continueEnd;
}
methodName += string(fContinuation, continueEnd - fContinuation);
+ if (string::npos != methodName.find('\n')) {
+ methodName.erase(std::remove(methodName.begin(), methodName.end(), '\n'),
+ methodName.end());
+ }
method = this->findMethod(methodName, root);
if (!method) {
if (fBmhStructDef && fBmhStructDef->fDeprecated) {