new batch of docs
new batch of docs
Docs-Preview: https://skia.org/?cl=141244
Bug: skia:
Change-Id: I5a285778baaee2734495374adeb7359d524e47e3
Reviewed-on: https://skia-review.googlesource.com/141244
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
diff --git a/docs/SkBitmap_Reference.bmh b/docs/SkBitmap_Reference.bmh
index 5bf8e1b..433743b 100644
--- a/docs/SkBitmap_Reference.bmh
+++ b/docs/SkBitmap_Reference.bmh
@@ -77,6 +77,7 @@
# ------------------------------------------------------------------------------
#Method virtual bool allocPixelRef(SkBitmap* bitmap) = 0
+#Line # allocates pixel memory ##
Allocates the pixel memory for the bitmap, given its dimensions and
Color_Type. Returns true on success, where success means either setPixels
diff --git a/docs/SkCanvas_Reference.bmh b/docs/SkCanvas_Reference.bmh
index dabec68..c310b11 100644
--- a/docs/SkCanvas_Reference.bmh
+++ b/docs/SkCanvas_Reference.bmh
@@ -5444,15 +5444,15 @@
Draws Text_Blob blob at (x, y), using Clip, Matrix, and Paint paint.
blob contains Glyphs, their positions, and paint attributes specific to text:
-Typeface, Paint_Text_Size, Paint_Text_Scale_X, Paint_Text_Skew_X,
-Paint_Text_Align, Paint_Hinting, Anti_Alias, Paint_Fake_Bold,
-Font_Embedded_Bitmaps, Full_Hinting_Spacing, LCD_Text, Linear_Text,
-Subpixel_Text, and Paint_Vertical_Text.
+#paint_font_metrics#.
Paint_Text_Encoding must be set to SkPaint::kGlyphID_TextEncoding.
-Elements of paint: Path_Effect, Mask_Filter, Shader, Color_Filter,
-Image_Filter, and Draw_Looper; apply to blob.
+Elements of paint: Anti_Alias, Blend_Mode, Color including Color_Alpha,
+Color_Filter, Paint_Dither, Draw_Looper, Mask_Filter, Path_Effect, Shader, and
+Paint_Style; apply to blob. If Paint contains SkPaint::kStroke_Style:
+Paint_Miter_Limit, Paint_Stroke_Cap, Paint_Stroke_Join, and Paint_Stroke_Width;
+apply to Path created from blob.
#Param blob Glyphs, positions, and their paints' text size, typeface, and so on ##
#Param x horizontal offset applied to blob ##
@@ -5497,10 +5497,7 @@
Draws Text_Blob blob at (x, y), using Clip, Matrix, and Paint paint.
blob contains Glyphs, their positions, and paint attributes specific to text:
-Typeface, Paint_Text_Size, Paint_Text_Scale_X, Paint_Text_Skew_X,
-Paint_Text_Align, Paint_Hinting, Anti_Alias, Paint_Fake_Bold,
-Font_Embedded_Bitmaps, Full_Hinting_Spacing, LCD_Text, Linear_Text,
-Subpixel_Text, and Paint_Vertical_Text.
+#paint_font_metrics#.
Paint_Text_Encoding must be set to SkPaint::kGlyphID_TextEncoding.
diff --git a/docs/SkDynamicMemoryWStream_Reference.bmh b/docs/SkDynamicMemoryWStream_Reference.bmh
new file mode 100644
index 0000000..ad7da9e
--- /dev/null
+++ b/docs/SkDynamicMemoryWStream_Reference.bmh
@@ -0,0 +1,252 @@
+#Topic DynamicMemoryWStream
+#Alias DynamicMemoryWStream_Reference ##
+
+#Class SkDynamicMemoryWStream
+
+#Subtopic Overview
+#Populate
+##
+
+#Subtopic Constructor
+#Populate
+##
+
+#Subtopic Member_Function
+#Populate
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkDynamicMemoryWStream()
+#In Constructor
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method ~SkDynamicMemoryWStream() override
+#In Constructor
+#Line # incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool write(const void* buffer, size_t size) override
+#In incomplete
+#Line # incomplete ##
+
+#Param buffer incomplete ##
+#Param size incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t bytesWritten() const override
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool read(void* buffer, size_t offset, size_t size)
+#In incomplete
+#Line # incomplete ##
+
+#Param buffer incomplete ##
+#Param offset incomplete ##
+#Param size incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void copyTo(void* dst) const
+#In incomplete
+#Line # incomplete ##
+
+Copies bytes read to dst.
+
+#Param dst incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool writeToStream(SkWStream* dst) const
+#In incomplete
+#Line # incomplete ##
+
+#Param dst incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void copyToAndReset(void* dst)
+#In incomplete
+#Line # incomplete ##
+
+Copies bytes read to dst, and resets stream to start.
+Internally, frees memory as it is copied, reducing total memory
+use on large streams.
+
+#Param dst incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool writeToAndReset(SkWStream* dst)
+#In incomplete
+#Line # incomplete ##
+
+Writes bytes read to dst, and resets stream to start.
+Internally, frees memory as it is copied, reducing total memory
+use on large streams.
+
+Stream is reset: data memory is released and stream length is set to zero;
+regardless of whether the write was successful.
+
+#Param dst incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method sk_sp<SkData> detachAsData()
+#In incomplete
+#Line # incomplete ##
+
+Return the contents as SkData, and then reset the stream.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method std::unique_ptr<SkStreamAsset> detachAsStream()
+#In incomplete
+#Line # incomplete ##
+
+Reset, returning a reader stream with the current content.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void reset()
+#In incomplete
+#Line # incomplete ##
+
+Reset the stream to its original, empty, state.
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void padToAlign4()
+#In incomplete
+#Line # incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+#Class SkDynamicMemoryWStream ##
+
+#Topic DynamicMemoryWStream ##
diff --git a/docs/SkFILEStream_Reference.bmh b/docs/SkFILEStream_Reference.bmh
new file mode 100644
index 0000000..e0f6135
--- /dev/null
+++ b/docs/SkFILEStream_Reference.bmh
@@ -0,0 +1,284 @@
+#Topic FILEStream
+#Alias FILEStream_Reference ##
+
+#Class SkFILEStream
+
+A stream that wraps a C FILE* file stream. */
+
+#Subtopic Overview
+#Populate
+##
+
+#Subtopic Constructor
+#Populate
+##
+
+#Subtopic Member_Function
+#Populate
+##
+
+# ------------------------------------------------------------------------------
+
+#Method explicit SkFILEStream(const char path[] = nullptr)
+#In Constructor
+#Line # incomplete ##
+
+Initializes Stream by reading data contained by path.
+File descriptor is opened here and is closed when SkFILEStream
+Destructor is invoked.
+
+#Param path incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method explicit SkFILEStream(FILE* file)
+#In Constructor
+#Line # incomplete ##
+
+Initialize the stream with an existing C_FILE stream.
+The current position of the C_FILE stream will be considered the
+beginning of the SkFILEStream.
+The C_FILE stream is closed when SkFILEStream Destructor is invoked.
+
+#Param file incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method ~SkFILEStream() override
+#In Constructor
+#Line # incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method static std::unique_ptr<SkFILEStream> Make(const char path[])
+#In incomplete
+#Line # incomplete ##
+
+#Param path incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isValid() const
+#In incomplete
+#Line # incomplete ##
+
+Returns true if the current path could be opened.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void close()
+#In incomplete
+#Line # incomplete ##
+
+Close this SkFILEStream.
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t read(void* buffer, size_t size) override
+#In incomplete
+#Line # incomplete ##
+
+#Param buffer incomplete ##
+#Param size incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isAtEnd() const override
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool rewind() override
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method std::unique_ptr<SkStreamAsset> duplicate() const
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t getPosition() const override
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool seek(size_t position) override
+#In incomplete
+#Line # incomplete ##
+
+#Param position incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool move(long offset) override
+#In incomplete
+#Line # incomplete ##
+
+#Param offset incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method std::unique_ptr<SkStreamAsset> fork() const
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t getLength() const override
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+#Class SkFILEStream ##
+
+#Topic FILEStream ##
diff --git a/docs/SkFILEWStream_Reference.bmh b/docs/SkFILEWStream_Reference.bmh
new file mode 100644
index 0000000..7dde5a1
--- /dev/null
+++ b/docs/SkFILEWStream_Reference.bmh
@@ -0,0 +1,135 @@
+#Topic FILEWStream
+#Alias FILEWStream_Reference ##
+
+#Class SkFILEWStream
+
+////////////////////////////////////////////////////////////////////////////////////////////
+
+#Subtopic Overview
+#Populate
+##
+
+#Subtopic Constructor
+#Populate
+##
+
+#Subtopic Member_Function
+#Populate
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkFILEWStream(const char path[])
+#In Constructor
+#Line # incomplete ##
+
+#Param path incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method ~SkFILEWStream() override
+#In Constructor
+#Line # incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isValid() const
+#In incomplete
+#Line # incomplete ##
+
+Returns true if the current path could be opened.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool write(const void* buffer, size_t size) override
+#In incomplete
+#Line # incomplete ##
+
+#Param buffer incomplete ##
+#Param size incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void flush() override
+#In incomplete
+#Line # incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void fsync()
+#In incomplete
+#Line # incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t bytesWritten() const override
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+#Class SkFILEWStream ##
+
+#Topic FILEWStream ##
diff --git a/docs/SkMemoryStream_Reference.bmh b/docs/SkMemoryStream_Reference.bmh
new file mode 100644
index 0000000..0287131
--- /dev/null
+++ b/docs/SkMemoryStream_Reference.bmh
@@ -0,0 +1,451 @@
+#Topic MemoryStream
+#Alias MemoryStream_Reference ##
+
+#Class SkMemoryStream
+
+#Subtopic Overview
+#Populate
+##
+
+#Subtopic Constructor
+#Populate
+##
+
+#Subtopic Member_Function
+#Populate
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkMemoryStream()
+#In Constructor
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method SkMemoryStream(size_t length)
+#In Constructor
+#Line # incomplete ##
+
+We allocate (and free) the memory. Write to it via getMemoryBase()
+
+#Param length incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method SkMemoryStream(const void* data, size_t length, bool copyData = false)
+#In Constructor
+#Line # incomplete ##
+
+If copyData is true, the stream makes a private copy of the data.
+
+#Param data incomplete ##
+#Param length incomplete ##
+#Param copyData incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method SkMemoryStream(sk_sp<SkData> data)
+#In Constructor
+#Line # incomplete ##
+
+Creates the stream to read from the specified data
+
+#Param data incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method static std::unique_ptr<SkMemoryStream> MakeCopy(const void* data, size_t length)
+#In incomplete
+#Line # incomplete ##
+
+Returns a stream with a copy of the input data.
+
+#Param data incomplete ##
+#Param length incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method static std::unique_ptr<SkMemoryStream> MakeDirect(const void* data, size_t length)
+#In incomplete
+#Line # incomplete ##
+
+Returns a stream with a bare pointer reference to the input data.
+
+#Param data incomplete ##
+#Param length incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method static std::unique_ptr<SkMemoryStream> Make(sk_sp<SkData> data)
+#In incomplete
+#Line # incomplete ##
+
+Returns a stream with a shared reference to the input data.
+
+#Param data incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual void setMemory(const void* data, size_t length,
+ bool copyData = false)
+#In incomplete
+#Line # incomplete ##
+
+Resets the stream to the specified data and length,
+just like the constructor.
+if copyData is true, the stream makes a private copy of the data
+
+#Param data incomplete ##
+#Param length incomplete ##
+#Param copyData incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void setMemoryOwned(const void* data, size_t length)
+#In incomplete
+#Line # incomplete ##
+
+#Private
+##
+
+#Param data incomplete ##
+#Param length incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method sk_sp<SkData> asData() const
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void setData(sk_sp<SkData> data)
+#In incomplete
+#Line # incomplete ##
+
+#Param data incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void skipToAlign4()
+#In incomplete
+#Line # incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method const void* getAtPos()
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t read(void* buffer, size_t size) override
+#In incomplete
+#Line # incomplete ##
+
+#Param buffer incomplete ##
+#Param size incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isAtEnd() const override
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t peek(void* buffer, size_t size) const override
+#In incomplete
+#Line # incomplete ##
+
+#Param buffer incomplete ##
+#Param size incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool rewind() override
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method std::unique_ptr<SkMemoryStream> duplicate() const
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t getPosition() const override
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool seek(size_t position) override
+#In incomplete
+#Line # incomplete ##
+
+#Param position incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool move(long offset) override
+#In incomplete
+#Line # incomplete ##
+
+#Param offset incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method std::unique_ptr<SkMemoryStream> fork() const
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t getLength() const override
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method const void* getMemoryBase() override
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+#Class SkMemoryStream ##
+
+#Topic MemoryStream ##
diff --git a/docs/SkPath_Reference.bmh b/docs/SkPath_Reference.bmh
index 28847b8..55cd01a 100644
--- a/docs/SkPath_Reference.bmh
+++ b/docs/SkPath_Reference.bmh
@@ -395,9 +395,9 @@
# ------------------------------------------------------------------------------
#Method SkPath()
-
+#In Constructor
#Line # constructs with default values ##
-Constucts an empty path. By default, Path has no Verbs, no Points, and no Weights.
+Constucts an empty Path. By default, Path has no Verbs, no Points, and no Weights.
Fill_Type is set to kWinding_FillType.
#Return empty Path ##
@@ -417,7 +417,7 @@
# ------------------------------------------------------------------------------
#Method SkPath(const SkPath& path)
-
+#In Constructor
#Line # makes a shallow copy ##
Constructs a copy of an existing path.
Copy constructor makes two paths identical by value. Internally, path and
@@ -515,7 +515,7 @@
#StdOut ##
##
-#SeeAlso swap() SkPath(const SkPath& path)
+#SeeAlso swap SkPath(const SkPath& path)
##
@@ -523,7 +523,7 @@
#Method bool operator==(const SkPath& a, const SkPath& b)
-#Line # compares paths for equality ##
+#Line # compares Paths for equality ##
Compares a and b; returns true if Fill_Type, Verb_Array, Point_Array, and Weights
are equivalent.
@@ -560,6 +560,8 @@
##
##
+#SeeAlso operator!=(const SkPath& a, const SkPath& b) operator=(const SkPath& path)
+
##
# ------------------------------------------------------------------------------
@@ -588,14 +590,14 @@
debugster("empty", one, two);
one.addRect({10, 20, 30, 40});
two.addRect({10, 20, 30, 40});
- debugster("addRect", one, two);
+ debugster("add rect", one, two);
one.setConvexity(SkPath::kConcave_Convexity);
debugster("setConvexity", one, two);
SkDebugf("convexity %c=\n", one.getConvexity() == two.getConvexity() ? '=' : '!');
}
#StdOut
empty one == two
-addRect one == two
+add rect one == two
setConvexity one == two
convexity !=
##
@@ -1275,7 +1277,7 @@
#Line # returns if verb count is zero ##
Returns if Path is empty.
Empty Path may have FillType but has no SkPoint, Verb, or Conic_Weight.
-SkPath() constructs empty Path; reset() and (rewind) make Path empty.
+SkPath() constructs empty Path; reset() and rewind() make Path empty.
#Return true if the path contains no Verb array ##
@@ -5414,6 +5416,7 @@
##
#Method Iter(const SkPath& path, bool forceClose)
+#Line # constructs Path iterator ##
Sets Iter to return elements of Verb_Array, Point_Array, and Conic_Weight in path.
If forceClose is true, Iter will add kLine_Verb and kClose_Verb after each
@@ -5473,7 +5476,7 @@
##
#Method void setPath(const SkPath& path, bool forceClose)
-
+#Line # resets Iter to Path ##
Sets Iter to return elements of Verb_Array, Point_Array, and Conic_Weight in path.
If forceClose is true, Iter will add kLine_Verb and kClose_Verb after each
open Contour. path is not altered.
@@ -5532,6 +5535,7 @@
##
#Method Verb next(SkPoint pts[4], bool doConsumeDegenerates = true, bool exact = false)
+#Line # returns next Verb ##
Returns next Verb in Verb_Array, and advances Iter.
When Verb_Array is exhausted, returns kDone_Verb.
@@ -5625,7 +5629,7 @@
##
#Method SkScalar conicWeight() const
-
+#Line # returns Conic_Weight ##
Returns Conic_Weight if next() returned kConic_Verb.
If next() has not been called, or next() did not return kConic_Verb,
@@ -5879,7 +5883,7 @@
investigated to see if the change is correct or not.
see change 21340 (abandoned for now)
- #SeeAlso next()
+ #SeeAlso next
##
diff --git a/docs/SkPicture_Reference.bmh b/docs/SkPicture_Reference.bmh
index 8ad642a..3445504 100644
--- a/docs/SkPicture_Reference.bmh
+++ b/docs/SkPicture_Reference.bmh
@@ -139,7 +139,14 @@
#In Constructor
#Line # constructs Picture from stream ##
-Recreates a picture that was serialized into a stream.
+Recreates Picture that was serialized into a stream. Returns constructed Picture
+if successful; otherwise, returns nullptr. Fails if data does not permit
+constructing valid Picture.
+
+procs.fPictureProc permits supplying a custom function to decode Picture.
+If procs.fPictureProc is nullptr, default decoding is used. procs.fPictureCtx
+may be used to provide user context to procs.fPictureProc; procs.fPictureProc
+is called with a pointer to data, data byte length, and user context.
#Param stream container for serial data ##
#Param procs custom serial data decoders; may be nullptr ##
@@ -172,7 +179,14 @@
#In Constructor
#Line # constructs Picture from data ##
-Recreates a picture that was serialized into data.
+Recreates Picture that was serialized into data. Returns constructed Picture
+if successful; otherwise, returns nullptr. Fails if data does not permit
+constructing valid Picture.
+
+procs.fPictureProc permits supplying a custom function to decode Picture.
+If procs.fPictureProc is nullptr, default decoding is used. procs.fPictureCtx
+may be used to provide user context to procs.fPictureProc; procs.fPictureProc
+is called with a pointer to data, data byte length, and user context.
#Param data container for serial data ##
#Param procs custom serial data decoders; may be nullptr ##
@@ -207,7 +221,14 @@
#Param size size of data ##
#Param procs custom serial data decoders; may be nullptr ##
-Recreates a picture that was serialized into data.
+Recreates Picture that was serialized into data. Returns constructed Picture
+if successful; otherwise, returns nullptr. Fails if size is smaller than
+required data length, or if data does not permit constructing valid Picture.
+
+procs.fPictureProc permits supplying a custom function to decode Picture.
+If procs.fPictureProc is nullptr, default decoding is used. procs.fPictureCtx
+may be used to provide user context to procs.fPictureProc; procs.fPictureProc
+is called with a pointer to data, data byte length, and user context.
#Return Picture constructed from data ##
@@ -328,10 +349,15 @@
#Method sk_sp<SkData> serialize(const SkSerialProcs* procs = nullptr) const
#In Utility
-#Line # writes Picture to data ##
-Returns storage containing data describing Picture, using optional custom
+#Line # writes Picture to Data ##
+Returns storage containing Data describing Picture, using optional custom
encoders.
+procs.fPictureProc permits supplying a custom function to encode Picture.
+If procs.fPictureProc is nullptr, default encoding is used. procs.fPictureCtx
+may be used to provide user context to procs.fPictureProc; procs.fPictureProc
+is called with a pointer to Picture and user context.
+
#Param procs custom serial data encoders; may be nullptr ##
#Return storage containing serialized Picture ##
@@ -358,6 +384,11 @@
#Method void serialize(SkWStream* stream, const SkSerialProcs* procs = nullptr) const
Writes picture to stream, using optional custom encoders.
+procs.fPictureProc permits supplying a custom function to encode Picture.
+If procs.fPictureProc is nullptr, default encoding is used. procs.fPictureCtx
+may be used to provide user context to procs.fPictureProc; procs.fPictureProc
+is called with a pointer to Picture and user context.
+
#Param stream writable serial data stream ##
#Param procs custom serial data encoders; may be nullptr ##
diff --git a/docs/SkRRect_Reference.bmh b/docs/SkRRect_Reference.bmh
index 633239a..3a0c136 100644
--- a/docs/SkRRect_Reference.bmh
+++ b/docs/SkRRect_Reference.bmh
@@ -537,7 +537,7 @@
#In Property
#Line # returns corner radii for simple types ##
-Returns top-left corner x-radii. If type() returns kEmpty_Type, kRect_Type,
+Returns top-left corner radii. If type() returns kEmpty_Type, kRect_Type,
kOval_Type, or kSimple_Type, returns a value representative of all corner radii.
If type() returns kNinePatch_Type or kComplex_Type, at least one of the
remaining three corners has a different value.
diff --git a/docs/SkRect_Reference.bmh b/docs/SkRect_Reference.bmh
index 49eff9e..e06b943 100644
--- a/docs/SkRect_Reference.bmh
+++ b/docs/SkRect_Reference.bmh
@@ -1528,10 +1528,10 @@
Returns true if: fLeft <= x < fRight && fTop <= y < fBottom.
Returns false if SkRect is empty.
-#Param x test SkPoint x-coordinate ##
-#Param y test SkPoint y-coordinate ##
+#Param x test Point x-coordinate ##
+#Param y test Point y-coordinate ##
-#Return true if (x, y) is inside SkRect ##
+#Return true if (x, y) is inside Rect ##
#Example
SkRect rect = { 30, 50, 40, 60 };
diff --git a/docs/SkRegion_Reference.bmh b/docs/SkRegion_Reference.bmh
new file mode 100644
index 0000000..b664e27
--- /dev/null
+++ b/docs/SkRegion_Reference.bmh
@@ -0,0 +1,1954 @@
+#Topic Region
+#Alias Region_Reference ##
+#Alias Regions ##
+
+Region is a compressed one bit mask. Region describes an aliased clipping area
+on integer boundaries. Region can also describe an array of integer rectangles.
+
+Canvas uses Region to reduce the current clip. Region may be drawn to Canvas;
+Paint determines if Region is filled or stroked, its Color, and so on.
+
+Region may be constructed from IRect array or Path. Diagonal lines and curves
+in Path become integer rectangle edges. Regions operators compute union,
+intersection, difference, and so on. Canvas allows only intersection and
+difference; successive clips can only reduce available Canvas area.
+
+#PhraseDef list_of_op_types
+kDifference_Op, kIntersect_Op, kUnion_Op, kXOR_Op, kReverseDifference_Op,
+kReplace_Op
+##
+
+#Class SkRegion
+
+SkRegion describes the set of pixels used to clip Canvas. SkRegion is compact,
+efficiently storing a single integer rectangle, or a run length encoded array
+of rectangles. SkRegion may reduce the current Canvas_Clip, or may be drawn as
+one or more integer rectangles. SkRegion iterator returns the scan lines or
+rectangles contained by it, optionally intersecting a bounding rectangle.
+
+#Subtopic Overview
+#Populate
+##
+
+#Subtopic Constant
+#Populate
+##
+
+#Subtopic Class
+#Populate
+##
+
+#Subtopic Constructor
+#Populate
+##
+
+#Subtopic Operator
+#Populate
+##
+
+#Subtopic Member_Function
+#Populate
+##
+
+# ------------------------------------------------------------------------------
+
+#Class Iterator
+#Line # iterator returning IRect ##
+
+#Code
+ class Iterator {
+ public:
+ Iterator();
+ Iterator(const SkRegion& region);
+ bool rewind();
+ void reset(const SkRegion& region);
+ bool done() const;
+ void next();
+ const SkIRect& rect();
+ const SkRegion* rgn();
+ };
+##
+
+Returns sequence of rectangles, sorted along y-axis, then x-axis, that make
+up Region.
+
+# ------------------------------------------------------------------------------
+
+#Method Iterator()
+#Line # constructs Region iterator ##
+Initializes Iterator with an empty Region. done() on Iterator returns true.
+Call reset() to initialized Iterator at a later time.
+
+#Return empty Region ierator ##
+
+#Example
+ SkRegion::Iterator iter;
+ SkRegion region;
+ region.setRect({1, 2, 3, 4});
+ iter.reset(region);
+ auto r = iter.rect();
+ SkDebugf("rect={%d,%d,%d,%d}\n", r.fLeft, r.fTop, r.fRight, r.fBottom);
+#StdOut
+rect={1,2,3,4}
+##
+##
+
+#SeeAlso reset SkRegion
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method Iterator(const SkRegion& region)
+#Line # constructs Region iterator ##
+Sets Iterator to return elements of IRect array in region.
+#Param region Region to iterate ##
+
+#Return Region iterator ##
+
+#Example
+ SkRegion region;
+ region.setRect({1, 2, 3, 4});
+ SkRegion::Iterator iter(region);
+ auto r = iter.rect();
+ SkDebugf("rect={%d,%d,%d,%d}\n", r.fLeft, r.fTop, r.fRight, r.fBottom);
+#StdOut
+rect={1,2,3,4}
+##
+##
+
+#SeeAlso reset SkRegion Cliperator Spanerator
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool rewind()
+#Line # points Iterator to start ##
+
+Points Iterator to start of Region.
+Returns true if Region was set; otherwise, returns false.
+
+#Return true if Region was set ##
+
+#Example
+#Bug 8186
+ auto debugster = [](const char* label, SkRegion::Iterator& iter, bool addRewind) -> void {
+ if (addRewind) {
+ bool success = iter.rewind();
+ SkDebugf("%14s rewind success=%s\n", label, success ? "true" : "false");
+ }
+ auto r = iter.rect();
+ SkDebugf("%14s rect={%d,%d,%d,%d}\n", label, r.fLeft, r.fTop, r.fRight, r.fBottom);
+ };
+ SkRegion::Iterator iter;
+ debugster("empty iter", iter, true);
+ SkRegion region;
+ iter.reset(region);
+ debugster("empty region", iter, true);
+ region.setRect({1, 2, 3, 4});
+ iter.reset(region);
+ debugster("after set rect", iter, false);
+ debugster("after rewind", iter, true);
+#StdOut
+#Volatile
+ empty iter rewind success=false
+ empty iter rect={0,0,0,0}
+ empty region rewind success=true
+ empty region rect={0,0,0,0}
+after set rect rect={1,2,3,4}
+ after rewind rewind success=true
+ after rewind rect={1,2,3,4}
+##
+##
+
+#SeeAlso reset
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void reset(const SkRegion& region)
+#Line # sets Region to iterate ##
+
+Resets iterator, using the new Region.
+
+#Param region Region to iterate ##
+
+#Example
+ auto debugster = [](const char* label, SkRegion::Iterator& iter) -> void {
+ SkDebugf("%14s: done=%s\n", label, iter.done() ? "true" : "false");
+ };
+ SkRegion region;
+ SkRegion::Iterator iter(region);
+ debugster("empty region", iter);
+ region.setRect({1, 2, 3, 4});
+ debugster("after set rect", iter);
+ iter.reset(region);
+ debugster("after reset", iter);
+#StdOut
+ empty region: done=true
+after set rect: done=true
+ after reset: done=false
+##
+##
+
+#SeeAlso rewind
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool done() const
+#Line # returns if data parsing is complete ##
+
+Returns true if Iterator is pointing to final IRect in Region.
+
+#Return true if data parsing is complete ##
+
+#Example
+ SkRegion region;
+ SkRegion::Iterator iter(region);
+ SkDebugf("done=%s\n", iter.done() ? "true" : "false");
+ region.setRect({1, 2, 3, 4});
+ iter.rewind();
+ SkDebugf("done=%s\n", iter.done() ? "true" : "false");
+#StdOut
+done=true
+done=false
+##
+##
+
+#SeeAlso next rect
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void next()
+#Line # advances to next IRect ##
+
+Advances Iterator to next IRect in Region if it is not done.
+
+#Example
+ SkRegion region;
+ SkIRect rects[] = {{1, 2, 3, 4}, {5, 6, 7, 8}};
+ region.setRects(rects, SK_ARRAY_COUNT(rects));
+ SkRegion::Iterator iter(region);
+ do {
+ auto r2 = iter.rect();
+ SkDebugf("rect={%d,%d,%d,%d}\n", r2.fLeft, r2.fTop, r2.fRight, r2.fBottom);
+ iter.next();
+ } while (!iter.done());
+#StdOut
+rect={1,2,3,4}
+rect={5,6,7,8}
+##
+##
+
+#SeeAlso done rect
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method const SkIRect& rect() const
+#Line # returns part of Region as IRect ##
+
+Returns IRect element in Region. Does not return predictable results if Region
+is empty.
+
+#Return part of Region as IRect ##
+
+#Example
+#Bug 8186
+ SkRegion region;
+ SkRegion::Iterator iter(region);
+ auto r1 = iter.rect();
+ SkDebugf("rect={%d,%d,%d,%d}\n", r1.fLeft, r1.fTop, r1.fRight, r1.fBottom);
+ region.setRect({1, 2, 3, 4});
+ iter.rewind();
+ auto r2 = iter.rect();
+ SkDebugf("rect={%d,%d,%d,%d}\n", r2.fLeft, r2.fTop, r2.fRight, r2.fBottom);
+#StdOut
+#Volatile
+rect={0,0,0,0}
+rect={1,2,3,4}
+##
+##
+
+#SeeAlso next done
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method const SkRegion* rgn() const
+#Line # returns original Region ##
+
+Returns Region if set; otherwise, returns nullptr.
+
+#Return iterated Region ##
+
+#Example
+ SkRegion region;
+ SkIRect rects[] = {{1, 2, 3, 4}, {3, 4, 5, 6}};
+ region.setRects(rects, SK_ARRAY_COUNT(rects));
+ SkRegion::Iterator iter(region);
+ auto r = iter.rect();
+ SkDebugf("rect={%d,%d,%d,%d}\n", r.fLeft, r.fTop, r.fRight, r.fBottom);
+ auto b = iter.rgn()->getBounds();
+ SkDebugf("bounds={%d,%d,%d,%d}\n", b.fLeft, b.fTop, b.fRight, b.fBottom);
+##
+
+#SeeAlso Iterator reset
+
+#Method ##
+
+#Class Iterator ##
+
+# ------------------------------------------------------------------------------
+
+#Class Cliperator
+#Line # iterator returning IRect within clip ##
+
+#Code
+ class SK_API Cliperator {
+ public:
+ Cliperator(const SkRegion&, const SkIRect& clip);
+ bool done();
+ void next();
+ const SkIRect& rect() const;
+ };
+##
+
+Returns the sequence of rectangles, sorted along y-axis, then x-axis, that make
+up Region intersected with the specified clip rectangle.
+
+# ------------------------------------------------------------------------------
+
+#Method Cliperator(const SkRegion& region, const SkIRect& clip)
+#Line # constructs Region iterator with clip ##
+
+Sets Cliperator to return elements of IRect array in Region within clip.
+
+#Param region Region to iterate ##
+#Param clip bounds of iteration ##
+
+#Return Region iterator ##
+
+#Example
+ SkRegion region;
+ region.setRect({1, 2, 3, 4});
+ SkRegion::Cliperator clipper(region, {0, 0, 2, 3});
+ auto r = clipper.rect();
+ SkDebugf("rect={%d,%d,%d,%d}\n", r.fLeft, r.fTop, r.fRight, r.fBottom);
+#StdOut
+rect={1,2,2,3}
+##
+##
+
+#SeeAlso SkRegion Iterator Spanerator
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool done()
+#Line # returns if data parsing is complete ##
+
+Returns true if Cliperator is pointing to final IRect in Region.
+
+#Return true if data parsing is complete ##
+
+#Example
+ auto debugster = [](const char* label, SkRegion& region) -> void {
+ SkRegion::Cliperator clipper(region, {0, 0, 5, 5});
+ SkDebugf("%14s done=%s\n", label, clipper.done() ? "true" : "false");
+ };
+ SkRegion region;
+ debugster("empty region", region);
+ region.setRect({1, 2, 3, 4});
+ debugster("after add rect", region);
+#StdOut
+ empty region done=true
+after add rect done=false
+##
+##
+
+#SeeAlso next rect
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void next()
+#Line # advances to next IRect within clip ##
+
+Advances iterator to next IRect in Region contained by clip.
+
+#Example
+ SkRegion region;
+ SkIRect rects[] = {{1, 2, 3, 4}, {5, 6, 7, 8}};
+ region.setRects(rects, SK_ARRAY_COUNT(rects));
+ SkRegion::Cliperator clipper(region, {0, 3, 8, 7});
+ do {
+ auto r2 = clipper.rect();
+ SkDebugf("rect={%d,%d,%d,%d}\n", r2.fLeft, r2.fTop, r2.fRight, r2.fBottom);
+ clipper.next();
+ } while (!clipper.done());
+#StdOut
+rect={1,3,3,4}
+rect={5,6,7,7}
+##
+##
+
+#SeeAlso done
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method const SkIRect& rect() const
+#Line # returns part of Region as IRect intersected with clip ##
+
+Returns IRect element in Region, intersected with clip passed to Cliperator
+constructor. Does not return predictable results if Region
+is empty.
+
+#Return part of Region inside clip as IRect ##
+
+#Example
+#Bug 8186
+ auto debugster = [](const char* label, SkRegion& region) -> void {
+ SkRegion::Cliperator clipper(region, {0, 0, 5, 3});
+ auto r = clipper.rect();
+ SkDebugf("%14s rect={%d,%d,%d,%d}\n", label, r.fLeft, r.fTop, r.fRight, r.fBottom);
+ };
+ SkRegion region;
+ debugster("empty region", region);
+ region.setRect({1, 2, 3, 4});
+ debugster("after set rect", region);
+#StdOut
+#Volatile
+ empty region rect={1094713344,1065353216,0,-1}
+after set rect rect={1,2,3,3}
+##
+##
+
+#SeeAlso next done
+
+#Method ##
+
+#Class Cliperator ##
+
+# ------------------------------------------------------------------------------
+
+#Class Spanerator
+#Line # horizontal line segment iterator ##
+
+#Code
+ class Spanerator {
+ public:
+ Spanerator(const SkRegion& region, int y, int left, int right);
+ bool next(int* left, int* right);
+ };
+##
+
+Returns the line segment ends within Region that intersect a horizontal line.
+
+# ------------------------------------------------------------------------------
+
+#Method Spanerator(const SkRegion& region, int y, int left, int right)
+#Line # constructs Region iterator on scan line ##
+
+Sets Spanerator to return line segments in Region on scan line.
+
+
+#Param region Region to iterate ##
+#Param y horizontal line to intersect ##
+#Param left bounds of iteration ##
+#Param right bounds of iteration ##
+
+#Return Region iterator ##
+
+#Example
+ SkRegion region;
+ region.setRect({1, 2, 3, 4});
+ SkRegion::Spanerator spanner(region, 3, 2, 4);
+ int left, right;
+ bool result = spanner.next(&left, &right);
+ SkDebugf("result=%s left=%d right=%d\n", result ? "true" : "false", left, right);
+##
+
+#SeeAlso SkRegion Iterator Cliperator
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool next(int* left, int* right)
+#Line # advances to next span on horizontal line ##
+
+Advances iterator to next span intersecting Region within line segment provided
+in constructor. Returns true if interval was found.
+
+#Param left pointer to span start; may be nullptr ##
+#Param right pointer to span end; may be nullptr ##
+
+#Return true if interval was found ##
+
+#Example
+ auto debugster = [](const char* label, SkRegion& region) -> void {
+ SkRegion::Spanerator spanner(region, 3, 2, 4);
+ int left, right;
+ bool result = spanner.next(&left, &right);
+ SkDebugf("%14s: result=%s", label, result ? "true" : "false");
+ if (result) SkDebugf(" left=%d right=%d", left, right);
+ SkDebugf("\n");
+ };
+ SkRegion region;
+ debugster("empty region", region);
+ region.setRect({1, 2, 3, 4});
+ debugster("after set rect", region);
+#StdOut
+ empty region: result=false
+after set rect: result=true left=2 right=3
+##
+##
+
+#SeeAlso done
+
+#Method ##
+
+#Class Spanerator ##
+
+# ------------------------------------------------------------------------------
+
+#Method SkRegion()
+#In Constructor
+#Line # constructs with default values ##
+
+Constructs an empty Region. Region is set to empty bounds
+at (0, 0) with zero width and height.
+
+#Return empty Region ##
+
+#Example
+SkRegion region;
+SkIRect r = region.getBounds();
+SkDebugf("region bounds: {%d, %d, %d, %d}\n", r.fLeft, r.fTop, r.fRight, r.fBottom);
+#StdOut
+region bounds: {0, 0, 0, 0}
+##
+##
+
+#SeeAlso setEmpty
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method SkRegion(const SkRegion& region)
+#In Constructor
+#Line # makes a shallow copy ##
+Constructs a copy of an existing region.
+Copy constructor makes two regions identical by value. Internally, region and
+the returned result share pointer values. The underlying Rect array is
+copied when modified.
+
+Creating a Region copy is very efficient and never allocates memory.
+Regions are always copied by value from the interface; the underlying shared
+pointers are not exposed.
+
+#Param region Region to copy by value ##
+
+#Return copy of Region ##
+
+#Example
+ auto debugster = [](const char* label, SkRegion& region) -> void {
+ auto r = region.getBounds();
+ SkDebugf("%14s: {%d,%d,%d,%d}\n", label, r.fLeft, r.fTop, r.fRight, r.fBottom);
+ };
+ SkRegion region({1, 2, 3, 4});
+ SkRegion region2(region);
+ debugster("region bounds", region);
+ debugster("region2 bounds", region2);
+ region.setEmpty();
+ SkDebugf(" after region set empty:\n");
+ debugster("region bounds", region);
+ debugster("region2 bounds", region2);
+#StdOut
+ region bounds: {1,2,3,4}
+region2 bounds: {1,2,3,4}
+ after region set empty:
+ region bounds: {0,0,0,0}
+region2 bounds: {1,2,3,4}
+##
+##
+
+#SeeAlso setRegion operator=(const SkRegion& region)
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method explicit SkRegion(const SkIRect& rect)
+#In Constructor
+#Line # constructs Region matching IRect ##
+Constructs a rectangular Region matching the bounds of rect.
+
+#Param rect bounds of constructed Region ##
+
+#Return rectangular Region ##
+
+#Example
+ SkRegion region({1, 2, 3, 4});
+ SkRegion region2;
+ region2.setRect({1, 2, 3, 4});
+ SkDebugf("region %c= region2\n", region == region2 ? '=' : '!');
+##
+
+#SeeAlso setRect setRegion
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method ~SkRegion()
+#In Constructor
+#Line # decreases Reference_Count of owned objects ##
+Releases ownership of any shared data and deletes data if Region is sole owner.
+
+#Example
+#Description
+delete calls Region Destructor, but copy of original in region2 is unaffected.
+##
+ SkRegion* region = new SkRegion({1, 2, 3, 4});
+ SkRegion region2(*region);
+ delete region;
+ auto r = region2.getBounds();
+ SkDebugf("region2 bounds: {%d,%d,%d,%d}\n", r.fLeft, r.fTop, r.fRight, r.fBottom);
+#StdOut
+region2 bounds: {1,2,3,4}
+##
+##
+
+#SeeAlso SkRegion() SkRegion(const SkRegion& region) SkRegion(const SkIRect& rect) operator=(const SkRegion& region)
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method SkRegion& operator=(const SkRegion& region)
+#In Operator
+#Line # makes a shallow copy ##
+Constructs a copy of an existing region.
+Makes two regions identical by value. Internally, region and
+the returned result share pointer values. The underlying Rect array is
+copied when modified.
+
+Creating a Region copy is very efficient and never allocates memory.
+Regions are always copied by value from the interface; the underlying shared
+pointers are not exposed.
+
+#Param region Region to copy by value ##
+
+#Return Region to copy by value ##
+
+#Example
+ auto debugster = [](const char* label, SkRegion& region) -> void {
+ auto r = region.getBounds();
+ SkDebugf("%14s: {%d,%d,%d,%d}\n", label, r.fLeft, r.fTop, r.fRight, r.fBottom);
+ };
+ SkRegion region1({1, 2, 3, 4});
+ SkRegion region2 = region1;
+ debugster("region1 bounds", region1);
+ debugster("region2 bounds", region2);
+#StdOut
+region1 bounds: {1,2,3,4}
+region2 bounds: {1,2,3,4}
+##
+##
+
+#SeeAlso set swap SkRegion(const SkRegion& region)
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool operator==(const SkRegion& other)_const
+#In Operator
+#Line # compares Regions for equality ##
+
+Compares Region and other; returns true if they enclose exactly
+the same area.
+
+#Param other Region to compare ##
+
+#Return true if Region pair are equivalent ##
+
+#Example
+ auto debugster = [](const char* prefix, const SkRegion& a, const SkRegion& b) -> void {
+ SkDebugf("%s one %c= two\n", prefix, a == b ? '=' : '!');
+ };
+ SkRegion one;
+ SkRegion two;
+ debugster("empty", one, two);
+ one.setRect({1, 2, 3, 4});
+ debugster("set rect", one, two);
+ one.setEmpty();
+ debugster("set empty", one, two);
+#StdOut
+empty one == two
+set rect one != two
+set empty one == two
+##
+##
+
+#SeeAlso operator!=(const SkRegion& other)_const operator=(const SkRegion& region)
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool operator!=(const SkRegion& other)_const
+#In Operator
+#Line # compares Regions for inequality ##
+
+Compares Region and other; returns true if they do not enclose the same area.
+
+#Param other Region to compare ##
+
+#Return true if Region pair are not equivalent ##
+
+#Example
+ auto debugster = [](const char* prefix, const SkRegion& a, const SkRegion& b) -> void {
+ SkDebugf("%s one %c= two\n", prefix, a != b ? '!' : '=');
+ };
+ SkRegion one;
+ SkRegion two;
+ debugster("empty", one, two);
+ one.setRect({1, 2, 3, 4});
+ two.setRect({1, 2, 3, 3});
+ debugster("set rect", one, two);
+ two.op({1, 3, 3, 4}, SkRegion::kUnion_Op);
+ debugster("union rect", one, two);
+#StdOut
+empty one == two
+set rect one != two
+union rect one == two
+##
+##
+
+#SeeAlso operator==(const SkRegion& other)_const operator=(const SkRegion& region)
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool set(const SkRegion& src)
+#In Constructor
+#Line # makes a shallow copy ##
+
+Sets Region to src, and returns true if src bounds is not empty.
+This makes Region and src identical by value. Internally,
+Region and src share pointer values. The underlying Rect array is
+copied when modified.
+
+Creating a Region copy is very efficient and never allocates memory.
+Regions are always copied by value from the interface; the underlying shared
+pointers are not exposed.
+
+#Param src Region to copy ##
+
+#Return copy of src ##
+
+#Example
+ auto debugster = [](const char* label, SkRegion& region) -> void {
+ auto r = region.getBounds();
+ SkDebugf("%14s: {%d,%d,%d,%d}\n", label, r.fLeft, r.fTop, r.fRight, r.fBottom);
+ };
+ SkRegion region1({1, 2, 3, 4});
+ SkRegion region2;
+ region2.set(region1);
+ debugster("region1 bounds", region1);
+ debugster("region2 bounds", region2);
+#StdOut
+region1 bounds: {1,2,3,4}
+region2 bounds: {1,2,3,4}
+##
+##
+
+#SeeAlso operator=(const SkRegion& region) swap SkRegion(const SkRegion& region)
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void swap(SkRegion& other)
+#In Operator
+#Line # exchanges Region pair ##
+
+Exchanges IRect array of Region and other. swap() internally exchanges pointers,
+so it is lightweight and does not allocate memory.
+
+swap() usage has largely been replaced by operator=(const SkRegion& region).
+Paths do not copy their content on assignment until they are written to,
+making assignment as efficient as swap().
+
+#Param other operator=(const SkRegion& region) set ##
+
+#Example
+ auto debugster = [](const char* label, SkRegion& region) -> void {
+ auto r = region.getBounds();
+ SkDebugf("%14s: {%d,%d,%d,%d}\n", label, r.fLeft, r.fTop, r.fRight, r.fBottom);
+ };
+ SkRegion region1({1, 2, 3, 4});
+ SkRegion region2;
+ region1.swap(region2);
+ debugster("region1 bounds", region1);
+ debugster("region2 bounds", region2);
+#StdOut
+region1 bounds: {0,0,0,0}
+region2 bounds: {1,2,3,4}
+##
+##
+
+#SeeAlso operator=(const SkRegion& region) set SkRegion(const SkRegion& region)
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isEmpty() const
+#In Property
+#Line # returns if bounds has no width or height ##
+
+Returns true if Region is empty.
+Empty Region has bounds width or height less than or equal to zero.
+SkRegion() constructs empty Region; setEmpty
+and setRect with dimensionless data make Region empty.
+
+#Return true if bounds has no width or height ##
+
+#Example
+ auto debugster = [](const char* label, SkRegion& region) -> void {
+ SkDebugf("%14s: region is %s" "empty\n", label, region.isEmpty() ? "" : "not ");
+ };
+ SkRegion region;
+ debugster("initial", region);
+ region.setRect({1, 2, 3, 4});
+ debugster("set rect", region);
+ region.setEmpty();
+ debugster("set empty", region);
+#StdOut
+ initial: region is empty
+ set rect: region is not empty
+ set empty: region is empty
+##
+##
+
+#SeeAlso isRect isComplex operator==(const SkRegion& other)_const
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isRect() const
+#In Property
+#Line # returns if Region contains one IRect ##
+
+Returns true if Region is one IRect with positive dimensions.
+
+#Return true if Region contains one IRect ##
+
+#Example
+ auto debugster = [](const char* label, const SkRegion& region) -> void {
+ SkDebugf("%s: region is %s" "rect\n", label, region.isRect() ? "" : "not ");
+ };
+ SkRegion region;
+ debugster("initial", region);
+ region.setRect({1, 2, 3, 4});
+ debugster("set rect", region);
+ region.setEmpty();
+ debugster("set empty", region);
+#StdOut
+initial: region is not rect
+set rect: region is rect
+set empty: region is not rect
+##
+##
+
+#SeeAlso isEmpty isComplex
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isComplex() const
+#In Property
+#Line # returns true if Region contains more than one IRect ##
+
+Returns true if Region is described by more than one rectangle.
+
+#Return true if Region contains more than one IRect ##
+
+#Example
+ auto debugster = [](const char* label, const SkRegion& region) -> void {
+ SkDebugf("%s: region is %s" "complex\n", label, region.isComplex() ? "" : "not ");
+ };
+ SkRegion region;
+ debugster("initial", region);
+ region.setRect({1, 2, 3, 4});
+ debugster("set rect", region);
+ region.op({2, 3, 4, 5}, SkRegion::kUnion_Op);
+ debugster("op rect", region);
+#StdOut
+initial: region is not complex
+set rect: region is not complex
+op rect: region is complex
+##
+##
+
+#SeeAlso isEmpty isRect
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method const SkIRect& getBounds() const
+#In Property
+#Line # returns maximum and minimum of IRect array ##
+
+Returns minimum and maximum axes values of IRect array.
+Returns (0, 0, 0, 0) if Region is empty.
+
+#Return combined bounds of all IRect elements ##
+
+#Example
+ SkRegion region({1, 2, 3, 4});
+ region.op({2, 3, 4, 5}, SkRegion::kUnion_Op);
+ auto r = region.getBounds();
+ SkDebugf("bounds: {%d,%d,%d,%d}\n", r.fLeft, r.fTop, r.fRight, r.fBottom);
+#StdOut
+bounds: {1,2,4,5}
+##
+##
+
+#SeeAlso isEmpty isRect
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method int computeRegionComplexity() const
+#In Property
+#Line # returns relative complexity ##
+
+Returns a value that increases with the number of
+elements in Region. Returns zero if Region is empty.
+Returns one if Region equals IRect; otherwise, returns
+value greater than one indicating that Region is complex.
+
+Call to compare Regions for relative complexity.
+
+#Return relative complexity ##
+
+#Example
+ auto debugster = [](const char* label, const SkRegion& region) -> void {
+ SkDebugf("%s: region complexity %d\n", label, region.computeRegionComplexity());
+ };
+ SkRegion region;
+ debugster("initial", region);
+ region.setRect({1, 2, 3, 4});
+ debugster("set rect", region);
+ region.op({2, 3, 4, 5}, SkRegion::kUnion_Op);
+ debugster("op rect", region);
+#StdOut
+initial: region complexity 0
+set rect: region complexity 1
+op rect: region complexity 3
+##
+##
+
+#SeeAlso isRect isComplex
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool getBoundaryPath(SkPath* path) const
+#In Property
+#Line # appends Region outline to Path ##
+
+Appends outline of Region to path.
+Returns true if Region is not empty; otherwise, returns false, and leaves path
+unmodified.
+
+#Param path Path to append to ##
+
+#Return true if path changed ##
+
+#Example
+#Height 100
+ SkRegion region;
+ region.setRect({10, 20, 90, 60});
+ region.op({30, 40, 60, 80}, SkRegion::kXOR_Op);
+ canvas->drawRegion(region, SkPaint());
+ SkPath path;
+ region.getBoundaryPath(&path);
+ path.offset(100, 0);
+ canvas->drawPath(path, SkPaint());
+##
+
+#SeeAlso isEmpty isComplex
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool setEmpty()
+#In Constructor
+#Line # constructs with default values ##
+
+Constructs an empty Region. Region is set to empty bounds
+at (0, 0) with zero width and height. Always returns false.
+
+#Return false ##
+
+#Example
+ auto debugster = [](const char* label, SkRegion& region) -> void {
+ auto r = region.getBounds();
+ SkDebugf("%14s: {%d,%d,%d,%d}\n", label, r.fLeft, r.fTop, r.fRight, r.fBottom);
+ };
+ SkRegion region({1, 2, 3, 4});
+ debugster("region bounds", region);
+ region.setEmpty();
+ SkDebugf(" after region set empty:\n");
+ debugster("region bounds", region);
+#StdOut
+ region bounds: {1,2,3,4}
+ after region set empty:
+ region bounds: {0,0,0,0}
+##
+##
+
+#SeeAlso SkRegion()
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool setRect(const SkIRect& rect)
+#In Constructor
+#Line # constructs Region matching IRect ##
+
+Constructs a rectangular Region matching the bounds of rect.
+If rect is empty, constructs empty and returns false.
+
+#Param rect bounds of constructed Region ##
+
+#Return true if rect is not empty ##
+
+#Example
+ SkRegion region({1, 2, 3, 4});
+ SkDebugf("region is %s" "empty\n", region.isEmpty() ? "" : "not ");
+ bool setEmpty = region.setRect({1, 2, 1, 4});
+ SkDebugf("region is %s" "empty\n", region.isEmpty() ? "" : "not ");
+ SkDebugf("setEmpty: %s\n", setEmpty ? "true" : "false");
+#StdOut
+region is not empty
+region is empty
+setEmpty: false
+##
+##
+
+#SeeAlso SkRegion(const SkIRect& rect)
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool setRect(int32_t left, int32_t top, int32_t right, int32_t bottom)
+#In Constructor
+#Line # constructs Region matching bounds ##
+
+Constructs Region with bounds (left, top, right, bottom).
+Returns true if left is less than right and top is less than bottom; otherwise,
+constructs empty Region and returns false.
+
+#Param left edge of bounds on x-axis ##
+#Param top edge of bounds on y-axis ##
+#Param right edge of bounds on x-axis ##
+#Param bottom edge of bounds on y-axis ##
+
+#Return rectangular Region ##
+
+#Example
+ auto debugster = [](const char* label, bool success, SkRegion& region) -> void {
+ auto r = region.getBounds();
+ SkDebugf("%14s: success:%s {%d,%d,%d,%d}\n", label, success ? "true" : "false",
+ r.fLeft, r.fTop, r.fRight, r.fBottom);
+ };
+ SkRegion region;
+ bool success = region.setRect(1, 2, 3, 4);
+ debugster("set to: 1,2,3,4", success, region);
+ success = region.setRect(3, 2, 1, 4);
+ debugster("set to: 3,2,1,4", success, region);
+#StdOut
+set to: 1,2,3,4: success:true {1,2,3,4}
+set to: 3,2,1,4: success:false {0,0,0,0}
+##
+##
+
+#SeeAlso SkRegion(const SkIRect& rect)
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool setRects(const SkIRect rects[], int count)
+#In Constructor
+#Line # sets IRect array ##
+
+Constructs Region as the union of IRect in rects array. If count is
+zero, constructs empty Region. Returns false if constructed Region is empty.
+
+May be faster than repeated calls to op().
+
+#Param rects array of IRects ##
+#Param count array size ##
+
+#Return true if constructed Region is not empty ##
+
+#Example
+#Height 70
+ SkIRect rects[] = { {10, 10, 40, 40}, {20, 20, 50, 50}, {30, 30, 60, 60} };
+ SkRegion region;
+ region.setRects(rects, SK_ARRAY_COUNT(rects));
+ canvas->drawRegion(region, SkPaint());
+ region.setEmpty();
+ for (auto add : rects) {
+ region.op(add, SkRegion::kUnion_Op);
+ }
+ region.translate(100, 0);
+ canvas->drawRegion(region, SkPaint());
+##
+
+#SeeAlso setRect op
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool setRegion(const SkRegion& region)
+#In Constructor
+#Line # copies Region ##
+
+Constructs a copy of an existing region.
+Makes two regions identical by value. Internally, region and
+the returned result share pointer values. The underlying Rect array is
+copied when modified.
+
+Creating a Region copy is very efficient and never allocates memory.
+Regions are always copied by value from the interface; the underlying shared
+pointers are not exposed.
+
+#Param region Region to copy by value ##
+
+#Return Region to copy by value ##
+
+#Example
+ auto debugster = [](const char* label, SkRegion& region) -> void {
+ auto r = region.getBounds();
+ SkDebugf("%14s: {%d,%d,%d,%d}\n", label, r.fLeft, r.fTop, r.fRight, r.fBottom);
+ };
+ SkRegion region({1, 2, 3, 4});
+ SkRegion region2;
+ region2.setRegion(region);
+ debugster("region bounds", region);
+ debugster("region2 bounds", region2);
+ region2.setEmpty();
+ SkDebugf(" after region set empty:\n");
+ debugster("region bounds", region);
+ debugster("region2 bounds", region2);
+#StdOut
+ region bounds: {1,2,3,4}
+region2 bounds: {1,2,3,4}
+ after region set empty:
+ region bounds: {1,2,3,4}
+region2 bounds: {0,0,0,0}
+##
+##
+
+#SeeAlso SkRegion(const SkRegion& region)
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool setPath(const SkPath& path, const SkRegion& clip)
+#In Constructor
+#Line # constructs Region from clipped Path ##
+
+Constructs Region to match outline of path within clip.
+Returns false if constructed Region is empty.
+
+Constructed Region draws the same pixels as path through clip when
+Anti_Aliasing is disabled.
+
+#Param path Path providing outline ##
+#Param clip Region containing path ##
+
+#Return true if constructed Region is not empty ##
+
+#Example
+#Height 120
+ SkPaint paint;
+ paint.setTextSize(128);
+ SkPath textPath;
+ paint.getTextPath("Q", 1, 0, 110, &textPath);
+ SkIRect clipRect = {20, 20, 100, 120};
+ SkRegion clipRegion(clipRect);
+ SkRegion region;
+ region.setPath(textPath, clipRegion);
+ canvas->drawRegion(region, SkPaint());
+ clipRect.offset(100, 0);
+ textPath.offset(100, 0);
+ canvas->clipRect(SkRect::Make(clipRect), false);
+ canvas->drawPath(textPath, SkPaint());
+##
+
+#SeeAlso setRects op
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool intersects(const SkIRect& rect) const
+#In Intersection
+#Line # returns true if areas overlap ##
+
+Returns true if Region intersects rect.
+Returns false if either rect or Region is empty, or do not intersect.
+
+#Param rect IRect to intersect ##
+
+#Return true if rect and Region have area in common ##
+
+#Example
+#Duration 4
+#Height 128
+ SkPaint paint;
+ paint.setTextSize(128);
+ SkPath textPath;
+ paint.getTextPath("W", 1, 20, 110, &textPath);
+ SkRegion region;
+ region.setPath(textPath, SkRegion({0, 0, 256, 256}));
+ canvas->drawRegion(region, SkPaint());
+ SkIRect iRect = SkIRect::MakeXYWH(frame * 160, 55, 10, 10);
+ paint.setColor(region.intersects(iRect) ? SK_ColorBLUE : SK_ColorRED);
+ canvas->drawRect(SkRect::Make(iRect), paint);
+##
+
+#SeeAlso contains SkRect::intersects
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool intersects(const SkRegion& other) const
+
+Returns true if Region intersects other.
+Returns false if either other or Region is empty, or do not intersect.
+
+#Param other Region to intersect ##
+
+#Return true if other and Region have area in common ##
+
+#Example
+#Duration 4
+#Height 128
+ SkPaint paint;
+ paint.setTextSize(128);
+ SkPath hPath, dotPath;
+ paint.getTextPath("H", 1, 40, 110, &hPath);
+ paint.getTextPath(",", 1, frame * 180, 95, &dotPath);
+ SkRegion hRegion, dotRegion;
+ hRegion.setPath(hPath, SkRegion({0, 0, 256, 256}));
+ dotRegion.setPath(dotPath, SkRegion({0, 0, 256, 256}));
+ canvas->drawRegion(hRegion, paint);
+ paint.setColor(hRegion.intersects(dotRegion) ? SK_ColorBLUE : SK_ColorRED);
+ canvas->drawRegion(dotRegion, paint);
+##
+
+#SeeAlso contains SkRect::intersects
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool contains(int32_t x, int32_t y) const
+#In Intersection
+#Line # returns true if points are equal or inside ##
+
+Returns true if IPoint (x, y) is inside Region.
+Returns false if Region is empty.
+
+#Param x test IPoint x-coordinate ##
+#Param y test IPoint y-coordinate ##
+
+#Return true if (x, y) is inside Region ##
+
+#Example
+#Height 128
+ SkPaint paint;
+ paint.setTextSize(128);
+ SkPath xPath;
+ paint.getTextPath("X", 1, 20, 110, &xPath);
+ SkRegion xRegion;
+ xRegion.setPath(xPath, SkRegion({0, 0, 256, 256}));
+ canvas->drawRegion(xRegion, paint);
+ for (int y = 0; y < 128; y += 8) {
+ for (int x = 0; x < 128; x += 8) {
+ paint.setColor(xRegion.contains(x, y) ? SK_ColorWHITE : SK_ColorRED);
+ canvas->drawPoint(x, y, paint);
+ }
+ }
+##
+
+#SeeAlso intersects SkRect::contains
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool contains(const SkIRect& other) const
+
+Returns true if other is completely inside Region.
+Returns false if Region or other is empty.
+
+#Param other IRect to contain ##
+
+#Return true if other is inside Region ##
+
+#Example
+#Height 128
+#Duration 4
+ SkPaint paint;
+ paint.setTextSize(128);
+ SkPath xPath;
+ paint.getTextPath("X", 1, 20, 110, &xPath);
+ SkRegion xRegion;
+ SkIRect drawBounds = {0, 0, 128, 128};
+ xRegion.setPath(xPath, SkRegion(drawBounds));
+ xRegion.op(drawBounds, SkRegion::kReverseDifference_Op);
+ canvas->drawRegion(xRegion, paint);
+ SkIRect test = SkIRect::MakeXYWH(frame* 128, 64, 5, 5);
+ if (xRegion.contains(test)) {
+ paint.setColor(SK_ColorYELLOW);
+ canvas->drawRect(SkRect::Make(test), paint);
+ }
+##
+
+#SeeAlso intersects SkRect::contains
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool contains(const SkRegion& other) const
+
+Returns true if other is completely inside Region.
+Returns false if Region or other is empty.
+
+#Param other Region to contain ##
+
+#Return true if other is inside Region ##
+
+#Example
+#Height 128
+#Duration 4
+ SkPaint paint;
+ paint.setTextSize(128);
+ SkPath xPath, testPath;
+ paint.getTextPath("X", 1, 20, 110, &xPath);
+ paint.getTextPath("`", 1, frame * 150 - 40, 150, &testPath);
+ SkRegion xRegion, testRegion;
+ SkIRect drawBounds = {0, 0, 128, 128};
+ xRegion.setPath(xPath, SkRegion(drawBounds));
+ testRegion.setPath(testPath, SkRegion(drawBounds));
+ xRegion.op(drawBounds, SkRegion::kReverseDifference_Op);
+ canvas->drawRegion(xRegion, paint);
+ if (xRegion.contains(testRegion)) {
+ paint.setColor(SK_ColorYELLOW);
+ canvas->drawRegion(testRegion, paint);
+ }
+##
+
+#SeeAlso intersects SkRect::contains
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool quickContains(const SkIRect& r) const
+#In Intersection
+#Line # returns true quickly if points are equal or inside ##
+
+Returns true if Region is a single rectangle and contains r.
+May return false even though Region contains r.
+
+#Param r IRect to contain ##
+
+#Return true quickly if r points are equal or inside ##
+
+#Example
+ SkRegion region({1, 2, 3, 4});
+ SkIRect test = {2, 2, 3, 3};
+ SkDebugf("quickContains 1: %s\n", region.quickContains(test) ? "true" : "false");
+ region.op({1, 4, 3, 6}, SkRegion::kUnion_Op);
+ SkDebugf("quickContains 2: %s\n", region.quickContains(test) ? "true" : "false");
+ region.op({1, 7, 3, 8}, SkRegion::kUnion_Op);
+ SkDebugf("quickContains 3: %s\n", region.quickContains(test) ? "true" : "false");
+#StdOut
+quickContains 1: true
+quickContains 2: true
+quickContains 3: false
+##
+##
+
+#SeeAlso contains quickReject intersects
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool quickContains(int32_t left, int32_t top, int32_t right,
+ int32_t bottom) const
+
+Returns true if Region is a single rectangle and contains IRect
+(left, top, right, bottom).
+Returns false if Region is empty or IRect (left, top, right, bottom) is empty.
+May return false even though Region contains (left, top, right, bottom).
+
+#Param left edge of bounds on x-axis ##
+#Param top edge of bounds on y-axis ##
+#Param right edge of bounds on x-axis ##
+#Param bottom edge of bounds on y-axis ##
+
+#Return true quickly if IRect are equal or inside ##
+
+#Example
+ auto debugster = [](const char* label, SkRegion& region) -> void {
+ SkDebugf("%s: %s\n", label, region.quickContains(2, 2, 3, 3) ? "true" : "false");
+ };
+ SkRegion region({1, 2, 3, 4});
+ debugster("quickContains 1", region);
+ region.op({1, 4, 3, 6}, SkRegion::kUnion_Op);
+ debugster("quickContains 2", region);
+ region.op({1, 7, 3, 8}, SkRegion::kUnion_Op);
+ debugster("quickContains 3", region);
+#StdOut
+quickContains 1: true
+quickContains 2: true
+quickContains 3: false
+##
+##
+
+#SeeAlso contains quickReject intersects
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool quickReject(const SkIRect& rect) const
+#In Intersection
+#Line # returns true quickly if points are outside ##
+
+Returns true if Region does not intersect rect.
+Returns true if rect is empty or Region is empty.
+May return false even though Region does not intersect rect.
+
+#Param rect IRect to intersect ##
+
+#Return true if rect does not intersect ##
+
+#Example
+ SkRegion region({1, 2, 3, 4});
+ SkIRect test = {4, 2, 5, 3};
+ SkDebugf("quickReject 1: %s\n", region.quickReject(test) ? "true" : "false");
+ region.op({1, 4, 3, 6}, SkRegion::kUnion_Op);
+ SkDebugf("quickReject 2: %s\n", region.quickReject(test) ? "true" : "false");
+ region.op({4, 7, 5, 8}, SkRegion::kUnion_Op);
+ SkDebugf("quickReject 3: %s\n", region.quickReject(test) ? "true" : "false");
+#StdOut
+quickReject 1: true
+quickReject 2: true
+quickReject 3: false
+##
+##
+
+#SeeAlso quickContains contains intersects
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool quickReject(const SkRegion& rgn) const
+
+Returns true if Region does not intersect rgn.
+Returns true if rgn is empty or Region is empty.
+May return false even though Region does not intersect rgn.
+
+#Param rgn Region to intersect ##
+
+#Return true if rgn does not intersect ##
+
+#Example
+ SkRegion region({1, 2, 3, 4});
+ SkRegion test;
+ SkIRect rects[] = {{4, 2, 5, 3}, {7, 2, 8, 3}};
+ test.setRects(rects, SK_ARRAY_COUNT(rects));
+ SkDebugf("quickReject 1: %s\n", region.quickReject(test) ? "true" : "false");
+ region.op({1, 4, 3, 6}, SkRegion::kUnion_Op);
+ SkDebugf("quickReject 2: %s\n", region.quickReject(test) ? "true" : "false");
+ region.op({4, 7, 5, 8}, SkRegion::kUnion_Op);
+ SkDebugf("quickReject 3: %s\n", region.quickReject(test) ? "true" : "false");
+#StdOut
+quickReject 1: true
+quickReject 2: true
+quickReject 3: false
+##
+##
+
+#SeeAlso quickContains contains intersects
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void translate(int dx, int dy)
+#In Transform
+#Line # translates IPoints in Region ##
+
+Offsets Region by IVector (dx, dy). Has no effect if Region is empty.
+
+#Param dx x-axis offset ##
+#Param dy y-axis offset ##
+
+#Example
+#Height 90
+ SkRegion test;
+ SkIRect rects[] = {{40, 20, 50, 30}, {70, 40, 80, 50}, { 60, 10, 70, 20}};
+ test.setRects(rects, SK_ARRAY_COUNT(rects));
+ SkPaint paint;
+ for (auto color : { SK_ColorRED, SK_ColorBLUE, SK_ColorGREEN, SK_ColorMAGENTA } ) {
+ paint.setColor(color);
+ canvas->drawRegion(test, paint);
+ test.translate(10, 10);
+ }
+##
+
+#SeeAlso SkCanvas::translate SkIRect::offset SkPath::offset
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method void translate(int dx, int dy, SkRegion* dst) const
+
+Offsets Region by IVector (dx, dy), writing result to dst. Region may be passed
+as dst parameter, translating Region in place. Has no effect if dst is nullptr.
+If Region is empty, sets dst to empty.
+
+#Param dx x-axis offset ##
+#Param dy y-axis offset ##
+#Param dst translated result ##
+
+#Example
+ SkRegion test;
+ SkIRect rects[] = {{40, 20, 50, 30}, {70, 40, 80, 50}, { 60, 10, 70, 20}};
+ test.setRects(rects, SK_ARRAY_COUNT(rects));
+ SkPaint paint;
+ for (auto color : { SK_ColorRED, SK_ColorBLUE, SK_ColorGREEN, SK_ColorMAGENTA } ) {
+ paint.setColor(color);
+ canvas->drawRegion(test, paint);
+ SkRegion second;
+ test.translate(10, test.getBounds().fBottom, &second);
+ test.op(second, SkRegion::kXOR_Op);
+ test.translate(30, 0);
+ }
+##
+
+#SeeAlso SkCanvas::translate SkIRect::offset SkPath::offset
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Enum Op
+#Line # binary operator combining Regions ##
+
+#Code
+ enum Op {
+ kDifference_Op,
+ kIntersect_Op,
+ kUnion_Op,
+ kXOR_Op,
+ kReverseDifference_Op,
+ kReplace_Op,
+ kLastOp = kReplace_Op,
+ };
+##
+
+The logical operations that can be performed when combining two Regions.
+
+#Const kDifference_Op 0
+#Line # target minus operand ##
+Subtracts operand Region from target Region.
+##
+#Const kIntersect_Op 1
+#Line # target intersected with operand ##
+Intersects operand Region and target Region.
+##
+#Const kUnion_Op 2
+#Line # target unioned with operand ##
+Unions operand Region and target Region.
+##
+#Const kXOR_Op 3
+#Line # target exclusive or with operand ##
+Replaces target Region with area exclusive to both Regions.
+##
+#Const kReverseDifference_Op 4
+#Line # operand minus target ##
+Subtracts target Region from operand Region.
+##
+#Const kReplace_Op 5
+#Line # replace target with operand ##
+Replaces target Region with operand Region.
+##
+#Const kLastOp 5
+#Line # last operator ##
+##
+
+#Example
+ SkRegion operand({35, 35, 85, 85});
+ const char* labels[] = {"difference", "intersect", "union", "xor", "reverse diff", "replace"};
+ int index = 0;
+ SkPaint paint;
+ paint.setTextAlign(SkPaint::kCenter_Align);
+ for (auto op : { SkRegion::kDifference_Op, SkRegion::kIntersect_Op, SkRegion::kUnion_Op,
+ SkRegion::kXOR_Op, SkRegion::kReverseDifference_Op, SkRegion::kReplace_Op } ) {
+ SkRegion target({10, 10, 60, 60});
+ target.op(operand, op);
+ canvas->drawRegion(target, paint);
+ canvas->drawString(labels[index++], 40, 100, paint);
+ canvas->translate(80, 0);
+ if (SkRegion::kUnion_Op == op) {
+ canvas->translate(-240, 120);
+ }
+ }
+##
+
+#SeeAlso SkPathOp
+
+#Enum ##
+
+# ------------------------------------------------------------------------------
+
+#Const kOpCnt 6
+#Line # number of operators defined ##
+May be used to verify that Op is a legal value.
+#Const ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool op(const SkIRect& rect, Op op)
+#In Transform
+#Line # applies binary operator ##
+
+Replaces Region with the result of Region op rect.
+Returns true if replaced Region is not empty.
+
+#Param rect IRect operand ##
+#Param op operator, one of: #list_of_op_types#
+##
+
+#Return false if result is empty ##
+
+#Example
+#Height 128
+ SkPaint paint;
+ paint.setTextSize(128);
+ SkPath xPath;
+ paint.getTextPath("X", 1, 20, 110, &xPath);
+ SkRegion xRegion;
+ SkIRect drawBounds = {0, 0, 128, 128};
+ xRegion.setPath(xPath, SkRegion(drawBounds));
+ xRegion.op(drawBounds, SkRegion::kReverseDifference_Op);
+ canvas->drawRegion(xRegion, paint);
+##
+
+#SeeAlso setRects Op
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool op(int left, int top, int right, int bottom, Op op)
+
+Replaces Region with the result of Region op IRect (left, top, right, bottom).
+Returns true if replaced Region is not empty.
+
+#Param left edge of bounds on x-axis ##
+#Param top edge of bounds on y-axis ##
+#Param right edge of bounds on x-axis ##
+#Param bottom edge of bounds on y-axis ##
+#Param op operator, one of: #list_of_op_types#
+##
+
+#Return false if result is empty ##
+
+#Example
+#Duration 4
+#Height 128
+ SkPaint paint;
+ paint.setTextSize(128);
+ SkPath xPath;
+ paint.getTextPath("X", 1, 20, 110, &xPath);
+ SkRegion xRegion;
+ SkIRect drawBounds = {0, 0, 128, 128};
+ xRegion.setPath(xPath, SkRegion(drawBounds));
+ xRegion.op(drawBounds.fLeft + frame * drawBounds.width(), drawBounds.fTop,
+ drawBounds.fRight, drawBounds.fBottom, SkRegion::kReverseDifference_Op);
+ canvas->drawRegion(xRegion, paint);
+##
+
+#SeeAlso setRects Op
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool op(const SkRegion& rgn, Op op)
+
+Replaces Region with the result of Region op rgn.
+Returns true if replaced Region is not empty.
+
+#Param rgn Region operand ##
+#Param op operator, one of: #list_of_op_types#
+##
+
+#Return false if result is empty ##
+
+#Example
+#Duration 4
+#Height 128
+ SkPaint paint;
+ paint.setTextSize(128);
+ SkPath xPath, opPath;
+ paint.getTextPath("X", 1, 20, 110, &xPath);
+ opPath.addCircle(64, 64, frame * 64);
+ SkRegion xRegion, opRegion;
+ SkIRect drawBounds = {0, 0, 128, 128};
+ opRegion.setPath(opPath, SkRegion(drawBounds));
+ xRegion.setPath(xPath, SkRegion(drawBounds));
+ xRegion.op(opRegion, SkRegion::kReverseDifference_Op);
+ canvas->drawRegion(xRegion, paint);
+##
+
+#SeeAlso setRects Op
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool op(const SkIRect& rect, const SkRegion& rgn, Op op)
+
+Replaces Region with the result of rect op rgn.
+Returns true if replaced Region is not empty.
+
+#Param rect IRect operand ##
+#Param rgn Region operand ##
+#Param op operator, one of: #list_of_op_types#
+##
+
+#Return false if result is empty ##
+
+#Example
+#Duration 4
+#Height 128
+ SkPaint paint;
+ paint.setTextSize(128);
+ SkPath xPath, opPath;
+ paint.getTextPath("X", 1, 20, 110, &xPath);
+ opPath.addCircle(64, 64, frame * 64);
+ SkRegion xRegion, opRegion, rectRegion;
+ SkIRect drawBounds = {0, 0, 128, 128};
+ opRegion.setPath(opPath, SkRegion(drawBounds));
+ xRegion.setPath(xPath, SkRegion(drawBounds));
+ drawBounds.inset(frame * drawBounds.width() / 2, 0);
+ rectRegion.op(drawBounds, opRegion, SkRegion::kIntersect_Op);
+ xRegion.op(rectRegion, SkRegion::kReverseDifference_Op);
+ canvas->drawRegion(xRegion, paint);
+##
+
+#SeeAlso setRects Op
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool op(const SkRegion& rgn, const SkIRect& rect, Op op)
+
+Replaces Region with the result of rgn op rect.
+Returns true if replaced Region is not empty.
+
+#Param rgn Region operand ##
+#Param rect IRect operand ##
+#Param op operator, one of: #list_of_op_types#
+##
+
+#Return false if result is empty ##
+
+#Example
+#Duration 4
+#Height 128
+ SkPaint paint;
+ paint.setTextSize(128);
+ SkPath xPath, opPath;
+ paint.getTextPath("X", 1, 20, 110, &xPath);
+ opPath.addCircle(64, 64, frame * 64);
+ SkRegion xRegion, opRegion, rectRegion;
+ SkIRect drawBounds = {0, 0, 128, 128};
+ opRegion.setPath(opPath, SkRegion(drawBounds));
+ xRegion.setPath(xPath, SkRegion(drawBounds));
+ drawBounds.inset(frame * drawBounds.width() / 2, 0);
+ rectRegion.op(opRegion, drawBounds, SkRegion::kUnion_Op);
+ xRegion.op(rectRegion, SkRegion::kReverseDifference_Op);
+ canvas->drawRegion(xRegion, paint);
+##
+
+#SeeAlso setRects Op
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool op(const SkRegion& rgna, const SkRegion& rgnb, Op op)
+
+Replaces Region with the result of rgna op rgnb.
+Returns true if replaced Region is not empty.
+
+#Param rgna Region operand ##
+#Param rgnb Region operand ##
+#Param op operator, one of: #list_of_op_types#
+##
+
+#Return false if result is empty ##
+
+#Example
+#Duration 4
+#Height 128
+ SkPaint paint;
+ paint.setTextSize(128);
+ SkPath xPath, opPath;
+ paint.getTextPath("X", 1, 20, 110, &xPath);
+ xPath.setFillType(SkPath::kInverseWinding_FillType);
+ opPath.addCircle(64, 64, frame * 64);
+ opPath.setFillType(SkPath::kInverseWinding_FillType);
+ SkRegion xRegion, opRegion, rectRegion;
+ SkIRect drawBounds = {0, 0, 128, 128};
+ opRegion.setPath(opPath, SkRegion(drawBounds));
+ xRegion.setPath(xPath, SkRegion(drawBounds));
+ drawBounds.inset(frame * drawBounds.width() / 2, 0);
+ rectRegion.setRect(drawBounds);
+ rectRegion.op(xRegion, SkRegion::kIntersect_Op);
+ xRegion.op(rectRegion, opRegion, SkRegion::kReverseDifference_Op);
+ canvas->drawRegion(xRegion, paint);
+##
+
+#SeeAlso setRects Op
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method char* toString()
+#In Utility
+#Line # exists for Android framework only ##
+#Private
+Android framework only.
+##
+#Return string representation of Region ##
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t writeToMemory(void* buffer) const
+#In Utility
+#Line # writes to buffer ##
+
+Writes Region to buffer, and returns number of bytes written.
+If buffer is nullptr, returns number number of bytes that would be written.
+
+#Param buffer storage for binary data ##
+
+#Return size of Region ##
+
+#Example
+#Height 128
+ SkPaint paint;
+ paint.setTextSize(128);
+ SkPath xPath;
+ paint.getTextPath("X", 1, 20, 110, &xPath);
+ SkIRect drawBounds = {0, 0, 128, 128};
+ SkRegion xRegion;
+ xRegion.setPath(xPath, SkRegion(drawBounds));
+ size_t size = xRegion.writeToMemory(nullptr);
+ sk_sp<SkData> data = SkData::MakeUninitialized(size);
+ xRegion.writeToMemory(data->writable_data());
+ SkRegion copy;
+ copy.readFromMemory(data->data(), data->size());
+ canvas->drawRegion(copy, paint);
+##
+
+#SeeAlso readFromMemory
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t readFromMemory(const void* buffer, size_t length)
+#In Utility
+#Line # reads from buffer ##
+
+Constructs Region from buffer of size length. Returns bytes read.
+Returned value will be multiple of four or zero if length was too small.
+
+#Param buffer storage for binary data ##
+#Param length size of buffer ##
+
+#Return bytes read ##
+
+#Example
+#Height 100
+ SkRegion region({20, 20, 80, 80});
+ size_t size = region.writeToMemory(nullptr);
+ sk_sp<SkData> data = SkData::MakeUninitialized(size);
+ region.writeToMemory(data->writable_data());
+ SkRegion copy;
+ copy.readFromMemory(data->data(), data->size());
+ canvas->drawRegion(copy, SkPaint());
+##
+
+#SeeAlso writeToMemory
+
+#Method ##
+
+#Class SkRegion ##
+
+#Topic Region ##
diff --git a/docs/SkStream_Reference.bmh b/docs/SkStream_Reference.bmh
new file mode 100644
index 0000000..d978d08
--- /dev/null
+++ b/docs/SkStream_Reference.bmh
@@ -0,0 +1,529 @@
+#Topic Stream
+#Alias Stream_Reference ##
+
+#Class SkStream
+
+SkStream describes an abstract class that provides readable serial access to
+data. Subclass SkFILEStream stores readable data in a file. Subclass
+SkMemoryStream stores readable data in memory.
+
+SkStream data is immutable; data access is synchronous. Reading Stream data
+returns only as many bytes as were available when Stream was created. Unlike
+traditional streams, additional data will not become available at a later time
+or on a subsequent read request.
+
+#Subtopic Overview
+#Populate
+##
+
+#Subtopic Constructor
+#Populate
+##
+
+#Subtopic Member_Function
+#Populate
+##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual ~SkStream()
+#In Constructor
+#Line # incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method SkStream()
+#In Constructor
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method static std::unique_ptr<SkStreamAsset> MakeFromFile(const char path[])
+#In incomplete
+#Line # incomplete ##
+
+Attempts to open the specified file as a stream, returns nullptr on failure.
+
+#Param path incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual size_t read(void* buffer, size_t size) = 0
+#In incomplete
+#Line # incomplete ##
+
+Reads or skips size number of bytes.
+If buffer is nullptr, skip size bytes, return how many were skipped.
+If buffer is not nullptr, copy size bytes into buffer, return how many were copied.
+
+#Param buffer when nullptr skip size bytes, otherwise copy size bytes into buffer
+##
+#Param size the number of bytes to skip or copy
+##
+
+#Return the number of bytes actually read.
+##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t skip(size_t size)
+#In incomplete
+#Line # incomplete ##
+
+Skip size number of bytes. #Param size incomplete ##
+
+#Return the actual number bytes that could be skipped
+##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual size_t peek(void* buffer, size_t size) const
+#In incomplete
+#Line # incomplete ##
+
+Attempt to peek at size bytes.
+If this stream supports peeking, copy min(size, peekable bytes) into
+buffer, and return the number of bytes copied.
+If the stream does not support peeking, or cannot peek any bytes,
+return 0 and leave buffer unchanged.
+The stream is guaranteed to be in the same visible state after this
+call, regardless of success or failure.
+
+#Param buffer must not be nullptr, and must be at least size bytes. Destination
+ to copy bytes
+##
+#Param size number of bytes to copy
+##
+
+#Return number of bytes peeked/copied.
+##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual bool isAtEnd() const = 0
+#In incomplete
+#Line # incomplete ##
+
+Returns true when all the bytes in the stream have been read.
+This may return true early (when there are no more bytes to be read)
+or late (after the first unsuccessful read).
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT readS8(int8_t* i)
+#In incomplete
+#Line # incomplete ##
+
+#Param i incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT readS16(int16_t* i)
+#In incomplete
+#Line # incomplete ##
+
+#Param i incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT readS32(int32_t* i)
+#In incomplete
+#Line # incomplete ##
+
+#Param i incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT readU8(uint8_t* i)
+#In incomplete
+#Line # incomplete ##
+
+#Param i incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT readU16(uint16_t* i)
+#In incomplete
+#Line # incomplete ##
+
+#Param i incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT readU32(uint32_t* i)
+#In incomplete
+#Line # incomplete ##
+
+#Param i incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT readBool(bool* b)
+#In incomplete
+#Line # incomplete ##
+
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT readScalar(SkScalar* s)
+#In incomplete
+#Line # incomplete ##
+
+#Param s incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT readPackedUInt(size_t* u)
+#In incomplete
+#Line # incomplete ##
+
+#Param u incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual bool rewind()
+#In incomplete
+#Line # incomplete ##
+
+Rewinds to the beginning of the stream. Returns true if the stream is known
+to be at the beginning after this call returns.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method std::unique_ptr<SkStream> duplicate() const
+#In incomplete
+#Line # incomplete ##
+
+Duplicates this stream. If this cannot be done, returns NULL.
+The returned stream will be positioned at the beginning of its data.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method std::unique_ptr<SkStream> fork() const
+#In incomplete
+#Line # incomplete ##
+
+Duplicates this stream. If this cannot be done, returns NULL.
+The returned stream will be positioned the same as this stream.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual bool hasPosition() const
+#In incomplete
+#Line # incomplete ##
+
+Returns true if this stream can report its current position.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual size_t getPosition() const
+#In incomplete
+#Line # incomplete ##
+
+Returns the current position in the stream. If this cannot be done, returns 0.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual bool seek(size_t position)
+#In incomplete
+#Line # incomplete ##
+
+#Param position incomplete ##
+
+Seeks to an absolute position in the stream. If this cannot be done, returns false.
+If an attempt is made to seek past the end of the stream, the position will be set
+to the end of the stream.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual bool move(long offset)
+#In incomplete
+#Line # incomplete ##
+
+#Param offset incomplete ##
+
+Seeks to an relative offset in the stream. If this cannot be done, returns false.
+If an attempt is made to move to a position outside the stream, the position will be set
+to the closest point within the stream (beginning or end).
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual bool hasLength() const
+#In incomplete
+#Line # incomplete ##
+
+Returns true if this stream can report its total length.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual size_t getLength() const
+#In incomplete
+#Line # incomplete ##
+
+Returns the total length of the stream. If this cannot be done, returns 0.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual const void* getMemoryBase()
+#In incomplete
+#Line # incomplete ##
+
+Returns the starting address for the data. If this cannot be done, returns NULL.
+TODO: replace with virtual const SkData* getData()
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+#Class SkStream ##
+
+#Topic Stream ##
diff --git a/docs/SkTextBlobBuilder_Reference.bmh b/docs/SkTextBlobBuilder_Reference.bmh
new file mode 100644
index 0000000..e2e121e
--- /dev/null
+++ b/docs/SkTextBlobBuilder_Reference.bmh
@@ -0,0 +1,287 @@
+#Topic Text_Blob_Builder
+#Alias Text_Blob_Builder_Reference ##
+
+#Class SkTextBlobBuilder
+
+Helper class for constructing SkTextBlob.
+
+#Subtopic Overview
+#Populate
+##
+
+#Subtopic Class
+#Populate
+##
+
+#Subtopic Constructor
+#Populate
+##
+
+#Subtopic Member_Function
+#Populate
+##
+
+# ------------------------------------------------------------------------------
+
+#Struct RunBuffer
+#Line # storage for Glyphs and Glyph positions ##
+
+#Code
+ struct RunBuffer {
+ SkGlyphID* glyphs;
+ SkScalar* pos;
+ char* utf8text;
+ uint32_t* clusters;
+ };
+##
+
+RunBuffer supplies storage for Glyphs and positions within a run.
+
+A run is a sequence of Glyphs sharing Paint_Font_Metrics and positioning.
+Each run may position its Glyphs in one of three ways:
+by specifying where the first Glyph is drawn, and allowing Paint_Font_Metrics to
+determine the advance to subsequent Glyphs; by specifying a baseline, and
+the position on that baseline for each Glyph in run; or by providing Point
+array, one per Glyph.
+
+#Subtopic Member
+#Populate
+##
+
+#Member SkGlyphID* glyphs
+#Line # storage for Glyphs in run ##
+ glyphs points to memory for one or more Glyphs. glyphs memory must be
+ written to by the caller.
+##
+
+#Member SkScalar* pos
+#Line # storage for positions in run ##
+ pos points to memory for Glyph positions. Depending on how RunBuffer
+ is allocated, pos may point to zero bytes per Glyph, one Scalar per Glyph,
+ or one Point per Glyph.
+##
+
+#Member char* utf8text
+#Line # reserved for future use ##
+ Reserved for future use. utf8text should not be read or written.
+##
+
+#Member uint32_t* clusters
+#Line # reserved for future use ##
+ Reserved for future use. clusters should not be read or written.
+##
+
+#SeeAlso allocRun allocRunPos allocRunPosH
+
+#Struct RunBuffer ##
+
+# ------------------------------------------------------------------------------
+
+#Method SkTextBlobBuilder()
+#In Constructor
+#Line # constructs with default values ##
+
+Constructs empty Text_Blob_Builder. By default, Text_Blob_Builder has no runs.
+
+#Return empty Text_Blob_Builder ##
+
+#Example
+ SkTextBlobBuilder builder;
+ sk_sp<SkTextBlob> blob = builder.make();
+ SkDebugf("blob " "%s" " nullptr", blob == nullptr ? "equals" : "does not equal");
+#StdOut
+blob equals nullptr
+##
+##
+
+#SeeAlso make SkTextBlob::MakeFromText
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method ~SkTextBlobBuilder()
+#In Constructor
+#Line # deletes storage ##
+Deletes data allocated internally by Text_Blob_Builder.
+
+#NoExample
+##
+
+#SeeAlso SkTextBlobBuilder()
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method sk_sp<SkTextBlob> make()
+#In Constructor
+#Line # constructs Text_Blob from bulider ##
+
+Returns Text_Blob built from runs of Glyphs added by builder. Returned
+Text_Blob is immutable; it may be copied, but its contents may not be altered.
+Returns nullptr if no runs of Glyphs were added by builder.
+
+Resets Text_Blob_Builder to its initial empty state, allowing it to be
+reused to build a new set of runs.
+
+#Return Text_Blob or nullptr ##
+
+#Example
+ SkTextBlobBuilder builder;
+ sk_sp<SkTextBlob> blob = builder.make();
+ SkDebugf("blob " "%s" " nullptr\n", blob == nullptr ? "equals" : "does not equal");
+ SkPaint paint;
+ paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
+ paint.textToGlyphs("x", 1, builder.allocRun(paint, 1, 20, 20).glyphs);
+ blob = builder.make();
+ SkDebugf("blob " "%s" " nullptr\n", blob == nullptr ? "equals" : "does not equal");
+ blob = builder.make();
+ SkDebugf("blob " "%s" " nullptr\n", blob == nullptr ? "equals" : "does not equal");
+#StdOut
+blob equals nullptr
+blob does not equal nullptr
+blob equals nullptr
+##
+##
+
+#SeeAlso SkTextBlob::MakeFromText
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method const RunBuffer& allocRun(const SkPaint& font, int count, SkScalar x, SkScalar y,
+ const SkRect* bounds = nullptr)
+#In Allocator
+#Line # returns writable glyph buffer at Point ##
+
+Returns run with storage for Glyphs. Caller must write count Glyphs to
+RunBuffer.glyphs before next call to FontBlobBuilder.
+
+RunBuffer.utf8text, and RunBuffer.clusters should be ignored.
+
+Glyphs share Paint_Font_Metrics in font, including: #paint_font_metrics#.
+
+Glyphs are positioned on a baseline at (x, y), using font Paint_Font_Metrics to
+determine their relative placement.
+
+bounds defines an optional bounding box, used to suppress drawing when Text_Blob
+bounds does not intersect Surface bounds. If bounds is nullptr, Text_Blob bounds
+is computed from (x, y) and RunBuffer.glyphs Paint_Font_Metrics.
+
+#Param font Paint used for this run ##
+#Param count number of glyphs ##
+#Param x horizontal offset within the blob ##
+#Param y vertical offset within the blob ##
+#Param bounds optional run bounding box ##
+
+#Return writable glyph buffer ##
+
+#Example
+#Height 60
+ SkTextBlobBuilder builder;
+ SkPaint paint, glyphPaint;
+ glyphPaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
+ const SkTextBlobBuilder::RunBuffer& run = builder.allocRun(glyphPaint, 5, 20, 20);
+ paint.textToGlyphs("hello", 5, run.glyphs);
+ canvas->drawRect({20, 20, 30, 30}, paint);
+ canvas->drawTextBlob(builder.make(), 20, 20, paint);
+##
+
+#SeeAlso allocRunPosH allocRunPos
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method const RunBuffer& allocRunPosH(const SkPaint& font, int count, SkScalar y,
+ const SkRect* bounds = nullptr)
+#In Allocator
+#Line # returns writable glyph and x-axis position buffers ##
+
+Returns run with storage for Glyphs and positions along baseline. Caller must
+write count Glyphs to RunBuffer.glyphs, and count Scalars to RunBuffer.pos;
+before next call to FontBlobBuilder.
+
+RunBuffer.utf8text, and RunBuffer.clusters should be ignored.
+
+Glyphs share Paint_Font_Metrics in font, including: #paint_font_metrics#.
+
+Glyphs are positioned on a baseline at y, using x-axis positions written by
+caller to RunBuffer.pos.
+
+bounds defines an optional bounding box, used to suppress drawing when Text_Blob
+bounds does not intersect Surface bounds. If bounds is nullptr, Text_Blob bounds
+is computed from y, RunBuffer.pos, and RunBuffer.glyphs Paint_Font_Metrics.
+
+#Param font Paint used for this run ##
+#Param count number of Glyphs ##
+#Param y vertical offset within the blob ##
+#Param bounds optional run bounding box ##
+
+#Return writable glyph buffer and x-axis position buffer ##
+
+#Example
+#Height 60
+ SkTextBlobBuilder builder;
+ SkPaint paint, glyphPaint;
+ glyphPaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
+ const SkTextBlobBuilder::RunBuffer& run = builder.allocRunPosH(glyphPaint, 5, 20);
+ paint.textToGlyphs("hello", 5, run.glyphs);
+ SkScalar positions[] = {0, 10, 20, 40, 80};
+ memcpy(run.pos, positions, sizeof(positions));
+ canvas->drawTextBlob(builder.make(), 20, 20, paint);
+##
+
+#SeeAlso allocRunPos allocRun
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method const RunBuffer& allocRunPos(const SkPaint& font, int count,
+ const SkRect* bounds = nullptr)
+#In Allocator
+#Line # returns writable glyph and Point buffers ##
+
+Returns run with storage for Glyphs and Point positions. Caller must
+write count Glyphs to RunBuffer.glyphs, and count Points to RunBuffer.pos;
+before next call to FontBlobBuilder.
+
+RunBuffer.utf8text, and RunBuffer.clusters should be ignored.
+
+Glyphs share Paint_Font_Metrics in font, including: #paint_font_metrics#.
+
+Glyphs are positioned using Points written by caller to RunBuffer.pos, using
+two Scalar values for each Point.
+
+bounds defines an optional bounding box, used to suppress drawing when Text_Blob
+bounds does not intersect Surface bounds. If bounds is nullptr, Text_Blob bounds
+is computed from RunBuffer.pos, and RunBuffer.glyphs Paint_Font_Metrics.
+
+#Param font Paint used for this run ##
+#Param count number of Glyphs ##
+#Param bounds optional run bounding box ##
+
+#Return writable glyph buffer and Point buffer ##
+
+#Example
+#Height 90
+ SkTextBlobBuilder builder;
+ SkPaint paint, glyphPaint;
+ glyphPaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
+ const SkTextBlobBuilder::RunBuffer& run = builder.allocRunPos(glyphPaint, 5);
+ paint.textToGlyphs("hello", 5, run.glyphs);
+ SkPoint positions[] = {{0, 0}, {10, 10}, {20, 20}, {40, 40}, {80, 80}};
+ memcpy(run.pos, positions, sizeof(positions));
+ canvas->drawTextBlob(builder.make(), 20, 20, paint);
+##
+
+#SeeAlso allocRunPosH allocRun
+
+#Method ##
+
+#Class SkTextBlobBuilder ##
+
+#Topic Text_Blob_Builder ##
diff --git a/docs/SkTextBlob_Reference.bmh b/docs/SkTextBlob_Reference.bmh
new file mode 100644
index 0000000..169fa63
--- /dev/null
+++ b/docs/SkTextBlob_Reference.bmh
@@ -0,0 +1,325 @@
+#Topic Text_Blob
+#Alias Text_Blob_Reference ##
+
+#PhraseDef paint_font_metrics
+Typeface, Paint_Text_Size, Paint_Text_Scale_X,
+Paint_Text_Skew_X, Paint_Text_Align, Paint_Hinting, Anti_Alias, Paint_Fake_Bold,
+Font_Embedded_Bitmaps, Full_Hinting_Spacing, LCD_Text, Linear_Text,
+and Subpixel_Text
+##
+
+Text_Blob holds one or more runs of text. Each run associates a string of Glyphs
+with a position and Paint. Each Paint contains attributes used
+to define the run text: #paint_font_metrics#.
+
+Text_Blob runs of text use Glyph_ID encoding; each run Paint must set
+Paint_Text_Encoding to SkPaint::kGlyphID_TextEncoding.
+
+Text_Blob is constructed with SkTextBlob::MakeFromText or Text_Blob_Builder.
+Once created, Text_Blob can not be modified.
+
+#Subtopic Overview
+#Populate
+##
+
+#Subtopic Constructor
+#Populate
+##
+
+#Subtopic Member_Function
+#Populate
+##
+
+# ------------------------------------------------------------------------------
+
+#Class SkTextBlob
+
+SkTextBlob combines multiple text runs into an immutable container. Each text
+run consists of Glyphs, Paint, and position. Only parts of Paint related to
+fonts and text rendering are used by run.
+
+# ------------------------------------------------------------------------------
+
+#Method const SkRect& bounds() const
+#In Property
+#Line # returns conservative bounding box ##
+
+Returns conservative bounding box. Uses Paint associated with each glyph to
+determine glyph bounds, and unions all bounds. Returned bounds may be
+larger than the bounds of all Glyphs in runs.
+
+#Return conservative bounding box ##
+
+#Example
+#Height 70
+ SkTextBlobBuilder textBlobBuilder;
+ const char bunny[] = "/(^x^)\\";
+ const int len = sizeof(bunny) - 1;
+ uint16_t glyphs[len];
+ SkPaint paint;
+ paint.textToGlyphs(bunny, len, glyphs);
+ paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
+ int runs[] = { 3, 1, 3 };
+ SkPoint textPos = { 20, 50 };
+ int glyphIndex = 0;
+ for (auto runLen : runs) {
+ paint.setTextSize(1 == runLen ? 20 : 50);
+ const SkTextBlobBuilder::RunBuffer& run =
+ textBlobBuilder.allocRun(paint, runLen, textPos.fX, textPos.fY);
+ memcpy(run.glyphs, &glyphs[glyphIndex], sizeof(glyphs[0]) * runLen);
+ textPos.fX += paint.measureText(&glyphs[glyphIndex], sizeof(glyphs[0]) * runLen, nullptr);
+ glyphIndex += runLen;
+ }
+ sk_sp<const SkTextBlob> blob = textBlobBuilder.make();
+ paint.reset();
+ canvas->drawTextBlob(blob.get(), 0, 0, paint);
+ paint.setStyle(SkPaint::kStroke_Style);
+ canvas->drawRect(blob->bounds(), paint);
+##
+
+#SeeAlso SkPath::getBounds
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method uint32_t uniqueID() const
+#In Property
+#Line # returns identifier for Text_Blob ##
+
+Returns a non-zero value unique among all text blobs.
+
+#Return identifier for Text_Blob ##
+
+#Example
+for (int index = 0; index < 2; ++index) {
+ SkTextBlobBuilder textBlobBuilder;
+ const char bunny[] = "/(^x^)\\";
+ const int len = sizeof(bunny) - 1;
+ uint16_t glyphs[len];
+ SkPaint paint;
+ paint.textToGlyphs(bunny, len, glyphs);
+ paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
+ paint.setTextScaleX(0.5);
+ int runs[] = { 3, 1, 3 };
+ SkPoint textPos = { 20, 50 };
+ int glyphIndex = 0;
+ for (auto runLen : runs) {
+ paint.setTextSize(1 == runLen ? 20 : 50);
+ const SkTextBlobBuilder::RunBuffer& run =
+ textBlobBuilder.allocRun(paint, runLen, textPos.fX, textPos.fY);
+ memcpy(run.glyphs, &glyphs[glyphIndex], sizeof(glyphs[0]) * runLen);
+ textPos.fX += paint.measureText(&glyphs[glyphIndex], sizeof(glyphs[0]) * runLen, nullptr);
+ glyphIndex += runLen;
+ }
+ sk_sp<const SkTextBlob> blob = textBlobBuilder.make();
+ paint.reset();
+ canvas->drawTextBlob(blob.get(), 0, 0, paint);
+ std::string id = "unique ID:" + std::to_string(blob->uniqueID());
+ canvas->drawString(id.c_str(), 30, blob->bounds().fBottom + 15, paint);
+ canvas->translate(blob->bounds().fRight + 10, 0);
+}
+##
+
+#SeeAlso SkRefCnt
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method static sk_sp<SkTextBlob> MakeFromText(
+ const void* text, size_t byteLength, const SkPaint& paint)
+#In Constructor
+#Line # constructs Text_Blob with one run ##
+
+Creates Text_Blob with a single run. text meaning depends on Paint_Text_Encoding;
+by default, text is encoded as UTF-8.
+
+paint contains attributes used to define the run text: #paint_font_metrics#.
+
+#Param text character code points or Glyphs drawn ##
+#Param byteLength byte length of text array ##
+#Param paint text size, typeface, text scale, and so on, used to draw ##
+
+#Return Text_Blob constructed from one run ##
+
+#Example
+#Height 24
+ SkPaint blobPaint;
+ blobPaint.setColor(SK_ColorRED); // ignored
+ blobPaint.setTextSize(24); // respected
+ blobPaint.setAntiAlias(true); // ignored
+ SkPaint canvasPaint = blobPaint;
+ canvasPaint.setColor(SK_ColorBLUE); // respected
+ canvasPaint.setTextSize(2); // ignored
+ sk_sp<SkTextBlob> blob = SkTextBlob::MakeFromText("Hello World", 11, blobPaint);
+ canvas->drawTextBlob(blob, 20, 20, canvasPaint);
+##
+
+#SeeAlso MakeFromString TextBlobBuilder
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static sk_sp<SkTextBlob> MakeFromString(const char* string, const SkPaint& paint)
+#In Constructor
+#Line # constructs Text_Blob with one run ##
+
+Creates Text_Blob with a single run. string meaning depends on Paint_Text_Encoding;
+by default, string is encoded as UTF-8.
+
+paint contains Paint_Font_Metrics used to define the run text: #paint_font_metrics#.
+
+#Param string character code points or Glyphs drawn ##
+#Param paint text size, typeface, text scale, and so on, used to draw ##
+
+#Return Text_Blob constructed from one run ##
+
+#Example
+#Height 24
+ SkPaint blobPaint;
+ blobPaint.setColor(SK_ColorRED); // ignored
+ blobPaint.setTextSize(24); // respected
+ blobPaint.setAntiAlias(true); // ignored
+ SkPaint canvasPaint = blobPaint;
+ canvasPaint.setColor(SK_ColorBLUE); // respected
+ canvasPaint.setTextSize(2); // ignored
+ sk_sp<SkTextBlob> blob = SkTextBlob::MakeFromString("Hello World", blobPaint);
+ canvas->drawTextBlob(blob, 20, 20, canvasPaint);
+##
+
+#SeeAlso MakeFromText TextBlobBuilder
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t serialize(const SkSerialProcs& procs, void* memory, size_t memory_size) const
+#In Utility
+#Line # writes Text_Blob to memory ##
+
+Writes data to allow later reconstruction of Text_Blob. memory points to storage
+to receive the encoded data, and memory_size describes the size of storage.
+Returns bytes used if provided storage is large enough to hold all data;
+otherwise, returns zero.
+
+procs.fTypefaceProc permits supplying a custom function to encode Typeface.
+If procs.fTypefaceProc is nullptr, default encoding is used. procs.fTypefaceCtx
+may be used to provide user context to procs.fTypefaceProc; procs.fTypefaceProc
+is called with a pointer to Typeface and user context.
+
+#Param procs custom serial data encoders; may be nullptr ##
+#Param memory storage for data ##
+#Param size size of storage ##
+
+#Return bytes written, or zero if required storage is larger than memory_size ##
+
+#Example
+#Height 64
+###$
+$Function
+#include "SkSerialProcs.h"
+$$
+$$$#
+ SkPaint blobPaint;
+ blobPaint.setTextSize(24);
+ sk_sp<SkTextBlob> blob = SkTextBlob::MakeAsDrawText("Hello World", 11, blobPaint);
+ char storage[2048];
+ size_t used = blob->serialize(SkSerialProcs(), storage, sizeof(storage));
+ sk_sp<SkTextBlob> copy = SkTextBlob::Deserialize(storage, used, SkDeserialProcs());
+ canvas->drawTextBlob(copy, 20, 20, SkPaint());
+ std::string usage = "size=" + std::to_string(sizeof(storage)) + " used=" + std::to_string(used);
+ canvas->drawString(usage.c_str(), 20, 40, SkPaint());
+##
+
+#SeeAlso Deserialize SkSerialProcs
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method sk_sp<SkData> serialize(const SkSerialProcs& procs) const
+#In Utility
+#Line # writes Text_Blob to Data ##
+Returns storage containing Data describing Text_Blob, using optional custom
+encoders.
+
+procs.fTypefaceProc permits supplying a custom function to encode Typeface.
+If procs.fTypefaceProc is nullptr, default encoding is used. procs.fTypefaceCtx
+may be used to provide user context to procs.fTypefaceProc; procs.fTypefaceProc
+is called with a pointer to Typeface and user context.
+
+#Param procs custom serial data encoders; may be nullptr ##
+
+#Return storage containing serialized Text_Blob ##
+
+#Example
+#Height 24
+###$
+$Function
+#include "SkSerialProcs.h"
+$$
+$$$#
+ SkPaint blobPaint;
+ blobPaint.setTextSize(24);
+ sk_sp<SkTextBlob> blob = SkTextBlob::MakeAsDrawText("Hello World", 11, blobPaint);
+ sk_sp<SkData> data = blob->serialize(SkSerialProcs());
+ sk_sp<SkTextBlob> copy = SkTextBlob::Deserialize(data->data(), data->size(), SkDeserialProcs());
+ canvas->drawTextBlob(copy, 20, 20, SkPaint());
+##
+
+#SeeAlso Deserialize SkData SkSerialProcs
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method static sk_sp<SkTextBlob> Deserialize(const void* data, size_t size, const SkDeserialProcs& procs)
+#In Constructor
+#Line # constructs Text_Blob from memory ##
+
+Recreates Text_Blob that was serialized into data. Returns constructed Text_Blob
+if successful; otherwise, returns nullptr. Fails if size is smaller than
+required data length, or if data does not permit constructing valid Text_Blob.
+
+procs.fTypefaceProc permits supplying a custom function to decode Typeface.
+If procs.fTypefaceProc is nullptr, default decoding is used. procs.fTypefaceCtx
+may be used to provide user context to procs.fTypefaceProc; procs.fTypefaceProc
+is called with a pointer to Typeface data, data byte length, and user context.
+
+#Param data pointer for serial data ##
+#Param size size of data ##
+#Param procs custom serial data decoders; may be nullptr ##
+
+#Return Text_Blob constructed from data in memory ##
+
+#Example
+#Height 24
+#Description
+Text "Hacker" replaces "World!", but does not update its metrics.
+When drawn, "Hacker" uses the spacing computed for "World!".
+##
+###$
+$Function
+#include "SkSerialProcs.h"
+$$
+$$$#
+ SkPaint blobPaint;
+ blobPaint.setTextSize(24);
+ sk_sp<SkTextBlob> blob = SkTextBlob::MakeAsDrawText("Hello World!", 12, blobPaint);
+ sk_sp<SkData> data = blob->serialize(SkSerialProcs());
+ uint16_t glyphs[6];
+ blobPaint.textToGlyphs("Hacker", 6, glyphs);
+ memcpy((char*)data->writable_data() + 0x54, glyphs, sizeof(glyphs));
+ sk_sp<SkTextBlob> copy = SkTextBlob::Deserialize(data->data(), data->size(), SkDeserialProcs());
+ canvas->drawTextBlob(copy, 20, 20, SkPaint());
+##
+
+#SeeAlso serialize SkDeserialProcs
+
+#Method ##
+
+#Class SkTextBlob ##
+
+#Topic Text_Blob ##
diff --git a/docs/SkWStream_Reference.bmh b/docs/SkWStream_Reference.bmh
new file mode 100644
index 0000000..77edc41
--- /dev/null
+++ b/docs/SkWStream_Reference.bmh
@@ -0,0 +1,362 @@
+#Topic WStream
+#Alias WStream_Reference ##
+
+#Class SkWStream
+
+#Subtopic Overview
+#Populate
+##
+
+#Subtopic Constructor
+#Populate
+##
+
+#Subtopic Member_Function
+#Populate
+##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual ~SkWStream()
+#In Constructor
+#Line # incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method SkWStream()
+#In Constructor
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual bool write(const void* buffer, size_t size) = 0
+#In incomplete
+#Line # incomplete ##
+
+Called to write bytes to a SkWStream. Returns true on success
+
+#Param buffer the address of at least size bytes to be written to the stream
+##
+#Param size number of bytes in buffer to write to the stream
+##
+
+#Return true on success
+##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual void flush()
+#In incomplete
+#Line # incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method virtual size_t bytesWritten() const = 0
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool write8(U8CPU value)
+#In incomplete
+#Line # incomplete ##
+
+Helpers.
+
+#Param value incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool write16(U16CPU value)
+#In incomplete
+#Line # incomplete ##
+
+#Param value incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool write32(uint32_t v)
+#In incomplete
+#Line # incomplete ##
+
+#Param v incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool writeText(const char text[])
+#In incomplete
+#Line # incomplete ##
+
+#Param text incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool newline()
+#In incomplete
+#Line # incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool writeDecAsText(int32_t)
+#In incomplete
+#Line # incomplete ##
+
+#Param t incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool writeBigDecAsText(int64_t, int minDigits = 0)
+#In incomplete
+#Line # incomplete ##
+
+#Param t incomplete ##
+#Param minDigits incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool writeHexAsText(uint32_t, int minDigits = 0)
+#In incomplete
+#Line # incomplete ##
+
+#Param t incomplete ##
+#Param minDigits incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool writeScalarAsText(SkScalar)
+#In incomplete
+#Line # incomplete ##
+
+#Param SkScalar incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool writeBool(bool v)
+#In incomplete
+#Line # incomplete ##
+
+#Param v incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool writeScalar(SkScalar)
+#In incomplete
+#Line # incomplete ##
+
+#Param SkScalar incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool writePackedUInt(size_t)
+#In incomplete
+#Line # incomplete ##
+
+#Param t incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method bool writeStream(SkStream* input, size_t length)
+#In incomplete
+#Line # incomplete ##
+
+#Param input incomplete ##
+#Param length incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method static int SizeOfPackedUInt(size_t value)
+#In incomplete
+#Line # incomplete ##
+
+This returns the number of bytes in the stream required to store
+'value'.
+
+#Param value incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+#Method ##
+
+#Class SkWStream ##
+
+#Topic WStream ##
diff --git a/docs/status.json b/docs/status.json
index 6814f9c..e5ef788 100644
--- a/docs/status.json
+++ b/docs/status.json
@@ -16,7 +16,9 @@
"SkPoint.h",
"SkRRect.h",
"SkRect.h",
- "SkSurface.h"
+ "SkRegion.h",
+ "SkSurface.h",
+ "SkTextBlob.h"
]
},
"docs": [
@@ -34,11 +36,14 @@
"SkPicture_Reference.bmh",
"SkRRect_Reference.bmh",
"SkRect_Reference.bmh",
+ "SkRegion_Reference.bmh",
"SkBitmap_Reference.bmh",
"SkIPoint_Reference.bmh",
"SkMatrix_Reference.bmh",
"SkPixmap_Reference.bmh",
"SkSurface_Reference.bmh",
+ "SkTextBlobBuilder_Reference.bmh",
+ "SkTextBlob_Reference.bmh",
"illustrations.bmh",
"undocumented.bmh"
]
@@ -46,9 +51,16 @@
"InProgress": {
"include": {
"core": [
+ "SkStream.h"
]
},
"docs": [
+ "SkDynamicMemoryWStream_Reference.bmh",
+ "SkFILEStream_Reference.bmh",
+ "SkFILEWStream_Reference.bmh",
+ "SkMemoryStream_Reference.bmh",
+ "SkStream_Reference.bmh",
+ "SkWStream_Reference.bmh",
"overview.bmh",
"usingBookmaker.bmh"
]
diff --git a/docs/undocumented.bmh b/docs/undocumented.bmh
index 490ebf0..6161398 100644
--- a/docs/undocumented.bmh
+++ b/docs/undocumented.bmh
@@ -11,8 +11,9 @@
PDF XPS
RFC
NaN NaNs
-
- C C++ SIZE_MAX
+ U16CPU
+
+ C C++ SIZE_MAX C_FILE
CSS HTML
Sa Da Sc Dc max min # temporary until figure out what to do
@@ -361,6 +362,8 @@
#Topic ##
#Topic Glyph
+#Subtopic ID
+##
#Alias Glyphs ##
##
@@ -470,6 +473,7 @@
#Typedef ##
#Topic Scalar
#Alias Scalar ##
+ #Alias Scalars ##
#Typedef float SkScalar
#Typedef ##
##
@@ -631,11 +635,6 @@
#Class ##
#Topic ##
-#Topic Region
-#Class SkRegion
-##
-#Topic ##
-
#Topic Render_Target
#Class GrRenderTarget
##
@@ -682,10 +681,10 @@
#Alias Sprites ##
#Topic ##
-#Topic Stream
-#Class SkStream
+#Topic Stream_Asset
+#Class SkStreamAsset
##
-##
+#Topic ##
#Topic String
#Class SkString
@@ -721,11 +720,6 @@
#Topic Text
#Topic ##
-#Topic Text_Blob
-#Class SkTextBlob
-#Class ##
-#Topic ##
-
#Topic Texture
#Class GrBackendTexture
#Method bool isValid() const
@@ -744,7 +738,13 @@
##
#Topic Typeface
+#Subtopic ID
+#Typedef uint32_t SkFontID
+##
+##
#Class SkTypeface
+ #Method SkFontID uniqueID() const
+ ##
#Class ##
#Topic ##
@@ -794,11 +794,6 @@
##
#Topic ##
-#Topic WStream
-#Class SkWStream
-##
-#Topic ##
-
#Topic Xfermode_Image_Filter
#Class SkXfermodeImageFilter
##
diff --git a/site/user/api/SkBitmap_Reference.md b/site/user/api/SkBitmap_Reference.md
index b08db74..299a606 100644
--- a/site/user/api/SkBitmap_Reference.md
+++ b/site/user/api/SkBitmap_Reference.md
@@ -459,10 +459,14 @@
## <a name='Member_Function'>Member_Function</a>
-SkBitmap member functions read and modify the structure properties.
+SkBitmap::Allocator member functions read and modify the structure properties.
<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='#SkBitmap_Allocator_allocPixelRef'>allocPixelRef</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>allocates pixel memory</td>
+ </tr>
</table>
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
@@ -507,10 +511,14 @@
## <a name='Member_Function'>Member_Function</a>
-SkBitmap member functions read and modify the structure properties.
+SkBitmap::HeapAllocator member functions read and modify the structure properties.
<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='#SkBitmap_HeapAllocator_allocPixelRef'>allocPixelRef</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>allocates pixel memory</td>
+ </tr>
</table>
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
diff --git a/site/user/api/SkCanvas_Reference.md b/site/user/api/SkCanvas_Reference.md
index b44a55b..12ff419 100644
--- a/site/user/api/SkCanvas_Reference.md
+++ b/site/user/api/SkCanvas_Reference.md
@@ -294,7 +294,7 @@
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkCanvas_clipRegion'>clipRegion</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>combines <a href='#Clip'>Clip</a> with <a href='undocumented#Region'>Region</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>combines <a href='#Clip'>Clip</a> with <a href='SkRegion_Reference#Region'>Region</a></td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkCanvas_concat'>concat</a></td>
@@ -418,7 +418,7 @@
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkCanvas_drawRegion'>drawRegion</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>draws <a href='undocumented#Region'>Region</a> using <a href='#Clip'>Clip</a>, <a href='#Matrix'>Matrix</a>, and <a href='SkPaint_Reference#Paint'>Paint</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>draws <a href='SkRegion_Reference#Region'>Region</a> using <a href='#Clip'>Clip</a>, <a href='#Matrix'>Matrix</a>, and <a href='SkPaint_Reference#Paint'>Paint</a></td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkCanvas_drawRoundRect'>drawRoundRect</a></td>
@@ -2313,9 +2313,22 @@
# <a name='SkCanvas_SaveLayerRec'>Struct SkCanvas::SaveLayerRec</a>
+## <a name='Layer_SaveLayerRec_Member_Function'>Member_Function</a>
+
+
+SkCanvas::SaveLayerRec member functions read and modify the structure properties.
+<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='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec()</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a></td>
+ </tr>
+</table>
+
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
- struct <a href='#SkCanvas_SaveLayerRec_empty_constructor'>SaveLayerRec</a> {
- <a href='#SkCanvas_SaveLayerRec_empty_constructor'>SaveLayerRec</a>*(...
+ struct <a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a> {
+ <a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a>*(...
const <a href='SkRect_Reference#SkRect'>SkRect</a>* <a href='#SkCanvas_SaveLayerRec_fBounds'>fBounds</a>;
const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* <a href='#SkCanvas_SaveLayerRec_fPaint'>fPaint</a>;
@@ -2324,7 +2337,7 @@
};
</pre>
-<a href='#SkCanvas_SaveLayerRec_empty_constructor'>SaveLayerRec</a> contains the state used to create the <a href='#Layer'>Layer</a>.
+<a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a> contains the state used to create the <a href='#Layer'>Layer</a>.
## <a name='Layer_SaveLayerRec_Overview'>Layer SaveLayerRec Overview</a>
@@ -2336,6 +2349,10 @@
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>functions that construct <a href='#SkCanvas_SaveLayerRec'>SkCanvas::SaveLayerRec</a></td>
</tr>
<tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#Layer_SaveLayerRec_Member_Function'>Functions</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>global and class member functions</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#Layer_SaveLayerRec_Member'>Members</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>member values</td>
</tr>
@@ -2426,18 +2443,18 @@
<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
</table>
-<a name='SkCanvas_SaveLayerRec_empty_constructor'></a>
+<a name='SkCanvas_SaveLayerRec_SaveLayerRec'></a>
## SaveLayerRec
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-<a href='#SkCanvas_SaveLayerRec_empty_constructor'>SaveLayerRec</a>()
+<a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a>()
</pre>
Sets <a href='#SkCanvas_SaveLayerRec_fBounds'>fBounds</a>, <a href='#SkCanvas_SaveLayerRec_fPaint'>fPaint</a>, and <a href='#SkCanvas_SaveLayerRec_fBackdrop'>fBackdrop</a> to nullptr. Clears <a href='#SkCanvas_SaveLayerRec_fSaveLayerFlags'>fSaveLayerFlags</a>.
### Return Value
-empty <a href='#SkCanvas_SaveLayerRec_empty_constructor'>SaveLayerRec</a>
+empty <a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a>
### Example
@@ -2457,31 +2474,31 @@
---
-<a name='SkCanvas_const_SkRect_star_const_SkPaint_star'></a>
+<a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star'></a>
## SaveLayerRec
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-<a href='#SkCanvas_SaveLayerRec_empty_constructor'>SaveLayerRec</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint, <a href='#SkCanvas_SaveLayerFlags'>SaveLayerFlags</a> saveLayerFlags = 0)
+<a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint, <a href='#SkCanvas_SaveLayerFlags'>SaveLayerFlags</a> saveLayerFlags = 0)
</pre>
Sets <a href='#SkCanvas_SaveLayerRec_fBounds'>fBounds</a>, <a href='#SkCanvas_SaveLayerRec_fPaint'>fPaint</a>, and <a href='#SkCanvas_SaveLayerRec_fSaveLayerFlags'>fSaveLayerFlags</a>; sets <a href='#SkCanvas_SaveLayerRec_fBackdrop'>fBackdrop</a> to nullptr.
### Parameters
-<table> <tr> <td><a name='SkCanvas_const_SkRect_star_const_SkPaint_star_bounds'><code><strong>bounds</strong></code></a></td>
+<table> <tr> <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_bounds'><code><strong>bounds</strong></code></a></td>
<td><a href='#Layer'>Layer</a> dimensions; may be nullptr</td>
</tr>
- <tr> <td><a name='SkCanvas_const_SkRect_star_const_SkPaint_star_paint'><code><strong>paint</strong></code></a></td>
+ <tr> <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_paint'><code><strong>paint</strong></code></a></td>
<td>applied to <a href='#Layer'>Layer</a> when overlaying prior <a href='#Layer'>Layer</a>; may be nullptr</td>
</tr>
- <tr> <td><a name='SkCanvas_const_SkRect_star_const_SkPaint_star_saveLayerFlags'><code><strong>saveLayerFlags</strong></code></a></td>
- <td><a href='#SkCanvas_SaveLayerRec_empty_constructor'>SaveLayerRec</a> options to modify <a href='#Layer'>Layer</a></td>
+ <tr> <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_saveLayerFlags'><code><strong>saveLayerFlags</strong></code></a></td>
+ <td><a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a> options to modify <a href='#Layer'>Layer</a></td>
</tr>
</table>
### Return Value
-<a href='#SkCanvas_SaveLayerRec_empty_constructor'>SaveLayerRec</a> with empty backdrop
+<a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a> with empty backdrop
### Example
@@ -2501,11 +2518,11 @@
---
-<a name='SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star'></a>
+<a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star'></a>
## SaveLayerRec
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-<a href='#SkCanvas_SaveLayerRec_empty_constructor'>SaveLayerRec</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint, const <a href='undocumented#SkImageFilter'>SkImageFilter</a>* backdrop,
+<a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint, const <a href='undocumented#SkImageFilter'>SkImageFilter</a>* backdrop,
<a href='#SkCanvas_SaveLayerFlags'>SaveLayerFlags</a> saveLayerFlags)
</pre>
@@ -2513,24 +2530,24 @@
### Parameters
-<table> <tr> <td><a name='SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_bounds'><code><strong>bounds</strong></code></a></td>
+<table> <tr> <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_bounds'><code><strong>bounds</strong></code></a></td>
<td><a href='#Layer'>Layer</a> dimensions; may be nullptr</td>
</tr>
- <tr> <td><a name='SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_paint'><code><strong>paint</strong></code></a></td>
+ <tr> <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_paint'><code><strong>paint</strong></code></a></td>
<td>applied to <a href='#Layer'>Layer</a> when overlaying prior <a href='#Layer'>Layer</a>;
may be nullptr</td>
</tr>
- <tr> <td><a name='SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_backdrop'><code><strong>backdrop</strong></code></a></td>
+ <tr> <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_backdrop'><code><strong>backdrop</strong></code></a></td>
<td>prior <a href='#Layer'>Layer</a> copied with <a href='undocumented#Image_Filter'>Image Filter</a>; may be nullptr</td>
</tr>
- <tr> <td><a name='SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_saveLayerFlags'><code><strong>saveLayerFlags</strong></code></a></td>
- <td><a href='#SkCanvas_SaveLayerRec_empty_constructor'>SaveLayerRec</a> options to modify <a href='#Layer'>Layer</a></td>
+ <tr> <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_saveLayerFlags'><code><strong>saveLayerFlags</strong></code></a></td>
+ <td><a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a> options to modify <a href='#Layer'>Layer</a></td>
</tr>
</table>
### Return Value
-<a href='#SkCanvas_SaveLayerRec_empty_constructor'>SaveLayerRec</a> fully specified
+<a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a> fully specified
### Example
@@ -2550,50 +2567,50 @@
---
-<a name='SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star'></a>
+<a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star'></a>
## SaveLayerRec
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-<a href='#SkCanvas_SaveLayerRec_empty_constructor'>SaveLayerRec</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint, const <a href='undocumented#SkImageFilter'>SkImageFilter</a>* backdrop,
+<a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint, const <a href='undocumented#SkImageFilter'>SkImageFilter</a>* backdrop,
const <a href='SkImage_Reference#SkImage'>SkImage</a>* clipMask, const <a href='SkMatrix_Reference#SkMatrix'>SkMatrix</a>* clipMatrix, <a href='#SkCanvas_SaveLayerFlags'>SaveLayerFlags</a> saveLayerFlags)
</pre>
Experimental.
not readySets <a href='#SkCanvas_SaveLayerRec_fBounds'>fBounds</a>, <a href='#SkCanvas_SaveLayerRec_fPaint'>fPaint</a>, <a href='#SkCanvas_SaveLayerRec_fBackdrop'>fBackdrop</a>, <a href='#SkCanvas_SaveLayerRec_fClipMask'>fClipMask</a>, <a href='#SkCanvas_SaveLayerRec_fClipMatrix'>fClipMatrix</a>, and <a href='#SkCanvas_SaveLayerRec_fSaveLayerFlags'>fSaveLayerFlags</a>.
-<a href='#SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_clipMatrix'>clipMatrix</a> uses <a href='SkColor_Reference#Alpha'>Color Alpha</a> channel of image, transformed by <a href='#SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_clipMatrix'>clipMatrix</a>, to clip
+<a href='#SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_clipMatrix'>clipMatrix</a> uses <a href='SkColor_Reference#Alpha'>Color Alpha</a> channel of image, transformed by <a href='#SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_clipMatrix'>clipMatrix</a>, to clip
<a href='#Layer'>Layer</a> when drawn to <a href='#Canvas'>Canvas</a>.
Implementation is not complete; has no effect if <a href='undocumented#Device'>Device</a> is GPU-backed.
### Parameters
-<table> <tr> <td><a name='SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_bounds'><code><strong>bounds</strong></code></a></td>
+<table> <tr> <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_bounds'><code><strong>bounds</strong></code></a></td>
<td><a href='#Layer'>Layer</a> dimensions; may be nullptr</td>
</tr>
- <tr> <td><a name='SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_paint'><code><strong>paint</strong></code></a></td>
+ <tr> <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_paint'><code><strong>paint</strong></code></a></td>
<td>graphics state applied to <a href='#Layer'>Layer</a> when overlaying prior
<a href='#Layer'>Layer</a>; may be nullptr</td>
</tr>
- <tr> <td><a name='SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_backdrop'><code><strong>backdrop</strong></code></a></td>
+ <tr> <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_backdrop'><code><strong>backdrop</strong></code></a></td>
<td>prior <a href='#Layer'>Layer</a> copied with <a href='undocumented#Image_Filter'>Image Filter</a>;
may be nullptr</td>
</tr>
- <tr> <td><a name='SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_clipMask'><code><strong>clipMask</strong></code></a></td>
+ <tr> <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_clipMask'><code><strong>clipMask</strong></code></a></td>
<td>clip applied to <a href='#Layer'>Layer</a>; may be nullptr</td>
</tr>
- <tr> <td><a name='SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_clipMatrix'><code><strong>clipMatrix</strong></code></a></td>
- <td>matrix applied to <a href='#SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_clipMask'>clipMask</a>; may be nullptr to use
+ <tr> <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_clipMatrix'><code><strong>clipMatrix</strong></code></a></td>
+ <td>matrix applied to <a href='#SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_clipMask'>clipMask</a>; may be nullptr to use
identity matrix</td>
</tr>
- <tr> <td><a name='SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_saveLayerFlags'><code><strong>saveLayerFlags</strong></code></a></td>
- <td><a href='#SkCanvas_SaveLayerRec_empty_constructor'>SaveLayerRec</a> options to modify <a href='#Layer'>Layer</a></td>
+ <tr> <td><a name='SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star_const_SkImage_star_const_SkMatrix_star_saveLayerFlags'><code><strong>saveLayerFlags</strong></code></a></td>
+ <td><a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a> options to modify <a href='#Layer'>Layer</a></td>
</tr>
</table>
### Return Value
-<a href='#SkCanvas_SaveLayerRec_empty_constructor'>SaveLayerRec</a> fully specified
+<a href='#SkCanvas_SaveLayerRec_SaveLayerRec'>SaveLayerRec</a> fully specified
### See Also
@@ -2972,7 +2989,7 @@
<a href='#Clip'>Clip</a> can combine with <a href='SkRect_Reference#Rect'>Rect</a> and <a href='SkRRect_Reference#RRect'>Round Rect</a> primitives; like
<a href='SkPath_Reference#Path'>Path</a>, these are transformed by <a href='#Matrix'>Matrix</a> before they are combined with <a href='#Clip'>Clip</a>.
-<a href='#Clip'>Clip</a> can combine with <a href='undocumented#Region'>Region</a>. <a href='undocumented#Region'>Region</a> is assumed to be in <a href='undocumented#Device'>Device</a> coordinates
+<a href='#Clip'>Clip</a> can combine with <a href='SkRegion_Reference#Region'>Region</a>. <a href='SkRegion_Reference#Region'>Region</a> is assumed to be in <a href='undocumented#Device'>Device</a> coordinates
and is unaffected by <a href='#Matrix'>Matrix</a>.
### Example
@@ -3330,17 +3347,17 @@
## clipRegion
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-void <a href='#SkCanvas_clipRegion'>clipRegion</a>(const <a href='undocumented#SkRegion'>SkRegion</a>& deviceRgn, <a href='undocumented#SkClipOp'>SkClipOp</a> op = <a href='undocumented#SkClipOp_kIntersect'>SkClipOp::kIntersect</a>)
+void <a href='#SkCanvas_clipRegion'>clipRegion</a>(const <a href='SkRegion_Reference#SkRegion'>SkRegion</a>& deviceRgn, <a href='undocumented#SkClipOp'>SkClipOp</a> op = <a href='undocumented#SkClipOp_kIntersect'>SkClipOp::kIntersect</a>)
</pre>
-Replaces <a href='#Clip'>Clip</a> with the intersection or difference of <a href='#Clip'>Clip</a> and <a href='undocumented#Region'>Region</a> <a href='#SkCanvas_clipRegion_deviceRgn'>deviceRgn</a>.
+Replaces <a href='#Clip'>Clip</a> with the intersection or difference of <a href='#Clip'>Clip</a> and <a href='SkRegion_Reference#Region'>Region</a> <a href='#SkCanvas_clipRegion_deviceRgn'>deviceRgn</a>.
Resulting <a href='#Clip'>Clip</a> is <a href='undocumented#Alias'>Aliased</a>; pixels are fully contained by the clip.
<a href='#SkCanvas_clipRegion_deviceRgn'>deviceRgn</a> is unaffected by <a href='#Matrix'>Matrix</a>.
### Parameters
<table> <tr> <td><a name='SkCanvas_clipRegion_deviceRgn'><code><strong>deviceRgn</strong></code></a></td>
- <td><a href='undocumented#Region'>Region</a> to combine with <a href='#Clip'>Clip</a></td>
+ <td><a href='SkRegion_Reference#Region'>Region</a> to combine with <a href='#Clip'>Clip</a></td>
</tr>
<tr> <td><a name='SkCanvas_clipRegion_op'><code><strong>op</strong></code></a></td>
<td><a href='undocumented#Clip_Op'>Clip Op</a> to apply to <a href='#Clip'>Clip</a></td>
@@ -3350,7 +3367,7 @@
### Example
<div><fiddle-embed name="7bb57c0e456c5fda2c2cca4abb68b19e"><div>region is unaffected by canvas rotation; iRect is affected by canvas rotation.
-Both clips are <a href='undocumented#Alias'>Aliased</a>; this is not noticeable on <a href='undocumented#Region'>Region</a> clip because it
+Both clips are <a href='undocumented#Alias'>Aliased</a>; this is not noticeable on <a href='SkRegion_Reference#Region'>Region</a> clip because it
aligns to pixel boundaries.
</div></fiddle-embed></div>
@@ -3771,7 +3788,7 @@
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkCanvas_drawRegion'>drawRegion</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>draws <a href='undocumented#Region'>Region</a> using <a href='#Clip'>Clip</a>, <a href='#Matrix'>Matrix</a>, and <a href='SkPaint_Reference#Paint'>Paint</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>draws <a href='SkRegion_Reference#Region'>Region</a> using <a href='#Clip'>Clip</a>, <a href='#Matrix'>Matrix</a>, and <a href='SkPaint_Reference#Paint'>Paint</a></td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkCanvas_drawRoundRect'>drawRoundRect</a></td>
@@ -4253,10 +4270,10 @@
## drawRegion
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-void <a href='#SkCanvas_drawRegion'>drawRegion</a>(const <a href='undocumented#SkRegion'>SkRegion</a>& region, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& paint)
+void <a href='#SkCanvas_drawRegion'>drawRegion</a>(const <a href='SkRegion_Reference#SkRegion'>SkRegion</a>& region, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& paint)
</pre>
-Draws <a href='undocumented#Region'>Region</a> <a href='#SkCanvas_drawRegion_region'>region</a> using <a href='#Clip'>Clip</a>, <a href='#Matrix'>Matrix</a>, and <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawRegion_paint'>paint</a>.
+Draws <a href='SkRegion_Reference#Region'>Region</a> <a href='#SkCanvas_drawRegion_region'>region</a> using <a href='#Clip'>Clip</a>, <a href='#Matrix'>Matrix</a>, and <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawRegion_paint'>paint</a>.
In <a href='#SkCanvas_drawRegion_paint'>paint</a>: <a href='SkPaint_Reference#Style'>Paint Style</a> determines if rectangle is stroked or filled;
if stroked, <a href='SkPaint_Reference#Stroke_Width'>Paint Stroke Width</a> describes the line thickness, and
<a href='SkPaint_Reference#Stroke_Join'>Paint Stroke Join</a> draws the corners rounded or square.
@@ -6226,21 +6243,23 @@
## drawTextBlob
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-void <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a>(const <a href='undocumented#SkTextBlob'>SkTextBlob</a>* blob, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& paint)
+void <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a>(const <a href='SkTextBlob_Reference#SkTextBlob'>SkTextBlob</a>* blob, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& paint)
</pre>
-Draws <a href='undocumented#Text_Blob'>Text Blob</a> <a href='#SkCanvas_drawTextBlob_blob'>blob</a> at (<a href='#SkCanvas_drawTextBlob_x'>x</a>, <a href='#SkCanvas_drawTextBlob_y'>y</a>), using <a href='#Clip'>Clip</a>, <a href='#Matrix'>Matrix</a>, and <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawTextBlob_paint'>paint</a>.
+Draws <a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a> <a href='#SkCanvas_drawTextBlob_blob'>blob</a> at (<a href='#SkCanvas_drawTextBlob_x'>x</a>, <a href='#SkCanvas_drawTextBlob_y'>y</a>), using <a href='#Clip'>Clip</a>, <a href='#Matrix'>Matrix</a>, and <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawTextBlob_paint'>paint</a>.
-<a href='#SkCanvas_drawTextBlob_blob'>blob</a> contains <a href='undocumented#Glyph'>Glyphs</a>, their positions, and <a href='#SkCanvas_drawTextBlob_paint'>paint</a> attributes specific to text:
-<a href='undocumented#Typeface'>Typeface</a>, <a href='SkPaint_Reference#Text_Size'>Paint Text Size</a>, <a href='SkPaint_Reference#Text_Scale_X'>Paint Text Scale X</a>, <a href='SkPaint_Reference#Text_Skew_X'>Paint Text Skew X</a>,
-<a href='SkPaint_Reference#Text_Align'>Paint Text Align</a>, <a href='SkPaint_Reference#Hinting'>Paint Hinting</a>, <a href='SkPaint_Reference#Anti_Alias'>Anti Alias</a>, <a href='SkPaint_Reference#Fake_Bold'>Paint Fake Bold</a>,
+<a href='#SkCanvas_drawTextBlob_blob'>blob</a> contains <a href='undocumented#Glyph'>Glyphs</a>, their positions, and <a href='#SkCanvas_drawTextBlob_paint'>paint</a> attributes specific to text: <a href='undocumented#Typeface'>Typeface</a>, <a href='SkPaint_Reference#Text_Size'>Paint Text Size</a>, <a href='SkPaint_Reference#Text_Scale_X'>Paint Text Scale X</a>,
+<a href='SkPaint_Reference#Text_Skew_X'>Paint Text Skew X</a>, <a href='SkPaint_Reference#Text_Align'>Paint Text Align</a>, <a href='SkPaint_Reference#Hinting'>Paint Hinting</a>, <a href='SkPaint_Reference#Anti_Alias'>Anti Alias</a>, <a href='SkPaint_Reference#Fake_Bold'>Paint Fake Bold</a>,
<a href='SkPaint_Reference#Font_Embedded_Bitmaps'>Font Embedded Bitmaps</a>, <a href='SkPaint_Reference#Full_Hinting_Spacing'>Full Hinting Spacing</a>, <a href='SkPaint_Reference#LCD_Text'>LCD Text</a>, <a href='SkPaint_Reference#Linear_Text'>Linear Text</a>,
-<a href='SkPaint_Reference#Subpixel_Text'>Subpixel Text</a>, and <a href='SkPaint_Reference#Vertical_Text'>Paint Vertical Text</a>.
+and <a href='SkPaint_Reference#Subpixel_Text'>Subpixel Text</a>.
<a href='SkPaint_Reference#Text_Encoding'>Paint Text Encoding</a> must be set to <a href='SkPaint_Reference#SkPaint_kGlyphID_TextEncoding'>SkPaint::kGlyphID TextEncoding</a>.
-Elements of <a href='#SkCanvas_drawTextBlob_paint'>paint</a>: <a href='undocumented#Path_Effect'>Path Effect</a>, <a href='undocumented#Mask_Filter'>Mask Filter</a>, <a href='undocumented#Shader'>Shader</a>, <a href='undocumented#Color_Filter'>Color Filter</a>,
-<a href='undocumented#Image_Filter'>Image Filter</a>, and <a href='undocumented#Draw_Looper'>Draw Looper</a>; apply to <a href='#SkCanvas_drawTextBlob_blob'>blob</a>.
+Elements of <a href='#SkCanvas_drawTextBlob_paint'>paint</a>: <a href='SkPaint_Reference#Anti_Alias'>Anti Alias</a>, <a href='SkBlendMode_Reference#Blend_Mode'>Blend Mode</a>, <a href='SkColor_Reference#Color'>Color</a> including <a href='SkColor_Reference#Alpha'>Color Alpha</a>,
+<a href='undocumented#Color_Filter'>Color Filter</a>, <a href='SkPaint_Reference#Dither'>Paint Dither</a>, <a href='undocumented#Draw_Looper'>Draw Looper</a>, <a href='undocumented#Mask_Filter'>Mask Filter</a>, <a href='undocumented#Path_Effect'>Path Effect</a>, <a href='undocumented#Shader'>Shader</a>, and
+<a href='SkPaint_Reference#Style'>Paint Style</a>; apply to <a href='#SkCanvas_drawTextBlob_blob'>blob</a>. If <a href='SkPaint_Reference#Paint'>Paint</a> contains <a href='SkPaint_Reference#SkPaint_kStroke_Style'>SkPaint::kStroke Style</a>:
+<a href='SkPaint_Reference#Miter_Limit'>Paint Miter Limit</a>, <a href='SkPaint_Reference#Stroke_Cap'>Paint Stroke Cap</a>, <a href='SkPaint_Reference#Stroke_Join'>Paint Stroke Join</a>, and <a href='SkPaint_Reference#Stroke_Width'>Paint Stroke Width</a>;
+apply to <a href='SkPath_Reference#Path'>Path</a> created from <a href='#SkCanvas_drawTextBlob_blob'>blob</a>.
### Parameters
@@ -6271,16 +6290,15 @@
<a name='SkCanvas_drawTextBlob_2'></a>
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-void <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a>(const <a href='undocumented#sk_sp'>sk sp</a><<a href='undocumented#SkTextBlob'>SkTextBlob</a>>& blob, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& paint)
+void <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a>(const <a href='undocumented#sk_sp'>sk sp</a><<a href='SkTextBlob_Reference#SkTextBlob'>SkTextBlob</a>>& blob, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& paint)
</pre>
-Draws <a href='undocumented#Text_Blob'>Text Blob</a> <a href='#SkCanvas_drawTextBlob_2_blob'>blob</a> at (<a href='#SkCanvas_drawTextBlob_2_x'>x</a>, <a href='#SkCanvas_drawTextBlob_2_y'>y</a>), using <a href='#Clip'>Clip</a>, <a href='#Matrix'>Matrix</a>, and <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawTextBlob_2_paint'>paint</a>.
+Draws <a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a> <a href='#SkCanvas_drawTextBlob_2_blob'>blob</a> at (<a href='#SkCanvas_drawTextBlob_2_x'>x</a>, <a href='#SkCanvas_drawTextBlob_2_y'>y</a>), using <a href='#Clip'>Clip</a>, <a href='#Matrix'>Matrix</a>, and <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#SkCanvas_drawTextBlob_2_paint'>paint</a>.
-<a href='#SkCanvas_drawTextBlob_2_blob'>blob</a> contains <a href='undocumented#Glyph'>Glyphs</a>, their positions, and <a href='#SkCanvas_drawTextBlob_2_paint'>paint</a> attributes specific to text:
-<a href='undocumented#Typeface'>Typeface</a>, <a href='SkPaint_Reference#Text_Size'>Paint Text Size</a>, <a href='SkPaint_Reference#Text_Scale_X'>Paint Text Scale X</a>, <a href='SkPaint_Reference#Text_Skew_X'>Paint Text Skew X</a>,
-<a href='SkPaint_Reference#Text_Align'>Paint Text Align</a>, <a href='SkPaint_Reference#Hinting'>Paint Hinting</a>, <a href='SkPaint_Reference#Anti_Alias'>Anti Alias</a>, <a href='SkPaint_Reference#Fake_Bold'>Paint Fake Bold</a>,
+<a href='#SkCanvas_drawTextBlob_2_blob'>blob</a> contains <a href='undocumented#Glyph'>Glyphs</a>, their positions, and <a href='#SkCanvas_drawTextBlob_2_paint'>paint</a> attributes specific to text: <a href='undocumented#Typeface'>Typeface</a>, <a href='SkPaint_Reference#Text_Size'>Paint Text Size</a>, <a href='SkPaint_Reference#Text_Scale_X'>Paint Text Scale X</a>,
+<a href='SkPaint_Reference#Text_Skew_X'>Paint Text Skew X</a>, <a href='SkPaint_Reference#Text_Align'>Paint Text Align</a>, <a href='SkPaint_Reference#Hinting'>Paint Hinting</a>, <a href='SkPaint_Reference#Anti_Alias'>Anti Alias</a>, <a href='SkPaint_Reference#Fake_Bold'>Paint Fake Bold</a>,
<a href='SkPaint_Reference#Font_Embedded_Bitmaps'>Font Embedded Bitmaps</a>, <a href='SkPaint_Reference#Full_Hinting_Spacing'>Full Hinting Spacing</a>, <a href='SkPaint_Reference#LCD_Text'>LCD Text</a>, <a href='SkPaint_Reference#Linear_Text'>Linear Text</a>,
-<a href='SkPaint_Reference#Subpixel_Text'>Subpixel Text</a>, and <a href='SkPaint_Reference#Vertical_Text'>Paint Vertical Text</a>.
+and <a href='SkPaint_Reference#Subpixel_Text'>Subpixel Text</a>.
<a href='SkPaint_Reference#Text_Encoding'>Paint Text Encoding</a> must be set to <a href='SkPaint_Reference#SkPaint_kGlyphID_TextEncoding'>SkPaint::kGlyphID TextEncoding</a>.
@@ -6305,7 +6323,7 @@
### Example
-<div><fiddle-embed name="af4c69fbbd165c8b0eb0c9bd49ccbd8d"><div><a href='SkPaint_Reference#Paint'>Paint</a> attributes unrelated to text, like color, have no effect on <a href='#SkCanvas_drawTextBlob_2_paint'>paint</a> in allocated <a href='undocumented#Text_Blob'>Text Blob</a>.
+<div><fiddle-embed name="af4c69fbbd165c8b0eb0c9bd49ccbd8d"><div><a href='SkPaint_Reference#Paint'>Paint</a> attributes unrelated to text, like color, have no effect on <a href='#SkCanvas_drawTextBlob_2_paint'>paint</a> in allocated <a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a>.
<a href='SkPaint_Reference#Paint'>Paint</a> attributes related to text, like text size, have no effect on <a href='#SkCanvas_drawTextBlob_2_paint'>paint</a> passed to <a href='#SkCanvas_drawTextBlob'>drawTextBlob</a>.
</div></fiddle-embed></div>
diff --git a/site/user/api/SkPaint_Reference.md b/site/user/api/SkPaint_Reference.md
index 342579d..9603c5d 100644
--- a/site/user/api/SkPaint_Reference.md
+++ b/site/user/api/SkPaint_Reference.md
@@ -648,7 +648,7 @@
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getTextBlobIntercepts'>getTextBlobIntercepts</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns where lines intersect <a href='undocumented#Text_Blob'>Text Blob</a>; underlines</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns where lines intersect <a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a>; underlines</td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getTextEncoding'>getTextEncoding</a></td>
@@ -2802,8 +2802,8 @@
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkPaint_kFill_Style'><code>SkPaint::kFill_Style</code></a></td>
<td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>0</td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
-Applies to <a href='SkRect_Reference#Rect'>Rect</a>, <a href='undocumented#Region'>Region</a>, <a href='SkRRect_Reference#RRect'>Round Rect</a>, <a href='undocumented#Circle'>Circles</a>, <a href='undocumented#Oval'>Ovals</a>, <a href='SkPath_Reference#Path'>Path</a>, and <a href='undocumented#Text'>Text</a>.
-<a href='SkBitmap_Reference#Bitmap'>Bitmap</a>, <a href='SkImage_Reference#Image'>Image</a>, <a href='undocumented#Patch'>Patches</a>, <a href='undocumented#Region'>Region</a>, <a href='undocumented#Sprite'>Sprites</a>, and <a href='undocumented#Vertices'>Vertices</a> are painted as if
+Applies to <a href='SkRect_Reference#Rect'>Rect</a>, <a href='SkRegion_Reference#Region'>Region</a>, <a href='SkRRect_Reference#RRect'>Round Rect</a>, <a href='undocumented#Circle'>Circles</a>, <a href='undocumented#Oval'>Ovals</a>, <a href='SkPath_Reference#Path'>Path</a>, and <a href='undocumented#Text'>Text</a>.
+<a href='SkBitmap_Reference#Bitmap'>Bitmap</a>, <a href='SkImage_Reference#Image'>Image</a>, <a href='undocumented#Patch'>Patches</a>, <a href='SkRegion_Reference#Region'>Region</a>, <a href='undocumented#Sprite'>Sprites</a>, and <a href='undocumented#Vertices'>Vertices</a> are painted as if
<a href='#SkPaint_kFill_Style'>kFill Style</a> is set, and ignore the set <a href='#SkPaint_Style'>Style</a>.
The <a href='SkPath_Reference#Fill_Type'>Path Fill Type</a> specifies additional rules to fill the area outside the path edge,
and to create an unfilled hole inside the shape.
@@ -2814,7 +2814,7 @@
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkPaint_kStroke_Style'><code>SkPaint::kStroke_Style</code></a></td>
<td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>1</td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
-Applies to <a href='SkRect_Reference#Rect'>Rect</a>, <a href='undocumented#Region'>Region</a>, <a href='SkRRect_Reference#RRect'>Round Rect</a>, <a href='undocumented#Arc'>Arcs</a>, <a href='undocumented#Circle'>Circles</a>, <a href='undocumented#Oval'>Ovals</a>, <a href='SkPath_Reference#Path'>Path</a>, and <a href='undocumented#Text'>Text</a>.
+Applies to <a href='SkRect_Reference#Rect'>Rect</a>, <a href='SkRegion_Reference#Region'>Region</a>, <a href='SkRRect_Reference#RRect'>Round Rect</a>, <a href='undocumented#Arc'>Arcs</a>, <a href='undocumented#Circle'>Circles</a>, <a href='undocumented#Oval'>Ovals</a>, <a href='SkPath_Reference#Path'>Path</a>, and <a href='undocumented#Text'>Text</a>.
<a href='undocumented#Arc'>Arcs</a>, <a href='undocumented#Line'>Lines</a>, and points, are always drawn as if <a href='#SkPaint_kStroke_Style'>kStroke Style</a> is set,
and ignore the set <a href='#SkPaint_Style'>Style</a>.
The stroke construction is unaffected by the <a href='SkPath_Reference#Fill_Type'>Path Fill Type</a>.
@@ -2824,7 +2824,7 @@
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkPaint_kStrokeAndFill_Style'><code>SkPaint::kStrokeAndFill_Style</code></a></td>
<td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>2</td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
-Applies to <a href='SkRect_Reference#Rect'>Rect</a>, <a href='undocumented#Region'>Region</a>, <a href='SkRRect_Reference#RRect'>Round Rect</a>, <a href='undocumented#Circle'>Circles</a>, <a href='undocumented#Oval'>Ovals</a>, <a href='SkPath_Reference#Path'>Path</a>, and <a href='undocumented#Text'>Text</a>.
+Applies to <a href='SkRect_Reference#Rect'>Rect</a>, <a href='SkRegion_Reference#Region'>Region</a>, <a href='SkRRect_Reference#RRect'>Round Rect</a>, <a href='undocumented#Circle'>Circles</a>, <a href='undocumented#Oval'>Ovals</a>, <a href='SkPath_Reference#Path'>Path</a>, and <a href='undocumented#Text'>Text</a>.
<a href='SkPath_Reference#Path'>Path</a> is treated as if it is set to <a href='SkPath_Reference#SkPath_kWinding_FillType'>SkPath::kWinding FillType</a>,
and the set <a href='SkPath_Reference#Fill_Type'>Path Fill Type</a> is ignored.
</td>
@@ -4771,7 +4771,7 @@
## <a name='Font_Metrics_Constant'>Constant</a>
-SkPaint related constants are defined by <code>enum</code>, <code>enum class</code>, <code>#define</code>, <code>const</code>, and <code>constexpr</code>.
+SkPaint::FontMetrics related constants are defined by <code>enum</code>, <code>enum class</code>, <code>#define</code>, <code>const</code>, and <code>constexpr</code>.
<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>
@@ -4800,7 +4800,7 @@
## <a name='Font_Metrics_Member_Function'>Member_Function</a>
-SkPaint member functions read and modify the structure properties.
+SkPaint::FontMetrics member functions read and modify the structure properties.
<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>
@@ -4825,7 +4825,7 @@
## <a name='Font_Metrics_Member'>Member</a>
-SkPaint members may be read and written directly without using a member function.
+SkPaint::FontMetrics members may be read and written directly without using a member function.
<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>
@@ -5935,7 +5935,7 @@
## getTextBlobIntercepts
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-int <a href='#SkPaint_getTextBlobIntercepts'>getTextBlobIntercepts</a>(const <a href='undocumented#SkTextBlob'>SkTextBlob</a>* blob, const <a href='undocumented#SkScalar'>SkScalar</a> bounds[2], <a href='undocumented#SkScalar'>SkScalar</a>* intervals) const
+int <a href='#SkPaint_getTextBlobIntercepts'>getTextBlobIntercepts</a>(const <a href='SkTextBlob_Reference#SkTextBlob'>SkTextBlob</a>* blob, const <a href='undocumented#SkScalar'>SkScalar</a> bounds[2], <a href='undocumented#SkScalar'>SkScalar</a>* intervals) const
</pre>
Returns the number of <a href='#SkPaint_getTextBlobIntercepts_intervals'>intervals</a> that intersect <a href='#SkPaint_getTextBlobIntercepts_bounds'>bounds</a>.
diff --git a/site/user/api/SkPath_Reference.md b/site/user/api/SkPath_Reference.md
index 9442e4d..76ad5ec 100644
--- a/site/user/api/SkPath_Reference.md
+++ b/site/user/api/SkPath_Reference.md
@@ -415,7 +415,7 @@
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPath_equal_operator'>operator==(const SkPath& a, const SkPath& b)</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>compares paths for equality</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>compares <a href='#Path'>Paths</a> for equality</td>
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPath_swap'>swap</a></td>
@@ -906,7 +906,7 @@
<a href='#SkPath'>SkPath</a>()
</pre>
-Constucts an empty path. By default, <a href='#Path'>Path</a> has no <a href='#Verb'>Verbs</a>, no <a href='SkPoint_Reference#Point'>Points</a>, and no <a href='#Conic_Weight'>Weights</a>.
+Constucts an empty <a href='#Path'>Path</a>. By default, <a href='#Path'>Path</a> has no <a href='#Verb'>Verbs</a>, no <a href='SkPoint_Reference#Point'>Points</a>, and no <a href='#Conic_Weight'>Weights</a>.
<a href='#Fill_Type'>Fill Type</a> is set to <a href='#SkPath_kWinding_FillType'>kWinding FillType</a>.
### Return Value
@@ -1089,6 +1089,10 @@
</fiddle-embed></div>
+### See Also
+
+<a href='#SkPath_notequal_operator'>operator!=(const SkPath& a, const SkPath& b)</a> <a href='#SkPath_copy_operator'>operator=(const SkPath& path)</a>
+
---
<a name='SkPath_notequal_operator'></a>
@@ -1117,14 +1121,14 @@
### Example
-<div><fiddle-embed name="0c6870ba1cea85ce6da5abd489c23d83"><div><a href='#Path'>Path</a> pair are equal though their convexity is not equal.
+<div><fiddle-embed name="bbbda1cc818d96c9c0d2a06c0c48902b"><div><a href='#Path'>Path</a> pair are equal though their convexity is not equal.
</div>
#### Example Output
~~~~
empty one == two
-addRect one == two
+add rect one == two
setConvexity one == two
convexity !=
~~~~
@@ -1824,7 +1828,7 @@
Returns if <a href='#Path'>Path</a> is empty.
Empty <a href='#Path'>Path</a> may have <a href='#SkPath_FillType'>FillType</a> but has no <a href='SkPoint_Reference#SkPoint'>SkPoint</a>, <a href='#SkPath_Verb'>Verb</a>, or <a href='#Conic_Weight'>Conic Weight</a>.
-<a href='#SkPath_empty_constructor'>SkPath()</a> constructs empty <a href='#Path'>Path</a>; <a href='#SkPath_reset'>reset</a> and (rewind) make <a href='#Path'>Path</a> empty.
+<a href='#SkPath_empty_constructor'>SkPath()</a> constructs empty <a href='#Path'>Path</a>; <a href='#SkPath_reset'>reset</a> and <a href='#SkPath_rewind'>rewind</a> make <a href='#Path'>Path</a> empty.
### Return Value
@@ -5387,7 +5391,7 @@
## dump
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-void <a href='#SkPath_dump'>dump</a>(<a href='undocumented#SkWStream'>SkWStream</a>* stream, bool forceClose, bool dumpAsHex) const
+void <a href='#SkPath_dump'>dump</a>(<a href='SkWStream_Reference#SkWStream'>SkWStream</a>* stream, bool forceClose, bool dumpAsHex) const
</pre>
Writes text representation of <a href='#Path'>Path</a> to <a href='#SkPath_dump_stream'>stream</a>. If <a href='#SkPath_dump_stream'>stream</a> is nullptr, writes to
@@ -5398,7 +5402,7 @@
### Parameters
<table> <tr> <td><a name='SkPath_dump_stream'><code><strong>stream</strong></code></a></td>
- <td>writable <a href='undocumented#WStream'>WStream</a> receiving <a href='#Path'>Path</a> text representation; may be nullptr</td>
+ <td>writable <a href='SkWStream_Reference#WStream'>WStream</a> receiving <a href='#Path'>Path</a> text representation; may be nullptr</td>
</tr>
<tr> <td><a name='SkPath_dump_forceClose'><code><strong>forceClose</strong></code></a></td>
<td>true if missing <a href='#SkPath_kClose_Verb'>kClose Verb</a> is output</td>
@@ -5723,26 +5727,54 @@
## <a name='Constructor'>Constructor</a>
-SkPath can be constructed or initialized by these functions, including C++ class constructors.
+SkPath::Iter can be constructed or initialized by these functions, including C++ class constructors.
<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='#SkPath_Iter_const_SkPath'>Iter(const SkPath& path, bool forceClose)</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Path'>Path</a> iterator</td>
+ </tr>
</table>
## <a name='Member_Function'>Member_Function</a>
-SkPath member functions read and modify the structure properties.
+SkPath::Iter member functions read and modify the structure properties.
<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='#SkPath_Iter_Iter'>Iter()</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Path'>Path</a> iterator</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPath_Iter_conicWeight'>conicWeight</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='#Conic_Weight'>Conic Weight</a></td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPath_Iter_isCloseLine'>isCloseLine</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns if <a href='undocumented#Line'>Line</a> was generated by <a href='#SkPath_kClose_Verb'>kClose Verb</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPath_Iter_isClosedContour'>isClosedContour</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns if <a href='#Contour'>Contour</a> has <a href='#SkPath_kClose_Verb'>kClose Verb</a></td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPath_Iter_next'>next</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns next <a href='#SkPath_Verb'>Verb</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPath_Iter_setPath'>setPath</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>resets <a href='#SkPath_Iter_Iter'>Iter</a> to <a href='#Path'>Path</a></td>
+ </tr>
</table>
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
-class <a href='#SkPath_Iter_empty_constructor'>Iter</a> {
+class <a href='#SkPath_Iter_Iter'>Iter</a> {
public:
- <a href='#SkPath_Iter_empty_constructor'>Iter()</a>;
- <a href='#SkPath_const_SkPath'>Iter(const SkPath& path, bool forceClose)</a>;
+ <a href='#SkPath_Iter_Iter'>Iter()</a>;
+ <a href='#SkPath_Iter_const_SkPath'>Iter(const SkPath& path, bool forceClose)</a>;
void <a href='#SkPath_Iter_setPath'>setPath(const SkPath& path, bool forceClose)</a>;
<a href='#SkPath_Verb'>Verb</a> <a href='#SkPath_Iter_next'>next(SkPoint pts[4], bool doConsumeDegenerates = true, bool exact = false)</a>;
<a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPath_Iter_conicWeight'>conicWeight</a> const;
@@ -5765,19 +5797,19 @@
<a href='#SkPath_RawIter'>RawIter</a>
-<a name='SkPath_Iter_empty_constructor'></a>
+<a name='SkPath_Iter_Iter'></a>
## Iter
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-<a href='#SkPath_Iter_empty_constructor'>Iter</a>()
+<a href='#SkPath_Iter_Iter'>Iter</a>()
</pre>
-Initializes <a href='#SkPath_Iter_empty_constructor'>Iter</a> with an empty <a href='#Path'>Path</a>. <a href='#SkPath_Iter_next'>next</a> on <a href='#SkPath_Iter_empty_constructor'>Iter</a> returns <a href='#SkPath_kDone_Verb'>kDone Verb</a>.
-Call <a href='#SkPath_Iter_setPath'>setPath</a> to initialize <a href='#SkPath_Iter_empty_constructor'>Iter</a> at a later time.
+Initializes <a href='#SkPath_Iter_Iter'>Iter</a> with an empty <a href='#Path'>Path</a>. <a href='#SkPath_Iter_next'>next</a> on <a href='#SkPath_Iter_Iter'>Iter</a> returns <a href='#SkPath_kDone_Verb'>kDone Verb</a>.
+Call <a href='#SkPath_Iter_setPath'>setPath</a> to initialize <a href='#SkPath_Iter_Iter'>Iter</a> at a later time.
### Return Value
-<a href='#SkPath_Iter_empty_constructor'>Iter</a> of empty <a href='#Path'>Path</a>
+<a href='#SkPath_Iter_Iter'>Iter</a> of empty <a href='#Path'>Path</a>
### Example
@@ -5798,30 +5830,30 @@
---
-<a name='SkPath_const_SkPath'></a>
+<a name='SkPath_Iter_const_SkPath'></a>
## Iter
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-<a href='#SkPath_Iter_empty_constructor'>Iter</a>(const <a href='#SkPath'>SkPath</a>& path, bool forceClose)
+<a href='#SkPath_Iter_Iter'>Iter</a>(const <a href='#SkPath'>SkPath</a>& path, bool forceClose)
</pre>
-Sets <a href='#SkPath_Iter_empty_constructor'>Iter</a> to return elements of <a href='#Verb_Array'>Verb Array</a>, <a href='#Point_Array'>Point Array</a>, and <a href='#Conic_Weight'>Conic Weight</a> in <a href='#SkPath_const_SkPath_path'>path</a>.
-If <a href='#SkPath_const_SkPath_forceClose'>forceClose</a> is true, <a href='#SkPath_Iter_empty_constructor'>Iter</a> will add <a href='#SkPath_kLine_Verb'>kLine Verb</a> and <a href='#SkPath_kClose_Verb'>kClose Verb</a> after each
-open <a href='#Contour'>Contour</a>. <a href='#SkPath_const_SkPath_path'>path</a> is not altered.
+Sets <a href='#SkPath_Iter_Iter'>Iter</a> to return elements of <a href='#Verb_Array'>Verb Array</a>, <a href='#Point_Array'>Point Array</a>, and <a href='#Conic_Weight'>Conic Weight</a> in <a href='#SkPath_Iter_const_SkPath_path'>path</a>.
+If <a href='#SkPath_Iter_const_SkPath_forceClose'>forceClose</a> is true, <a href='#SkPath_Iter_Iter'>Iter</a> will add <a href='#SkPath_kLine_Verb'>kLine Verb</a> and <a href='#SkPath_kClose_Verb'>kClose Verb</a> after each
+open <a href='#Contour'>Contour</a>. <a href='#SkPath_Iter_const_SkPath_path'>path</a> is not altered.
### Parameters
-<table> <tr> <td><a name='SkPath_const_SkPath_path'><code><strong>path</strong></code></a></td>
+<table> <tr> <td><a name='SkPath_Iter_const_SkPath_path'><code><strong>path</strong></code></a></td>
<td><a href='#Path'>Path</a> to iterate</td>
</tr>
- <tr> <td><a name='SkPath_const_SkPath_forceClose'><code><strong>forceClose</strong></code></a></td>
+ <tr> <td><a name='SkPath_Iter_const_SkPath_forceClose'><code><strong>forceClose</strong></code></a></td>
<td>true if open <a href='#Contour'>Contours</a> generate <a href='#SkPath_kClose_Verb'>kClose Verb</a></td>
</tr>
</table>
### Return Value
-<a href='#SkPath_Iter_empty_constructor'>Iter</a> of <a href='#SkPath_const_SkPath_path'>path</a>
+<a href='#SkPath_Iter_Iter'>Iter</a> of <a href='#SkPath_Iter_const_SkPath_path'>path</a>
### Example
@@ -5857,8 +5889,8 @@
void <a href='#SkPath_Iter_setPath'>setPath</a>(const <a href='#SkPath'>SkPath</a>& path, bool forceClose)
</pre>
-Sets <a href='#SkPath_Iter_empty_constructor'>Iter</a> to return elements of <a href='#Verb_Array'>Verb Array</a>, <a href='#Point_Array'>Point Array</a>, and <a href='#Conic_Weight'>Conic Weight</a> in <a href='#SkPath_Iter_setPath_path'>path</a>.
-If <a href='#SkPath_Iter_setPath_forceClose'>forceClose</a> is true, <a href='#SkPath_Iter_empty_constructor'>Iter</a> will add <a href='#SkPath_kLine_Verb'>kLine Verb</a> and <a href='#SkPath_kClose_Verb'>kClose Verb</a> after each
+Sets <a href='#SkPath_Iter_Iter'>Iter</a> to return elements of <a href='#Verb_Array'>Verb Array</a>, <a href='#Point_Array'>Point Array</a>, and <a href='#Conic_Weight'>Conic Weight</a> in <a href='#SkPath_Iter_setPath_path'>path</a>.
+If <a href='#SkPath_Iter_setPath_forceClose'>forceClose</a> is true, <a href='#SkPath_Iter_Iter'>Iter</a> will add <a href='#SkPath_kLine_Verb'>kLine Verb</a> and <a href='#SkPath_kClose_Verb'>kClose Verb</a> after each
open <a href='#Contour'>Contour</a>. <a href='#SkPath_Iter_setPath_path'>path</a> is not altered.
### Parameters
@@ -5894,7 +5926,7 @@
### See Also
-<a href='#SkPath_const_SkPath'>Iter(const SkPath& path, bool forceClose)</a>
+<a href='#SkPath_Iter_const_SkPath'>Iter(const SkPath& path, bool forceClose)</a>
---
@@ -5905,7 +5937,7 @@
<a href='#SkPath_Verb'>Verb</a> <a href='#SkPath_Iter_next'>next</a>(<a href='SkPoint_Reference#SkPoint'>SkPoint</a> pts[4], bool doConsumeDegenerates = true, bool exact = false)
</pre>
-Returns next <a href='#SkPath_Verb'>Verb</a> in <a href='#Verb_Array'>Verb Array</a>, and advances <a href='#SkPath_Iter_empty_constructor'>Iter</a>.
+Returns next <a href='#SkPath_Verb'>Verb</a> in <a href='#Verb_Array'>Verb Array</a>, and advances <a href='#SkPath_Iter_Iter'>Iter</a>.
When <a href='#Verb_Array'>Verb Array</a> is exhausted, returns <a href='#SkPath_kDone_Verb'>kDone Verb</a>.
Zero to four <a href='SkPoint_Reference#Point'>Points</a> are stored in <a href='#SkPath_Iter_next_pts'>pts</a>, depending on the returned <a href='#SkPath_Verb'>Verb</a>.
@@ -6065,8 +6097,8 @@
</pre>
Returns true if subsequent calls to <a href='#SkPath_Iter_next'>next</a> return <a href='#SkPath_kClose_Verb'>kClose Verb</a> before returning
-<a href='#SkPath_kMove_Verb'>kMove Verb</a>. if true, <a href='#Contour'>Contour</a> <a href='#SkPath_Iter_empty_constructor'>Iter</a> is processing may end with <a href='#SkPath_kClose_Verb'>kClose Verb</a>, or
-<a href='#SkPath_Iter_empty_constructor'>Iter</a> may have been initialized with force close set to true.
+<a href='#SkPath_kMove_Verb'>kMove Verb</a>. if true, <a href='#Contour'>Contour</a> <a href='#SkPath_Iter_Iter'>Iter</a> is processing may end with <a href='#SkPath_kClose_Verb'>kClose Verb</a>, or
+<a href='#SkPath_Iter_Iter'>Iter</a> may have been initialized with force close set to true.
### Return Value
@@ -6089,7 +6121,7 @@
### See Also
-<a href='#SkPath_const_SkPath'>Iter(const SkPath& path, bool forceClose)</a>
+<a href='#SkPath_Iter_const_SkPath'>Iter(const SkPath& path, bool forceClose)</a>
---
@@ -6098,26 +6130,50 @@
## <a name='Constructor'>Constructor</a>
-SkPath can be constructed or initialized by these functions, including C++ class constructors.
+SkPath::RawIter can be constructed or initialized by these functions, including C++ class constructors.
<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='#SkPath_RawIter_copy_const_SkPath'>RawIter(const SkPath& path)</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs with <a href='#Path'>Path</a> to iterate over</td>
+ </tr>
</table>
## <a name='Member_Function'>Member_Function</a>
-SkPath member functions read and modify the structure properties.
+SkPath::RawIter member functions read and modify the structure properties.
<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='#SkPath_RawIter_RawIter'>RawIter()</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs empty <a href='#Path'>Path</a> iterator</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPath_RawIter_conicWeight'>conicWeight</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='#Conic_Weight'>Conic Weight</a></td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPath_RawIter_next'>next</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns next <a href='#SkPath_Verb'>Verb</a> and associated <a href='SkPoint_Reference#Point'>Points</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPath_RawIter_peek'>peek</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns next <a href='#SkPath_Verb'>Verb</a></td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPath_RawIter_setPath'>setPath</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>sets <a href='#Path'>Path</a> to iterate over</td>
+ </tr>
</table>
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
- class <a href='#SkPath_RawIter_empty_constructor'>RawIter</a> {
+ class <a href='#SkPath_RawIter_RawIter'>RawIter</a> {
public:
- <a href='#SkPath_RawIter_empty_constructor'>RawIter()</a>;
- <a href='#SkPath_copy_const_SkPath'>RawIter(const SkPath& path)</a>;
+ <a href='#SkPath_RawIter_RawIter'>RawIter()</a>;
+ <a href='#SkPath_RawIter_copy_const_SkPath'>RawIter(const SkPath& path)</a>;
void <a href='#SkPath_RawIter_setPath'>setPath(const SkPath& path)</a>;
<a href='#SkPath_Verb'>Verb</a> <a href='#SkPath_RawIter_next'>next(SkPoint pts[4])</a>;
<a href='#SkPath_Verb'>Verb</a> <a href='#SkPath_RawIter_peek'>peek</a> const;
@@ -6128,41 +6184,41 @@
Iterates through <a href='#Verb_Array'>Verb Array</a>, and associated <a href='#Point_Array'>Point Array</a> and <a href='#Conic_Weight'>Conic Weight</a>.
<a href='#Verb_Array'>Verb Array</a>, <a href='#Point_Array'>Point Array</a>, and <a href='#Conic_Weight'>Conic Weight</a> are returned unaltered.
-<a name='SkPath_RawIter_empty_constructor'></a>
+<a name='SkPath_RawIter_RawIter'></a>
## RawIter
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-<a href='#SkPath_RawIter_empty_constructor'>RawIter</a>()
+<a href='#SkPath_RawIter_RawIter'>RawIter</a>()
</pre>
-Initializes <a href='#SkPath_RawIter_empty_constructor'>RawIter</a> with an empty <a href='#Path'>Path</a>. <a href='#SkPath_RawIter_next'>next</a> on <a href='#SkPath_RawIter_empty_constructor'>RawIter</a> returns <a href='#SkPath_kDone_Verb'>kDone Verb</a>.
+Initializes <a href='#SkPath_RawIter_RawIter'>RawIter</a> with an empty <a href='#Path'>Path</a>. <a href='#SkPath_RawIter_next'>next</a> on <a href='#SkPath_RawIter_RawIter'>RawIter</a> returns <a href='#SkPath_kDone_Verb'>kDone Verb</a>.
Call <a href='#SkPath_RawIter_setPath'>setPath</a> to initialize <a href='#SkPath_Iter'>SkPath::Iter</a> at a later time.
### Return Value
-<a href='#SkPath_RawIter_empty_constructor'>RawIter</a> of empty <a href='#Path'>Path</a>
+<a href='#SkPath_RawIter_RawIter'>RawIter</a> of empty <a href='#Path'>Path</a>
---
-<a name='SkPath_copy_const_SkPath'></a>
+<a name='SkPath_RawIter_copy_const_SkPath'></a>
## RawIter
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-<a href='#SkPath_RawIter_empty_constructor'>RawIter</a>(const <a href='#SkPath'>SkPath</a>& path)
+<a href='#SkPath_RawIter_RawIter'>RawIter</a>(const <a href='#SkPath'>SkPath</a>& path)
</pre>
-Sets <a href='#SkPath_RawIter_empty_constructor'>RawIter</a> to return elements of <a href='#Verb_Array'>Verb Array</a>, <a href='#Point_Array'>Point Array</a>, and <a href='#Conic_Weight'>Conic Weight</a> in <a href='#SkPath_copy_const_SkPath_path'>path</a>.
+Sets <a href='#SkPath_RawIter_RawIter'>RawIter</a> to return elements of <a href='#Verb_Array'>Verb Array</a>, <a href='#Point_Array'>Point Array</a>, and <a href='#Conic_Weight'>Conic Weight</a> in <a href='#SkPath_RawIter_copy_const_SkPath_path'>path</a>.
### Parameters
-<table> <tr> <td><a name='SkPath_copy_const_SkPath_path'><code><strong>path</strong></code></a></td>
+<table> <tr> <td><a name='SkPath_RawIter_copy_const_SkPath_path'><code><strong>path</strong></code></a></td>
<td><a href='#Path'>Path</a> to iterate</td>
</tr>
</table>
### Return Value
-<a href='#SkPath_RawIter_empty_constructor'>RawIter</a> of <a href='#SkPath_copy_const_SkPath_path'>path</a>
+<a href='#SkPath_RawIter_RawIter'>RawIter</a> of <a href='#SkPath_RawIter_copy_const_SkPath_path'>path</a>
---
@@ -6191,7 +6247,7 @@
<a href='#SkPath_Verb'>Verb</a> <a href='#SkPath_RawIter_next'>next</a>(<a href='SkPoint_Reference#SkPoint'>SkPoint</a> pts[4])
</pre>
-Returns next <a href='#SkPath_Verb'>Verb</a> in <a href='#Verb_Array'>Verb Array</a>, and advances <a href='#SkPath_RawIter_empty_constructor'>RawIter</a>.
+Returns next <a href='#SkPath_Verb'>Verb</a> in <a href='#Verb_Array'>Verb Array</a>, and advances <a href='#SkPath_RawIter_RawIter'>RawIter</a>.
When <a href='#Verb_Array'>Verb Array</a> is exhausted, returns <a href='#SkPath_kDone_Verb'>kDone Verb</a>.
Zero to four <a href='SkPoint_Reference#Point'>Points</a> are stored in <a href='#SkPath_RawIter_next_pts'>pts</a>, depending on the returned <a href='#SkPath_Verb'>Verb</a>.
@@ -6238,7 +6294,7 @@
<a href='#SkPath_Verb'>Verb</a> <a href='#SkPath_RawIter_peek'>peek</a>() const
</pre>
-Returns next <a href='#SkPath_Verb'>Verb</a>, but does not advance <a href='#SkPath_RawIter_empty_constructor'>RawIter</a>.
+Returns next <a href='#SkPath_Verb'>Verb</a>, but does not advance <a href='#SkPath_RawIter_RawIter'>RawIter</a>.
### Return Value
diff --git a/site/user/api/SkPicture_Reference.md b/site/user/api/SkPicture_Reference.md
index 1d8c1bb..cfbcadf7 100644
--- a/site/user/api/SkPicture_Reference.md
+++ b/site/user/api/SkPicture_Reference.md
@@ -30,7 +30,7 @@
played in whole or in part at a later time.
<a href='#Picture'>Picture</a> is an abstract class. <a href='#Picture'>Picture</a> may be generated by <a href='undocumented#Picture_Recorder'>Picture Recorder</a>
-or <a href='undocumented#Drawable'>Drawable</a>, or from <a href='#Picture'>Picture</a> previously saved to <a href='undocumented#Data'>Data</a> or <a href='undocumented#Stream'>Stream</a>.
+or <a href='undocumented#Drawable'>Drawable</a>, or from <a href='#Picture'>Picture</a> previously saved to <a href='undocumented#Data'>Data</a> or <a href='SkStream_Reference#Stream'>Stream</a>.
<a href='#Picture'>Picture</a> may contain any <a href='SkCanvas_Reference#Canvas'>Canvas</a> drawing command, as well as one or more
<a href='SkCanvas_Reference#Matrix'>Canvas Matrix</a> or <a href='SkCanvas_Reference#Clip'>Canvas Clip</a>. <a href='#Picture'>Picture</a> has a cull <a href='SkRect_Reference#Rect'>Rect</a>, which is used as
@@ -107,7 +107,7 @@
</tr>
<tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPicture_serialize'>serialize</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>writes <a href='#Picture'>Picture</a> to data</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>writes <a href='#Picture'>Picture</a> to <a href='undocumented#Data'>Data</a></td>
</tr>
<tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPicture_uniqueID'>uniqueID</a></td>
@@ -120,39 +120,55 @@
## <a name='Constructor'>Constructor</a>
-SkPicture can be constructed or initialized by these functions, including C++ class constructors.
+SkPicture::AbortCallback can be constructed or initialized by these functions, including C++ class constructors.
<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='#SkPicture_AbortCallback_AbortCallback'>AbortCallback()</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>defines default constructor</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>defines default destructor</td>
+ </tr>
</table>
## <a name='Member_Function'>Member_Function</a>
-SkPicture member functions read and modify the structure properties.
+SkPicture::AbortCallback member functions read and modify the structure properties.
<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='#SkPicture_AbortCallback_AbortCallback'>AbortCallback()</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>defines default constructor</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPicture_AbortCallback_abort'>abort</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>aborts playback by callback</td>
+ </tr>
</table>
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
- class <a href='#SkPicture_AbortCallback_empty_constructor'>AbortCallback</a> {
+ class <a href='#SkPicture_AbortCallback_AbortCallback'>AbortCallback</a> {
public:
- <a href='#SkPicture_AbortCallback_empty_constructor'>AbortCallback()</a> {}
+ <a href='#SkPicture_AbortCallback_AbortCallback'>AbortCallback()</a> {}
virtual
</pre>
-<a href='#SkPicture_AbortCallback_empty_constructor'>AbortCallback</a> is an abstract class. An implementation of <a href='#SkPicture_AbortCallback_empty_constructor'>AbortCallback</a> may
+<a href='#SkPicture_AbortCallback_AbortCallback'>AbortCallback</a> is an abstract class. An implementation of <a href='#SkPicture_AbortCallback_AbortCallback'>AbortCallback</a> may
passed as a parameter to <a href='#SkPicture_playback'>SkPicture::playback</a>, to stop it before all drawing
commands have been processed.
If <a href='#SkPicture_AbortCallback_abort'>AbortCallback::abort</a> returns true, <a href='#SkPicture_playback'>SkPicture::playback</a> is interrupted.
-<a name='SkPicture_AbortCallback_empty_constructor'></a>
+<a name='SkPicture_AbortCallback_AbortCallback'></a>
## AbortCallback
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-<a href='#SkPicture_AbortCallback_empty_constructor'>AbortCallback</a>()
+<a href='#SkPicture_AbortCallback_AbortCallback'>AbortCallback</a>()
</pre>
Has no effect.
@@ -167,7 +183,7 @@
---
-<a name='SkPicture_destructor'></a>
+<a name='SkPicture_AbortCallback_destructor'></a>
## ~AbortCallback
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
@@ -190,7 +206,7 @@
</pre>
Stops <a href='#Picture'>Picture</a> playback when some condition is met. A subclass of
-<a href='#SkPicture_AbortCallback_empty_constructor'>AbortCallback</a> provides an override for <a href='#SkPicture_AbortCallback_abort'>abort</a> that can stop <a href='#SkPicture_playback'>SkPicture::playback</a>.
+<a href='#SkPicture_AbortCallback_AbortCallback'>AbortCallback</a> provides an override for <a href='#SkPicture_AbortCallback_abort'>abort</a> that can stop <a href='#SkPicture_playback'>SkPicture::playback</a>.
The part of <a href='#Picture'>Picture</a> drawn when aborted is undefined. <a href='#Picture'>Picture</a> instantiations are
free to stop drawing at different points during playback.
@@ -219,10 +235,17 @@
## MakeFromStream
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-static <a href='undocumented#sk_sp'>sk sp</a><<a href='#SkPicture'>SkPicture</a>> <a href='#SkPicture_MakeFromStream'>MakeFromStream</a>(<a href='undocumented#SkStream'>SkStream</a>* stream, const <a href='undocumented#SkDeserialProcs'>SkDeserialProcs</a>* procs = nullptr)
+static <a href='undocumented#sk_sp'>sk sp</a><<a href='#SkPicture'>SkPicture</a>> <a href='#SkPicture_MakeFromStream'>MakeFromStream</a>(<a href='SkStream_Reference#SkStream'>SkStream</a>* stream, const <a href='undocumented#SkDeserialProcs'>SkDeserialProcs</a>* procs = nullptr)
</pre>
-Recreates a picture that was serialized into a <a href='#SkPicture_MakeFromStream_stream'>stream</a>.
+Recreates <a href='#Picture'>Picture</a> that was serialized into a <a href='#SkPicture_MakeFromStream_stream'>stream</a>. Returns constructed <a href='#Picture'>Picture</a>
+if successful; otherwise, returns nullptr. Fails if data does not permit
+constructing valid <a href='#Picture'>Picture</a>.
+
+<a href='#SkPicture_MakeFromStream_procs'>procs</a>.fPictureProc permits supplying a custom function to decode <a href='#Picture'>Picture</a>.
+If <a href='#SkPicture_MakeFromStream_procs'>procs</a>.fPictureProc is nullptr, default decoding is used. <a href='#SkPicture_MakeFromStream_procs'>procs</a>.fPictureCtx
+may be used to provide user context to <a href='#SkPicture_MakeFromStream_procs'>procs</a>.fPictureProc; <a href='#SkPicture_MakeFromStream_procs'>procs</a>.fPictureProc
+is called with a pointer to data, data byte length, and user context.
### Parameters
@@ -255,7 +278,14 @@
static <a href='undocumented#sk_sp'>sk sp</a><<a href='#SkPicture'>SkPicture</a>> <a href='#SkPicture_MakeFromData'>MakeFromData</a>(const <a href='undocumented#SkData'>SkData</a>* data, const <a href='undocumented#SkDeserialProcs'>SkDeserialProcs</a>* procs = nullptr)
</pre>
-Recreates a picture that was serialized into <a href='#SkPicture_MakeFromData_data'>data</a>.
+Recreates <a href='#Picture'>Picture</a> that was serialized into <a href='#SkPicture_MakeFromData_data'>data</a>. Returns constructed <a href='#Picture'>Picture</a>
+if successful; otherwise, returns nullptr. Fails if <a href='#SkPicture_MakeFromData_data'>data</a> does not permit
+constructing valid <a href='#Picture'>Picture</a>.
+
+<a href='#SkPicture_MakeFromData_procs'>procs</a>.fPictureProc permits supplying a custom function to decode <a href='#Picture'>Picture</a>.
+If <a href='#SkPicture_MakeFromData_procs'>procs</a>.fPictureProc is nullptr, default decoding is used. <a href='#SkPicture_MakeFromData_procs'>procs</a>.fPictureCtx
+may be used to provide user context to <a href='#SkPicture_MakeFromData_procs'>procs</a>.fPictureProc; <a href='#SkPicture_MakeFromData_procs'>procs</a>.fPictureProc
+is called with a pointer to <a href='#SkPicture_MakeFromData_data'>data</a>, <a href='#SkPicture_MakeFromData_data'>data</a> byte length, and user context.
### Parameters
@@ -299,7 +329,14 @@
<tr> <td><a name='SkPicture_MakeFromData_2_procs'><code><strong>procs</strong></code></a></td>
<td>custom serial <a href='#SkPicture_MakeFromData_2_data'>data</a> decoders; may be nullptr</td>
</tr>
-Recreates a picture that was serialized into <a href='#SkPicture_MakeFromData_2_data'>data</a>.
+Recreates <a href='#Picture'>Picture</a> that was serialized into <a href='#SkPicture_MakeFromData_2_data'>data</a>. Returns constructed <a href='#Picture'>Picture</a>
+if successful; otherwise, returns nullptr. Fails if <a href='#SkPicture_MakeFromData_2_size'>size</a> is smaller than
+required <a href='#SkPicture_MakeFromData_2_data'>data</a> length, or if <a href='#SkPicture_MakeFromData_2_data'>data</a> does not permit constructing valid <a href='#Picture'>Picture</a>.
+
+<a href='#SkPicture_MakeFromData_2_procs'>procs</a>.fPictureProc permits supplying a custom function to decode <a href='#Picture'>Picture</a>.
+If <a href='#SkPicture_MakeFromData_2_procs'>procs</a>.fPictureProc is nullptr, default decoding is used. <a href='#SkPicture_MakeFromData_2_procs'>procs</a>.fPictureCtx
+may be used to provide user context to <a href='#SkPicture_MakeFromData_2_procs'>procs</a>.fPictureProc; <a href='#SkPicture_MakeFromData_2_procs'>procs</a>.fPictureProc
+is called with a pointer to <a href='#SkPicture_MakeFromData_2_data'>data</a>, <a href='#SkPicture_MakeFromData_2_data'>data</a> byte length, and user context.
</table>
@@ -419,9 +456,14 @@
<a href='undocumented#sk_sp'>sk sp</a><<a href='undocumented#SkData'>SkData</a>> <a href='#SkPicture_serialize'>serialize</a>(const <a href='undocumented#SkSerialProcs'>SkSerialProcs</a>* procs = nullptr) const
</pre>
-Returns storage containing data describing <a href='#Picture'>Picture</a>, using optional custom
+Returns storage containing <a href='undocumented#Data'>Data</a> describing <a href='#Picture'>Picture</a>, using optional custom
encoders.
+<a href='#SkPicture_serialize_procs'>procs</a>.fPictureProc permits supplying a custom function to encode <a href='#Picture'>Picture</a>.
+If <a href='#SkPicture_serialize_procs'>procs</a>.fPictureProc is nullptr, default encoding is used. <a href='#SkPicture_serialize_procs'>procs</a>.fPictureCtx
+may be used to provide user context to <a href='#SkPicture_serialize_procs'>procs</a>.fPictureProc; <a href='#SkPicture_serialize_procs'>procs</a>.fPictureProc
+is called with a pointer to <a href='#Picture'>Picture</a> and user context.
+
### Parameters
<table> <tr> <td><a name='SkPicture_serialize_procs'><code><strong>procs</strong></code></a></td>
@@ -446,11 +488,16 @@
<a name='SkPicture_serialize_2'></a>
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-void <a href='#SkPicture_serialize'>serialize</a>(<a href='undocumented#SkWStream'>SkWStream</a>* stream, const <a href='undocumented#SkSerialProcs'>SkSerialProcs</a>* procs = nullptr) const
+void <a href='#SkPicture_serialize'>serialize</a>(<a href='SkWStream_Reference#SkWStream'>SkWStream</a>* stream, const <a href='undocumented#SkSerialProcs'>SkSerialProcs</a>* procs = nullptr) const
</pre>
Writes picture to <a href='#SkPicture_serialize_2_stream'>stream</a>, using optional custom encoders.
+<a href='#SkPicture_serialize_2_procs'>procs</a>.fPictureProc permits supplying a custom function to encode <a href='#Picture'>Picture</a>.
+If <a href='#SkPicture_serialize_2_procs'>procs</a>.fPictureProc is nullptr, default encoding is used. <a href='#SkPicture_serialize_2_procs'>procs</a>.fPictureCtx
+may be used to provide user context to <a href='#SkPicture_serialize_2_procs'>procs</a>.fPictureProc; <a href='#SkPicture_serialize_2_procs'>procs</a>.fPictureProc
+is called with a pointer to <a href='#Picture'>Picture</a> and user context.
+
### Parameters
<table> <tr> <td><a name='SkPicture_serialize_2_stream'><code><strong>stream</strong></code></a></td>
@@ -467,7 +514,7 @@
### See Also
-<a href='#SkPicture_MakeFromStream'>MakeFromStream</a> <a href='undocumented#SkWStream'>SkWStream</a> <a href='undocumented#SkSerialProcs'>SkSerialProcs</a>
+<a href='#SkPicture_MakeFromStream'>MakeFromStream</a> <a href='SkWStream_Reference#SkWStream'>SkWStream</a> <a href='undocumented#SkSerialProcs'>SkSerialProcs</a>
---
diff --git a/site/user/api/SkRRect_Reference.md b/site/user/api/SkRRect_Reference.md
index aa43f16..15f0791 100644
--- a/site/user/api/SkRRect_Reference.md
+++ b/site/user/api/SkRRect_Reference.md
@@ -790,7 +790,7 @@
<a href='SkPoint_Reference#SkVector'>SkVector</a> <a href='#SkRRect_getSimpleRadii'>getSimpleRadii</a>() const
</pre>
-Returns top-left corner x-radii. If <a href='#SkRRect_type'>type</a> returns <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>, <a href='#SkRRect_kRect_Type'>kRect Type</a>,
+Returns top-left corner radii. If <a href='#SkRRect_type'>type</a> returns <a href='#SkRRect_kEmpty_Type'>kEmpty Type</a>, <a href='#SkRRect_kRect_Type'>kRect Type</a>,
<a href='#SkRRect_kOval_Type'>kOval Type</a>, or <a href='#SkRRect_kSimple_Type'>kSimple Type</a>, returns a value representative of all corner radii.
If <a href='#SkRRect_type'>type</a> returns <a href='#SkRRect_kNinePatch_Type'>kNinePatch Type</a> or <a href='#SkRRect_kComplex_Type'>kComplex Type</a>, at least one of the
remaining three corners has a different value.
diff --git a/site/user/api/SkRect_Reference.md b/site/user/api/SkRect_Reference.md
index e0402bf..0259ab0 100644
--- a/site/user/api/SkRect_Reference.md
+++ b/site/user/api/SkRect_Reference.md
@@ -2504,16 +2504,16 @@
### Parameters
<table> <tr> <td><a name='SkRect_contains_x'><code><strong>x</strong></code></a></td>
- <td>test <a href='SkPoint_Reference#SkPoint'>SkPoint</a> x-coordinate</td>
+ <td>test <a href='SkPoint_Reference#Point'>Point</a> x-coordinate</td>
</tr>
<tr> <td><a name='SkRect_contains_y'><code><strong>y</strong></code></a></td>
- <td>test <a href='SkPoint_Reference#SkPoint'>SkPoint</a> y-coordinate</td>
+ <td>test <a href='SkPoint_Reference#Point'>Point</a> y-coordinate</td>
</tr>
</table>
### Return Value
-true if (x, y) is inside <a href='#SkRect'>SkRect</a>
+true if (x, y) is inside <a href='#Rect'>Rect</a>
### Example
diff --git a/site/user/api/SkRegion_Reference.md b/site/user/api/SkRegion_Reference.md
new file mode 100644
index 0000000..c9859c9
--- /dev/null
+++ b/site/user/api/SkRegion_Reference.md
@@ -0,0 +1,2520 @@
+SkRegion Reference
+===
+
+# <a name='Region'>Region</a>
+<a href='#Region'>Region</a> is a compressed one bit mask. <a href='#Region'>Region</a> describes an aliased clipping area
+on integer boundaries. <a href='#Region'>Region</a> can also describe an array of integer rectangles.
+
+<a href='SkCanvas_Reference#Canvas'>Canvas</a> uses <a href='#Region'>Region</a> to reduce the current clip. <a href='#Region'>Region</a> may be drawn to <a href='SkCanvas_Reference#Canvas'>Canvas</a>;
+<a href='SkPaint_Reference#Paint'>Paint</a> determines if <a href='#Region'>Region</a> is filled or stroked, its <a href='SkColor_Reference#Color'>Color</a>, and so on.
+
+<a href='#Region'>Region</a> may be constructed from <a href='SkIRect_Reference#IRect'>IRect</a> array or <a href='SkPath_Reference#Path'>Path</a>. Diagonal lines and curves
+in <a href='SkPath_Reference#Path'>Path</a> become integer rectangle edges. <a href='#Region'>Regions</a> operators compute union,
+intersection, difference, and so on. <a href='SkCanvas_Reference#Canvas'>Canvas</a> allows only intersection and
+difference; successive clips can only reduce available <a href='SkCanvas_Reference#Canvas'>Canvas</a> area.
+
+# <a name='SkRegion'>Class SkRegion</a>
+<a href='#SkRegion'>SkRegion</a> describes the set of pixels used to clip <a href='SkCanvas_Reference#Canvas'>Canvas</a>. <a href='#SkRegion'>SkRegion</a> is compact,
+efficiently storing a single integer rectangle, or a run length encoded array
+of rectangles. <a href='#SkRegion'>SkRegion</a> may reduce the current <a href='SkCanvas_Reference#Clip'>Canvas Clip</a>, or may be drawn as
+one or more integer rectangles. <a href='#SkRegion'>SkRegion</a> iterator returns the scan lines or
+rectangles contained by it, optionally intersecting a bounding rectangle.
+
+## Overview
+
+<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='#Class'>Class Declarations</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>embedded class members</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#Constant'>Constants</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>enum and enum class, and their const values</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#Constructor'>Constructors</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>functions that construct <a href='#SkRegion'>SkRegion</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#Member_Function'>Functions</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>global and class member functions</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <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>
+</table>
+
+
+## <a name='Constant'>Constant</a>
+
+
+SkRegion related constants are defined by <code>enum</code>, <code>enum class</code>, <code>#define</code>, <code>const</code>, and <code>constexpr</code>.
+<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='undocumented#Op'>Op</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>binary operator combining <a href='#Region'>Regions</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_kDifference_Op'>kDifference Op</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>target minus operand</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_kIntersect_Op'>kIntersect Op</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>target intersected with operand</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_kLastOp'>kLastOp</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>last operator</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_kOpCnt'>kOpCnt</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>number of operators defined</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_kReplace_Op'>kReplace Op</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>replace target with operand</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_kReverseDifference_Op'>kReverseDifference Op</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>operand minus target</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_kUnion_Op'>kUnion Op</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>target unioned with operand</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_kXOR_Op'>kXOR Op</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>target exclusive or with operand</td>
+ </tr>
+</table>
+
+## <a name='Class'>Class</a>
+
+
+SkRegion uses C++ classes to declare the public data structures and interfaces.
+<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='#SkRegion_Cliperator'>Cliperator</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>iterator returning <a href='SkIRect_Reference#IRect'>IRect</a> within clip</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_Iterator'>Iterator</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>iterator returning <a href='SkIRect_Reference#IRect'>IRect</a></td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_Spanerator'>Spanerator</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>horizontal line segment iterator</td>
+ </tr>
+</table>
+
+## <a name='Constructor'>Constructor</a>
+
+
+SkRegion can be constructed or initialized by these functions, including C++ class constructors.
+<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='#SkRegion_empty_constructor'>SkRegion()</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs with default values</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_copy_const_SkIRect'>SkRegion(const SkIRect& rect)</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Region'>Region</a> matching <a href='SkIRect_Reference#IRect'>IRect</a></td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_copy_const_SkRegion'>SkRegion(const SkRegion& region)</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>makes a shallow copy</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_set'>set</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>makes a shallow copy</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_setEmpty'>setEmpty</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs with default values</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_setPath'>setPath</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Region'>Region</a> from clipped <a href='SkPath_Reference#Path'>Path</a></td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_setRect'>setRect</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Region'>Region</a> matching <a href='SkIRect_Reference#IRect'>IRect</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_setRect'>setRect(const SkIRect& rect)</a></td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_setRect_2'>setRect(int32 t left, int32 t top, int32 t right, int32 t bottom)</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_setRects'>setRects</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>sets <a href='SkIRect_Reference#IRect'>IRect</a> array</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_setRegion'>setRegion</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>copies <a href='#Region'>Region</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_destructor'>~SkRegion()</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>decreases <a href='undocumented#Reference_Count'>Reference Count</a> of owned objects</td>
+ </tr>
+</table>
+
+## <a name='Operator'>Operator</a>
+
+
+SkRegion operators inline class member functions with arithmetic equivalents.
+<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='#SkRegion_notequal1_operator'>operator!=(const SkRegion& other) const</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>compares <a href='#Region'>Regions</a> for inequality</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_copy_operator'>operator=(const SkRegion& region)</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>makes a shallow copy</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_equal1_operator'>operator==(const SkRegion& other) const</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>compares <a href='#Region'>Regions</a> for equality</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_swap'>swap</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>exchanges <a href='#Region'>Region</a> pair</td>
+ </tr>
+</table>
+
+## <a name='Member_Function'>Member Function</a>
+
+
+SkRegion member functions read and modify the structure properties.
+<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='#SkRegion_computeRegionComplexity'>computeRegionComplexity</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns relative complexity</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_contains'>contains</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if points are equal or inside</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_getBoundaryPath'>getBoundaryPath</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>appends <a href='#Region'>Region</a> outline to <a href='SkPath_Reference#Path'>Path</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_getBounds'>getBounds</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns maximum and minimum of <a href='SkIRect_Reference#IRect'>IRect</a> array</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_intersects'>intersects</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if areas overlap</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_isComplex'>isComplex</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if <a href='#Region'>Region</a> contains more than one <a href='SkIRect_Reference#IRect'>IRect</a></td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_isEmpty'>isEmpty</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns if bounds has no width or height</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_isRect'>isRect</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns if <a href='#Region'>Region</a> contains one <a href='SkIRect_Reference#IRect'>IRect</a></td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_op'>op</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>applies binary operator</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_quickContains'>quickContains</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true quickly if points are equal or inside</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_quickReject'>quickReject</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true quickly if points are outside</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_readFromMemory'>readFromMemory</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>reads from buffer</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_set'>set</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>makes a shallow copy</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_setEmpty'>setEmpty</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs with default values</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_setPath'>setPath</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Region'>Region</a> from clipped <a href='SkPath_Reference#Path'>Path</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_setRect'>setRect</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Region'>Region</a> matching <a href='SkIRect_Reference#IRect'>IRect</a></td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_setRects'>setRects</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>sets <a href='SkIRect_Reference#IRect'>IRect</a> array</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_setRegion'>setRegion</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>copies <a href='#Region'>Region</a></td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_swap'>swap</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>exchanges <a href='#Region'>Region</a> pair</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_toString'>toString</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>exists for Android framework only</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_translate'>translate</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>translates <a href='SkIPoint_Reference#IPoint'>IPoints</a> in <a href='#Region'>Region</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_writeToMemory'>writeToMemory</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>writes to buffer</td>
+ </tr>
+</table>
+
+# <a name='SkRegion_Iterator'>Class SkRegion::Iterator</a>
+
+## <a name='Constructor'>Constructor</a>
+
+
+SkRegion::Iterator can be constructed or initialized by these functions, including C++ class constructors.
+<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='#SkRegion_Iterator_copy_const_SkRegion'>Iterator(const SkRegion& region)</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Region'>Region</a> iterator</td>
+ </tr>
+</table>
+
+## <a name='Member_Function'>Member_Function</a>
+
+
+SkRegion::Iterator member functions read and modify the structure properties.
+<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='#SkRegion_Iterator_Iterator'>Iterator()</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Region'>Region</a> iterator</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_Iterator_done'>done</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns if data parsing is complete</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_Iterator_next'>next</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>advances to next <a href='SkIRect_Reference#IRect'>IRect</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_Iterator_rect'>rect</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns part of <a href='#Region'>Region</a> as <a href='SkIRect_Reference#IRect'>IRect</a></td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_Iterator_reset'>reset</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>sets <a href='#Region'>Region</a> to iterate</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_Iterator_rewind'>rewind</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>points <a href='#SkRegion_Iterator_Iterator'>Iterator</a> to start</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_Iterator_rgn'>rgn</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns original <a href='#Region'>Region</a></td>
+ </tr>
+</table>
+
+<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
+ class <a href='#SkRegion_Iterator_Iterator'>Iterator</a> {
+ public:
+ <a href='#SkRegion_Iterator_Iterator'>Iterator()</a>;
+ <a href='#SkRegion_Iterator_copy_const_SkRegion'>Iterator(const SkRegion& region)</a>;
+ bool <a href='#SkRegion_Iterator_rewind'>rewind</a>;
+ void <a href='#SkRegion_Iterator_reset'>reset(const SkRegion& region)</a>;
+ bool <a href='#SkRegion_Iterator_done'>done</a> const;
+ void <a href='#SkRegion_Iterator_next'>next</a>;
+ const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& <a href='#SkRegion_Iterator_rect'>rect</a>;
+ const <a href='#SkRegion'>SkRegion</a>* <a href='#SkRegion_Iterator_rgn'>rgn</a>;
+ };
+</pre>
+
+Returns sequence of rectangles, sorted along y-axis, then x-axis, that make
+up <a href='#Region'>Region</a>.
+
+<a name='SkRegion_Iterator_Iterator'></a>
+## Iterator
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+<a href='#SkRegion_Iterator_Iterator'>Iterator</a>()
+</pre>
+
+Initializes <a href='#SkRegion_Iterator_Iterator'>Iterator</a> with an empty <a href='#Region'>Region</a>. <a href='#SkRegion_Iterator_done'>done</a> on <a href='#SkRegion_Iterator_Iterator'>Iterator</a> returns true.
+Call <a href='#SkRegion_Iterator_reset'>reset</a> to initialized <a href='#SkRegion_Iterator_Iterator'>Iterator</a> at a later time.
+
+### Return Value
+
+empty <a href='#Region'>Region</a> ierator
+
+### Example
+
+<div><fiddle-embed name="a2db43ee3cbf6893e9b23927fb44298a">
+
+#### Example Output
+
+~~~~
+rect={1,2,3,4}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_Iterator_reset'>reset</a> <a href='#SkRegion'>SkRegion</a>
+
+---
+
+<a name='SkRegion_Iterator_copy_const_SkRegion'></a>
+## Iterator
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+<a href='#SkRegion_Iterator_Iterator'>Iterator</a>(const <a href='#SkRegion'>SkRegion</a>& region)
+</pre>
+
+Sets <a href='#SkRegion_Iterator_Iterator'>Iterator</a> to return elements of <a href='SkIRect_Reference#IRect'>IRect</a> array in <a href='#SkRegion_Iterator_copy_const_SkRegion_region'>region</a>.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_Iterator_copy_const_SkRegion_region'><code><strong>region</strong></code></a></td>
+ <td><a href='#Region'>Region</a> to iterate</td>
+ </tr>
+</table>
+
+### Return Value
+
+<a href='#Region'>Region</a> iterator
+
+### Example
+
+<div><fiddle-embed name="e317ceca48a6a7504219af58f35d2c95">
+
+#### Example Output
+
+~~~~
+rect={1,2,3,4}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_Iterator_reset'>reset</a> <a href='#SkRegion'>SkRegion</a> <a href='#SkRegion_Cliperator'>Cliperator</a> <a href='#SkRegion_Spanerator'>Spanerator</a>
+
+---
+
+<a name='SkRegion_Iterator_rewind'></a>
+## rewind
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_Iterator_rewind'>rewind</a>()
+</pre>
+
+<a href='SkPoint_Reference#Point'>Points</a> <a href='#SkRegion_Iterator_Iterator'>Iterator</a> to start of <a href='#Region'>Region</a>.
+Returns true if <a href='#Region'>Region</a> was set; otherwise, returns false.
+
+### Return Value
+
+true if <a href='#Region'>Region</a> was set
+
+### Example
+
+<div><fiddle-embed name="32d51e959d6cc720a74ec4822511e2cd">
+
+#### Example Output
+
+~~~~
+#Volatile
+empty iter rewind success=false
+empty iter rect={0,0,0,0}
+empty region rewind success=true
+empty region rect={0,0,0,0}
+after set rect rect={1,2,3,4}
+after rewind rewind success=true
+after rewind rect={1,2,3,4}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_Iterator_reset'>reset</a>
+
+---
+
+<a name='SkRegion_Iterator_reset'></a>
+## reset
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+void <a href='#SkRegion_Iterator_reset'>reset</a>(const <a href='#SkRegion'>SkRegion</a>& region)
+</pre>
+
+Resets iterator, using the new <a href='#Region'>Region</a>.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_Iterator_reset_region'><code><strong>region</strong></code></a></td>
+ <td><a href='#Region'>Region</a> to iterate</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="d153f87bd518a4ab947b7e407ea1db79">
+
+#### Example Output
+
+~~~~
+empty region: done=true
+after set rect: done=true
+after reset: done=false
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_Iterator_rewind'>rewind</a>
+
+---
+
+<a name='SkRegion_Iterator_done'></a>
+## done
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_Iterator_done'>done</a>() const
+</pre>
+
+Returns true if <a href='#SkRegion_Iterator_Iterator'>Iterator</a> is pointing to final <a href='SkIRect_Reference#IRect'>IRect</a> in <a href='#Region'>Region</a>.
+
+### Return Value
+
+true if data parsing is complete
+
+### Example
+
+<div><fiddle-embed name="814efa7d7f4ae52dfc861a937c1b5c25">
+
+#### Example Output
+
+~~~~
+done=true
+done=false
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_Iterator_next'>next</a> <a href='#SkRegion_Iterator_rect'>rect</a>
+
+---
+
+<a name='SkRegion_Iterator_next'></a>
+## next
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+void <a href='#SkRegion_Iterator_next'>next</a>()
+</pre>
+
+Advances <a href='#SkRegion_Iterator_Iterator'>Iterator</a> to next <a href='SkIRect_Reference#IRect'>IRect</a> in <a href='#Region'>Region</a> if it is not done.
+
+### Example
+
+<div><fiddle-embed name="771236c2eadfc2fcd02a3e61a0875d39">
+
+#### Example Output
+
+~~~~
+rect={1,2,3,4}
+rect={5,6,7,8}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_Iterator_done'>done</a> <a href='#SkRegion_Iterator_rect'>rect</a>
+
+---
+
+<a name='SkRegion_Iterator_rect'></a>
+## rect
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& <a href='#SkRegion_Iterator_rect'>rect</a>() const
+</pre>
+
+Returns <a href='SkIRect_Reference#IRect'>IRect</a> element in <a href='#Region'>Region</a>. Does not return predictable results if <a href='#Region'>Region</a>
+is empty.
+
+### Return Value
+
+part of <a href='#Region'>Region</a> as <a href='SkIRect_Reference#IRect'>IRect</a>
+
+### Example
+
+<div><fiddle-embed name="0e7c58ab5d3bcfb36b1f8464cf6c7d89">
+
+#### Example Output
+
+~~~~
+#Volatile
+rect={0,0,0,0}
+rect={1,2,3,4}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_Iterator_next'>next</a> <a href='#SkRegion_Iterator_done'>done</a>
+
+---
+
+<a name='SkRegion_Iterator_rgn'></a>
+## rgn
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+const <a href='#SkRegion'>SkRegion</a>* <a href='#SkRegion_Iterator_rgn'>rgn</a>() const
+</pre>
+
+Returns <a href='#Region'>Region</a> if set; otherwise, returns nullptr.
+
+### Return Value
+
+iterated <a href='#Region'>Region</a>
+
+### Example
+
+<div><fiddle-embed name="bbc3c454a21186e2a16e843a5b061c44"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_Iterator_Iterator'>Iterator</a> <a href='#SkRegion_Iterator_reset'>reset</a>
+
+---
+
+# <a name='SkRegion_Cliperator'>Class SkRegion::Cliperator</a>
+
+## <a name='Constructor'>Constructor</a>
+
+
+SkRegion::Cliperator can be constructed or initialized by these functions, including C++ class constructors.
+<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='#SkRegion_Cliperator_const_SkRegion_const_SkIRect'>Cliperator(const SkRegion& region, const SkIRect& clip)</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Region'>Region</a> iterator with clip</td>
+ </tr>
+</table>
+
+## <a name='Member_Function'>Member_Function</a>
+
+
+SkRegion::Cliperator member functions read and modify the structure properties.
+<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='#SkRegion_Cliperator_done'>done</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns if data parsing is complete</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_Cliperator_next'>next</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>advances to next <a href='SkIRect_Reference#IRect'>IRect</a> within clip</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkRegion_Cliperator_rect'>rect</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns part of <a href='#Region'>Region</a> as <a href='SkIRect_Reference#IRect'>IRect</a> intersected with clip</td>
+ </tr>
+</table>
+
+<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
+ class SK_API <a href='#SkRegion_Cliperator'>Cliperator</a> {
+ public:
+ <a href='#SkRegion_Cliperator'>Cliperator(const SkRegion&, const SkIRect& clip)</a>;
+ bool <a href='#SkRegion_Cliperator_done'>done</a>;
+ void <a href='#SkRegion_Cliperator_next'>next</a>;
+ const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& <a href='#SkRegion_Cliperator_rect'>rect</a> const;
+ };
+</pre>
+
+Returns the sequence of rectangles, sorted along y-axis, then x-axis, that make
+up <a href='#Region'>Region</a> intersected with the specified clip rectangle.
+
+<a name='SkRegion_Cliperator_const_SkRegion_const_SkIRect'></a>
+## Cliperator
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+<a href='#SkRegion_Cliperator'>Cliperator</a>(const <a href='#SkRegion'>SkRegion</a>& region, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& clip)
+</pre>
+
+Sets <a href='#SkRegion_Cliperator'>Cliperator</a> to return elements of <a href='SkIRect_Reference#IRect'>IRect</a> array in <a href='#Region'>Region</a> within <a href='#SkRegion_Cliperator_const_SkRegion_const_SkIRect_clip'>clip</a>.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_Cliperator_const_SkRegion_const_SkIRect_region'><code><strong>region</strong></code></a></td>
+ <td><a href='#Region'>Region</a> to iterate</td>
+ </tr>
+ <tr> <td><a name='SkRegion_Cliperator_const_SkRegion_const_SkIRect_clip'><code><strong>clip</strong></code></a></td>
+ <td>bounds of iteration</td>
+ </tr>
+</table>
+
+### Return Value
+
+<a href='#Region'>Region</a> iterator
+
+### Example
+
+<div><fiddle-embed name="3831fb6006a7e0ad5d140c266c22be78">
+
+#### Example Output
+
+~~~~
+rect={1,2,2,3}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion'>SkRegion</a> <a href='#SkRegion_Iterator'>Iterator</a> <a href='#SkRegion_Spanerator'>Spanerator</a>
+
+---
+
+<a name='SkRegion_Cliperator_done'></a>
+## done
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_Cliperator_done'>done</a>()
+</pre>
+
+Returns true if <a href='#SkRegion_Cliperator'>Cliperator</a> is pointing to final <a href='SkIRect_Reference#IRect'>IRect</a> in <a href='#Region'>Region</a>.
+
+### Return Value
+
+true if data parsing is complete
+
+### Example
+
+<div><fiddle-embed name="6cca7b96836266800d852664a1366453">
+
+#### Example Output
+
+~~~~
+empty region done=true
+after add rect done=false
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_Cliperator_next'>next</a> <a href='#SkRegion_Cliperator_rect'>rect</a>
+
+---
+
+<a name='SkRegion_Cliperator_next'></a>
+## next
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+void <a href='#SkRegion_Cliperator_next'>next</a>()
+</pre>
+
+Advances iterator to next <a href='SkIRect_Reference#IRect'>IRect</a> in <a href='#Region'>Region</a> contained by clip.
+
+### Example
+
+<div><fiddle-embed name="3bbcc7eec19c808a8167bbcc987199f8">
+
+#### Example Output
+
+~~~~
+rect={1,3,3,4}
+rect={5,6,7,7}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_Cliperator_done'>done</a>
+
+---
+
+<a name='SkRegion_Cliperator_rect'></a>
+## rect
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& <a href='#SkRegion_Cliperator_rect'>rect</a>() const
+</pre>
+
+Returns <a href='SkIRect_Reference#IRect'>IRect</a> element in <a href='#Region'>Region</a>, intersected with clip passed to <a href='#SkRegion_Cliperator'>Cliperator</a>
+constructor. Does not return predictable results if <a href='#Region'>Region</a>
+is empty.
+
+### Return Value
+
+part of <a href='#Region'>Region</a> inside clip as <a href='SkIRect_Reference#IRect'>IRect</a>
+
+### Example
+
+<div><fiddle-embed name="05791751f00b4c2426093fa143b43bc7">
+
+#### Example Output
+
+~~~~
+#Volatile
+empty region rect={1094713344,1065353216,0,-1}
+after set rect rect={1,2,3,3}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_Cliperator_next'>next</a> <a href='#SkRegion_Cliperator_done'>done</a>
+
+---
+
+# <a name='SkRegion_Spanerator'>Class SkRegion::Spanerator</a>
+
+## <a name='Constructor'>Constructor</a>
+
+
+SkRegion::Spanerator can be constructed or initialized by these functions, including C++ class constructors.
+<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='#SkRegion_Spanerator_const_SkRegion_int_int_int'>Spanerator(const SkRegion& region, int y, int left, int right)</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Region'>Region</a> iterator on scan line</td>
+ </tr>
+</table>
+
+## <a name='Member_Function'>Member_Function</a>
+
+
+SkRegion::Spanerator member functions read and modify the structure properties.
+<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='#SkRegion_Spanerator_next'>next</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>advances to next span on horizontal line</td>
+ </tr>
+</table>
+
+<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
+ class <a href='#SkRegion_Spanerator'>Spanerator</a> {
+ public:
+ <a href='#SkRegion_Spanerator_const_SkRegion_int_int_int'>Spanerator(const SkRegion& region, int y, int left, int right)</a>;
+ bool <a href='#SkRegion_Spanerator_next'>next(int* left, int* right)</a>;
+ };
+</pre>
+
+Returns the line segment ends within <a href='#Region'>Region</a> that intersect a horizontal line.
+
+<a name='SkRegion_Spanerator_const_SkRegion_int_int_int'></a>
+## Spanerator
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+<a href='#SkRegion_Spanerator'>Spanerator</a>(const <a href='#SkRegion'>SkRegion</a>& region, int y, int left, int right)
+</pre>
+
+Sets <a href='#SkRegion_Spanerator'>Spanerator</a> to return line segments in <a href='#Region'>Region</a> on scan line.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_Spanerator_const_SkRegion_int_int_int_region'><code><strong>region</strong></code></a></td>
+ <td><a href='#Region'>Region</a> to iterate</td>
+ </tr>
+ <tr> <td><a name='SkRegion_Spanerator_const_SkRegion_int_int_int_y'><code><strong>y</strong></code></a></td>
+ <td>horizontal line to intersect</td>
+ </tr>
+ <tr> <td><a name='SkRegion_Spanerator_const_SkRegion_int_int_int_left'><code><strong>left</strong></code></a></td>
+ <td>bounds of iteration</td>
+ </tr>
+ <tr> <td><a name='SkRegion_Spanerator_const_SkRegion_int_int_int_right'><code><strong>right</strong></code></a></td>
+ <td>bounds of iteration</td>
+ </tr>
+</table>
+
+### Return Value
+
+<a href='#Region'>Region</a> iterator
+
+### Example
+
+<div><fiddle-embed name="3073b3f8ea7252871b6156ff674dc385"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion'>SkRegion</a> <a href='#SkRegion_Iterator'>Iterator</a> <a href='#SkRegion_Cliperator'>Cliperator</a>
+
+---
+
+<a name='SkRegion_Spanerator_next'></a>
+## next
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_Spanerator_next'>next</a>(int* left, int* right)
+</pre>
+
+Advances iterator to next span intersecting <a href='#Region'>Region</a> within line segment provided
+in constructor. Returns true if interval was found.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_Spanerator_next_left'><code><strong>left</strong></code></a></td>
+ <td>pointer to span start; may be nullptr</td>
+ </tr>
+ <tr> <td><a name='SkRegion_Spanerator_next_right'><code><strong>right</strong></code></a></td>
+ <td>pointer to span end; may be nullptr</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if interval was found
+
+### Example
+
+<div><fiddle-embed name="03d02180fee5f64ec4a3347e118fb2ec">
+
+#### Example Output
+
+~~~~
+empty region: result=false
+after set rect: result=true left=2 right=3
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+done
+
+---
+
+<a name='SkRegion_empty_constructor'></a>
+## SkRegion
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+<a href='#SkRegion'>SkRegion</a>()
+</pre>
+
+Constructs an empty <a href='#Region'>Region</a>. <a href='#Region'>Region</a> is set to empty bounds
+at (0, 0) with zero width and height.
+
+### Return Value
+
+empty <a href='#Region'>Region</a>
+
+### Example
+
+<div><fiddle-embed name="4549dcda3e0f9a41b3daee0ed37deca8">
+
+#### Example Output
+
+~~~~
+region bounds: {0, 0, 0, 0}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_setEmpty'>setEmpty</a>
+
+---
+
+<a name='SkRegion_copy_const_SkRegion'></a>
+## SkRegion
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+<a href='#SkRegion'>SkRegion</a>(const <a href='#SkRegion'>SkRegion</a>& region)
+</pre>
+
+Constructs a copy of an existing <a href='#SkRegion_copy_const_SkRegion_region'>region</a>.
+Copy constructor makes two regions identical by value. Internally, <a href='#SkRegion_copy_const_SkRegion_region'>region</a> and
+the returned result share pointer values. The underlying <a href='SkRect_Reference#Rect'>Rect</a> array is
+copied when modified.
+
+Creating a <a href='#Region'>Region</a> copy is very efficient and never allocates memory.
+<a href='#Region'>Regions</a> are always copied by value from the interface; the underlying shared
+pointers are not exposed.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_copy_const_SkRegion_region'><code><strong>region</strong></code></a></td>
+ <td><a href='#Region'>Region</a> to copy by value</td>
+ </tr>
+</table>
+
+### Return Value
+
+copy of <a href='#Region'>Region</a>
+
+### Example
+
+<div><fiddle-embed name="3daa83fca809b9ec6560d2ef9e2da5e6">
+
+#### Example Output
+
+~~~~
+region bounds: {1,2,3,4}
+region2 bounds: {1,2,3,4}
+after region set empty:
+region bounds: {0,0,0,0}
+region2 bounds: {1,2,3,4}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_setRegion'>setRegion</a> <a href='#SkRegion_copy_operator'>operator=(const SkRegion& region)</a>
+
+---
+
+<a name='SkRegion_copy_const_SkIRect'></a>
+## SkRegion
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+explicit <a href='#SkRegion'>SkRegion</a>(const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& rect)
+</pre>
+
+Constructs a rectangular <a href='#Region'>Region</a> matching the bounds of <a href='#SkRegion_copy_const_SkIRect_rect'>rect</a>.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_copy_const_SkIRect_rect'><code><strong>rect</strong></code></a></td>
+ <td>bounds of constructed <a href='#Region'>Region</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+rectangular <a href='#Region'>Region</a>
+
+### Example
+
+<div><fiddle-embed name="5253910233f7961c30b4c18ab911e917"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_setRect'>setRect</a><sup><a href='#SkRegion_setRect_2'>[2]</a></sup> <a href='#SkRegion_setRegion'>setRegion</a>
+
+---
+
+<a name='SkRegion_destructor'></a>
+## ~SkRegion
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+<a href='#SkRegion_destructor'>~SkRegion</a>()
+</pre>
+
+Releases ownership of any shared data and deletes data if <a href='#Region'>Region</a> is sole owner.
+
+### Example
+
+<div><fiddle-embed name="985ff654a6b67288d322c748132a088e"><div>delete calls <a href='#Region'>Region</a> <a href='undocumented#Destructor'>Destructor</a>, but copy of original in region2 is unaffected.
+</div>
+
+#### Example Output
+
+~~~~
+region2 bounds: {1,2,3,4}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_empty_constructor'>SkRegion()</a> <a href='#SkRegion_copy_const_SkRegion'>SkRegion(const SkRegion& region)</a> <a href='#SkRegion_copy_const_SkIRect'>SkRegion(const SkIRect& rect)</a> <a href='#SkRegion_copy_operator'>operator=(const SkRegion& region)</a>
+
+---
+
+<a name='SkRegion_copy_operator'></a>
+## operator=
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+<a href='#SkRegion'>SkRegion</a>& <a href='#SkRegion_copy_operator'>operator=(const SkRegion& region)</a>
+</pre>
+
+Constructs a copy of an existing <a href='#SkRegion_copy_operator_region'>region</a>.
+Makes two regions identical by value. Internally, <a href='#SkRegion_copy_operator_region'>region</a> and
+the returned result share pointer values. The underlying <a href='SkRect_Reference#Rect'>Rect</a> array is
+copied when modified.
+
+Creating a <a href='#Region'>Region</a> copy is very efficient and never allocates memory.
+<a href='#Region'>Regions</a> are always copied by value from the interface; the underlying shared
+pointers are not exposed.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_copy_operator_region'><code><strong>region</strong></code></a></td>
+ <td><a href='#Region'>Region</a> to copy by value</td>
+ </tr>
+</table>
+
+### Return Value
+
+<a href='#Region'>Region</a> to copy by value
+
+### Example
+
+<div><fiddle-embed name="e8513f6394c24efaa301d41921c5241a">
+
+#### Example Output
+
+~~~~
+region1 bounds: {1,2,3,4}
+region2 bounds: {1,2,3,4}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_set'>set</a> <a href='#SkRegion_swap'>swap</a> <a href='#SkRegion_copy_const_SkRegion'>SkRegion(const SkRegion& region)</a>
+
+---
+
+<a name='SkRegion_equal1_operator'></a>
+## operator==
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool operator==(const SkRegion& other) _const
+</pre>
+
+Compares <a href='#Region'>Region</a> and <a href='#SkRegion_equal1_operator_other'>other</a>; returns true if they enclose exactly
+the same area.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_equal1_operator_other'><code><strong>other</strong></code></a></td>
+ <td><a href='#Region'>Region</a> to compare</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href='#Region'>Region</a> pair are equivalent
+
+### Example
+
+<div><fiddle-embed name="d7f4fdc8bc63ca8410ed166ecef0aef3">
+
+#### Example Output
+
+~~~~
+empty one == two
+set rect one != two
+set empty one == two
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_notequal1_operator'>operator!=(const SkRegion& other) const</a> <a href='#SkRegion_copy_operator'>operator=(const SkRegion& region)</a>
+
+---
+
+<a name='SkRegion_notequal1_operator'></a>
+## operator!=
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool operator!=(const SkRegion& other) _const
+</pre>
+
+Compares <a href='#Region'>Region</a> and <a href='#SkRegion_notequal1_operator_other'>other</a>; returns true if they do not enclose the same area.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_notequal1_operator_other'><code><strong>other</strong></code></a></td>
+ <td><a href='#Region'>Region</a> to compare</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href='#Region'>Region</a> pair are not equivalent
+
+### Example
+
+<div><fiddle-embed name="3357caa9d8d810f200cbccb668182496">
+
+#### Example Output
+
+~~~~
+empty one == two
+set rect one != two
+union rect one == two
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_equal1_operator'>operator==(const SkRegion& other) const</a> <a href='#SkRegion_copy_operator'>operator=(const SkRegion& region)</a>
+
+---
+
+<a name='SkRegion_set'></a>
+## set
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_set'>set</a>(const <a href='#SkRegion'>SkRegion</a>& src)
+</pre>
+
+Sets <a href='#Region'>Region</a> to <a href='#SkRegion_set_src'>src</a>, and returns true if <a href='#SkRegion_set_src'>src</a> bounds is not empty.
+This makes <a href='#Region'>Region</a> and <a href='#SkRegion_set_src'>src</a> identical by value. Internally,
+<a href='#Region'>Region</a> and <a href='#SkRegion_set_src'>src</a> share pointer values. The underlying <a href='SkRect_Reference#Rect'>Rect</a> array is
+copied when modified.
+
+Creating a <a href='#Region'>Region</a> copy is very efficient and never allocates memory.
+<a href='#Region'>Regions</a> are always copied by value from the interface; the underlying shared
+pointers are not exposed.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_set_src'><code><strong>src</strong></code></a></td>
+ <td><a href='#Region'>Region</a> to copy</td>
+ </tr>
+</table>
+
+### Return Value
+
+copy of <a href='#SkRegion_set_src'>src</a>
+
+### Example
+
+<div><fiddle-embed name="b3538117c7ae2cb7de3b42ca45fe1b13">
+
+#### Example Output
+
+~~~~
+region1 bounds: {1,2,3,4}
+region2 bounds: {1,2,3,4}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_copy_operator'>operator=(const SkRegion& region)</a> <a href='#SkRegion_swap'>swap</a> <a href='#SkRegion_copy_const_SkRegion'>SkRegion(const SkRegion& region)</a>
+
+---
+
+<a name='SkRegion_swap'></a>
+## swap
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+void <a href='#SkRegion_swap'>swap</a>(<a href='#SkRegion'>SkRegion</a>& other)
+</pre>
+
+Exchanges <a href='SkIRect_Reference#IRect'>IRect</a> array of <a href='#Region'>Region</a> and <a href='#SkRegion_swap_other'>other</a>. <a href='#SkRegion_swap'>swap</a> internally exchanges pointers,
+so it is lightweight and does not allocate memory.
+
+<a href='#SkRegion_swap'>swap</a> usage has largely been replaced by <a href='#SkRegion_copy_operator'>operator=(const SkRegion& region)</a>.
+<a href='SkPath_Reference#Path'>Paths</a> do not copy their content on assignment until they are written to,
+making assignment as efficient as <a href='#SkRegion_swap'>swap</a>.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_swap_other'><code><strong>other</strong></code></a></td>
+ <td><a href='#SkRegion_copy_operator'>operator=(const SkRegion& region)</a> set</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="ae67b7b4c198b46c58e48f5af061c8f1">
+
+#### Example Output
+
+~~~~
+region1 bounds: {0,0,0,0}
+region2 bounds: {1,2,3,4}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_copy_operator'>operator=(const SkRegion& region)</a> <a href='#SkRegion_set'>set</a> <a href='#SkRegion_copy_const_SkRegion'>SkRegion(const SkRegion& region)</a>
+
+---
+
+<a name='SkRegion_isEmpty'></a>
+## isEmpty
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_isEmpty'>isEmpty</a>() const
+</pre>
+
+Returns true if <a href='#Region'>Region</a> is empty.
+Empty <a href='#Region'>Region</a> has bounds width or height less than or equal to zero.
+<a href='#SkRegion_empty_constructor'>SkRegion()</a> constructs empty <a href='#Region'>Region</a>; <a href='#SkRegion_setEmpty'>setEmpty</a>
+and <a href='#SkRegion_setRect'>setRect</a> with dimensionless data make <a href='#Region'>Region</a> empty.
+
+### Return Value
+
+true if bounds has no width or height
+
+### Example
+
+<div><fiddle-embed name="10ef0de39e8553dd97cf8668ce185070">
+
+#### Example Output
+
+~~~~
+initial: region is empty
+set rect: region is not empty
+set empty: region is empty
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_isRect'>isRect</a> <a href='#SkRegion_isComplex'>isComplex</a> <a href='#SkRegion_equal1_operator'>operator==(const SkRegion& other) const</a>
+
+---
+
+<a name='SkRegion_isRect'></a>
+## isRect
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_isRect'>isRect</a>() const
+</pre>
+
+Returns true if <a href='#Region'>Region</a> is one <a href='SkIRect_Reference#IRect'>IRect</a> with positive dimensions.
+
+### Return Value
+
+true if <a href='#Region'>Region</a> contains one <a href='SkIRect_Reference#IRect'>IRect</a>
+
+### Example
+
+<div><fiddle-embed name="b6adbdddf7fe45a1098121c4e5fd57ea">
+
+#### Example Output
+
+~~~~
+initial: region is not rect
+set rect: region is rect
+set empty: region is not rect
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_isEmpty'>isEmpty</a> <a href='#SkRegion_isComplex'>isComplex</a>
+
+---
+
+<a name='SkRegion_isComplex'></a>
+## isComplex
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_isComplex'>isComplex</a>() const
+</pre>
+
+Returns true if <a href='#Region'>Region</a> is described by more than one rectangle.
+
+### Return Value
+
+true if <a href='#Region'>Region</a> contains more than one <a href='SkIRect_Reference#IRect'>IRect</a>
+
+### Example
+
+<div><fiddle-embed name="1fbd76d75ca2d280e81856311de4e54e">
+
+#### Example Output
+
+~~~~
+initial: region is not complex
+set rect: region is not complex
+op rect: region is complex
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_isEmpty'>isEmpty</a> <a href='#SkRegion_isRect'>isRect</a>
+
+---
+
+<a name='SkRegion_getBounds'></a>
+## getBounds
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& <a href='#SkRegion_getBounds'>getBounds</a>() const
+</pre>
+
+Returns minimum and maximum axes values of <a href='SkIRect_Reference#IRect'>IRect</a> array.
+Returns (0, 0, 0, 0) if <a href='#Region'>Region</a> is empty.
+
+### Return Value
+
+combined bounds of all <a href='SkIRect_Reference#IRect'>IRect</a> elements
+
+### Example
+
+<div><fiddle-embed name="651632582d385d2531e7aa551c31e331">
+
+#### Example Output
+
+~~~~
+bounds: {1,2,4,5}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_isEmpty'>isEmpty</a> <a href='#SkRegion_isRect'>isRect</a>
+
+---
+
+<a name='SkRegion_computeRegionComplexity'></a>
+## computeRegionComplexity
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+int <a href='#SkRegion_computeRegionComplexity'>computeRegionComplexity</a>() const
+</pre>
+
+Returns a value that increases with the number of
+elements in <a href='#Region'>Region</a>. Returns zero if <a href='#Region'>Region</a> is empty.
+Returns one if <a href='#Region'>Region</a> equals <a href='SkIRect_Reference#IRect'>IRect</a>; otherwise, returns
+value greater than one indicating that <a href='#Region'>Region</a> is complex.
+
+Call to compare <a href='#Region'>Regions</a> for relative complexity.
+
+### Return Value
+
+relative complexity
+
+### Example
+
+<div><fiddle-embed name="c4984fefdcecdd1090be160f80939d87">
+
+#### Example Output
+
+~~~~
+initial: region complexity 0
+set rect: region complexity 1
+op rect: region complexity 3
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_isRect'>isRect</a> <a href='#SkRegion_isComplex'>isComplex</a>
+
+---
+
+<a name='SkRegion_getBoundaryPath'></a>
+## getBoundaryPath
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_getBoundaryPath'>getBoundaryPath</a>(<a href='SkPath_Reference#SkPath'>SkPath</a>* path) const
+</pre>
+
+Appends outline of <a href='#Region'>Region</a> to <a href='#SkRegion_getBoundaryPath_path'>path</a>.
+Returns true if <a href='#Region'>Region</a> is not empty; otherwise, returns false, and leaves <a href='#SkRegion_getBoundaryPath_path'>path</a>
+unmodified.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_getBoundaryPath_path'><code><strong>path</strong></code></a></td>
+ <td><a href='SkPath_Reference#Path'>Path</a> to append to</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href='#SkRegion_getBoundaryPath_path'>path</a> changed
+
+### Example
+
+<div><fiddle-embed name="6631d36406efa3b3e27960c876421a7f"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_isEmpty'>isEmpty</a> <a href='#SkRegion_isComplex'>isComplex</a>
+
+---
+
+<a name='SkRegion_setEmpty'></a>
+## setEmpty
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_setEmpty'>setEmpty</a>()
+</pre>
+
+Constructs an empty <a href='#Region'>Region</a>. <a href='#Region'>Region</a> is set to empty bounds
+at (0, 0) with zero width and height. Always returns false.
+
+### Return Value
+
+false
+
+### Example
+
+<div><fiddle-embed name="1314f7250963775c5ee89cc5981eee24">
+
+#### Example Output
+
+~~~~
+region bounds: {1,2,3,4}
+after region set empty:
+region bounds: {0,0,0,0}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_empty_constructor'>SkRegion()</a>
+
+---
+
+<a name='SkRegion_setRect'></a>
+## setRect
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_setRect'>setRect</a>(const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& rect)
+</pre>
+
+Constructs a rectangular <a href='#Region'>Region</a> matching the bounds of <a href='#SkRegion_setRect_rect'>rect</a>.
+If <a href='#SkRegion_setRect_rect'>rect</a> is empty, constructs empty and returns false.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_setRect_rect'><code><strong>rect</strong></code></a></td>
+ <td>bounds of constructed <a href='#Region'>Region</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href='#SkRegion_setRect_rect'>rect</a> is not empty
+
+### Example
+
+<div><fiddle-embed name="e12575ffcd262f2364e0e6bece98a825">
+
+#### Example Output
+
+~~~~
+region is not empty
+region is empty
+setEmpty: false
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_copy_const_SkIRect'>SkRegion(const SkIRect& rect)</a>
+
+---
+
+<a name='SkRegion_setRect_2'></a>
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_setRect'>setRect</a>(int32_t left, int32_t top, int32_t right, int32_t bottom)
+</pre>
+
+Constructs <a href='#Region'>Region</a> with bounds (<a href='#SkRegion_setRect_2_left'>left</a>, <a href='#SkRegion_setRect_2_top'>top</a>, <a href='#SkRegion_setRect_2_right'>right</a>, <a href='#SkRegion_setRect_2_bottom'>bottom</a>).
+Returns true if <a href='#SkRegion_setRect_2_left'>left</a> is less than <a href='#SkRegion_setRect_2_right'>right</a> and <a href='#SkRegion_setRect_2_top'>top</a> is less than <a href='#SkRegion_setRect_2_bottom'>bottom</a>; otherwise,
+constructs empty <a href='#Region'>Region</a> and returns false.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_setRect_2_left'><code><strong>left</strong></code></a></td>
+ <td>edge of bounds on x-axis</td>
+ </tr>
+ <tr> <td><a name='SkRegion_setRect_2_top'><code><strong>top</strong></code></a></td>
+ <td>edge of bounds on y-axis</td>
+ </tr>
+ <tr> <td><a name='SkRegion_setRect_2_right'><code><strong>right</strong></code></a></td>
+ <td>edge of bounds on x-axis</td>
+ </tr>
+ <tr> <td><a name='SkRegion_setRect_2_bottom'><code><strong>bottom</strong></code></a></td>
+ <td>edge of bounds on y-axis</td>
+ </tr>
+</table>
+
+### Return Value
+
+rectangular <a href='#Region'>Region</a>
+
+### Example
+
+<div><fiddle-embed name="5b31a1b077818a8150ad50f3b19e7bfe">
+
+#### Example Output
+
+~~~~
+set to: 1,2,3,4: success:true {1,2,3,4}
+set to: 3,2,1,4: success:false {0,0,0,0}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_copy_const_SkIRect'>SkRegion(const SkIRect& rect)</a>
+
+---
+
+<a name='SkRegion_setRects'></a>
+## setRects
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_setRects'>setRects</a>(const <a href='SkIRect_Reference#SkIRect'>SkIRect</a> rects[], int count)
+</pre>
+
+Constructs <a href='#Region'>Region</a> as the union of <a href='SkIRect_Reference#IRect'>IRect</a> in <a href='#SkRegion_setRects_rects'>rects</a> array. If <a href='#SkRegion_setRects_count'>count</a> is
+zero, constructs empty <a href='#Region'>Region</a>. Returns false if constructed <a href='#Region'>Region</a> is empty.
+
+May be faster than repeated calls to <a href='#SkRegion_op'>op</a>.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_setRects_rects'><code><strong>rects</strong></code></a></td>
+ <td>array of <a href='SkIRect_Reference#IRect'>IRects</a></td>
+ </tr>
+ <tr> <td><a name='SkRegion_setRects_count'><code><strong>count</strong></code></a></td>
+ <td>array size</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if constructed <a href='#Region'>Region</a> is not empty
+
+### Example
+
+<div><fiddle-embed name="fc793a14ed76c096a68a755c963c1ee0"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_setRect'>setRect</a><sup><a href='#SkRegion_setRect_2'>[2]</a></sup> <a href='#SkRegion_op'>op</a><sup><a href='#SkRegion_op_2'>[2]</a></sup><sup><a href='#SkRegion_op_3'>[3]</a></sup><sup><a href='#SkRegion_op_4'>[4]</a></sup><sup><a href='#SkRegion_op_5'>[5]</a></sup><sup><a href='#SkRegion_op_6'>[6]</a></sup>
+
+---
+
+<a name='SkRegion_setRegion'></a>
+## setRegion
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_setRegion'>setRegion</a>(const <a href='#SkRegion'>SkRegion</a>& region)
+</pre>
+
+Constructs a copy of an existing <a href='#SkRegion_setRegion_region'>region</a>.
+Makes two regions identical by value. Internally, <a href='#SkRegion_setRegion_region'>region</a> and
+the returned result share pointer values. The underlying <a href='SkRect_Reference#Rect'>Rect</a> array is
+copied when modified.
+
+Creating a <a href='#Region'>Region</a> copy is very efficient and never allocates memory.
+<a href='#Region'>Regions</a> are always copied by value from the interface; the underlying shared
+pointers are not exposed.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_setRegion_region'><code><strong>region</strong></code></a></td>
+ <td><a href='#Region'>Region</a> to copy by value</td>
+ </tr>
+</table>
+
+### Return Value
+
+<a href='#Region'>Region</a> to copy by value
+
+### Example
+
+<div><fiddle-embed name="5d75d22bd155576838155762ab040751">
+
+#### Example Output
+
+~~~~
+region bounds: {1,2,3,4}
+region2 bounds: {1,2,3,4}
+after region set empty:
+region bounds: {1,2,3,4}
+region2 bounds: {0,0,0,0}
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_copy_const_SkRegion'>SkRegion(const SkRegion& region)</a>
+
+---
+
+<a name='SkRegion_setPath'></a>
+## setPath
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_setPath'>setPath</a>(const <a href='SkPath_Reference#SkPath'>SkPath</a>& path, const <a href='#SkRegion'>SkRegion</a>& clip)
+</pre>
+
+Constructs <a href='#Region'>Region</a> to match outline of <a href='#SkRegion_setPath_path'>path</a> within <a href='#SkRegion_setPath_clip'>clip</a>.
+Returns false if constructed <a href='#Region'>Region</a> is empty.
+
+Constructed <a href='#Region'>Region</a> draws the same pixels as <a href='#SkRegion_setPath_path'>path</a> through <a href='#SkRegion_setPath_clip'>clip</a> when
+<a href='SkPaint_Reference#Anti_Alias'>Anti Aliasing</a> is disabled.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_setPath_path'><code><strong>path</strong></code></a></td>
+ <td><a href='SkPath_Reference#Path'>Path</a> providing outline</td>
+ </tr>
+ <tr> <td><a name='SkRegion_setPath_clip'><code><strong>clip</strong></code></a></td>
+ <td><a href='#Region'>Region</a> containing <a href='#SkRegion_setPath_path'>path</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+true if constructed <a href='#Region'>Region</a> is not empty
+
+### Example
+
+<div><fiddle-embed name="45b9ea2247b9ca7f10aa22ea29a426f4"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_setRects'>setRects</a> <a href='#SkRegion_op'>op</a><sup><a href='#SkRegion_op_2'>[2]</a></sup><sup><a href='#SkRegion_op_3'>[3]</a></sup><sup><a href='#SkRegion_op_4'>[4]</a></sup><sup><a href='#SkRegion_op_5'>[5]</a></sup><sup><a href='#SkRegion_op_6'>[6]</a></sup>
+
+---
+
+<a name='SkRegion_intersects'></a>
+## intersects
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_intersects'>intersects</a>(const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& rect) const
+</pre>
+
+Returns true if <a href='#Region'>Region</a> intersects <a href='#SkRegion_intersects_rect'>rect</a>.
+Returns false if either <a href='#SkRegion_intersects_rect'>rect</a> or <a href='#Region'>Region</a> is empty, or do not intersect.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_intersects_rect'><code><strong>rect</strong></code></a></td>
+ <td><a href='SkIRect_Reference#IRect'>IRect</a> to intersect</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href='#SkRegion_intersects_rect'>rect</a> and <a href='#Region'>Region</a> have area in common
+
+### Example
+
+<div><fiddle-embed name="42bde0ef8c2ee372751428cd6e21c1ca"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_contains'>contains</a><sup><a href='#SkRegion_contains_2'>[2]</a></sup><sup><a href='#SkRegion_contains_3'>[3]</a></sup> <a href='SkRect_Reference#SkRect_intersects'>SkRect::intersects</a><sup><a href='SkRect_Reference#SkRect_intersects_2'>[2]</a></sup>
+
+---
+
+<a name='SkRegion_intersects_2'></a>
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_intersects'>intersects</a>(const <a href='#SkRegion'>SkRegion</a>& other) const
+</pre>
+
+Returns true if <a href='#Region'>Region</a> intersects <a href='#SkRegion_intersects_2_other'>other</a>.
+Returns false if either <a href='#SkRegion_intersects_2_other'>other</a> or <a href='#Region'>Region</a> is empty, or do not intersect.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_intersects_2_other'><code><strong>other</strong></code></a></td>
+ <td><a href='#Region'>Region</a> to intersect</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href='#SkRegion_intersects_2_other'>other</a> and <a href='#Region'>Region</a> have area in common
+
+### Example
+
+<div><fiddle-embed name="4263d79ac0e7df02e90948fdde9fa965"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_contains'>contains</a><sup><a href='#SkRegion_contains_2'>[2]</a></sup><sup><a href='#SkRegion_contains_3'>[3]</a></sup> <a href='SkRect_Reference#SkRect_intersects'>SkRect::intersects</a><sup><a href='SkRect_Reference#SkRect_intersects_2'>[2]</a></sup>
+
+---
+
+<a name='SkRegion_contains'></a>
+## contains
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_contains'>contains</a>(int32_t x, int32_t y) const
+</pre>
+
+Returns true if <a href='SkIPoint_Reference#IPoint'>IPoint</a> (<a href='#SkRegion_contains_x'>x</a>, <a href='#SkRegion_contains_y'>y</a>) is inside <a href='#Region'>Region</a>.
+Returns false if <a href='#Region'>Region</a> is empty.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_contains_x'><code><strong>x</strong></code></a></td>
+ <td>test <a href='SkIPoint_Reference#IPoint'>IPoint</a> <a href='#SkRegion_contains_x'>x</a>-coordinate</td>
+ </tr>
+ <tr> <td><a name='SkRegion_contains_y'><code><strong>y</strong></code></a></td>
+ <td>test <a href='SkIPoint_Reference#IPoint'>IPoint</a> <a href='#SkRegion_contains_y'>y</a>-coordinate</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if (<a href='#SkRegion_contains_x'>x</a>, <a href='#SkRegion_contains_y'>y</a>) is inside <a href='#Region'>Region</a>
+
+### Example
+
+<div><fiddle-embed name="e3899c2715c332bfc7648d5f2b9eefc6"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_intersects'>intersects</a><sup><a href='#SkRegion_intersects_2'>[2]</a></sup> <a href='SkRect_Reference#SkRect_contains'>SkRect::contains</a><sup><a href='SkRect_Reference#SkRect_contains_2'>[2]</a></sup><sup><a href='SkRect_Reference#SkRect_contains_3'>[3]</a></sup>
+
+---
+
+<a name='SkRegion_contains_2'></a>
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_contains'>contains</a>(const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& other) const
+</pre>
+
+Returns true if <a href='#SkRegion_contains_2_other'>other</a> is completely inside <a href='#Region'>Region</a>.
+Returns false if <a href='#Region'>Region</a> or <a href='#SkRegion_contains_2_other'>other</a> is empty.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_contains_2_other'><code><strong>other</strong></code></a></td>
+ <td><a href='SkIRect_Reference#IRect'>IRect</a> to contain</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href='#SkRegion_contains_2_other'>other</a> is inside <a href='#Region'>Region</a>
+
+### Example
+
+<div><fiddle-embed name="100b4cbd5dd7406804e40035833a433c"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_intersects'>intersects</a><sup><a href='#SkRegion_intersects_2'>[2]</a></sup> <a href='SkRect_Reference#SkRect_contains'>SkRect::contains</a><sup><a href='SkRect_Reference#SkRect_contains_2'>[2]</a></sup><sup><a href='SkRect_Reference#SkRect_contains_3'>[3]</a></sup>
+
+---
+
+<a name='SkRegion_contains_3'></a>
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_contains'>contains</a>(const <a href='#SkRegion'>SkRegion</a>& other) const
+</pre>
+
+Returns true if <a href='#SkRegion_contains_3_other'>other</a> is completely inside <a href='#Region'>Region</a>.
+Returns false if <a href='#Region'>Region</a> or <a href='#SkRegion_contains_3_other'>other</a> is empty.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_contains_3_other'><code><strong>other</strong></code></a></td>
+ <td><a href='#Region'>Region</a> to contain</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href='#SkRegion_contains_3_other'>other</a> is inside <a href='#Region'>Region</a>
+
+### Example
+
+<div><fiddle-embed name="46de22da2f3e08a8d7f064634fc1c7b5"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_intersects'>intersects</a><sup><a href='#SkRegion_intersects_2'>[2]</a></sup> <a href='SkRect_Reference#SkRect_contains'>SkRect::contains</a><sup><a href='SkRect_Reference#SkRect_contains_2'>[2]</a></sup><sup><a href='SkRect_Reference#SkRect_contains_3'>[3]</a></sup>
+
+---
+
+<a name='SkRegion_quickContains'></a>
+## quickContains
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_quickContains'>quickContains</a>(const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& r) const
+</pre>
+
+Returns true if <a href='#Region'>Region</a> is a single rectangle and contains <a href='#SkRegion_quickContains_r'>r</a>.
+May return false even though <a href='#Region'>Region</a> contains <a href='#SkRegion_quickContains_r'>r</a>.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_quickContains_r'><code><strong>r</strong></code></a></td>
+ <td><a href='SkIRect_Reference#IRect'>IRect</a> to contain</td>
+ </tr>
+</table>
+
+### Return Value
+
+true quickly if <a href='#SkRegion_quickContains_r'>r</a> points are equal or inside
+
+### Example
+
+<div><fiddle-embed name="d8e5eac373e2e7cfc1b8cd0229647ba6">
+
+#### Example Output
+
+~~~~
+quickContains 1: true
+quickContains 2: true
+quickContains 3: false
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_contains'>contains</a><sup><a href='#SkRegion_contains_2'>[2]</a></sup><sup><a href='#SkRegion_contains_3'>[3]</a></sup> <a href='#SkRegion_quickReject'>quickReject</a><sup><a href='#SkRegion_quickReject_2'>[2]</a></sup> <a href='#SkRegion_intersects'>intersects</a><sup><a href='#SkRegion_intersects_2'>[2]</a></sup>
+
+---
+
+<a name='SkRegion_quickContains_2'></a>
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_quickContains'>quickContains</a>(int32_t left, int32_t top, int32_t right, int32_t bottom) const
+</pre>
+
+Returns true if <a href='#Region'>Region</a> is a single rectangle and contains <a href='SkIRect_Reference#IRect'>IRect</a>
+(<a href='#SkRegion_quickContains_2_left'>left</a>, <a href='#SkRegion_quickContains_2_top'>top</a>, <a href='#SkRegion_quickContains_2_right'>right</a>, <a href='#SkRegion_quickContains_2_bottom'>bottom</a>).
+Returns false if <a href='#Region'>Region</a> is empty or <a href='SkIRect_Reference#IRect'>IRect</a> (<a href='#SkRegion_quickContains_2_left'>left</a>, <a href='#SkRegion_quickContains_2_top'>top</a>, <a href='#SkRegion_quickContains_2_right'>right</a>, <a href='#SkRegion_quickContains_2_bottom'>bottom</a>) is empty.
+May return false even though <a href='#Region'>Region</a> contains (<a href='#SkRegion_quickContains_2_left'>left</a>, <a href='#SkRegion_quickContains_2_top'>top</a>, <a href='#SkRegion_quickContains_2_right'>right</a>, <a href='#SkRegion_quickContains_2_bottom'>bottom</a>).
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_quickContains_2_left'><code><strong>left</strong></code></a></td>
+ <td>edge of bounds on x-axis</td>
+ </tr>
+ <tr> <td><a name='SkRegion_quickContains_2_top'><code><strong>top</strong></code></a></td>
+ <td>edge of bounds on y-axis</td>
+ </tr>
+ <tr> <td><a name='SkRegion_quickContains_2_right'><code><strong>right</strong></code></a></td>
+ <td>edge of bounds on x-axis</td>
+ </tr>
+ <tr> <td><a name='SkRegion_quickContains_2_bottom'><code><strong>bottom</strong></code></a></td>
+ <td>edge of bounds on y-axis</td>
+ </tr>
+</table>
+
+### Return Value
+
+true quickly if <a href='SkIRect_Reference#IRect'>IRect</a> are equal or inside
+
+### Example
+
+<div><fiddle-embed name="eb6d290887e1a3a0b051b4d7b012f5e1">
+
+#### Example Output
+
+~~~~
+quickContains 1: true
+quickContains 2: true
+quickContains 3: false
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_contains'>contains</a><sup><a href='#SkRegion_contains_2'>[2]</a></sup><sup><a href='#SkRegion_contains_3'>[3]</a></sup> <a href='#SkRegion_quickReject'>quickReject</a><sup><a href='#SkRegion_quickReject_2'>[2]</a></sup> <a href='#SkRegion_intersects'>intersects</a><sup><a href='#SkRegion_intersects_2'>[2]</a></sup>
+
+---
+
+<a name='SkRegion_quickReject'></a>
+## quickReject
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_quickReject'>quickReject</a>(const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& rect) const
+</pre>
+
+Returns true if <a href='#Region'>Region</a> does not intersect <a href='#SkRegion_quickReject_rect'>rect</a>.
+Returns true if <a href='#SkRegion_quickReject_rect'>rect</a> is empty or <a href='#Region'>Region</a> is empty.
+May return false even though <a href='#Region'>Region</a> does not intersect <a href='#SkRegion_quickReject_rect'>rect</a>.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_quickReject_rect'><code><strong>rect</strong></code></a></td>
+ <td><a href='SkIRect_Reference#IRect'>IRect</a> to intersect</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href='#SkRegion_quickReject_rect'>rect</a> does not intersect
+
+### Example
+
+<div><fiddle-embed name="71ac24b7d91ac5ca7c14b43930d5f85d">
+
+#### Example Output
+
+~~~~
+quickReject 1: true
+quickReject 2: true
+quickReject 3: false
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_quickContains'>quickContains</a><sup><a href='#SkRegion_quickContains_2'>[2]</a></sup> <a href='#SkRegion_contains'>contains</a><sup><a href='#SkRegion_contains_2'>[2]</a></sup><sup><a href='#SkRegion_contains_3'>[3]</a></sup> <a href='#SkRegion_intersects'>intersects</a><sup><a href='#SkRegion_intersects_2'>[2]</a></sup>
+
+---
+
+<a name='SkRegion_quickReject_2'></a>
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_quickReject'>quickReject</a>(const <a href='#SkRegion'>SkRegion</a>& rgn) const
+</pre>
+
+Returns true if <a href='#Region'>Region</a> does not intersect <a href='#SkRegion_quickReject_2_rgn'>rgn</a>.
+Returns true if <a href='#SkRegion_quickReject_2_rgn'>rgn</a> is empty or <a href='#Region'>Region</a> is empty.
+May return false even though <a href='#Region'>Region</a> does not intersect <a href='#SkRegion_quickReject_2_rgn'>rgn</a>.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_quickReject_2_rgn'><code><strong>rgn</strong></code></a></td>
+ <td><a href='#Region'>Region</a> to intersect</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href='#SkRegion_quickReject_2_rgn'>rgn</a> does not intersect
+
+### Example
+
+<div><fiddle-embed name="def7dba38947c33b203e4f9db6c88be3">
+
+#### Example Output
+
+~~~~
+quickReject 1: true
+quickReject 2: true
+quickReject 3: false
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_quickContains'>quickContains</a><sup><a href='#SkRegion_quickContains_2'>[2]</a></sup> <a href='#SkRegion_contains'>contains</a><sup><a href='#SkRegion_contains_2'>[2]</a></sup><sup><a href='#SkRegion_contains_3'>[3]</a></sup> <a href='#SkRegion_intersects'>intersects</a><sup><a href='#SkRegion_intersects_2'>[2]</a></sup>
+
+---
+
+<a name='SkRegion_translate'></a>
+## translate
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+void <a href='#SkRegion_translate'>translate</a>(int dx, int dy)
+</pre>
+
+Offsets <a href='#Region'>Region</a> by <a href='SkIPoint_Reference#IVector'>IVector</a> (<a href='#SkRegion_translate_dx'>dx</a>, <a href='#SkRegion_translate_dy'>dy</a>). Has no effect if <a href='#Region'>Region</a> is empty.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_translate_dx'><code><strong>dx</strong></code></a></td>
+ <td>x-axis offset</td>
+ </tr>
+ <tr> <td><a name='SkRegion_translate_dy'><code><strong>dy</strong></code></a></td>
+ <td>y-axis offset</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="4e5b9e53aa1b200fed3ee6596ca01f0e"></fiddle-embed></div>
+
+### See Also
+
+<a href='SkCanvas_Reference#SkCanvas_translate'>SkCanvas::translate</a> <a href='SkIRect_Reference#SkIRect_offset'>SkIRect::offset</a><sup><a href='SkIRect_Reference#SkIRect_offset_2'>[2]</a></sup> <a href='SkPath_Reference#SkPath_offset'>SkPath::offset</a><sup><a href='SkPath_Reference#SkPath_offset_2'>[2]</a></sup>
+
+---
+
+<a name='SkRegion_translate_2'></a>
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+void <a href='#SkRegion_translate'>translate</a>(int dx, int dy, <a href='#SkRegion'>SkRegion</a>* dst) const
+</pre>
+
+Offsets <a href='#Region'>Region</a> by <a href='SkIPoint_Reference#IVector'>IVector</a> (<a href='#SkRegion_translate_2_dx'>dx</a>, <a href='#SkRegion_translate_2_dy'>dy</a>), writing result to <a href='#SkRegion_translate_2_dst'>dst</a>. <a href='#Region'>Region</a> may be passed
+as <a href='#SkRegion_translate_2_dst'>dst</a> parameter, translating <a href='#Region'>Region</a> in place. Has no effect if <a href='#SkRegion_translate_2_dst'>dst</a> is nullptr.
+If <a href='#Region'>Region</a> is empty, sets <a href='#SkRegion_translate_2_dst'>dst</a> to empty.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_translate_2_dx'><code><strong>dx</strong></code></a></td>
+ <td>x-axis offset</td>
+ </tr>
+ <tr> <td><a name='SkRegion_translate_2_dy'><code><strong>dy</strong></code></a></td>
+ <td>y-axis offset</td>
+ </tr>
+ <tr> <td><a name='SkRegion_translate_2_dst'><code><strong>dst</strong></code></a></td>
+ <td>translated result</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="024200960eb52fee1f471514607e6001"></fiddle-embed></div>
+
+### See Also
+
+<a href='SkCanvas_Reference#SkCanvas_translate'>SkCanvas::translate</a> <a href='SkIRect_Reference#SkIRect_offset'>SkIRect::offset</a><sup><a href='SkIRect_Reference#SkIRect_offset_2'>[2]</a></sup> <a href='SkPath_Reference#SkPath_offset'>SkPath::offset</a><sup><a href='SkPath_Reference#SkPath_offset_2'>[2]</a></sup>
+
+---
+
+## <a name='SkRegion_Op'>Enum SkRegion::Op</a>
+
+<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
+ enum <a href='undocumented#Op'>Op</a> {
+ <a href='#SkRegion_kDifference_Op'>kDifference Op</a>,
+ <a href='#SkRegion_kIntersect_Op'>kIntersect Op</a>,
+ <a href='#SkRegion_kUnion_Op'>kUnion Op</a>,
+ <a href='#SkRegion_kXOR_Op'>kXOR Op</a>,
+ <a href='#SkRegion_kReverseDifference_Op'>kReverseDifference Op</a>,
+ <a href='#SkRegion_kReplace_Op'>kReplace Op</a>,
+ <a href='#SkRegion_kLastOp'>kLastOp</a> = <a href='#SkRegion_kReplace_Op'>kReplace Op</a>,
+ };
+</pre>
+
+The logical operations that can be performed when combining two <a href='#Region'>Regions</a>.
+
+### Constants
+
+<table style='border-collapse: collapse; width: 62.5em'>
+ <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Const</th>
+<th style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>Value</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 name='SkRegion_kDifference_Op'><code>SkRegion::kDifference_Op</code></a></td>
+ <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>0</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
+Subtracts operand <a href='#Region'>Region</a> from target <a href='#Region'>Region</a>.
+</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRegion_kIntersect_Op'><code>SkRegion::kIntersect_Op</code></a></td>
+ <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>1</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
+Intersects operand <a href='#Region'>Region</a> and target <a href='#Region'>Region</a>.
+</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRegion_kUnion_Op'><code>SkRegion::kUnion_Op</code></a></td>
+ <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>2</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
+Unions operand <a href='#Region'>Region</a> and target <a href='#Region'>Region</a>.
+</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRegion_kXOR_Op'><code>SkRegion::kXOR_Op</code></a></td>
+ <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>3</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
+Replaces target <a href='#Region'>Region</a> with area exclusive to both <a href='#Region'>Regions</a>.
+</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRegion_kReverseDifference_Op'><code>SkRegion::kReverseDifference_Op</code></a></td>
+ <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>4</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
+Subtracts target <a href='#Region'>Region</a> from operand <a href='#Region'>Region</a>.
+</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRegion_kReplace_Op'><code>SkRegion::kReplace_Op</code></a></td>
+ <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>5</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
+Replaces target <a href='#Region'>Region</a> with operand <a href='#Region'>Region</a>.
+</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkRegion_kLastOp'><code>SkRegion::kLastOp</code></a></td>
+ <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>5</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
+last operator</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="fb82d2d3ec51912215a0eb9b45dcbc3c"></fiddle-embed></div>
+
+### See Also
+
+<a href='undocumented#SkPathOp'>SkPathOp</a>
+
+### Constants
+
+<table style='border-collapse: collapse; width: 62.5em'>
+ <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Const</th>
+<th style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>Value</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 name='SkRegion_kOpCnt'><code>SkRegion::kOpCnt</code></a></td>
+ <td style='text-align: center; border: 2px solid #dddddd; padding: 8px; '>6</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
+May be used to verify that <a href='undocumented#Op'>Op</a> is a legal value.</td>
+ </tr>
+</table>
+
+<a name='SkRegion_op'></a>
+## op
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_op'>op</a>(const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& rect, <a href='undocumented#Op'>Op</a> op)
+</pre>
+
+Replaces <a href='#Region'>Region</a> with the result of <a href='#Region'>Region</a> op <a href='#SkRegion_op_rect'>rect</a>.
+Returns true if replaced <a href='#Region'>Region</a> is not empty.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_op_rect'><code><strong>rect</strong></code></a></td>
+ <td><a href='SkIRect_Reference#IRect'>IRect</a> operand</td>
+ </tr>
+ <tr> <td><a name='SkRegion_op_op'><code><strong>op</strong></code></a></td>
+ <td>operator, one of: <a href='#SkRegion_kDifference_Op'>kDifference Op</a>, <a href='#SkRegion_kIntersect_Op'>kIntersect Op</a>, <a href='#SkRegion_kUnion_Op'>kUnion Op</a>, <a href='#SkRegion_kXOR_Op'>kXOR Op</a>, <a href='#SkRegion_kReverseDifference_Op'>kReverseDifference Op</a>,
+<a href='#SkRegion_kReplace_Op'>kReplace Op</a> </td>
+ </tr>
+</table>
+
+### Return Value
+
+false if result is empty
+
+### Example
+
+<div><fiddle-embed name="1790b2e054c536a54601138365700ac3"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_setRects'>setRects</a> <a href='undocumented#Op'>Op</a>
+
+---
+
+<a name='SkRegion_op_2'></a>
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_op'>op</a>(int left, int top, int right, int bottom, <a href='undocumented#Op'>Op</a> op)
+</pre>
+
+Replaces <a href='#Region'>Region</a> with the result of <a href='#Region'>Region</a> op <a href='SkIRect_Reference#IRect'>IRect</a> (<a href='#SkRegion_op_2_left'>left</a>, <a href='#SkRegion_op_2_top'>top</a>, <a href='#SkRegion_op_2_right'>right</a>, <a href='#SkRegion_op_2_bottom'>bottom</a>).
+Returns true if replaced <a href='#Region'>Region</a> is not empty.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_op_2_left'><code><strong>left</strong></code></a></td>
+ <td>edge of bounds on x-axis</td>
+ </tr>
+ <tr> <td><a name='SkRegion_op_2_top'><code><strong>top</strong></code></a></td>
+ <td>edge of bounds on y-axis</td>
+ </tr>
+ <tr> <td><a name='SkRegion_op_2_right'><code><strong>right</strong></code></a></td>
+ <td>edge of bounds on x-axis</td>
+ </tr>
+ <tr> <td><a name='SkRegion_op_2_bottom'><code><strong>bottom</strong></code></a></td>
+ <td>edge of bounds on y-axis</td>
+ </tr>
+ <tr> <td><a name='SkRegion_op_2_op'><code><strong>op</strong></code></a></td>
+ <td>operator, one of: <a href='#SkRegion_kDifference_Op'>kDifference Op</a>, <a href='#SkRegion_kIntersect_Op'>kIntersect Op</a>, <a href='#SkRegion_kUnion_Op'>kUnion Op</a>, <a href='#SkRegion_kXOR_Op'>kXOR Op</a>, <a href='#SkRegion_kReverseDifference_Op'>kReverseDifference Op</a>,
+<a href='#SkRegion_kReplace_Op'>kReplace Op</a> </td>
+ </tr>
+</table>
+
+### Return Value
+
+false if result is empty
+
+### Example
+
+<div><fiddle-embed name="2e3497890d523235f96680716c321098"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_setRects'>setRects</a> <a href='undocumented#Op'>Op</a>
+
+---
+
+<a name='SkRegion_op_3'></a>
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_op'>op</a>(const <a href='#SkRegion'>SkRegion</a>& rgn, <a href='undocumented#Op'>Op</a> op)
+</pre>
+
+Replaces <a href='#Region'>Region</a> with the result of <a href='#Region'>Region</a> op <a href='#SkRegion_op_3_rgn'>rgn</a>.
+Returns true if replaced <a href='#Region'>Region</a> is not empty.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_op_3_rgn'><code><strong>rgn</strong></code></a></td>
+ <td><a href='#Region'>Region</a> operand</td>
+ </tr>
+ <tr> <td><a name='SkRegion_op_3_op'><code><strong>op</strong></code></a></td>
+ <td>operator, one of: <a href='#SkRegion_kDifference_Op'>kDifference Op</a>, <a href='#SkRegion_kIntersect_Op'>kIntersect Op</a>, <a href='#SkRegion_kUnion_Op'>kUnion Op</a>, <a href='#SkRegion_kXOR_Op'>kXOR Op</a>, <a href='#SkRegion_kReverseDifference_Op'>kReverseDifference Op</a>,
+<a href='#SkRegion_kReplace_Op'>kReplace Op</a> </td>
+ </tr>
+</table>
+
+### Return Value
+
+false if result is empty
+
+### Example
+
+<div><fiddle-embed name="65f4eccea3514ed7e37b5067e15efddb"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_setRects'>setRects</a> <a href='undocumented#Op'>Op</a>
+
+---
+
+<a name='SkRegion_op_4'></a>
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_op'>op</a>(const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& rect, const <a href='#SkRegion'>SkRegion</a>& rgn, <a href='undocumented#Op'>Op</a> op)
+</pre>
+
+Replaces <a href='#Region'>Region</a> with the result of <a href='#SkRegion_op_4_rect'>rect</a> op <a href='#SkRegion_op_4_rgn'>rgn</a>.
+Returns true if replaced <a href='#Region'>Region</a> is not empty.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_op_4_rect'><code><strong>rect</strong></code></a></td>
+ <td><a href='SkIRect_Reference#IRect'>IRect</a> operand</td>
+ </tr>
+ <tr> <td><a name='SkRegion_op_4_rgn'><code><strong>rgn</strong></code></a></td>
+ <td><a href='#Region'>Region</a> operand</td>
+ </tr>
+ <tr> <td><a name='SkRegion_op_4_op'><code><strong>op</strong></code></a></td>
+ <td>operator, one of: <a href='#SkRegion_kDifference_Op'>kDifference Op</a>, <a href='#SkRegion_kIntersect_Op'>kIntersect Op</a>, <a href='#SkRegion_kUnion_Op'>kUnion Op</a>, <a href='#SkRegion_kXOR_Op'>kXOR Op</a>, <a href='#SkRegion_kReverseDifference_Op'>kReverseDifference Op</a>,
+<a href='#SkRegion_kReplace_Op'>kReplace Op</a> </td>
+ </tr>
+</table>
+
+### Return Value
+
+false if result is empty
+
+### Example
+
+<div><fiddle-embed name="3f964be1e1fd2fbb977b655d3a928f0a"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_setRects'>setRects</a> <a href='undocumented#Op'>Op</a>
+
+---
+
+<a name='SkRegion_op_5'></a>
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_op'>op</a>(const <a href='#SkRegion'>SkRegion</a>& rgn, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& rect, <a href='undocumented#Op'>Op</a> op)
+</pre>
+
+Replaces <a href='#Region'>Region</a> with the result of <a href='#SkRegion_op_5_rgn'>rgn</a> op <a href='#SkRegion_op_5_rect'>rect</a>.
+Returns true if replaced <a href='#Region'>Region</a> is not empty.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_op_5_rgn'><code><strong>rgn</strong></code></a></td>
+ <td><a href='#Region'>Region</a> operand</td>
+ </tr>
+ <tr> <td><a name='SkRegion_op_5_rect'><code><strong>rect</strong></code></a></td>
+ <td><a href='SkIRect_Reference#IRect'>IRect</a> operand</td>
+ </tr>
+ <tr> <td><a name='SkRegion_op_5_op'><code><strong>op</strong></code></a></td>
+ <td>operator, one of: <a href='#SkRegion_kDifference_Op'>kDifference Op</a>, <a href='#SkRegion_kIntersect_Op'>kIntersect Op</a>, <a href='#SkRegion_kUnion_Op'>kUnion Op</a>, <a href='#SkRegion_kXOR_Op'>kXOR Op</a>, <a href='#SkRegion_kReverseDifference_Op'>kReverseDifference Op</a>,
+<a href='#SkRegion_kReplace_Op'>kReplace Op</a> </td>
+ </tr>
+</table>
+
+### Return Value
+
+false if result is empty
+
+### Example
+
+<div><fiddle-embed name="e623208dd44f0b24499ac5f1593d1b39"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_setRects'>setRects</a> <a href='undocumented#Op'>Op</a>
+
+---
+
+<a name='SkRegion_op_6'></a>
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+bool <a href='#SkRegion_op'>op</a>(const <a href='#SkRegion'>SkRegion</a>& rgna, const <a href='#SkRegion'>SkRegion</a>& rgnb, <a href='undocumented#Op'>Op</a> op)
+</pre>
+
+Replaces <a href='#Region'>Region</a> with the result of <a href='#SkRegion_op_6_rgna'>rgna</a> op <a href='#SkRegion_op_6_rgnb'>rgnb</a>.
+Returns true if replaced <a href='#Region'>Region</a> is not empty.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_op_6_rgna'><code><strong>rgna</strong></code></a></td>
+ <td><a href='#Region'>Region</a> operand</td>
+ </tr>
+ <tr> <td><a name='SkRegion_op_6_rgnb'><code><strong>rgnb</strong></code></a></td>
+ <td><a href='#Region'>Region</a> operand</td>
+ </tr>
+ <tr> <td><a name='SkRegion_op_6_op'><code><strong>op</strong></code></a></td>
+ <td>operator, one of: <a href='#SkRegion_kDifference_Op'>kDifference Op</a>, <a href='#SkRegion_kIntersect_Op'>kIntersect Op</a>, <a href='#SkRegion_kUnion_Op'>kUnion Op</a>, <a href='#SkRegion_kXOR_Op'>kXOR Op</a>, <a href='#SkRegion_kReverseDifference_Op'>kReverseDifference Op</a>,
+<a href='#SkRegion_kReplace_Op'>kReplace Op</a> </td>
+ </tr>
+</table>
+
+### Return Value
+
+false if result is empty
+
+### Example
+
+<div><fiddle-embed name="13de1a6fcb2302a2a30278cb88d3e17d"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_setRects'>setRects</a> <a href='undocumented#Op'>Op</a>
+
+---
+
+<a name='SkRegion_toString'></a>
+## toString
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+char* <a href='#SkRegion_toString'>toString</a>()
+</pre>
+
+### Return Value
+
+string representation of <a href='#Region'>Region</a>
+
+---
+
+<a name='SkRegion_writeToMemory'></a>
+## writeToMemory
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+size_t <a href='#SkRegion_writeToMemory'>writeToMemory</a>(void* buffer) const
+</pre>
+
+Writes <a href='#Region'>Region</a> to <a href='#SkRegion_writeToMemory_buffer'>buffer</a>, and returns number of bytes written.
+If <a href='#SkRegion_writeToMemory_buffer'>buffer</a> is nullptr, returns number number of bytes that would be written.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_writeToMemory_buffer'><code><strong>buffer</strong></code></a></td>
+ <td>storage for binary data</td>
+ </tr>
+</table>
+
+### Return Value
+
+size of <a href='#Region'>Region</a>
+
+### Example
+
+<div><fiddle-embed name="1419d2a8c22c355ab46240865d056ee5"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_readFromMemory'>readFromMemory</a>
+
+---
+
+<a name='SkRegion_readFromMemory'></a>
+## readFromMemory
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+size_t <a href='#SkRegion_readFromMemory'>readFromMemory</a>(const void* buffer, size_t length)
+</pre>
+
+Constructs <a href='#Region'>Region</a> from <a href='#SkRegion_readFromMemory_buffer'>buffer</a> of size <a href='#SkRegion_readFromMemory_length'>length</a>. Returns bytes read.
+Returned value will be multiple of four or zero if <a href='#SkRegion_readFromMemory_length'>length</a> was too small.
+
+### Parameters
+
+<table> <tr> <td><a name='SkRegion_readFromMemory_buffer'><code><strong>buffer</strong></code></a></td>
+ <td>storage for binary data</td>
+ </tr>
+ <tr> <td><a name='SkRegion_readFromMemory_length'><code><strong>length</strong></code></a></td>
+ <td>size of <a href='#SkRegion_readFromMemory_buffer'>buffer</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+bytes read
+
+### Example
+
+<div><fiddle-embed name="1ede346c430ef23df0eaaf0773dd6a15"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkRegion_writeToMemory'>writeToMemory</a>
+
+---
+
diff --git a/site/user/api/SkTextBlobBuilder_Reference.md b/site/user/api/SkTextBlobBuilder_Reference.md
new file mode 100644
index 0000000..de8ae20
--- /dev/null
+++ b/site/user/api/SkTextBlobBuilder_Reference.md
@@ -0,0 +1,435 @@
+SkTextBlobBuilder Reference
+===
+
+# <a name='Text_Blob_Builder'>Text Blob Builder</a>
+
+# <a name='SkTextBlobBuilder'>Class SkTextBlobBuilder</a>
+
+## <a name='Struct'>Struct</a>
+
+
+SkTextBlobBuilder uses C++ structs to declare the public data structures and interfaces.
+<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='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>storage for <a href='undocumented#Glyph'>Glyphs</a> and <a href='undocumented#Glyph'>Glyph</a> positions</td>
+ </tr>
+</table>
+
+Helper class for constructing <a href='SkTextBlob_Reference#SkTextBlob'>SkTextBlob</a>.
+
+## Overview
+
+<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='#Constructor'>Constructors</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>functions that construct <a href='#SkTextBlobBuilder'>SkTextBlobBuilder</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#Member_Function'>Functions</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>global and class member functions</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#Struct'>Struct Declarations</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>embedded struct members</td>
+ </tr>
+</table>
+
+
+## <a name='Class'>Class</a>
+
+
+SkTextBlobBuilder uses C++ classes to declare the public data structures and interfaces.
+<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>
+</table>
+
+## <a name='Constructor'>Constructor</a>
+
+
+SkTextBlobBuilder can be constructed or initialized by these functions, including C++ class constructors.
+<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='#SkTextBlobBuilder_empty_constructor'>SkTextBlobBuilder()</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs with default values</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlobBuilder_make'>make</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a> from bulider</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlobBuilder_destructor'>~SkTextBlobBuilder()</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>deletes storage</td>
+ </tr>
+</table>
+
+## <a name='Member_Function'>Member Function</a>
+
+
+SkTextBlobBuilder member functions read and modify the structure properties.
+<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='#SkTextBlobBuilder_allocRun'>allocRun</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns writable glyph buffer at <a href='SkPoint_Reference#Point'>Point</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlobBuilder_allocRunPos'>allocRunPos</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns writable glyph and <a href='SkPoint_Reference#Point'>Point</a> buffers</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlobBuilder_allocRunPosH'>allocRunPosH</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns writable glyph and x-axis position buffers</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlobBuilder_make'>make</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a> from bulider</td>
+ </tr>
+</table>
+
+# <a name='SkTextBlobBuilder_RunBuffer'>Struct SkTextBlobBuilder::RunBuffer</a>
+
+<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
+ struct <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a> {
+ <a href='undocumented#SkGlyphID'>SkGlyphID</a>* glyphs;
+ <a href='undocumented#SkScalar'>SkScalar</a>* pos;
+ char* <a href='#SkTextBlobBuilder_RunBuffer_utf8text'>utf8text</a>;
+ uint32_t* clusters;
+ };
+</pre>
+
+<a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a> supplies storage for <a href='undocumented#Glyph'>Glyphs</a> and positions within a run.
+
+A run is a sequence of <a href='undocumented#Glyph'>Glyphs</a> sharing <a href='SkPaint_Reference#Font_Metrics'>Paint Font Metrics</a> and positioning.
+Each run may position its <a href='undocumented#Glyph'>Glyphs</a> in one of three ways:
+by specifying where the first <a href='undocumented#Glyph'>Glyph</a> is drawn, and allowing <a href='SkPaint_Reference#Font_Metrics'>Paint Font Metrics</a> to
+determine the advance to subsequent <a href='undocumented#Glyph'>Glyphs</a>; by specifying a baseline, and
+the position on that baseline for each <a href='undocumented#Glyph'>Glyph</a> in run; or by providing <a href='SkPoint_Reference#Point'>Point</a>
+array, one per <a href='undocumented#Glyph'>Glyph</a>.
+
+## <a name='Member'>Member</a>
+
+
+SkTextBlobBuilder::RunBuffer members may be read and written directly without using a member function.
+<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; '>clusters</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>reserved for future use</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>glyphs</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>storage for <a href='undocumented#Glyph'>Glyphs</a> in run</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>pos</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>storage for positions in run</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlobBuilder_RunBuffer_utf8text'>utf8text</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>reserved for future use</td>
+ </tr>
+</table>
+
+### Members
+
+<table style='border-collapse: collapse; width: 62.5em'>
+ <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Type</th>
+<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Name</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; '>SkGlyphID*</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkTextBlobBuilder_RunBuffer_glyphs'><code>glyphs</code></a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
+glyphs points to memory for one or more <a href='undocumented#Glyph'>Glyphs</a>. glyphs memory must be
+written to by the caller.
+</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>SkScalar*</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkTextBlobBuilder_RunBuffer_pos'><code>pos</code></a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
+pos points to memory for <a href='undocumented#Glyph'>Glyph</a> positions. Depending on how <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>
+is allocated, pos may point to zero bytes per <a href='undocumented#Glyph'>Glyph</a>, one <a href='undocumented#Scalar'>Scalar</a> per <a href='undocumented#Glyph'>Glyph</a>,
+or one <a href='SkPoint_Reference#Point'>Point</a> per <a href='undocumented#Glyph'>Glyph</a>.
+</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>char*</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkTextBlobBuilder_RunBuffer_utf8text'><code>utf8text</code></a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
+Reserved for future use. <a href='#SkTextBlobBuilder_RunBuffer_utf8text'>utf8text</a> should not be read or written.
+</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>uint32_t*</td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkTextBlobBuilder_RunBuffer_clusters'><code>clusters</code></a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
+Reserved for future use. clusters should not be read or written.
+</td>
+ </tr>
+</table>
+
+### See Also
+
+<a href='#SkTextBlobBuilder_allocRun'>allocRun</a> <a href='#SkTextBlobBuilder_allocRunPos'>allocRunPos</a> <a href='#SkTextBlobBuilder_allocRunPosH'>allocRunPosH</a>
+
+<a name='SkTextBlobBuilder_empty_constructor'></a>
+## SkTextBlobBuilder
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+<a href='#SkTextBlobBuilder'>SkTextBlobBuilder</a>()
+</pre>
+
+Constructs empty <a href='#Text_Blob_Builder'>Text Blob Builder</a>. By default, <a href='#Text_Blob_Builder'>Text Blob Builder</a> has no runs.
+
+### Return Value
+
+empty <a href='#Text_Blob_Builder'>Text Blob Builder</a>
+
+### Example
+
+<div><fiddle-embed name="d9dbabfe24aad92ee3c8144513e90d81">
+
+#### Example Output
+
+~~~~
+blob equals nullptr
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='#SkTextBlobBuilder_make'>make</a> <a href='SkTextBlob_Reference#SkTextBlob_MakeFromText'>SkTextBlob::MakeFromText</a>
+
+---
+
+<a name='SkTextBlobBuilder_destructor'></a>
+## ~SkTextBlobBuilder
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+<a href='#SkTextBlobBuilder_destructor'>~SkTextBlobBuilder</a>()
+</pre>
+
+Deletes data allocated internally by <a href='#Text_Blob_Builder'>Text Blob Builder</a>.
+
+### See Also
+
+<a href='#SkTextBlobBuilder_empty_constructor'>SkTextBlobBuilder()</a>
+
+---
+
+<a name='SkTextBlobBuilder_make'></a>
+## make
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+<a href='undocumented#sk_sp'>sk sp</a><<a href='SkTextBlob_Reference#SkTextBlob'>SkTextBlob</a>> <a href='#SkTextBlobBuilder_make'>make</a>()
+</pre>
+
+Returns <a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a> built from runs of <a href='undocumented#Glyph'>Glyphs</a> added by builder. Returned
+<a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a> is immutable; it may be copied, but its contents may not be altered.
+Returns nullptr if no runs of <a href='undocumented#Glyph'>Glyphs</a> were added by builder.
+
+Resets <a href='#Text_Blob_Builder'>Text Blob Builder</a> to its initial empty state, allowing it to be
+reused to build a new set of runs.
+
+### Return Value
+
+<a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a> or nullptr
+
+### Example
+
+<div><fiddle-embed name="595f6ae785a623ac26059f0573fda995">
+
+#### Example Output
+
+~~~~
+blob equals nullptr
+blob does not equal nullptr
+blob equals nullptr
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href='SkTextBlob_Reference#SkTextBlob_MakeFromText'>SkTextBlob::MakeFromText</a>
+
+---
+
+<a name='SkTextBlobBuilder_allocRun'></a>
+## allocRun
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+const <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>& <a href='#SkTextBlobBuilder_allocRun'>allocRun</a>(const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& font, int count, <a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y,
+ const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds = nullptr)
+</pre>
+
+Returns run with storage for <a href='undocumented#Glyph'>Glyphs</a>. Caller must write <a href='#SkTextBlobBuilder_allocRun_count'>count</a> <a href='undocumented#Glyph'>Glyphs</a> to
+<a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.glyphs before next call to FontBlobBuilder.
+
+<a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.utf8text, and <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.clusters should be ignored.
+
+<a href='undocumented#Glyph'>Glyphs</a> share <a href='SkPaint_Reference#Font_Metrics'>Paint Font Metrics</a> in <a href='#SkTextBlobBuilder_allocRun_font'>font</a>, including: <a href='undocumented#Typeface'>Typeface</a>, <a href='SkPaint_Reference#Text_Size'>Paint Text Size</a>, <a href='SkPaint_Reference#Text_Scale_X'>Paint Text Scale X</a>,
+<a href='SkPaint_Reference#Text_Skew_X'>Paint Text Skew X</a>, <a href='SkPaint_Reference#Text_Align'>Paint Text Align</a>, <a href='SkPaint_Reference#Hinting'>Paint Hinting</a>, <a href='SkPaint_Reference#Anti_Alias'>Anti Alias</a>, <a href='SkPaint_Reference#Fake_Bold'>Paint Fake Bold</a>,
+<a href='SkPaint_Reference#Font_Embedded_Bitmaps'>Font Embedded Bitmaps</a>, <a href='SkPaint_Reference#Full_Hinting_Spacing'>Full Hinting Spacing</a>, <a href='SkPaint_Reference#LCD_Text'>LCD Text</a>, <a href='SkPaint_Reference#Linear_Text'>Linear Text</a>,
+and <a href='SkPaint_Reference#Subpixel_Text'>Subpixel Text</a>.
+
+<a href='undocumented#Glyph'>Glyphs</a> are positioned on a baseline at (<a href='#SkTextBlobBuilder_allocRun_x'>x</a>, <a href='#SkTextBlobBuilder_allocRun_y'>y</a>), using <a href='#SkTextBlobBuilder_allocRun_font'>font</a> <a href='SkPaint_Reference#Font_Metrics'>Paint Font Metrics</a> to
+determine their relative placement.
+
+<a href='#SkTextBlobBuilder_allocRun_bounds'>bounds</a> defines an optional bounding box, used to suppress drawing when <a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a>
+<a href='#SkTextBlobBuilder_allocRun_bounds'>bounds</a> does not intersect <a href='SkSurface_Reference#Surface'>Surface</a> <a href='#SkTextBlobBuilder_allocRun_bounds'>bounds</a>. If <a href='#SkTextBlobBuilder_allocRun_bounds'>bounds</a> is nullptr, <a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a> <a href='#SkTextBlobBuilder_allocRun_bounds'>bounds</a>
+is computed from (<a href='#SkTextBlobBuilder_allocRun_x'>x</a>, <a href='#SkTextBlobBuilder_allocRun_y'>y</a>) and <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.glyphs <a href='SkPaint_Reference#Font_Metrics'>Paint Font Metrics</a>.
+
+### Parameters
+
+<table> <tr> <td><a name='SkTextBlobBuilder_allocRun_font'><code><strong>font</strong></code></a></td>
+ <td><a href='SkPaint_Reference#Paint'>Paint</a> used for this run</td>
+ </tr>
+ <tr> <td><a name='SkTextBlobBuilder_allocRun_count'><code><strong>count</strong></code></a></td>
+ <td>number of glyphs</td>
+ </tr>
+ <tr> <td><a name='SkTextBlobBuilder_allocRun_x'><code><strong>x</strong></code></a></td>
+ <td>horizontal offset within the blob</td>
+ </tr>
+ <tr> <td><a name='SkTextBlobBuilder_allocRun_y'><code><strong>y</strong></code></a></td>
+ <td>vertical offset within the blob</td>
+ </tr>
+ <tr> <td><a name='SkTextBlobBuilder_allocRun_bounds'><code><strong>bounds</strong></code></a></td>
+ <td>optional run bounding box</td>
+ </tr>
+</table>
+
+### Return Value
+
+writable glyph buffer
+
+### Example
+
+<div><fiddle-embed name="aedc51083fadd99451fe5180b8ff4c7d"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkTextBlobBuilder_allocRunPosH'>allocRunPosH</a> <a href='#SkTextBlobBuilder_allocRunPos'>allocRunPos</a>
+
+---
+
+<a name='SkTextBlobBuilder_allocRunPosH'></a>
+## allocRunPosH
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+const <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>& <a href='#SkTextBlobBuilder_allocRunPosH'>allocRunPosH</a>(const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& font, int count, <a href='undocumented#SkScalar'>SkScalar</a> y,
+ const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds = nullptr)
+</pre>
+
+Returns run with storage for <a href='undocumented#Glyph'>Glyphs</a> and positions along baseline. Caller must
+write <a href='#SkTextBlobBuilder_allocRunPosH_count'>count</a> <a href='undocumented#Glyph'>Glyphs</a> to <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.glyphs, and <a href='#SkTextBlobBuilder_allocRunPosH_count'>count</a> <a href='undocumented#Scalar'>Scalars</a> to <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.pos;
+before next call to FontBlobBuilder.
+
+<a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.utf8text, and <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.clusters should be ignored.
+
+<a href='undocumented#Glyph'>Glyphs</a> share <a href='SkPaint_Reference#Font_Metrics'>Paint Font Metrics</a> in <a href='#SkTextBlobBuilder_allocRunPosH_font'>font</a>, including: <a href='undocumented#Typeface'>Typeface</a>, <a href='SkPaint_Reference#Text_Size'>Paint Text Size</a>, <a href='SkPaint_Reference#Text_Scale_X'>Paint Text Scale X</a>,
+<a href='SkPaint_Reference#Text_Skew_X'>Paint Text Skew X</a>, <a href='SkPaint_Reference#Text_Align'>Paint Text Align</a>, <a href='SkPaint_Reference#Hinting'>Paint Hinting</a>, <a href='SkPaint_Reference#Anti_Alias'>Anti Alias</a>, <a href='SkPaint_Reference#Fake_Bold'>Paint Fake Bold</a>,
+<a href='SkPaint_Reference#Font_Embedded_Bitmaps'>Font Embedded Bitmaps</a>, <a href='SkPaint_Reference#Full_Hinting_Spacing'>Full Hinting Spacing</a>, <a href='SkPaint_Reference#LCD_Text'>LCD Text</a>, <a href='SkPaint_Reference#Linear_Text'>Linear Text</a>,
+and <a href='SkPaint_Reference#Subpixel_Text'>Subpixel Text</a>.
+
+<a href='undocumented#Glyph'>Glyphs</a> are positioned on a baseline at <a href='#SkTextBlobBuilder_allocRunPosH_y'>y</a>, using x-axis positions written by
+caller to <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.pos.
+
+<a href='#SkTextBlobBuilder_allocRunPosH_bounds'>bounds</a> defines an optional bounding box, used to suppress drawing when <a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a>
+<a href='#SkTextBlobBuilder_allocRunPosH_bounds'>bounds</a> does not intersect <a href='SkSurface_Reference#Surface'>Surface</a> <a href='#SkTextBlobBuilder_allocRunPosH_bounds'>bounds</a>. If <a href='#SkTextBlobBuilder_allocRunPosH_bounds'>bounds</a> is nullptr, <a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a> <a href='#SkTextBlobBuilder_allocRunPosH_bounds'>bounds</a>
+is computed from <a href='#SkTextBlobBuilder_allocRunPosH_y'>y</a>, <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.pos, and <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.glyphs <a href='SkPaint_Reference#Font_Metrics'>Paint Font Metrics</a>.
+
+### Parameters
+
+<table> <tr> <td><a name='SkTextBlobBuilder_allocRunPosH_font'><code><strong>font</strong></code></a></td>
+ <td><a href='SkPaint_Reference#Paint'>Paint</a> used for this run</td>
+ </tr>
+ <tr> <td><a name='SkTextBlobBuilder_allocRunPosH_count'><code><strong>count</strong></code></a></td>
+ <td>number of <a href='undocumented#Glyph'>Glyphs</a></td>
+ </tr>
+ <tr> <td><a name='SkTextBlobBuilder_allocRunPosH_y'><code><strong>y</strong></code></a></td>
+ <td>vertical offset within the blob</td>
+ </tr>
+ <tr> <td><a name='SkTextBlobBuilder_allocRunPosH_bounds'><code><strong>bounds</strong></code></a></td>
+ <td>optional run bounding box</td>
+ </tr>
+</table>
+
+### Return Value
+
+writable glyph buffer and x-axis position buffer
+
+### Example
+
+<div><fiddle-embed name="735c352787b24e490740dedd035987d2"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkTextBlobBuilder_allocRunPos'>allocRunPos</a> <a href='#SkTextBlobBuilder_allocRun'>allocRun</a>
+
+---
+
+<a name='SkTextBlobBuilder_allocRunPos'></a>
+## allocRunPos
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+const <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>& <a href='#SkTextBlobBuilder_allocRunPos'>allocRunPos</a>(const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& font, int count, const <a href='SkRect_Reference#SkRect'>SkRect</a>* bounds = nullptr)
+</pre>
+
+Returns run with storage for <a href='undocumented#Glyph'>Glyphs</a> and <a href='SkPoint_Reference#Point'>Point</a> positions. Caller must
+write <a href='#SkTextBlobBuilder_allocRunPos_count'>count</a> <a href='undocumented#Glyph'>Glyphs</a> to <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.glyphs, and <a href='#SkTextBlobBuilder_allocRunPos_count'>count</a> <a href='SkPoint_Reference#Point'>Points</a> to <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.pos;
+before next call to FontBlobBuilder.
+
+<a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.utf8text, and <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.clusters should be ignored.
+
+<a href='undocumented#Glyph'>Glyphs</a> share <a href='SkPaint_Reference#Font_Metrics'>Paint Font Metrics</a> in <a href='#SkTextBlobBuilder_allocRunPos_font'>font</a>, including: <a href='undocumented#Typeface'>Typeface</a>, <a href='SkPaint_Reference#Text_Size'>Paint Text Size</a>, <a href='SkPaint_Reference#Text_Scale_X'>Paint Text Scale X</a>,
+<a href='SkPaint_Reference#Text_Skew_X'>Paint Text Skew X</a>, <a href='SkPaint_Reference#Text_Align'>Paint Text Align</a>, <a href='SkPaint_Reference#Hinting'>Paint Hinting</a>, <a href='SkPaint_Reference#Anti_Alias'>Anti Alias</a>, <a href='SkPaint_Reference#Fake_Bold'>Paint Fake Bold</a>,
+<a href='SkPaint_Reference#Font_Embedded_Bitmaps'>Font Embedded Bitmaps</a>, <a href='SkPaint_Reference#Full_Hinting_Spacing'>Full Hinting Spacing</a>, <a href='SkPaint_Reference#LCD_Text'>LCD Text</a>, <a href='SkPaint_Reference#Linear_Text'>Linear Text</a>,
+and <a href='SkPaint_Reference#Subpixel_Text'>Subpixel Text</a>.
+
+<a href='undocumented#Glyph'>Glyphs</a> are positioned using <a href='SkPoint_Reference#Point'>Points</a> written by caller to <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.pos, using
+two <a href='undocumented#Scalar'>Scalar</a> values for each <a href='SkPoint_Reference#Point'>Point</a>.
+
+<a href='#SkTextBlobBuilder_allocRunPos_bounds'>bounds</a> defines an optional bounding box, used to suppress drawing when <a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a>
+<a href='#SkTextBlobBuilder_allocRunPos_bounds'>bounds</a> does not intersect <a href='SkSurface_Reference#Surface'>Surface</a> <a href='#SkTextBlobBuilder_allocRunPos_bounds'>bounds</a>. If <a href='#SkTextBlobBuilder_allocRunPos_bounds'>bounds</a> is nullptr, <a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a> <a href='#SkTextBlobBuilder_allocRunPos_bounds'>bounds</a>
+is computed from <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.pos, and <a href='#SkTextBlobBuilder_RunBuffer'>RunBuffer</a>.glyphs <a href='SkPaint_Reference#Font_Metrics'>Paint Font Metrics</a>.
+
+### Parameters
+
+<table> <tr> <td><a name='SkTextBlobBuilder_allocRunPos_font'><code><strong>font</strong></code></a></td>
+ <td><a href='SkPaint_Reference#Paint'>Paint</a> used for this run</td>
+ </tr>
+ <tr> <td><a name='SkTextBlobBuilder_allocRunPos_count'><code><strong>count</strong></code></a></td>
+ <td>number of <a href='undocumented#Glyph'>Glyphs</a></td>
+ </tr>
+ <tr> <td><a name='SkTextBlobBuilder_allocRunPos_bounds'><code><strong>bounds</strong></code></a></td>
+ <td>optional run bounding box</td>
+ </tr>
+</table>
+
+### Return Value
+
+writable glyph buffer and <a href='SkPoint_Reference#Point'>Point</a> buffer
+
+### Example
+
+<div><fiddle-embed name="f65c92ff5bfcc95ba58a2ba4d67f944f"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkTextBlobBuilder_allocRunPosH'>allocRunPosH</a> <a href='#SkTextBlobBuilder_allocRun'>allocRun</a>
+
+---
+
diff --git a/site/user/api/SkTextBlob_Reference.md b/site/user/api/SkTextBlob_Reference.md
new file mode 100644
index 0000000..282edd2
--- /dev/null
+++ b/site/user/api/SkTextBlob_Reference.md
@@ -0,0 +1,402 @@
+SkTextBlob Reference
+===
+
+# <a name='Text_Blob'>Text Blob</a>
+<a href='#Text_Blob'>Text Blob</a> holds one or more runs of text. Each run associates a string of <a href='undocumented#Glyph'>Glyphs</a>
+with a position and <a href='SkPaint_Reference#Paint'>Paint</a>. Each <a href='SkPaint_Reference#Paint'>Paint</a> contains attributes used
+to define the run text: <a href='undocumented#Typeface'>Typeface</a>, <a href='SkPaint_Reference#Text_Size'>Paint Text Size</a>, <a href='SkPaint_Reference#Text_Scale_X'>Paint Text Scale X</a>,
+<a href='SkPaint_Reference#Text_Skew_X'>Paint Text Skew X</a>, <a href='SkPaint_Reference#Text_Align'>Paint Text Align</a>, <a href='SkPaint_Reference#Hinting'>Paint Hinting</a>, <a href='SkPaint_Reference#Anti_Alias'>Anti Alias</a>, <a href='SkPaint_Reference#Fake_Bold'>Paint Fake Bold</a>,
+<a href='SkPaint_Reference#Font_Embedded_Bitmaps'>Font Embedded Bitmaps</a>, <a href='SkPaint_Reference#Full_Hinting_Spacing'>Full Hinting Spacing</a>, <a href='SkPaint_Reference#LCD_Text'>LCD Text</a>, <a href='SkPaint_Reference#Linear_Text'>Linear Text</a>,
+and <a href='SkPaint_Reference#Subpixel_Text'>Subpixel Text</a>.
+
+<a href='#Text_Blob'>Text Blob</a> runs of text use <a href='undocumented#ID'>Glyph ID</a> encoding; each run <a href='SkPaint_Reference#Paint'>Paint</a> must set
+<a href='SkPaint_Reference#Text_Encoding'>Paint Text Encoding</a> to <a href='SkPaint_Reference#SkPaint_kGlyphID_TextEncoding'>SkPaint::kGlyphID TextEncoding</a>.
+
+<a href='#Text_Blob'>Text Blob</a> is constructed with <a href='#SkTextBlob_MakeFromText'>SkTextBlob::MakeFromText</a> or <a href='SkTextBlobBuilder_Reference#Text_Blob_Builder'>Text Blob Builder</a>.
+Once created, <a href='#Text_Blob'>Text Blob</a> can not be modified.
+
+## Overview
+
+<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='#Constructor'>Constructors</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>functions that construct <a href='#SkTextBlob'>SkTextBlob</a></td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#Member_Function'>Functions</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>global and class member functions</td>
+ </tr>
+</table>
+
+
+## <a name='Constructor'>Constructor</a>
+
+
+SkTextBlob can be constructed or initialized by these functions, including C++ class constructors.
+<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='#SkTextBlob_Deserialize'>Deserialize</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Text_Blob'>Text Blob</a> from memory</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlob_MakeFromString'>MakeFromString</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Text_Blob'>Text Blob</a> with one run</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlob_MakeFromText'>MakeFromText</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Text_Blob'>Text Blob</a> with one run</td>
+ </tr>
+</table>
+
+## <a name='Member_Function'>Member Function</a>
+
+
+SkTextBlob member functions read and modify the structure properties.
+<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='#SkTextBlob_Deserialize'>Deserialize</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Text_Blob'>Text Blob</a> from memory</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlob_MakeFromString'>MakeFromString</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Text_Blob'>Text Blob</a> with one run</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlob_MakeFromText'>MakeFromText</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Text_Blob'>Text Blob</a> with one run</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlob_bounds'>bounds</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns conservative bounding box</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlob_serialize'>serialize</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>writes <a href='#Text_Blob'>Text Blob</a> to memory</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlob_uniqueID'>uniqueID</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns identifier for <a href='#Text_Blob'>Text Blob</a></td>
+ </tr>
+</table>
+
+# <a name='SkTextBlob'>Class SkTextBlob</a>
+
+## <a name='Constructor'>Constructor</a>
+
+
+SkTextBlob can be constructed or initialized by these functions, including C++ class constructors.
+<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='#SkTextBlob_Deserialize'>Deserialize</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Text_Blob'>Text Blob</a> from memory</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlob_MakeFromString'>MakeFromString</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Text_Blob'>Text Blob</a> with one run</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlob_MakeFromText'>MakeFromText</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Text_Blob'>Text Blob</a> with one run</td>
+ </tr>
+</table>
+
+## <a name='Member_Function'>Member_Function</a>
+
+
+SkTextBlob member functions read and modify the structure properties.
+<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='#SkTextBlob_Deserialize'>Deserialize</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Text_Blob'>Text Blob</a> from memory</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlob_MakeFromString'>MakeFromString</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Text_Blob'>Text Blob</a> with one run</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlob_MakeFromText'>MakeFromText</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>constructs <a href='#Text_Blob'>Text Blob</a> with one run</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlob_bounds'>bounds</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns conservative bounding box</td>
+ </tr>
+ <tr style='background-color: #f0f0f0; '>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlob_serialize'>serialize</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>writes <a href='#Text_Blob'>Text Blob</a> to memory</td>
+ </tr>
+ <tr>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkTextBlob_uniqueID'>uniqueID</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns identifier for <a href='#Text_Blob'>Text Blob</a></td>
+ </tr>
+</table>
+
+<a href='#SkTextBlob'>SkTextBlob</a> combines multiple text runs into an immutable container. Each text
+run consists of <a href='undocumented#Glyph'>Glyphs</a>, <a href='SkPaint_Reference#Paint'>Paint</a>, and position. Only parts of <a href='SkPaint_Reference#Paint'>Paint</a> related to
+fonts and text rendering are used by run.
+
+<a name='SkTextBlob_bounds'></a>
+## bounds
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+const <a href='SkRect_Reference#SkRect'>SkRect</a>& <a href='#SkTextBlob_bounds'>bounds</a>() const
+</pre>
+
+Returns conservative bounding box. Uses <a href='SkPaint_Reference#Paint'>Paint</a> associated with each glyph to
+determine glyph bounds, and unions all bounds. Returned bounds may be
+larger than the bounds of all <a href='undocumented#Glyph'>Glyphs</a> in runs.
+
+### Return Value
+
+conservative bounding box
+
+### Example
+
+<div><fiddle-embed name="52ba6c8a9483df8c373fdb49b32a5e19"></fiddle-embed></div>
+
+### See Also
+
+<a href='SkPath_Reference#SkPath_getBounds'>SkPath::getBounds</a>
+
+---
+
+<a name='SkTextBlob_uniqueID'></a>
+## uniqueID
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+uint32_t <a href='#SkTextBlob_uniqueID'>uniqueID</a>() const
+</pre>
+
+Returns a non-zero value unique among all text blobs.
+
+### Return Value
+
+identifier for <a href='#Text_Blob'>Text Blob</a>
+
+### Example
+
+<div><fiddle-embed name="5a29bcc0076950339c955149c34e1d46"></fiddle-embed></div>
+
+### See Also
+
+<a href='undocumented#SkRefCnt'>SkRefCnt</a>
+
+---
+
+<a name='SkTextBlob_MakeFromText'></a>
+## MakeFromText
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+static <a href='undocumented#sk_sp'>sk sp</a><<a href='#SkTextBlob'>SkTextBlob</a>> <a href='#SkTextBlob_MakeFromText'>MakeFromText</a>(
+ const void* text, size_t byteLength,
+ const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& paint)
+</pre>
+
+Creates <a href='#Text_Blob'>Text Blob</a> with a single run. <a href='#SkTextBlob_MakeFromText_text'>text</a> meaning depends on <a href='SkPaint_Reference#Text_Encoding'>Paint Text Encoding</a>;
+by default, <a href='#SkTextBlob_MakeFromText_text'>text</a> is encoded as UTF-8.
+
+<a href='#SkTextBlob_MakeFromText_paint'>paint</a> contains attributes used to define the run <a href='#SkTextBlob_MakeFromText_text'>text</a>: <a href='undocumented#Typeface'>Typeface</a>, <a href='SkPaint_Reference#Text_Size'>Paint Text Size</a>, <a href='SkPaint_Reference#Text_Scale_X'>Paint Text Scale X</a>,
+<a href='SkPaint_Reference#Text_Skew_X'>Paint Text Skew X</a>, <a href='SkPaint_Reference#Text_Align'>Paint Text Align</a>, <a href='SkPaint_Reference#Hinting'>Paint Hinting</a>, <a href='SkPaint_Reference#Anti_Alias'>Anti Alias</a>, <a href='SkPaint_Reference#Fake_Bold'>Paint Fake Bold</a>,
+<a href='SkPaint_Reference#Font_Embedded_Bitmaps'>Font Embedded Bitmaps</a>, <a href='SkPaint_Reference#Full_Hinting_Spacing'>Full Hinting Spacing</a>, <a href='SkPaint_Reference#LCD_Text'>LCD Text</a>, <a href='SkPaint_Reference#Linear_Text'>Linear Text</a>,
+and <a href='SkPaint_Reference#Subpixel_Text'>Subpixel Text</a>.
+
+### Parameters
+
+<table> <tr> <td><a name='SkTextBlob_MakeFromText_text'><code><strong>text</strong></code></a></td>
+ <td>character code points or <a href='undocumented#Glyph'>Glyphs</a> drawn</td>
+ </tr>
+ <tr> <td><a name='SkTextBlob_MakeFromText_byteLength'><code><strong>byteLength</strong></code></a></td>
+ <td>byte length of <a href='#SkTextBlob_MakeFromText_text'>text</a> array</td>
+ </tr>
+ <tr> <td><a name='SkTextBlob_MakeFromText_paint'><code><strong>paint</strong></code></a></td>
+ <td><a href='#SkTextBlob_MakeFromText_text'>text</a> size, typeface, <a href='#SkTextBlob_MakeFromText_text'>text</a> scale, and so on, used to draw</td>
+ </tr>
+</table>
+
+### Return Value
+
+<a href='#Text_Blob'>Text Blob</a> constructed from one run
+
+### Example
+
+<div><fiddle-embed name="74686684967a310dc06fe2915b0a4798"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkTextBlob_MakeFromString'>MakeFromString</a> TextBlobBuilder
+
+---
+
+<a name='SkTextBlob_MakeFromString'></a>
+## MakeFromString
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+static <a href='undocumented#sk_sp'>sk sp</a><<a href='#SkTextBlob'>SkTextBlob</a>> <a href='#SkTextBlob_MakeFromString'>MakeFromString</a>(const char* string, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>& paint)
+</pre>
+
+Creates <a href='#Text_Blob'>Text Blob</a> with a single run. <a href='#SkTextBlob_MakeFromString_string'>string</a> meaning depends on <a href='SkPaint_Reference#Text_Encoding'>Paint Text Encoding</a>;
+by default, <a href='#SkTextBlob_MakeFromString_string'>string</a> is encoded as UTF-8.
+
+<a href='#SkTextBlob_MakeFromString_paint'>paint</a> contains <a href='SkPaint_Reference#Font_Metrics'>Paint Font Metrics</a> used to define the run text: <a href='undocumented#Typeface'>Typeface</a>, <a href='SkPaint_Reference#Text_Size'>Paint Text Size</a>, <a href='SkPaint_Reference#Text_Scale_X'>Paint Text Scale X</a>,
+<a href='SkPaint_Reference#Text_Skew_X'>Paint Text Skew X</a>, <a href='SkPaint_Reference#Text_Align'>Paint Text Align</a>, <a href='SkPaint_Reference#Hinting'>Paint Hinting</a>, <a href='SkPaint_Reference#Anti_Alias'>Anti Alias</a>, <a href='SkPaint_Reference#Fake_Bold'>Paint Fake Bold</a>,
+<a href='SkPaint_Reference#Font_Embedded_Bitmaps'>Font Embedded Bitmaps</a>, <a href='SkPaint_Reference#Full_Hinting_Spacing'>Full Hinting Spacing</a>, <a href='SkPaint_Reference#LCD_Text'>LCD Text</a>, <a href='SkPaint_Reference#Linear_Text'>Linear Text</a>,
+and <a href='SkPaint_Reference#Subpixel_Text'>Subpixel Text</a>.
+
+### Parameters
+
+<table> <tr> <td><a name='SkTextBlob_MakeFromString_string'><code><strong>string</strong></code></a></td>
+ <td>character code points or <a href='undocumented#Glyph'>Glyphs</a> drawn</td>
+ </tr>
+ <tr> <td><a name='SkTextBlob_MakeFromString_paint'><code><strong>paint</strong></code></a></td>
+ <td>text size, typeface, text scale, and so on, used to draw</td>
+ </tr>
+</table>
+
+### Return Value
+
+<a href='#Text_Blob'>Text Blob</a> constructed from one run
+
+### Example
+
+<div><fiddle-embed name="705b26bb5e361369d897eeb511b6a184"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkTextBlob_MakeFromText'>MakeFromText</a> TextBlobBuilder
+
+---
+
+<a name='SkTextBlob_serialize'></a>
+## serialize
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+size_t <a href='#SkTextBlob_serialize'>serialize</a>(const <a href='undocumented#SkSerialProcs'>SkSerialProcs</a>& procs, void* memory, size_t memory_size) const
+</pre>
+
+Writes data to allow later reconstruction of <a href='#Text_Blob'>Text Blob</a>. <a href='#SkTextBlob_serialize_memory'>memory</a> points to storage
+to receive the encoded data, and memory_size describes the <a href='#SkTextBlob_serialize_size'>size</a> of storage.
+Returns bytes used if provided storage is large enough to hold all data;
+otherwise, returns zero.
+
+<a href='#SkTextBlob_serialize_procs'>procs</a>.fTypefaceProc permits supplying a custom function to encode <a href='undocumented#Typeface'>Typeface</a>.
+If <a href='#SkTextBlob_serialize_procs'>procs</a>.fTypefaceProc is nullptr, default encoding is used. <a href='#SkTextBlob_serialize_procs'>procs</a>.fTypefaceCtx
+may be used to provide user context to <a href='#SkTextBlob_serialize_procs'>procs</a>.fTypefaceProc; <a href='#SkTextBlob_serialize_procs'>procs</a>.fTypefaceProc
+is called with a pointer to <a href='undocumented#Typeface'>Typeface</a> and user context.
+
+### Parameters
+
+<table> <tr> <td><a name='SkTextBlob_serialize_procs'><code><strong>procs</strong></code></a></td>
+ <td>custom serial data encoders; may be nullptr</td>
+ </tr>
+ <tr> <td><a name='SkTextBlob_serialize_memory'><code><strong>memory</strong></code></a></td>
+ <td>storage for data</td>
+ </tr>
+ <tr> <td><a name='SkTextBlob_serialize_size'><code><strong>size</strong></code></a></td>
+ <td><a href='#SkTextBlob_serialize_size'>size</a> of storage</td>
+ </tr>
+</table>
+
+### Return Value
+
+bytes written, or zero if required storage is larger than memory_size
+
+### Example
+
+<div><fiddle-embed name="adf1f5687736356419c0114327ea6df9"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkTextBlob_Deserialize'>Deserialize</a> <a href='undocumented#SkSerialProcs'>SkSerialProcs</a>
+
+---
+
+<a name='SkTextBlob_serialize_2'></a>
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+<a href='undocumented#sk_sp'>sk sp</a><<a href='undocumented#SkData'>SkData</a>> <a href='#SkTextBlob_serialize'>serialize</a>(const <a href='undocumented#SkSerialProcs'>SkSerialProcs</a>& procs) const
+</pre>
+
+Returns storage containing <a href='undocumented#Data'>Data</a> describing <a href='#Text_Blob'>Text Blob</a>, using optional custom
+encoders.
+
+<a href='#SkTextBlob_serialize_2_procs'>procs</a>.fTypefaceProc permits supplying a custom function to encode <a href='undocumented#Typeface'>Typeface</a>.
+If <a href='#SkTextBlob_serialize_2_procs'>procs</a>.fTypefaceProc is nullptr, default encoding is used. <a href='#SkTextBlob_serialize_2_procs'>procs</a>.fTypefaceCtx
+may be used to provide user context to <a href='#SkTextBlob_serialize_2_procs'>procs</a>.fTypefaceProc; <a href='#SkTextBlob_serialize_2_procs'>procs</a>.fTypefaceProc
+is called with a pointer to <a href='undocumented#Typeface'>Typeface</a> and user context.
+
+### Parameters
+
+<table> <tr> <td><a name='SkTextBlob_serialize_2_procs'><code><strong>procs</strong></code></a></td>
+ <td>custom serial data encoders; may be nullptr</td>
+ </tr>
+</table>
+
+### Return Value
+
+storage containing serialized <a href='#Text_Blob'>Text Blob</a>
+
+### Example
+
+<div><fiddle-embed name="ae23af73f49735177dd5cc1040ed1255"></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkTextBlob_Deserialize'>Deserialize</a> <a href='undocumented#SkData'>SkData</a> <a href='undocumented#SkSerialProcs'>SkSerialProcs</a>
+
+---
+
+<a name='SkTextBlob_Deserialize'></a>
+## Deserialize
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+static <a href='undocumented#sk_sp'>sk sp</a><<a href='#SkTextBlob'>SkTextBlob</a>> <a href='#SkTextBlob_Deserialize'>Deserialize</a>(const void* data, size_t size, const <a href='undocumented#SkDeserialProcs'>SkDeserialProcs</a>& procs)
+</pre>
+
+Recreates <a href='#Text_Blob'>Text Blob</a> that was serialized into <a href='#SkTextBlob_Deserialize_data'>data</a>. Returns constructed <a href='#Text_Blob'>Text Blob</a>
+if successful; otherwise, returns nullptr. Fails if <a href='#SkTextBlob_Deserialize_size'>size</a> is smaller than
+required <a href='#SkTextBlob_Deserialize_data'>data</a> length, or if <a href='#SkTextBlob_Deserialize_data'>data</a> does not permit constructing valid <a href='#Text_Blob'>Text Blob</a>.
+
+<a href='#SkTextBlob_Deserialize_procs'>procs</a>.fTypefaceProc permits supplying a custom function to decode <a href='undocumented#Typeface'>Typeface</a>.
+If <a href='#SkTextBlob_Deserialize_procs'>procs</a>.fTypefaceProc is nullptr, default decoding is used. <a href='#SkTextBlob_Deserialize_procs'>procs</a>.fTypefaceCtx
+may be used to provide user context to <a href='#SkTextBlob_Deserialize_procs'>procs</a>.fTypefaceProc; <a href='#SkTextBlob_Deserialize_procs'>procs</a>.fTypefaceProc
+is called with a pointer to <a href='undocumented#Typeface'>Typeface</a> <a href='#SkTextBlob_Deserialize_data'>data</a>, <a href='#SkTextBlob_Deserialize_data'>data</a> byte length, and user context.
+
+### Parameters
+
+<table> <tr> <td><a name='SkTextBlob_Deserialize_data'><code><strong>data</strong></code></a></td>
+ <td>pointer for serial <a href='#SkTextBlob_Deserialize_data'>data</a></td>
+ </tr>
+ <tr> <td><a name='SkTextBlob_Deserialize_size'><code><strong>size</strong></code></a></td>
+ <td><a href='#SkTextBlob_Deserialize_size'>size</a> of <a href='#SkTextBlob_Deserialize_data'>data</a></td>
+ </tr>
+ <tr> <td><a name='SkTextBlob_Deserialize_procs'><code><strong>procs</strong></code></a></td>
+ <td>custom serial <a href='#SkTextBlob_Deserialize_data'>data</a> decoders; may be nullptr</td>
+ </tr>
+</table>
+
+### Return Value
+
+<a href='#Text_Blob'>Text Blob</a> constructed from <a href='#SkTextBlob_Deserialize_data'>data</a> in memory
+
+### Example
+
+<div><fiddle-embed name="b49322e0363bd2930f4c7b98a3ff250e"><div><a href='undocumented#Text'>Text</a> "" replaces "World!", but does not update its metrics.
+When drawn, "" uses the spacing computed for "World!".
+</div></fiddle-embed></div>
+
+### See Also
+
+<a href='#SkTextBlob_serialize'>serialize</a><sup><a href='#SkTextBlob_serialize_2'>[2]</a></sup> <a href='undocumented#SkDeserialProcs'>SkDeserialProcs</a>
+
+---
+
diff --git a/site/user/api/catalog.htm b/site/user/api/catalog.htm
index 5d93ed6..5443a1c 100644
--- a/site/user/api/catalog.htm
+++ b/site/user/api/catalog.htm
@@ -371,13 +371,27 @@
"name": "SkCanvas::MakeRasterDirectN32",
"stdout": "---\\n-x-\\n---\\n"
},
- "SkCanvas_SaveLayerRec_empty_constructor": {
+ "SkCanvas_SaveLayerRec_SaveLayerRec": {
"code": "void draw(SkCanvas* canvas) {\n SkCanvas::SaveLayerRec rec1;\n rec1.fSaveLayerFlags = SkCanvas::kPreserveLCDText_SaveLayerFlag;\n SkCanvas::SaveLayerRec rec2(nullptr, nullptr, SkCanvas::kPreserveLCDText_SaveLayerFlag);\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": "b5cea1eed80a0eb04ddbab3f36dff73f",
"file": "SkCanvas_Reference",
"name": "SkCanvas::SaveLayerRec::SaveLayerRec()",
"stdout": "rec1 == rec2\\n"
},
+ "SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star": {
+ "code": "void draw(SkCanvas* canvas) {\n SkCanvas::SaveLayerRec rec1;\n SkCanvas::SaveLayerRec rec2(nullptr, nullptr);\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": "027f920259888fc19591ea9a90d92873",
+ "file": "SkCanvas_Reference",
+ "name": "SkCanvas::SaveLayerRec::SaveLayerRec(const SkRect* bounds, const SkPaint* paint, SaveLayerFlags saveLayerFlags = 0)",
+ "stdout": "rec1 == rec2\\n"
+ },
+ "SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star": {
+ "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)",
+ "stdout": "rec1 == rec2\\n"
+ },
"SkCanvas_accessTopRasterHandle": {
"code": "static void DeleteCallback(void*, void* context) {\n delete (char*) context;\n}\nclass CustomAllocator : public SkRasterHandleAllocator {\npublic:\n bool allocHandle(const SkImageInfo& info, Rec* rec) override {\n char* context = new char[4]{'s', 'k', 'i', 'a'};\n rec->fReleaseProc = DeleteCallback;\n rec->fReleaseCtx = context;\n rec->fHandle = context;\n rec->fPixels = context;\n rec->fRowBytes = 4;\n return true;\n }\n void updateHandle(Handle handle, const SkMatrix& ctm, const SkIRect& clip_bounds) override {\n // apply canvas matrix and clip to custom environment\n }\n};\n\nvoid draw(SkCanvas* canvas) {\n const SkImageInfo info = SkImageInfo::MakeN32Premul(1, 1);\n std::unique_ptr<SkCanvas> c2 =\n SkRasterHandleAllocator::MakeCanvas(std::unique_ptr<CustomAllocator>(\n new CustomAllocator()), info);\n char* context = (char*) c2->accessTopRasterHandle();\n SkDebugf(\"context = %.4s\\n\", context);\n}\n",
"hash": "4486d0c0b22ad2931db130f42da4c80c",
@@ -392,20 +406,6 @@
"name": "SkCanvas::SkCanvas(const SkBitmap& bitmap, const SkSurfaceProps& props)",
"stdout": "-----\\n---x-\\n---x-\\n---x-\\n---x-\\n---x-\\n---x-\\n-----\\n---x-\\n---x-\\n-----\\n"
},
- "SkCanvas_const_SkRect_star_const_SkPaint_star": {
- "code": "void draw(SkCanvas* canvas) {\n SkCanvas::SaveLayerRec rec1;\n SkCanvas::SaveLayerRec rec2(nullptr, nullptr);\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": "027f920259888fc19591ea9a90d92873",
- "file": "SkCanvas_Reference",
- "name": "SkCanvas::SaveLayerRec::SaveLayerRec(const SkRect* bounds, const SkPaint* paint, SaveLayerFlags saveLayerFlags = 0)",
- "stdout": "rec1 == rec2\\n"
- },
- "SkCanvas_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star": {
- "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)",
- "stdout": "rec1 == rec2\\n"
- },
"SkCanvas_copy_const_SkBitmap": {
"code": "void draw(SkCanvas* ) {\n SkBitmap bitmap;\n // create a bitmap 5 wide and 11 high\n bitmap.allocPixels(SkImageInfo::MakeN32Premul(5, 11));\n SkCanvas canvas(bitmap);\n canvas.clear(SK_ColorWHITE); // white is Unpremultiplied, in ARGB order\n SkPixmap pixmap; // provides guaranteed access to the drawn pixels\n if (!canvas.peekPixels(&pixmap)) {\n SkDebugf(\"peekPixels should never fail.\\n\");\n }\n const SkPMColor* pixels = pixmap.addr32(); // points to top-left of bitmap\n SkPMColor pmWhite = pixels[0]; // the Premultiplied format may vary\n SkPaint paint; // by default, draws black, 12 point text\n canvas.drawString(\"!\", 1, 10, paint); // 1 char at baseline (1, 10)\n for (int y = 0; y < bitmap.height(); ++y) {\n for (int x = 0; x < bitmap.width(); ++x) {\n SkDebugf(\"%c\", *pixels++ == pmWhite ? '-' : 'x');\n }\n SkDebugf(\"\\n\");\n }\n}",
"hash": "dd92db963af190e849894038f39b598a",
@@ -2002,6 +2002,13 @@
"name": "SkPath::IsQuadDegenerate",
"stdout": "quad (100,100), (100.00001,100.00001), (100.00002,100.00002) is degenerate, nearly\\nquad (1100,1100), (1100,1100), (1100,1100) is degenerate, nearly\\nquad (100,100), (100.00001,100.00001), (100.00002,100.00002) is not degenerate, exactly\\nquad (1100,1100), (1100,1100), (1100,1100) is degenerate, exactly\\n"
},
+ "SkPath_Iter_Iter": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPath::Iter iter;\n SkPoint points[4];\n SkDebugf(\"iter is \" \"%s\" \"done\\n\", SkPath::kDone_Verb == iter.next(points) ? \"\" : \"not \");\n SkPath path;\n iter.setPath(path, false);\n SkDebugf(\"iter is \" \"%s\" \"done\\n\", SkPath::kDone_Verb == iter.next(points) ? \"\" : \"not \");\n}\n",
+ "hash": "01648775cb9b354b2f1836dad82a25ab",
+ "file": "SkPath_Reference",
+ "name": "SkPath::Iter::Iter()",
+ "stdout": "iter is done\\niter is done\\n"
+ },
"SkPath_Iter_conicWeight": {
"code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.conicTo(1, 2, 3, 4, .5f);\n SkPath::Iter iter(path, false);\n SkPoint p[4];\n SkDebugf(\"first verb is \" \"%s\" \"move\\n\", SkPath::kMove_Verb == iter.next(p) ? \"\" : \"not \");\n SkDebugf(\"next verb is \" \"%s\" \"conic\\n\", SkPath::kConic_Verb == iter.next(p) ? \"\" : \"not \");\n SkDebugf(\"conic points: {%g,%g}, {%g,%g}, {%g,%g}\\n\", p[0].fX, p[0].fY, p[1].fX, p[1].fY,\n p[2].fX, p[2].fY);\n SkDebugf(\"conic weight: %g\\n\", iter.conicWeight());\n}\n",
"hash": "7cdea37741d50f0594c6244eb07fd175",
@@ -2009,12 +2016,12 @@
"name": "SkPath::Iter::conicWeight",
"stdout": "first verb is move\\nnext verb is conic\\nconic points: {0,0}, {1,2}, {3,4}\\nconic weight: 0.5\\n"
},
- "SkPath_Iter_empty_constructor": {
- "code": "void draw(SkCanvas* canvas) {\n SkPath::Iter iter;\n SkPoint points[4];\n SkDebugf(\"iter is \" \"%s\" \"done\\n\", SkPath::kDone_Verb == iter.next(points) ? \"\" : \"not \");\n SkPath path;\n iter.setPath(path, false);\n SkDebugf(\"iter is \" \"%s\" \"done\\n\", SkPath::kDone_Verb == iter.next(points) ? \"\" : \"not \");\n}\n",
- "hash": "01648775cb9b354b2f1836dad82a25ab",
+ "SkPath_Iter_const_SkPath": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, SkPath::Iter& iter) -> void {\n SkDebugf(\"%s:\\n\", prefix);\n const char* verbStr[] = { \"Move\", \"Line\", \"Quad\", \"Conic\", \"Cubic\", \"Close\", \"Done\" };\n const int pointCount[] = { 1 , 2 , 3 , 3 , 4 , 1 , 0 };\n SkPath::Verb verb;\n do {\n SkPoint points[4];\n verb = iter.next(points);\n SkDebugf(\"k%s_Verb \", verbStr[(int) verb]);\n for (int i = 0; i < pointCount[(int) verb]; ++i) {\n SkDebugf(\"{%g, %g}, \", points[i].fX, points[i].fY);\n }\n if (SkPath::kConic_Verb == verb) {\n SkDebugf(\"weight = %g\", iter.conicWeight());\n }\n SkDebugf(\"\\n\");\n } while (SkPath::kDone_Verb != verb);\n SkDebugf(\"\\n\");\n };\n SkPath path;\n path.quadTo(10, 20, 30, 40);\n SkPath::Iter openIter(path, false);\n debugster(\"open\", openIter);\n SkPath::Iter closedIter(path, true);\n debugster(\"closed\", closedIter);\n}\n",
+ "hash": "13044dbf68885c0f15322c0633b633a3",
"file": "SkPath_Reference",
- "name": "SkPath::Iter::Iter()",
- "stdout": "iter is done\\niter is done\\n"
+ "name": "SkPath::Iter::Iter(const SkPath& path, bool forceClose)",
+ "stdout": "open:\\nkMove_Verb {0, 0}, \\nkQuad_Verb {0, 0}, {10, 20}, {30, 40}, \\nkDone_Verb \\n\\nclosed:\\nkMove_Verb {0, 0}, \\nkQuad_Verb {0, 0}, {10, 20}, {30, 40}, \\nkLine_Verb {30, 40}, {0, 0}, \\nkClose_Verb {0, 0}, \\nkDone_Verb \\n\\n"
},
"SkPath_Iter_isCloseLine": {
"code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.moveTo(6, 7);\n path.conicTo(1, 2, 3, 4, .5f);\n path.close();\n SkPath::Iter iter(path, false);\n SkPoint p[4];\n SkDebugf(\"1st verb is \" \"%s\" \"move\\n\", SkPath::kMove_Verb == iter.next(p) ? \"\" : \"not \");\n SkDebugf(\"moveTo point: {%g,%g}\\n\", p[0].fX, p[0].fY);\n SkDebugf(\"2nd verb is \" \"%s\" \"conic\\n\", SkPath::kConic_Verb == iter.next(p) ? \"\" : \"not \");\n SkDebugf(\"3rd verb is \" \"%s\" \"line\\n\", SkPath::kLine_Verb == iter.next(p) ? \"\" : \"not \");\n SkDebugf(\"line points: {%g,%g}, {%g,%g}\\n\", p[0].fX, p[0].fY, p[1].fX, p[1].fY);\n SkDebugf(\"line \" \"%s\" \"generated by close\\n\", iter.isCloseLine() ? \"\" : \"not \");\n SkDebugf(\"4th verb is \" \"%s\" \"close\\n\", SkPath::kClose_Verb == iter.next(p) ? \"\" : \"not \");\n}\n",
@@ -2100,13 +2107,6 @@
"name": "SkPath::computeTightBounds",
"stdout": "empty bounds = 0, 0, 0, 0\\ncircle bounds = 25, 20, 75, 70\\nrotated circle bounds = 25, 20, 75, 70\\n"
},
- "SkPath_const_SkPath": {
- "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, SkPath::Iter& iter) -> void {\n SkDebugf(\"%s:\\n\", prefix);\n const char* verbStr[] = { \"Move\", \"Line\", \"Quad\", \"Conic\", \"Cubic\", \"Close\", \"Done\" };\n const int pointCount[] = { 1 , 2 , 3 , 3 , 4 , 1 , 0 };\n SkPath::Verb verb;\n do {\n SkPoint points[4];\n verb = iter.next(points);\n SkDebugf(\"k%s_Verb \", verbStr[(int) verb]);\n for (int i = 0; i < pointCount[(int) verb]; ++i) {\n SkDebugf(\"{%g, %g}, \", points[i].fX, points[i].fY);\n }\n if (SkPath::kConic_Verb == verb) {\n SkDebugf(\"weight = %g\", iter.conicWeight());\n }\n SkDebugf(\"\\n\");\n } while (SkPath::kDone_Verb != verb);\n SkDebugf(\"\\n\");\n };\n SkPath path;\n path.quadTo(10, 20, 30, 40);\n SkPath::Iter openIter(path, false);\n debugster(\"open\", openIter);\n SkPath::Iter closedIter(path, true);\n debugster(\"closed\", closedIter);\n}\n",
- "hash": "13044dbf68885c0f15322c0633b633a3",
- "file": "SkPath_Reference",
- "name": "SkPath::Iter::Iter(const SkPath& path, bool forceClose)",
- "stdout": "open:\\nkMove_Verb {0, 0}, \\nkQuad_Verb {0, 0}, {10, 20}, {30, 40}, \\nkDone_Verb \\n\\nclosed:\\nkMove_Verb {0, 0}, \\nkQuad_Verb {0, 0}, {10, 20}, {30, 40}, \\nkLine_Verb {30, 40}, {0, 0}, \\nkClose_Verb {0, 0}, \\nkDone_Verb \\n\\n"
- },
"SkPath_copy_const_SkPath": {
"code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.lineTo(20, 20);\n SkPath path2(path);\n path2.close();\n SkDebugf(\"path verbs: %d\\n\", path.countVerbs());\n SkDebugf(\"path2 verbs: %d\\n\", path2.countVerbs());\n path.reset();\n SkDebugf(\"after reset\\n\" \"path verbs: %d\\n\", path.countVerbs());\n SkDebugf(\"path2 verbs: %d\\n\", path2.countVerbs());\n}",
"hash": "647312aacd946c8a6eabaca797140432",
@@ -2311,11 +2311,11 @@
"stdout": "volatile by default is false\\n"
},
"SkPath_notequal_operator": {
- "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& a, const SkPath& b) -> void {\n SkDebugf(\"%s one %c= two\\n\", prefix, a != b ? '!' : '=');\n };\n SkPath one;\n SkPath two;\n debugster(\"empty\", one, two);\n one.addRect({10, 20, 30, 40});\n two.addRect({10, 20, 30, 40});\n debugster(\"addRect\", one, two);\n one.setConvexity(SkPath::kConcave_Convexity);\n debugster(\"setConvexity\", one, two);\n SkDebugf(\"convexity %c=\\n\", one.getConvexity() == two.getConvexity() ? '=' : '!');\n}\n",
- "hash": "0c6870ba1cea85ce6da5abd489c23d83",
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& a, const SkPath& b) -> void {\n SkDebugf(\"%s one %c= two\\n\", prefix, a != b ? '!' : '=');\n };\n SkPath one;\n SkPath two;\n debugster(\"empty\", one, two);\n one.addRect({10, 20, 30, 40});\n two.addRect({10, 20, 30, 40});\n debugster(\"add rect\", one, two);\n one.setConvexity(SkPath::kConcave_Convexity);\n debugster(\"setConvexity\", one, two);\n SkDebugf(\"convexity %c=\\n\", one.getConvexity() == two.getConvexity() ? '=' : '!');\n}\n",
+ "hash": "bbbda1cc818d96c9c0d2a06c0c48902b",
"file": "SkPath_Reference",
"name": "SkPath::operator!=(const SkPath& a, const SkPath& b)",
- "stdout": "empty one == two\\naddRect one == two\\nsetConvexity one == two\\nconvexity !=\\n"
+ "stdout": "empty one == two\\nadd rect one == two\\nsetConvexity one == two\\nconvexity !=\\n"
},
"SkPath_readFromMemory": {
"code": "void draw(SkCanvas* canvas) {\n SkPath path, copy;\n path.lineTo(6.f / 7, 2.f / 3);\n size_t size = path.writeToMemory(nullptr);\n SkTDArray<char> storage;\n storage.setCount(size);\n path.writeToMemory(storage.begin());\n size_t wrongSize = size - 4;\n size_t bytesRead = copy.readFromMemory(storage.begin(), wrongSize);\n SkDebugf(\"length = %u; returned by readFromMemory = %u\\n\", wrongSize, bytesRead);\n size_t largerSize = size + 4;\n bytesRead = copy.readFromMemory(storage.begin(), largerSize);\n SkDebugf(\"length = %u; returned by readFromMemory = %u\\n\", largerSize, bytesRead);\n}\n",
@@ -3241,6 +3241,258 @@
"name": "SkRect::y()",
"stdout": "unsorted.fTop: 25 unsorted.y(): 25\\nsorted.fTop: 5 sorted.y(): 5\\n"
},
+ "SkRegion_Cliperator_const_SkRegion_const_SkIRect": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region;\n region.setRect({1, 2, 3, 4});\n SkRegion::Cliperator clipper(region, {0, 0, 2, 3});\n auto r = clipper.rect();\n SkDebugf(\"rect={%d,%d,%d,%d}\\n\", r.fLeft, r.fTop, r.fRight, r.fBottom);\n}",
+ "hash": "3831fb6006a7e0ad5d140c266c22be78",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::Cliperator::Cliperator(const SkRegion& region, const SkIRect& clip)",
+ "stdout": "rect={1,2,2,3}\\n"
+ },
+ "SkRegion_Cliperator_done": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, SkRegion& region) -> void {\n SkRegion::Cliperator clipper(region, {0, 0, 5, 5});\n SkDebugf(\"%14s done=%s\\n\", label, clipper.done() ? \"true\" : \"false\"); \n };\n SkRegion region;\n debugster(\"empty region\", region);\n region.setRect({1, 2, 3, 4});\n debugster(\"after add rect\", region);\n}",
+ "hash": "6cca7b96836266800d852664a1366453",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::Cliperator::done()",
+ "stdout": "empty region done=true\\nafter add rect done=false\\n"
+ },
+ "SkRegion_Cliperator_next": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region;\n SkIRect rects[] = {{1, 2, 3, 4}, {5, 6, 7, 8}};\n region.setRects(rects, SK_ARRAY_COUNT(rects));\n SkRegion::Cliperator clipper(region, {0, 3, 8, 7});\n do {\n auto r2 = clipper.rect();\n SkDebugf(\"rect={%d,%d,%d,%d}\\n\", r2.fLeft, r2.fTop, r2.fRight, r2.fBottom);\n clipper.next();\n } while (!clipper.done());\n}",
+ "hash": "3bbcc7eec19c808a8167bbcc987199f8",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::Cliperator::next()",
+ "stdout": "rect={1,3,3,4}\\nrect={5,6,7,7}\\n"
+ },
+ "SkRegion_Cliperator_rect": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, SkRegion& region) -> void {\n SkRegion::Cliperator clipper(region, {0, 0, 5, 3});\n auto r = clipper.rect();\n SkDebugf(\"%14s rect={%d,%d,%d,%d}\\n\", label, r.fLeft, r.fTop, r.fRight, r.fBottom); \n };\n SkRegion region;\n debugster(\"empty region\", region);\n region.setRect({1, 2, 3, 4});\n debugster(\"after set rect\", region);\n}",
+ "hash": "05791751f00b4c2426093fa143b43bc7",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::Cliperator::rect()",
+ "stdout": "empty region rect={1094713344,1065353216,0,-1}\\nafter set rect rect={1,2,3,3}\\n\\n"
+ },
+ "SkRegion_Iterator_Iterator": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion::Iterator iter;\n SkRegion region;\n region.setRect({1, 2, 3, 4});\n iter.reset(region);\n auto r = iter.rect();\n SkDebugf(\"rect={%d,%d,%d,%d}\\n\", r.fLeft, r.fTop, r.fRight, r.fBottom);\n}",
+ "hash": "a2db43ee3cbf6893e9b23927fb44298a",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::Iterator::Iterator()",
+ "stdout": "rect={1,2,3,4}\\n"
+ },
+ "SkRegion_Iterator_copy_const_SkRegion": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region;\n region.setRect({1, 2, 3, 4});\n SkRegion::Iterator iter(region);\n auto r = iter.rect();\n SkDebugf(\"rect={%d,%d,%d,%d}\\n\", r.fLeft, r.fTop, r.fRight, r.fBottom);\n}",
+ "hash": "e317ceca48a6a7504219af58f35d2c95",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::Iterator::Iterator(const SkRegion& region)",
+ "stdout": "rect={1,2,3,4}\\n"
+ },
+ "SkRegion_Iterator_done": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region;\n SkRegion::Iterator iter(region);\n SkDebugf(\"done=%s\\n\", iter.done() ? \"true\" : \"false\"); \n region.setRect({1, 2, 3, 4});\n iter.rewind();\n SkDebugf(\"done=%s\\n\", iter.done() ? \"true\" : \"false\");\n}",
+ "hash": "814efa7d7f4ae52dfc861a937c1b5c25",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::Iterator::done()",
+ "stdout": "done=true\\ndone=false\\n"
+ },
+ "SkRegion_Iterator_next": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region;\n SkIRect rects[] = {{1, 2, 3, 4}, {5, 6, 7, 8}};\n region.setRects(rects, SK_ARRAY_COUNT(rects));\n SkRegion::Iterator iter(region);\n do {\n auto r2 = iter.rect();\n SkDebugf(\"rect={%d,%d,%d,%d}\\n\", r2.fLeft, r2.fTop, r2.fRight, r2.fBottom);\n iter.next();\n } while (!iter.done());\n}",
+ "hash": "771236c2eadfc2fcd02a3e61a0875d39",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::Iterator::next()",
+ "stdout": "rect={1,2,3,4}\\nrect={5,6,7,8}\\n"
+ },
+ "SkRegion_Iterator_rect": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region;\n SkRegion::Iterator iter(region);\n auto r1 = iter.rect();\n SkDebugf(\"rect={%d,%d,%d,%d}\\n\", r1.fLeft, r1.fTop, r1.fRight, r1.fBottom); \n region.setRect({1, 2, 3, 4});\n iter.rewind();\n auto r2 = iter.rect();\n SkDebugf(\"rect={%d,%d,%d,%d}\\n\", r2.fLeft, r2.fTop, r2.fRight, r2.fBottom);\n}",
+ "hash": "0e7c58ab5d3bcfb36b1f8464cf6c7d89",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::Iterator::rect()",
+ "stdout": "rect={0,0,0,0}\\nrect={1,2,3,4}\\n\\n"
+ },
+ "SkRegion_Iterator_reset": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, SkRegion::Iterator& iter) -> void {\n SkDebugf(\"%14s: done=%s\\n\", label, iter.done() ? \"true\" : \"false\");\n };\n SkRegion region;\n SkRegion::Iterator iter(region);\n debugster(\"empty region\", iter);\n region.setRect({1, 2, 3, 4});\n debugster(\"after set rect\", iter);\n iter.reset(region);\n debugster(\"after reset\", iter);\n}",
+ "hash": "d153f87bd518a4ab947b7e407ea1db79",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::Iterator::reset()",
+ "stdout": "empty region: done=true\\nafter set rect: done=true\\n after reset: done=false\\n"
+ },
+ "SkRegion_Iterator_rewind": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, SkRegion::Iterator& iter, bool addRewind) -> void {\n if (addRewind) {\n bool success = iter.rewind();\n SkDebugf(\"%14s rewind success=%s\\n\", label, success ? \"true\" : \"false\");\n }\n auto r = iter.rect();\n SkDebugf(\"%14s rect={%d,%d,%d,%d}\\n\", label, r.fLeft, r.fTop, r.fRight, r.fBottom);\n };\n SkRegion::Iterator iter;\n debugster(\"empty iter\", iter, true);\n SkRegion region;\n iter.reset(region);\n debugster(\"empty region\", iter, true);\n region.setRect({1, 2, 3, 4});\n iter.reset(region);\n debugster(\"after set rect\", iter, false);\n debugster(\"after rewind\", iter, true);\n}",
+ "hash": "32d51e959d6cc720a74ec4822511e2cd",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::Iterator::rewind()",
+ "stdout": "empty iter rewind success=false\\nempty iter rect={0,0,0,0}\\nempty region rewind success=true\\nempty region rect={0,0,0,0}\\nafter set rect rect={1,2,3,4}\\nafter rewind rewind success=true\\nafter rewind rect={1,2,3,4}\\n\\n"
+ },
+ "SkRegion_Iterator_rgn": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region;\n SkIRect rects[] = {{1, 2, 3, 4}, {3, 4, 5, 6}};\n region.setRects(rects, SK_ARRAY_COUNT(rects));\n SkRegion::Iterator iter(region);\n auto r = iter.rect();\n SkDebugf(\"rect={%d,%d,%d,%d}\\n\", r.fLeft, r.fTop, r.fRight, r.fBottom);\n auto b = iter.rgn()->getBounds();\n SkDebugf(\"bounds={%d,%d,%d,%d}\\n\", b.fLeft, b.fTop, b.fRight, b.fBottom);\n}",
+ "hash": "bbc3c454a21186e2a16e843a5b061c44",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::Iterator::rgn()",
+ "stdout": "rect={1,2,3,4}\\nbounds={1,2,5,6}\\n"
+ },
+ "SkRegion_Spanerator_const_SkRegion_int_int_int": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region;\n region.setRect({1, 2, 3, 4});\n SkRegion::Spanerator spanner(region, 3, 2, 4);\n int left, right;\n bool result = spanner.next(&left, &right);\n SkDebugf(\"result=%s left=%d right=%d\\n\", result ? \"true\" : \"false\", left, right);\n}",
+ "hash": "3073b3f8ea7252871b6156ff674dc385",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::Spanerator::Spanerator(const SkRegion& region, int y, int left, int right)",
+ "stdout": "result=true left=2 right=3\\n"
+ },
+ "SkRegion_Spanerator_next": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, SkRegion& region) -> void {\n SkRegion::Spanerator spanner(region, 3, 2, 4);\n int left, right;\n bool result = spanner.next(&left, &right);\n SkDebugf(\"%14s: result=%s\", label, result ? \"true\" : \"false\");\n if (result) SkDebugf(\" left=%d right=%d\", left, right);\n SkDebugf(\"\\n\");\n };\n SkRegion region;\n debugster(\"empty region\", region);\n region.setRect({1, 2, 3, 4});\n debugster(\"after set rect\", region);\n}",
+ "hash": "03d02180fee5f64ec4a3347e118fb2ec",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::Spanerator::next()",
+ "stdout": "empty region: result=false\\nafter set rect: result=true left=2 right=3\\n"
+ },
+ "SkRegion_computeRegionComplexity": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, const SkRegion& region) -> void {\n SkDebugf(\"%s: region complexity %d\\n\", label, region.computeRegionComplexity());\n };\n SkRegion region;\n debugster(\"initial\", region);\n region.setRect({1, 2, 3, 4});\n debugster(\"set rect\", region);\n region.op({2, 3, 4, 5}, SkRegion::kUnion_Op);\n debugster(\"op rect\", region);\n}",
+ "hash": "c4984fefdcecdd1090be160f80939d87",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::computeRegionComplexity",
+ "stdout": "initial: region complexity 0\\nset rect: region complexity 1\\nop rect: region complexity 3\\n"
+ },
+ "SkRegion_copy_const_SkIRect": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region({1, 2, 3, 4});\n SkRegion region2;\n region2.setRect({1, 2, 3, 4});\n SkDebugf(\"region %c= region2\\n\", region == region2 ? '=' : '!');\n}",
+ "hash": "5253910233f7961c30b4c18ab911e917",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::SkRegion(const SkIRect& rect)",
+ "stdout": "region == region2\\n"
+ },
+ "SkRegion_copy_const_SkRegion": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, SkRegion& region) -> void {\n auto r = region.getBounds();\n SkDebugf(\"%14s: {%d,%d,%d,%d}\\n\", label, r.fLeft, r.fTop, r.fRight, r.fBottom);\n };\n SkRegion region({1, 2, 3, 4});\n SkRegion region2(region);\n debugster(\"region bounds\", region);\n debugster(\"region2 bounds\", region2);\n region.setEmpty();\n SkDebugf(\" after region set empty:\\n\");\n debugster(\"region bounds\", region);\n debugster(\"region2 bounds\", region2);\n}",
+ "hash": "3daa83fca809b9ec6560d2ef9e2da5e6",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::SkRegion(const SkRegion& region)",
+ "stdout": "region bounds: {1,2,3,4}\\nregion2 bounds: {1,2,3,4}\\n after region set empty:\\n region bounds: {0,0,0,0}\\nregion2 bounds: {1,2,3,4}\\n"
+ },
+ "SkRegion_copy_operator": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, SkRegion& region) -> void {\n auto r = region.getBounds();\n SkDebugf(\"%14s: {%d,%d,%d,%d}\\n\", label, r.fLeft, r.fTop, r.fRight, r.fBottom);\n };\n SkRegion region1({1, 2, 3, 4});\n SkRegion region2 = region1;\n debugster(\"region1 bounds\", region1);\n debugster(\"region2 bounds\", region2);\n}",
+ "hash": "e8513f6394c24efaa301d41921c5241a",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::operator=(const SkRegion& region)",
+ "stdout": "region1 bounds: {1,2,3,4}\\nregion2 bounds: {1,2,3,4}\\n"
+ },
+ "SkRegion_destructor": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion* region = new SkRegion({1, 2, 3, 4});\n SkRegion region2(*region);\n delete region;\n auto r = region2.getBounds();\n SkDebugf(\"region2 bounds: {%d,%d,%d,%d}\\n\", r.fLeft, r.fTop, r.fRight, r.fBottom);\n}",
+ "hash": "985ff654a6b67288d322c748132a088e",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::~SkRegion()",
+ "stdout": "region2 bounds: {1,2,3,4}\\n"
+ },
+ "SkRegion_empty_constructor": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region;\n SkIRect r = region.getBounds();\n SkDebugf(\"region bounds: {%d, %d, %d, %d}\\n\", r.fLeft, r.fTop, r.fRight, r.fBottom);\n}",
+ "hash": "4549dcda3e0f9a41b3daee0ed37deca8",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::SkRegion()",
+ "stdout": "region bounds: {0, 0, 0, 0}\\n"
+ },
+ "SkRegion_equal1_operator": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkRegion& a, const SkRegion& b) -> void {\n SkDebugf(\"%s one %c= two\\n\", prefix, a == b ? '=' : '!');\n };\n SkRegion one;\n SkRegion two;\n debugster(\"empty\", one, two);\n one.setRect({1, 2, 3, 4});\n debugster(\"set rect\", one, two);\n one.setEmpty();\n debugster(\"set empty\", one, two);\n}",
+ "hash": "d7f4fdc8bc63ca8410ed166ecef0aef3",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::operator==(const SkRegion& other)_const",
+ "stdout": "empty one == two\\nset rect one != two\\nset empty one == two\\n"
+ },
+ "SkRegion_getBounds": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region({1, 2, 3, 4});\n region.op({2, 3, 4, 5}, SkRegion::kUnion_Op);\n auto r = region.getBounds();\n SkDebugf(\"bounds: {%d,%d,%d,%d}\\n\", r.fLeft, r.fTop, r.fRight, r.fBottom);\n}",
+ "hash": "651632582d385d2531e7aa551c31e331",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::getBounds",
+ "stdout": "bounds: {1,2,4,5}\\n"
+ },
+ "SkRegion_isComplex": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, const SkRegion& region) -> void {\n SkDebugf(\"%s: region is %s\" \"complex\\n\", label, region.isComplex() ? \"\" : \"not \");\n };\n SkRegion region;\n debugster(\"initial\", region);\n region.setRect({1, 2, 3, 4});\n debugster(\"set rect\", region);\n region.op({2, 3, 4, 5}, SkRegion::kUnion_Op);\n debugster(\"op rect\", region);\n}",
+ "hash": "1fbd76d75ca2d280e81856311de4e54e",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::isComplex",
+ "stdout": "initial: region is not complex\\nset rect: region is not complex\\nop rect: region is complex\\n"
+ },
+ "SkRegion_isEmpty": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, SkRegion& region) -> void {\n SkDebugf(\"%14s: region is %s\" \"empty\\n\", label, region.isEmpty() ? \"\" : \"not \");\n };\n SkRegion region;\n debugster(\"initial\", region);\n region.setRect({1, 2, 3, 4});\n debugster(\"set rect\", region);\n region.setEmpty();\n debugster(\"set empty\", region);\n}",
+ "hash": "10ef0de39e8553dd97cf8668ce185070",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::isEmpty",
+ "stdout": "initial: region is empty\\n set rect: region is not empty\\n set empty: region is empty\\n"
+ },
+ "SkRegion_isRect": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, const SkRegion& region) -> void {\n SkDebugf(\"%s: region is %s\" \"rect\\n\", label, region.isRect() ? \"\" : \"not \");\n };\n SkRegion region;\n debugster(\"initial\", region);\n region.setRect({1, 2, 3, 4});\n debugster(\"set rect\", region);\n region.setEmpty();\n debugster(\"set empty\", region);\n}",
+ "hash": "b6adbdddf7fe45a1098121c4e5fd57ea",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::isRect",
+ "stdout": "initial: region is not rect\\nset rect: region is rect\\nset empty: region is not rect\\n"
+ },
+ "SkRegion_notequal1_operator": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkRegion& a, const SkRegion& b) -> void {\n SkDebugf(\"%s one %c= two\\n\", prefix, a != b ? '!' : '=');\n };\n SkRegion one;\n SkRegion two;\n debugster(\"empty\", one, two);\n one.setRect({1, 2, 3, 4});\n two.setRect({1, 2, 3, 3});\n debugster(\"set rect\", one, two);\n two.op({1, 3, 3, 4}, SkRegion::kUnion_Op);\n debugster(\"union rect\", one, two);\n}",
+ "hash": "3357caa9d8d810f200cbccb668182496",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::operator!=(const SkRegion& other)_const",
+ "stdout": "empty one == two\\nset rect one != two\\nunion rect one == two\\n"
+ },
+ "SkRegion_quickContains": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region({1, 2, 3, 4});\n SkIRect test = {2, 2, 3, 3};\n SkDebugf(\"quickContains 1: %s\\n\", region.quickContains(test) ? \"true\" : \"false\");\n region.op({1, 4, 3, 6}, SkRegion::kUnion_Op);\n SkDebugf(\"quickContains 2: %s\\n\", region.quickContains(test) ? \"true\" : \"false\");\n region.op({1, 7, 3, 8}, SkRegion::kUnion_Op);\n SkDebugf(\"quickContains 3: %s\\n\", region.quickContains(test) ? \"true\" : \"false\");\n}",
+ "hash": "d8e5eac373e2e7cfc1b8cd0229647ba6",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::quickContains",
+ "stdout": "quickContains 1: true\\nquickContains 2: true\\nquickContains 3: false\\n"
+ },
+ "SkRegion_quickContains_2": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, SkRegion& region) -> void {\n SkDebugf(\"%s: %s\\n\", label, region.quickContains(2, 2, 3, 3) ? \"true\" : \"false\");\n };\n SkRegion region({1, 2, 3, 4});\n debugster(\"quickContains 1\", region);\n region.op({1, 4, 3, 6}, SkRegion::kUnion_Op);\n debugster(\"quickContains 2\", region);\n region.op({1, 7, 3, 8}, SkRegion::kUnion_Op);\n debugster(\"quickContains 3\", region);\n}",
+ "hash": "eb6d290887e1a3a0b051b4d7b012f5e1",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::quickContains_2",
+ "stdout": "quickContains 1: true\\nquickContains 2: true\\nquickContains 3: false\\n"
+ },
+ "SkRegion_quickReject": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region({1, 2, 3, 4});\n SkIRect test = {4, 2, 5, 3};\n SkDebugf(\"quickReject 1: %s\\n\", region.quickReject(test) ? \"true\" : \"false\");\n region.op({1, 4, 3, 6}, SkRegion::kUnion_Op);\n SkDebugf(\"quickReject 2: %s\\n\", region.quickReject(test) ? \"true\" : \"false\");\n region.op({4, 7, 5, 8}, SkRegion::kUnion_Op);\n SkDebugf(\"quickReject 3: %s\\n\", region.quickReject(test) ? \"true\" : \"false\");\n}",
+ "hash": "71ac24b7d91ac5ca7c14b43930d5f85d",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::quickReject",
+ "stdout": "quickReject 1: true\\nquickReject 2: true\\nquickReject 3: false\\n"
+ },
+ "SkRegion_quickReject_2": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region({1, 2, 3, 4});\n SkRegion test;\n SkIRect rects[] = {{4, 2, 5, 3}, {7, 2, 8, 3}};\n test.setRects(rects, SK_ARRAY_COUNT(rects));\n SkDebugf(\"quickReject 1: %s\\n\", region.quickReject(test) ? \"true\" : \"false\");\n region.op({1, 4, 3, 6}, SkRegion::kUnion_Op);\n SkDebugf(\"quickReject 2: %s\\n\", region.quickReject(test) ? \"true\" : \"false\");\n region.op({4, 7, 5, 8}, SkRegion::kUnion_Op);\n SkDebugf(\"quickReject 3: %s\\n\", region.quickReject(test) ? \"true\" : \"false\");\n}",
+ "hash": "def7dba38947c33b203e4f9db6c88be3",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::quickReject_2",
+ "stdout": "quickReject 1: true\\nquickReject 2: true\\nquickReject 3: false\\n"
+ },
+ "SkRegion_set": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, SkRegion& region) -> void {\n auto r = region.getBounds();\n SkDebugf(\"%14s: {%d,%d,%d,%d}\\n\", label, r.fLeft, r.fTop, r.fRight, r.fBottom);\n };\n SkRegion region1({1, 2, 3, 4});\n SkRegion region2;\n region2.set(region1);\n debugster(\"region1 bounds\", region1);\n debugster(\"region2 bounds\", region2);\n}",
+ "hash": "b3538117c7ae2cb7de3b42ca45fe1b13",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::set()",
+ "stdout": "region1 bounds: {1,2,3,4}\\nregion2 bounds: {1,2,3,4}\\n"
+ },
+ "SkRegion_setEmpty": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, SkRegion& region) -> void {\n auto r = region.getBounds();\n SkDebugf(\"%14s: {%d,%d,%d,%d}\\n\", label, r.fLeft, r.fTop, r.fRight, r.fBottom);\n };\n SkRegion region({1, 2, 3, 4});\n debugster(\"region bounds\", region);\n region.setEmpty();\n SkDebugf(\" after region set empty:\\n\");\n debugster(\"region bounds\", region);\n}",
+ "hash": "1314f7250963775c5ee89cc5981eee24",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::setEmpty",
+ "stdout": "region bounds: {1,2,3,4}\\n after region set empty:\\n region bounds: {0,0,0,0}\\n"
+ },
+ "SkRegion_setRect": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region({1, 2, 3, 4});\n SkDebugf(\"region is %s\" \"empty\\n\", region.isEmpty() ? \"\" : \"not \");\n bool setEmpty = region.setRect({1, 2, 1, 4});\n SkDebugf(\"region is %s\" \"empty\\n\", region.isEmpty() ? \"\" : \"not \");\n SkDebugf(\"setEmpty: %s\\n\", setEmpty ? \"true\" : \"false\");\n}",
+ "hash": "e12575ffcd262f2364e0e6bece98a825",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::setRect",
+ "stdout": "region is not empty\\nregion is empty\\nsetEmpty: false\\n"
+ },
+ "SkRegion_setRect_2": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, bool success, SkRegion& region) -> void {\n auto r = region.getBounds();\n SkDebugf(\"%14s: success:%s {%d,%d,%d,%d}\\n\", label, success ? \"true\" : \"false\",\n r.fLeft, r.fTop, r.fRight, r.fBottom);\n };\n SkRegion region;\n bool success = region.setRect(1, 2, 3, 4);\n debugster(\"set to: 1,2,3,4\", success, region);\n success = region.setRect(3, 2, 1, 4);\n debugster(\"set to: 3,2,1,4\", success, region);\n}",
+ "hash": "5b31a1b077818a8150ad50f3b19e7bfe",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::setRect_2",
+ "stdout": "set to: 1,2,3,4: success:true {1,2,3,4}\\nset to: 3,2,1,4: success:false {0,0,0,0}\\n"
+ },
+ "SkRegion_setRegion": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, SkRegion& region) -> void {\n auto r = region.getBounds();\n SkDebugf(\"%14s: {%d,%d,%d,%d}\\n\", label, r.fLeft, r.fTop, r.fRight, r.fBottom);\n };\n SkRegion region({1, 2, 3, 4});\n SkRegion region2;\n region2.setRegion(region);\n debugster(\"region bounds\", region);\n debugster(\"region2 bounds\", region2);\n region2.setEmpty();\n SkDebugf(\" after region set empty:\\n\");\n debugster(\"region bounds\", region);\n debugster(\"region2 bounds\", region2);\n}",
+ "hash": "5d75d22bd155576838155762ab040751",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::setRegion",
+ "stdout": "region bounds: {1,2,3,4}\\nregion2 bounds: {1,2,3,4}\\n after region set empty:\\n region bounds: {1,2,3,4}\\nregion2 bounds: {0,0,0,0}\\n"
+ },
+ "SkRegion_swap": {
+ "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* label, SkRegion& region) -> void {\n auto r = region.getBounds();\n SkDebugf(\"%14s: {%d,%d,%d,%d}\\n\", label, r.fLeft, r.fTop, r.fRight, r.fBottom);\n };\n SkRegion region1({1, 2, 3, 4});\n SkRegion region2;\n region1.swap(region2);\n debugster(\"region1 bounds\", region1);\n debugster(\"region2 bounds\", region2);\n}",
+ "hash": "ae67b7b4c198b46c58e48f5af061c8f1",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::swap()",
+ "stdout": "region1 bounds: {0,0,0,0}\\nregion2 bounds: {1,2,3,4}\\n"
+ },
"SkSurface_MakeNull": {
"code": "void draw(SkCanvas* canvas) {\n SkDebugf(\"SkSurface::MakeNull(0, 0) %c= nullptr\\n\", SkSurface::MakeNull(0, 0) == nullptr ?\n '=' : '!');\n const int w = 37;\n const int h = 1000;\n auto surf = SkSurface::MakeNull(w, h);\n auto nullCanvas = surf->getCanvas();\n nullCanvas->drawPaint(SkPaint()); // does not crash, nothing draws\n SkDebugf(\"surf->makeImageSnapshot() %c= nullptr\\n\", surf->makeImageSnapshot() == nullptr ?\n '=' : '!');\n}",
"hash": "99a54b814ccab7d2b1143c88581649ff",
@@ -3317,6 +3569,20 @@
"file": "SkSurface_Reference",
"name": "SkSurface::width()",
"stdout": "surface width=37 canvas width=37\\n"
+ },
+ "SkTextBlobBuilder_empty_constructor": {
+ "code": "void draw(SkCanvas* canvas) {\n SkTextBlobBuilder builder;\n sk_sp<SkTextBlob> blob = builder.make();\n SkDebugf(\"blob \" \"%s\" \" nullptr\", blob == nullptr ? \"equals\" : \"does not equal\");\n}",
+ "hash": "d9dbabfe24aad92ee3c8144513e90d81",
+ "file": "SkTextBlobBuilder_Reference",
+ "name": "SkTextBlobBuilder::SkTextBlobBuilder()",
+ "stdout": "blob equals nullptr"
+ },
+ "SkTextBlobBuilder_make": {
+ "code": "void draw(SkCanvas* canvas) {\n SkTextBlobBuilder builder;\n sk_sp<SkTextBlob> blob = builder.make();\n SkDebugf(\"blob \" \"%s\" \" nullptr\\n\", blob == nullptr ? \"equals\" : \"does not equal\");\n SkPaint paint;\n paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);\n paint.textToGlyphs(\"x\", 1, builder.allocRun(paint, 1, 20, 20).glyphs);\n blob = builder.make();\n SkDebugf(\"blob \" \"%s\" \" nullptr\\n\", blob == nullptr ? \"equals\" : \"does not equal\");\n blob = builder.make();\n SkDebugf(\"blob \" \"%s\" \" nullptr\\n\", blob == nullptr ? \"equals\" : \"does not equal\");\n}",
+ "hash": "595f6ae785a623ac26059f0573fda995",
+ "file": "SkTextBlobBuilder_Reference",
+ "name": "SkTextBlobBuilder::make()",
+ "stdout": "blob equals nullptr\\nblob does not equal nullptr\\nblob equals nullptr\\n"
}
}
@@ -5344,6 +5610,286 @@
"file": "SkImageInfo_Reference",
"name": "SkColorTypeValidateAlphaType"
},
+ "SkDynamicMemoryWStream_bytesWritten": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkDynamicMemoryWStream_Reference",
+ "name": "SkDynamicMemoryWStream::bytesWritten"
+},
+ "SkDynamicMemoryWStream_copyTo": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkDynamicMemoryWStream_Reference",
+ "name": "SkDynamicMemoryWStream::copyTo"
+},
+ "SkDynamicMemoryWStream_copyToAndReset": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkDynamicMemoryWStream_Reference",
+ "name": "SkDynamicMemoryWStream::copyToAndReset"
+},
+ "SkDynamicMemoryWStream_destructor": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkDynamicMemoryWStream_Reference",
+ "name": "SkDynamicMemoryWStream::~SkDynamicMemoryWStream()"
+},
+ "SkDynamicMemoryWStream_detachAsData": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkDynamicMemoryWStream_Reference",
+ "name": "SkDynamicMemoryWStream::detachAsData"
+},
+ "SkDynamicMemoryWStream_detachAsStream": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkDynamicMemoryWStream_Reference",
+ "name": "SkDynamicMemoryWStream::detachAsStream"
+},
+ "SkDynamicMemoryWStream_empty_constructor": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkDynamicMemoryWStream_Reference",
+ "name": "SkDynamicMemoryWStream::SkDynamicMemoryWStream()"
+},
+ "SkDynamicMemoryWStream_padToAlign4": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkDynamicMemoryWStream_Reference",
+ "name": "SkDynamicMemoryWStream::padToAlign4"
+},
+ "SkDynamicMemoryWStream_read": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkDynamicMemoryWStream_Reference",
+ "name": "SkDynamicMemoryWStream::read()"
+},
+ "SkDynamicMemoryWStream_reset": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkDynamicMemoryWStream_Reference",
+ "name": "SkDynamicMemoryWStream::reset()"
+},
+ "SkDynamicMemoryWStream_write": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkDynamicMemoryWStream_Reference",
+ "name": "SkDynamicMemoryWStream::write()"
+},
+ "SkDynamicMemoryWStream_writeToAndReset": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkDynamicMemoryWStream_Reference",
+ "name": "SkDynamicMemoryWStream::writeToAndReset"
+},
+ "SkDynamicMemoryWStream_writeToStream": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkDynamicMemoryWStream_Reference",
+ "name": "SkDynamicMemoryWStream::writeToStream"
+},
+ "SkFILEStream_Make": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEStream_Reference",
+ "name": "SkFILEStream::Make"
+},
+ "SkFILEStream_close": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEStream_Reference",
+ "name": "SkFILEStream::close()"
+},
+ "SkFILEStream_copy_const": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEStream_Reference",
+ "name": "SkFILEStream::SkFILEStream(const char path[] = nullptr)"
+},
+ "SkFILEStream_copy_star": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEStream_Reference",
+ "name": "SkFILEStream::SkFILEStream(FILE* file)"
+},
+ "SkFILEStream_destructor": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEStream_Reference",
+ "name": "SkFILEStream::~SkFILEStream()"
+},
+ "SkFILEStream_duplicate": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEStream_Reference",
+ "name": "SkFILEStream::duplicate()"
+},
+ "SkFILEStream_fork": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEStream_Reference",
+ "name": "SkFILEStream::fork()"
+},
+ "SkFILEStream_getLength": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEStream_Reference",
+ "name": "SkFILEStream::getLength"
+},
+ "SkFILEStream_getPosition": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEStream_Reference",
+ "name": "SkFILEStream::getPosition"
+},
+ "SkFILEStream_isAtEnd": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEStream_Reference",
+ "name": "SkFILEStream::isAtEnd"
+},
+ "SkFILEStream_isValid": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEStream_Reference",
+ "name": "SkFILEStream::isValid"
+},
+ "SkFILEStream_move": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEStream_Reference",
+ "name": "SkFILEStream::move()"
+},
+ "SkFILEStream_read": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEStream_Reference",
+ "name": "SkFILEStream::read()"
+},
+ "SkFILEStream_rewind": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEStream_Reference",
+ "name": "SkFILEStream::rewind()"
+},
+ "SkFILEStream_seek": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEStream_Reference",
+ "name": "SkFILEStream::seek()"
+},
+ "SkFILEWStream_bytesWritten": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEWStream_Reference",
+ "name": "SkFILEWStream::bytesWritten"
+},
+ "SkFILEWStream_copy_const": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEWStream_Reference",
+ "name": "SkFILEWStream::SkFILEWStream(const char path[])"
+},
+ "SkFILEWStream_destructor": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEWStream_Reference",
+ "name": "SkFILEWStream::~SkFILEWStream()"
+},
+ "SkFILEWStream_flush": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEWStream_Reference",
+ "name": "SkFILEWStream::flush()"
+},
+ "SkFILEWStream_fsync": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEWStream_Reference",
+ "name": "SkFILEWStream::fsync()"
+},
+ "SkFILEWStream_isValid": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEWStream_Reference",
+ "name": "SkFILEWStream::isValid"
+},
+ "SkFILEWStream_write": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkFILEWStream_Reference",
+ "name": "SkFILEWStream::write()"
+},
"SkHSVToColor": {
"code": "void draw(SkCanvas* canvas) {\n canvas->drawBitmap(source, 0, 0);\n for (int y = 0; y < 256; ++y) {\n for (int x = 0; x < 256; ++x) {\n SkColor color = source.getColor(x, y);\n SkScalar hsv[3];\n SkColorToHSV(color, hsv);\n hsv[0] = hsv[0] + 90 >= 360 ? hsv[0] - 270 : hsv[0] + 90;\n SkPaint paint;\n paint.setColor(SkHSVToColor(x + y, hsv));\n canvas->drawRect(SkRect::MakeXYWH(x, y, 1, 1), paint);\n }\n }\n}",
"width": 256,
@@ -6424,6 +6970,198 @@
"file": "SkMatrix_Reference",
"name": "SkMatrix::setTranslate_2"
},
+ "SkMemoryStream_Make": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::Make"
+},
+ "SkMemoryStream_MakeCopy": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::MakeCopy"
+},
+ "SkMemoryStream_MakeDirect": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::MakeDirect"
+},
+ "SkMemoryStream_asData": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::asData"
+},
+ "SkMemoryStream_const_star": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::SkMemoryStream(const void* data, size_t length, bool copyData = false)"
+},
+ "SkMemoryStream_copy_": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::SkMemoryStream(size_t length)"
+},
+ "SkMemoryStream_copy_SkData": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::SkMemoryStream(sk_sp<SkData> data)"
+},
+ "SkMemoryStream_duplicate": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::duplicate()"
+},
+ "SkMemoryStream_empty_constructor": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::SkMemoryStream()"
+},
+ "SkMemoryStream_fork": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::fork()"
+},
+ "SkMemoryStream_getAtPos": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::getAtPos"
+},
+ "SkMemoryStream_getLength": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::getLength"
+},
+ "SkMemoryStream_getMemoryBase": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::getMemoryBase"
+},
+ "SkMemoryStream_getPosition": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::getPosition"
+},
+ "SkMemoryStream_isAtEnd": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::isAtEnd"
+},
+ "SkMemoryStream_move": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::move()"
+},
+ "SkMemoryStream_peek": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::peek()"
+},
+ "SkMemoryStream_read": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::read()"
+},
+ "SkMemoryStream_rewind": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::rewind()"
+},
+ "SkMemoryStream_seek": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::seek()"
+},
+ "SkMemoryStream_setData": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::setData"
+},
+ "SkMemoryStream_setMemory": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::setMemory"
+},
+ "SkMemoryStream_setMemoryOwned": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::setMemoryOwned"
+},
+ "SkMemoryStream_skipToAlign4": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkMemoryStream_Reference",
+ "name": "SkMemoryStream::skipToAlign4"
+},
"SkPaint_Join": {
"code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.moveTo(10, 50);\n path.quadTo(35, 110, 60, 210);\n path.quadTo(105, 110, 130, 10);\n SkPaint paint; // set to default kMiter_Join\n paint.setAntiAlias(true);\n paint.setStyle(SkPaint::kStroke_Style);\n paint.setStrokeWidth(20);\n canvas->drawPath(path, paint);\n canvas->translate(150, 0);\n paint.setStrokeJoin(SkPaint::kBevel_Join);\n canvas->drawPath(path, paint);\n canvas->translate(150, 0);\n paint.setStrokeJoin(SkPaint::kRound_Join);\n canvas->drawPath(path, paint);\n}\n",
"width": 462,
@@ -7872,6 +8610,366 @@
"file": "SkRRect_Reference",
"name": "SkRRect::writeToMemory"
},
+ "SkRegion_Op": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion operand({35, 35, 85, 85});\n const char* labels[] = {\"difference\", \"intersect\", \"union\", \"xor\", \"reverse diff\", \"replace\"};\n int index = 0;\n SkPaint paint;\n paint.setTextAlign(SkPaint::kCenter_Align);\n for (auto op : { SkRegion::kDifference_Op, SkRegion::kIntersect_Op, SkRegion::kUnion_Op,\n SkRegion::kXOR_Op, SkRegion::kReverseDifference_Op, SkRegion::kReplace_Op } ) {\n SkRegion target({10, 10, 60, 60});\n target.op(operand, op);\n canvas->drawRegion(target, paint);\n canvas->drawString(labels[index++], 40, 100, paint);\n canvas->translate(80, 0);\n if (SkRegion::kUnion_Op == op) {\n canvas->translate(-240, 120);\n }\n }\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "fb82d2d3ec51912215a0eb9b45dcbc3c",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::Op"
+},
+ "SkRegion_contains": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(128);\n SkPath xPath;\n paint.getTextPath(\"X\", 1, 20, 110, &xPath);\n SkRegion xRegion;\n xRegion.setPath(xPath, SkRegion({0, 0, 256, 256}));\n canvas->drawRegion(xRegion, paint);\n for (int y = 0; y < 128; y += 8) {\n for (int x = 0; x < 128; x += 8) {\n paint.setColor(xRegion.contains(x, y) ? SK_ColorWHITE : SK_ColorRED);\n canvas->drawPoint(x, y, paint);\n }\n }\n}",
+ "width": 256,
+ "height": 128,
+ "hash": "e3899c2715c332bfc7648d5f2b9eefc6",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::contains()"
+},
+ "SkRegion_contains_2": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(128);\n SkPath xPath;\n paint.getTextPath(\"X\", 1, 20, 110, &xPath);\n SkRegion xRegion;\n SkIRect drawBounds = {0, 0, 128, 128};\n xRegion.setPath(xPath, SkRegion(drawBounds));\n xRegion.op(drawBounds, SkRegion::kReverseDifference_Op);\n canvas->drawRegion(xRegion, paint);\n SkIRect test = SkIRect::MakeXYWH(frame* 128, 64, 5, 5);\n if (xRegion.contains(test)) {\n paint.setColor(SK_ColorYELLOW);\n canvas->drawRect(SkRect::Make(test), paint);\n }\n}",
+ "width": 256,
+ "height": 128,
+ "hash": "100b4cbd5dd7406804e40035833a433c",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::contains_2"
+},
+ "SkRegion_contains_3": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(128);\n SkPath xPath, testPath;\n paint.getTextPath(\"X\", 1, 20, 110, &xPath);\n paint.getTextPath(\"`\", 1, frame * 150 - 40, 150, &testPath);\n SkRegion xRegion, testRegion;\n SkIRect drawBounds = {0, 0, 128, 128};\n xRegion.setPath(xPath, SkRegion(drawBounds));\n testRegion.setPath(testPath, SkRegion(drawBounds));\n xRegion.op(drawBounds, SkRegion::kReverseDifference_Op);\n canvas->drawRegion(xRegion, paint);\n if (xRegion.contains(testRegion)) {\n paint.setColor(SK_ColorYELLOW);\n canvas->drawRegion(testRegion, paint);\n }\n}",
+ "width": 256,
+ "height": 128,
+ "hash": "46de22da2f3e08a8d7f064634fc1c7b5",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::contains_3"
+},
+ "SkRegion_getBoundaryPath": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region;\n region.setRect({10, 20, 90, 60});\n region.op({30, 40, 60, 80}, SkRegion::kXOR_Op);\n canvas->drawRegion(region, SkPaint());\n SkPath path;\n region.getBoundaryPath(&path);\n path.offset(100, 0);\n canvas->drawPath(path, SkPaint());\n}",
+ "width": 256,
+ "height": 100,
+ "hash": "6631d36406efa3b3e27960c876421a7f",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::getBoundaryPath"
+},
+ "SkRegion_intersects": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(128);\n SkPath textPath;\n paint.getTextPath(\"W\", 1, 20, 110, &textPath);\n SkRegion region;\n region.setPath(textPath, SkRegion({0, 0, 256, 256}));\n canvas->drawRegion(region, SkPaint());\n SkIRect iRect = SkIRect::MakeXYWH(frame * 160, 55, 10, 10);\n paint.setColor(region.intersects(iRect) ? SK_ColorBLUE : SK_ColorRED);\n canvas->drawRect(SkRect::Make(iRect), paint);\n}",
+ "width": 256,
+ "height": 128,
+ "hash": "42bde0ef8c2ee372751428cd6e21c1ca",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::intersects()"
+},
+ "SkRegion_intersects_2": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(128);\n SkPath hPath, dotPath;\n paint.getTextPath(\"H\", 1, 40, 110, &hPath);\n paint.getTextPath(\",\", 1, frame * 180, 95, &dotPath);\n SkRegion hRegion, dotRegion;\n hRegion.setPath(hPath, SkRegion({0, 0, 256, 256}));\n dotRegion.setPath(dotPath, SkRegion({0, 0, 256, 256}));\n canvas->drawRegion(hRegion, paint);\n paint.setColor(hRegion.intersects(dotRegion) ? SK_ColorBLUE : SK_ColorRED);\n canvas->drawRegion(dotRegion, paint);\n}",
+ "width": 256,
+ "height": 128,
+ "hash": "4263d79ac0e7df02e90948fdde9fa965",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::intersects_2"
+},
+ "SkRegion_op": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(128);\n SkPath xPath;\n paint.getTextPath(\"X\", 1, 20, 110, &xPath);\n SkRegion xRegion;\n SkIRect drawBounds = {0, 0, 128, 128};\n xRegion.setPath(xPath, SkRegion(drawBounds));\n xRegion.op(drawBounds, SkRegion::kReverseDifference_Op);\n canvas->drawRegion(xRegion, paint);\n}",
+ "width": 256,
+ "height": 128,
+ "hash": "1790b2e054c536a54601138365700ac3",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::op()"
+},
+ "SkRegion_op_2": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(128);\n SkPath xPath;\n paint.getTextPath(\"X\", 1, 20, 110, &xPath);\n SkRegion xRegion;\n SkIRect drawBounds = {0, 0, 128, 128};\n xRegion.setPath(xPath, SkRegion(drawBounds));\n xRegion.op(drawBounds.fLeft + frame * drawBounds.width(), drawBounds.fTop,\n drawBounds.fRight, drawBounds.fBottom, SkRegion::kReverseDifference_Op);\n canvas->drawRegion(xRegion, paint);\n}",
+ "width": 256,
+ "height": 128,
+ "hash": "2e3497890d523235f96680716c321098",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::op_2"
+},
+ "SkRegion_op_3": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(128);\n SkPath xPath, opPath;\n paint.getTextPath(\"X\", 1, 20, 110, &xPath);\n opPath.addCircle(64, 64, frame * 64);\n SkRegion xRegion, opRegion;\n SkIRect drawBounds = {0, 0, 128, 128};\n opRegion.setPath(opPath, SkRegion(drawBounds));\n xRegion.setPath(xPath, SkRegion(drawBounds));\n xRegion.op(opRegion, SkRegion::kReverseDifference_Op);\n canvas->drawRegion(xRegion, paint);\n}",
+ "width": 256,
+ "height": 128,
+ "hash": "65f4eccea3514ed7e37b5067e15efddb",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::op_3"
+},
+ "SkRegion_op_4": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(128);\n SkPath xPath, opPath;\n paint.getTextPath(\"X\", 1, 20, 110, &xPath);\n opPath.addCircle(64, 64, frame * 64);\n SkRegion xRegion, opRegion, rectRegion;\n SkIRect drawBounds = {0, 0, 128, 128};\n opRegion.setPath(opPath, SkRegion(drawBounds));\n xRegion.setPath(xPath, SkRegion(drawBounds));\n drawBounds.inset(frame * drawBounds.width() / 2, 0); \n rectRegion.op(drawBounds, opRegion, SkRegion::kIntersect_Op);\n xRegion.op(rectRegion, SkRegion::kReverseDifference_Op);\n canvas->drawRegion(xRegion, paint);\n}",
+ "width": 256,
+ "height": 128,
+ "hash": "3f964be1e1fd2fbb977b655d3a928f0a",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::op_4"
+},
+ "SkRegion_op_5": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(128);\n SkPath xPath, opPath;\n paint.getTextPath(\"X\", 1, 20, 110, &xPath);\n opPath.addCircle(64, 64, frame * 64);\n SkRegion xRegion, opRegion, rectRegion;\n SkIRect drawBounds = {0, 0, 128, 128};\n opRegion.setPath(opPath, SkRegion(drawBounds));\n xRegion.setPath(xPath, SkRegion(drawBounds));\n drawBounds.inset(frame * drawBounds.width() / 2, 0); \n rectRegion.op(opRegion, drawBounds, SkRegion::kUnion_Op);\n xRegion.op(rectRegion, SkRegion::kReverseDifference_Op);\n canvas->drawRegion(xRegion, paint);\n}",
+ "width": 256,
+ "height": 128,
+ "hash": "e623208dd44f0b24499ac5f1593d1b39",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::op_5"
+},
+ "SkRegion_op_6": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(128);\n SkPath xPath, opPath;\n paint.getTextPath(\"X\", 1, 20, 110, &xPath);\n xPath.setFillType(SkPath::kInverseWinding_FillType);\n opPath.addCircle(64, 64, frame * 64);\n opPath.setFillType(SkPath::kInverseWinding_FillType);\n SkRegion xRegion, opRegion, rectRegion;\n SkIRect drawBounds = {0, 0, 128, 128};\n opRegion.setPath(opPath, SkRegion(drawBounds));\n xRegion.setPath(xPath, SkRegion(drawBounds));\n drawBounds.inset(frame * drawBounds.width() / 2, 0);\n rectRegion.setRect(drawBounds); \n rectRegion.op(xRegion, SkRegion::kIntersect_Op);\n xRegion.op(rectRegion, opRegion, SkRegion::kReverseDifference_Op);\n canvas->drawRegion(xRegion, paint);\n}",
+ "width": 256,
+ "height": 128,
+ "hash": "13de1a6fcb2302a2a30278cb88d3e17d",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::op_6"
+},
+ "SkRegion_readFromMemory": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion region({20, 20, 80, 80});\n size_t size = region.writeToMemory(nullptr);\n sk_sp<SkData> data = SkData::MakeUninitialized(size);\n region.writeToMemory(data->writable_data());\n SkRegion copy;\n copy.readFromMemory(data->data(), data->size());\n canvas->drawRegion(copy, SkPaint());\n}",
+ "width": 256,
+ "height": 100,
+ "hash": "1ede346c430ef23df0eaaf0773dd6a15",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::readFromMemory"
+},
+ "SkRegion_setPath": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(128);\n SkPath textPath;\n paint.getTextPath(\"Q\", 1, 0, 110, &textPath);\n SkIRect clipRect = {20, 20, 100, 120};\n SkRegion clipRegion(clipRect);\n SkRegion region;\n region.setPath(textPath, clipRegion);\n canvas->drawRegion(region, SkPaint());\n clipRect.offset(100, 0);\n textPath.offset(100, 0);\n canvas->clipRect(SkRect::Make(clipRect), false);\n canvas->drawPath(textPath, SkPaint());\n}",
+ "width": 256,
+ "height": 120,
+ "hash": "45b9ea2247b9ca7f10aa22ea29a426f4",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::setPath"
+},
+ "SkRegion_setRects": {
+ "code": "void draw(SkCanvas* canvas) {\n SkIRect rects[] = { {10, 10, 40, 40}, {20, 20, 50, 50}, {30, 30, 60, 60} };\n SkRegion region;\n region.setRects(rects, SK_ARRAY_COUNT(rects));\n canvas->drawRegion(region, SkPaint());\n region.setEmpty();\n for (auto add : rects) {\n region.op(add, SkRegion::kUnion_Op);\n }\n region.translate(100, 0);\n canvas->drawRegion(region, SkPaint());\n}",
+ "width": 256,
+ "height": 70,
+ "hash": "fc793a14ed76c096a68a755c963c1ee0",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::setRects"
+},
+ "SkRegion_translate": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion test;\n SkIRect rects[] = {{40, 20, 50, 30}, {70, 40, 80, 50}, { 60, 10, 70, 20}};\n test.setRects(rects, SK_ARRAY_COUNT(rects));\n SkPaint paint;\n for (auto color : { SK_ColorRED, SK_ColorBLUE, SK_ColorGREEN, SK_ColorMAGENTA } ) {\n paint.setColor(color);\n canvas->drawRegion(test, paint);\n test.translate(10, 10);\n }\n}",
+ "width": 256,
+ "height": 90,
+ "hash": "4e5b9e53aa1b200fed3ee6596ca01f0e",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::translate()"
+},
+ "SkRegion_translate_2": {
+ "code": "void draw(SkCanvas* canvas) {\n SkRegion test;\n SkIRect rects[] = {{40, 20, 50, 30}, {70, 40, 80, 50}, { 60, 10, 70, 20}};\n test.setRects(rects, SK_ARRAY_COUNT(rects));\n SkPaint paint;\n for (auto color : { SK_ColorRED, SK_ColorBLUE, SK_ColorGREEN, SK_ColorMAGENTA } ) {\n paint.setColor(color);\n canvas->drawRegion(test, paint);\n SkRegion second;\n test.translate(10, test.getBounds().fBottom, &second);\n test.op(second, SkRegion::kXOR_Op);\n test.translate(30, 0);\n }\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "024200960eb52fee1f471514607e6001",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::translate_2"
+},
+ "SkRegion_writeToMemory": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(128);\n SkPath xPath;\n paint.getTextPath(\"X\", 1, 20, 110, &xPath);\n SkIRect drawBounds = {0, 0, 128, 128};\n SkRegion xRegion;\n xRegion.setPath(xPath, SkRegion(drawBounds));\n size_t size = xRegion.writeToMemory(nullptr);\n sk_sp<SkData> data = SkData::MakeUninitialized(size);\n xRegion.writeToMemory(data->writable_data());\n SkRegion copy;\n copy.readFromMemory(data->data(), data->size());\n canvas->drawRegion(copy, paint);\n}",
+ "width": 256,
+ "height": 128,
+ "hash": "1419d2a8c22c355ab46240865d056ee5",
+ "file": "SkRegion_Reference",
+ "name": "SkRegion::writeToMemory"
+},
+ "SkStream_MakeFromFile": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::MakeFromFile"
+},
+ "SkStream_destructor": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::~SkStream()"
+},
+ "SkStream_duplicate": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::duplicate()"
+},
+ "SkStream_empty_constructor": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::SkStream()"
+},
+ "SkStream_fork": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::fork()"
+},
+ "SkStream_getLength": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::getLength"
+},
+ "SkStream_getMemoryBase": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::getMemoryBase"
+},
+ "SkStream_getPosition": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::getPosition"
+},
+ "SkStream_hasLength": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::hasLength"
+},
+ "SkStream_hasPosition": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::hasPosition"
+},
+ "SkStream_isAtEnd": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::isAtEnd"
+},
+ "SkStream_move": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::move()"
+},
+ "SkStream_peek": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::peek()"
+},
+ "SkStream_read": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::read()"
+},
+ "SkStream_readBool": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::readBool"
+},
+ "SkStream_readPackedUInt": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::readPackedUInt"
+},
+ "SkStream_readS16": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::readS16"
+},
+ "SkStream_readS32": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::readS32"
+},
+ "SkStream_readS8": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::readS8"
+},
+ "SkStream_readScalar": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::readScalar"
+},
+ "SkStream_readU16": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::readU16"
+},
+ "SkStream_readU32": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::readU32"
+},
+ "SkStream_readU8": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::readU8"
+},
+ "SkStream_rewind": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::rewind()"
+},
+ "SkStream_seek": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::seek()"
+},
+ "SkStream_skip": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkStream_Reference",
+ "name": "SkStream::skip()"
+},
"SkSurface_MakeFromBackendTexture": {
"code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextSize(32);\n GrContext* context = canvas->getGrContext();\n if (!context) {\n canvas->drawString(\"GPU only!\", 20, 40, paint);\n return;\n }\n sk_sp<SkSurface> gpuSurface = SkSurface::MakeFromBackendTexture(context,\n backEndTexture, kTopLeft_GrSurfaceOrigin, 0,\n kRGBA_8888_SkColorType, nullptr, nullptr);\n auto surfaceCanvas = gpuSurface->getCanvas();\n surfaceCanvas->drawString(\"GPU rocks!\", 20, 40, paint);\n sk_sp<SkImage> image(gpuSurface->makeImageSnapshot());\n canvas->drawImage(image, 0, 0);\n}",
"width": 256,
@@ -8007,6 +9105,238 @@
"hash": "d77790dd3bc9f678fa4f582347fb8fba",
"file": "SkSurface_Reference",
"name": "SkSurface::writePixels_2"
+},
+ "SkTextBlobBuilder_allocRun": {
+ "code": "void draw(SkCanvas* canvas) {\n SkTextBlobBuilder builder;\n SkPaint paint, glyphPaint;\n glyphPaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);\n const SkTextBlobBuilder::RunBuffer& run = builder.allocRun(glyphPaint, 5, 20, 20);\n paint.textToGlyphs(\"hello\", 5, run.glyphs);\n canvas->drawRect({20, 20, 30, 30}, paint);\n canvas->drawTextBlob(builder.make(), 20, 20, paint);\n}",
+ "width": 256,
+ "height": 60,
+ "hash": "aedc51083fadd99451fe5180b8ff4c7d",
+ "file": "SkTextBlobBuilder_Reference",
+ "name": "SkTextBlobBuilder::allocRun"
+},
+ "SkTextBlobBuilder_allocRunPos": {
+ "code": "void draw(SkCanvas* canvas) {\n SkTextBlobBuilder builder;\n SkPaint paint, glyphPaint;\n glyphPaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);\n const SkTextBlobBuilder::RunBuffer& run = builder.allocRunPos(glyphPaint, 5);\n paint.textToGlyphs(\"hello\", 5, run.glyphs);\n SkPoint positions[] = {{0, 0}, {10, 10}, {20, 20}, {40, 40}, {80, 80}};\n memcpy(run.pos, positions, sizeof(positions));\n canvas->drawTextBlob(builder.make(), 20, 20, paint);\n}",
+ "width": 256,
+ "height": 90,
+ "hash": "f65c92ff5bfcc95ba58a2ba4d67f944f",
+ "file": "SkTextBlobBuilder_Reference",
+ "name": "SkTextBlobBuilder::allocRunPos"
+},
+ "SkTextBlobBuilder_allocRunPosH": {
+ "code": "void draw(SkCanvas* canvas) {\n SkTextBlobBuilder builder;\n SkPaint paint, glyphPaint;\n glyphPaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);\n const SkTextBlobBuilder::RunBuffer& run = builder.allocRunPosH(glyphPaint, 5, 20);\n paint.textToGlyphs(\"hello\", 5, run.glyphs);\n SkScalar positions[] = {0, 10, 20, 40, 80};\n memcpy(run.pos, positions, sizeof(positions));\n canvas->drawTextBlob(builder.make(), 20, 20, paint);\n}",
+ "width": 256,
+ "height": 60,
+ "hash": "735c352787b24e490740dedd035987d2",
+ "file": "SkTextBlobBuilder_Reference",
+ "name": "SkTextBlobBuilder::allocRunPosH"
+},
+ "SkTextBlob_Deserialize": {
+ "code": "#include \"SkSerialProcs.h\"\n\nvoid draw(SkCanvas* canvas) {\n SkPaint blobPaint;\n blobPaint.setTextSize(24);\n sk_sp<SkTextBlob> blob = SkTextBlob::MakeAsDrawText(\"Hello World!\", 12, blobPaint);\n sk_sp<SkData> data = blob->serialize(SkSerialProcs());\n uint16_t glyphs[6];\n blobPaint.textToGlyphs(\"Hacker\", 6, glyphs);\n memcpy((char*)data->writable_data() + 0x54, glyphs, sizeof(glyphs));\n sk_sp<SkTextBlob> copy = SkTextBlob::Deserialize(data->data(), data->size(), SkDeserialProcs());\n canvas->drawTextBlob(copy, 20, 20, SkPaint());\n}",
+ "width": 256,
+ "height": 24,
+ "hash": "b49322e0363bd2930f4c7b98a3ff250e",
+ "file": "SkTextBlob_Reference",
+ "name": "SkTextBlob::Deserialize"
+},
+ "SkTextBlob_MakeFromString": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint blobPaint;\n blobPaint.setColor(SK_ColorRED); // ignored\n blobPaint.setTextSize(24); // respected\n blobPaint.setAntiAlias(true); // ignored\n SkPaint canvasPaint = blobPaint;\n canvasPaint.setColor(SK_ColorBLUE); // respected\n canvasPaint.setTextSize(2); // ignored\n sk_sp<SkTextBlob> blob = SkTextBlob::MakeFromString(\"Hello World\", blobPaint);\n canvas->drawTextBlob(blob, 20, 20, canvasPaint);\n}",
+ "width": 256,
+ "height": 24,
+ "hash": "705b26bb5e361369d897eeb511b6a184",
+ "file": "SkTextBlob_Reference",
+ "name": "SkTextBlob::MakeFromString"
+},
+ "SkTextBlob_MakeFromText": {
+ "code": "void draw(SkCanvas* canvas) {\n SkPaint blobPaint;\n blobPaint.setColor(SK_ColorRED); // ignored\n blobPaint.setTextSize(24); // respected\n blobPaint.setAntiAlias(true); // ignored\n SkPaint canvasPaint = blobPaint;\n canvasPaint.setColor(SK_ColorBLUE); // respected\n canvasPaint.setTextSize(2); // ignored\n sk_sp<SkTextBlob> blob = SkTextBlob::MakeFromText(\"Hello World\", 11, blobPaint);\n canvas->drawTextBlob(blob, 20, 20, canvasPaint);\n}",
+ "width": 256,
+ "height": 24,
+ "hash": "74686684967a310dc06fe2915b0a4798",
+ "file": "SkTextBlob_Reference",
+ "name": "SkTextBlob::MakeFromText"
+},
+ "SkTextBlob_bounds": {
+ "code": "void draw(SkCanvas* canvas) {\n SkTextBlobBuilder textBlobBuilder;\n const char bunny[] = \"/(^x^)\\\\\";\n const int len = sizeof(bunny) - 1;\n uint16_t glyphs[len];\n SkPaint paint;\n paint.textToGlyphs(bunny, len, glyphs);\n paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);\n int runs[] = { 3, 1, 3 };\n SkPoint textPos = { 20, 50 };\n int glyphIndex = 0;\n for (auto runLen : runs) {\n paint.setTextSize(1 == runLen ? 20 : 50);\n const SkTextBlobBuilder::RunBuffer& run =\n textBlobBuilder.allocRun(paint, runLen, textPos.fX, textPos.fY);\n memcpy(run.glyphs, &glyphs[glyphIndex], sizeof(glyphs[0]) * runLen);\n textPos.fX += paint.measureText(&glyphs[glyphIndex], sizeof(glyphs[0]) * runLen, nullptr);\n glyphIndex += runLen;\n }\n sk_sp<const SkTextBlob> blob = textBlobBuilder.make();\n paint.reset();\n canvas->drawTextBlob(blob.get(), 0, 0, paint);\n paint.setStyle(SkPaint::kStroke_Style);\n canvas->drawRect(blob->bounds(), paint);\n}",
+ "width": 256,
+ "height": 70,
+ "hash": "52ba6c8a9483df8c373fdb49b32a5e19",
+ "file": "SkTextBlob_Reference",
+ "name": "SkTextBlob::bounds()"
+},
+ "SkTextBlob_serialize": {
+ "code": "#include \"SkSerialProcs.h\"\n\nvoid draw(SkCanvas* canvas) {\n SkPaint blobPaint;\n blobPaint.setTextSize(24);\n sk_sp<SkTextBlob> blob = SkTextBlob::MakeAsDrawText(\"Hello World\", 11, blobPaint);\n char storage[2048];\n size_t used = blob->serialize(SkSerialProcs(), storage, sizeof(storage));\n sk_sp<SkTextBlob> copy = SkTextBlob::Deserialize(storage, used, SkDeserialProcs());\n canvas->drawTextBlob(copy, 20, 20, SkPaint());\n std::string usage = \"size=\" + std::to_string(sizeof(storage)) + \" used=\" + std::to_string(used);\n canvas->drawString(usage.c_str(), 20, 40, SkPaint());\n}",
+ "width": 256,
+ "height": 64,
+ "hash": "adf1f5687736356419c0114327ea6df9",
+ "file": "SkTextBlob_Reference",
+ "name": "SkTextBlob::serialize()"
+},
+ "SkTextBlob_serialize_2": {
+ "code": "#include \"SkSerialProcs.h\"\n\nvoid draw(SkCanvas* canvas) {\n SkPaint blobPaint;\n blobPaint.setTextSize(24);\n sk_sp<SkTextBlob> blob = SkTextBlob::MakeAsDrawText(\"Hello World\", 11, blobPaint);\n sk_sp<SkData> data = blob->serialize(SkSerialProcs());\n sk_sp<SkTextBlob> copy = SkTextBlob::Deserialize(data->data(), data->size(), SkDeserialProcs());\n canvas->drawTextBlob(copy, 20, 20, SkPaint());\n}",
+ "width": 256,
+ "height": 24,
+ "hash": "ae23af73f49735177dd5cc1040ed1255",
+ "file": "SkTextBlob_Reference",
+ "name": "SkTextBlob::serialize_2"
+},
+ "SkTextBlob_uniqueID": {
+ "code": "void draw(SkCanvas* canvas) {\n for (int index = 0; index < 2; ++index) {\n SkTextBlobBuilder textBlobBuilder;\n const char bunny[] = \"/(^x^)\\\\\";\n const int len = sizeof(bunny) - 1;\n uint16_t glyphs[len];\n SkPaint paint;\n paint.textToGlyphs(bunny, len, glyphs);\n paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);\n paint.setTextScaleX(0.5);\n int runs[] = { 3, 1, 3 };\n SkPoint textPos = { 20, 50 };\n int glyphIndex = 0;\n for (auto runLen : runs) {\n paint.setTextSize(1 == runLen ? 20 : 50);\n const SkTextBlobBuilder::RunBuffer& run =\n textBlobBuilder.allocRun(paint, runLen, textPos.fX, textPos.fY);\n memcpy(run.glyphs, &glyphs[glyphIndex], sizeof(glyphs[0]) * runLen);\n textPos.fX += paint.measureText(&glyphs[glyphIndex], sizeof(glyphs[0]) * runLen, nullptr);\n glyphIndex += runLen;\n }\n sk_sp<const SkTextBlob> blob = textBlobBuilder.make();\n paint.reset();\n canvas->drawTextBlob(blob.get(), 0, 0, paint);\n std::string id = \"unique ID:\" + std::to_string(blob->uniqueID());\n canvas->drawString(id.c_str(), 30, blob->bounds().fBottom + 15, paint);\n canvas->translate(blob->bounds().fRight + 10, 0);\n }\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "5a29bcc0076950339c955149c34e1d46",
+ "file": "SkTextBlob_Reference",
+ "name": "SkTextBlob::uniqueID"
+},
+ "SkWStream_SizeOfPackedUInt": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::SizeOfPackedUInt"
+},
+ "SkWStream_bytesWritten": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::bytesWritten"
+},
+ "SkWStream_destructor": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::~SkWStream()"
+},
+ "SkWStream_empty_constructor": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::SkWStream()"
+},
+ "SkWStream_flush": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::flush()"
+},
+ "SkWStream_newline": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::newline()"
+},
+ "SkWStream_write": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::write()"
+},
+ "SkWStream_write16": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::write16"
+},
+ "SkWStream_write32": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::write32"
+},
+ "SkWStream_write8": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::write8"
+},
+ "SkWStream_writeBigDecAsText": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::writeBigDecAsText"
+},
+ "SkWStream_writeBool": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::writeBool"
+},
+ "SkWStream_writeDecAsText": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::writeDecAsText"
+},
+ "SkWStream_writeHexAsText": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::writeHexAsText"
+},
+ "SkWStream_writePackedUInt": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::writePackedUInt"
+},
+ "SkWStream_writeScalar": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::writeScalar"
+},
+ "SkWStream_writeScalarAsText": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::writeScalarAsText"
+},
+ "SkWStream_writeStream": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::writeStream"
+},
+ "SkWStream_writeText": {
+ "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
+ "width": 256,
+ "height": 256,
+ "hash": "882e8e0103048009a25cfc20400492f7",
+ "file": "SkWStream_Reference",
+ "name": "SkWStream::writeText"
}
}
var canvas
diff --git a/site/user/api/undocumented.md b/site/user/api/undocumented.md
index 3ef43a3..8c06cb2 100644
--- a/site/user/api/undocumented.md
+++ b/site/user/api/undocumented.md
@@ -250,6 +250,8 @@
# <a name='Glyph'>Glyph</a>
+## <a name='ID'>ID</a>
+
# <a name='Grayscale'>Grayscale</a>
# <a name='HTML_Aqua'>HTML Aqua</a>
@@ -463,10 +465,6 @@
# <a name='sk_sp'>Class sk_sp</a>
-# <a name='Region'>Region</a>
-
-# <a name='SkRegion'>Class SkRegion</a>
-
# <a name='RenderTarget'>RenderTarget</a>
# <a name='GrBackendRenderTarget'>Class GrBackendRenderTarget</a>
@@ -562,9 +560,9 @@
# <a name='Sprite'>Sprite</a>
-# <a name='Stream'>Stream</a>
+# <a name='Stream_Asset'>Stream Asset</a>
-# <a name='SkStream'>Class SkStream</a>
+# <a name='SkStreamAsset'>Class SkStreamAsset</a>
# <a name='String'>String</a>
@@ -605,10 +603,6 @@
# <a name='Text'>Text</a>
-# <a name='Text_Blob'>Text Blob</a>
-
-# <a name='SkTextBlob'>Class SkTextBlob</a>
-
# <a name='Texture'>Texture</a>
# <a name='GrBackendTexture'>Class GrBackendTexture</a>
@@ -626,8 +620,21 @@
# <a name='Typeface'>Typeface</a>
+## <a name='ID'>ID</a>
+
+## <a name='SkFontID'>Typedef SkFontID</a>
+
# <a name='SkTypeface'>Class SkTypeface</a>
+<a name='SkTypeface_uniqueID'></a>
+## uniqueID
+
+<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
+<a href='#SkFontID'>SkFontID</a> <a href='#SkTypeface_uniqueID'>uniqueID</a>() const
+</pre>
+
+---
+
# <a name='UV_Mapping'>UV Mapping</a>
# <a name='Unhinted'>Unhinted</a>
@@ -642,10 +649,6 @@
## <a name='Texs'>Texs</a>
-# <a name='WStream'>WStream</a>
-
-# <a name='SkWStream'>Class SkWStream</a>
-
# <a name='Xfermode_Image_Filter'>Xfermode Image Filter</a>
# <a name='SkXfermodeImageFilter'>Class SkXfermodeImageFilter</a>
diff --git a/tools/bookmaker/bookmaker.cpp b/tools/bookmaker/bookmaker.cpp
index 1b8e76e..c173c09 100644
--- a/tools/bookmaker/bookmaker.cpp
+++ b/tools/bookmaker/bookmaker.cpp
@@ -51,6 +51,8 @@
would rather keep links for body above #Literal, and/or make it a block and not a one-liner
add check to require #Const to contain #Code block if defining const or constexpr (enum consts have
#Code blocks inside the #Enum def)
+subclasses (e.g. Iter in SkPath) need to check for #Line and generate overview
+ subclass methods should also disallow #In
There are a number of formatting bugs with ad hoc patches where a substitution doesn't keep
the space before or after, or the linefeeds before or after. The rules are not very good either.
diff --git a/tools/bookmaker/bookmaker.h b/tools/bookmaker/bookmaker.h
index 19ea86b..04b1c0f 100644
--- a/tools/bookmaker/bookmaker.h
+++ b/tools/bookmaker/bookmaker.h
@@ -42,6 +42,7 @@
kNone,
kSK_API,
kSK_BEGIN_REQUIRE_DENSE,
+ kAlignAs,
kBool,
kChar,
kClass,
@@ -1568,6 +1569,7 @@
fIncludeWord = nullptr;
}
+ bool inAlignAs() const;
void checkForMissingParams(const vector<string>& methodParams,
const vector<string>& foundParams);
bool checkForWord();
@@ -1580,11 +1582,13 @@
void dumpConst(const Definition& , string className);
void dumpDefine(const Definition& );
void dumpEnum(const Definition& , string name);
- bool dumpGlobals();
+ bool dumpGlobals(string* globalFileName, long int* globalTell);
void dumpMethod(const Definition& , string className);
void dumpMember(const Definition& );
bool dumpTokens();
- bool dumpTokens(string skClassName);
+ bool dumpTokens(string skClassName, string globalFileName, long int* globalTell);
+ void dumpTypedef(const Definition& , string className);
+
bool findComments(const Definition& includeDef, Definition* markupDef);
Definition* findIncludeObject(const Definition& includeDef, MarkType markType,
string typeName);
@@ -1593,6 +1597,7 @@
bool isClone(const Definition& token);
bool isConstructor(const Definition& token, string className);
bool isInternalName(const Definition& token);
+ bool isMember(const Definition& token) const;
bool isOperator(const Definition& token);
Definition* parentBracket(Definition* parent) const;
bool parseChar();
diff --git a/tools/bookmaker/definition.cpp b/tools/bookmaker/definition.cpp
index 4dfeda3..fa32b7a 100644
--- a/tools/bookmaker/definition.cpp
+++ b/tools/bookmaker/definition.cpp
@@ -339,7 +339,7 @@
// for now, just handle paint -- maybe fiddle will loosen naming restrictions
void Definition::setCanonicalFiddle() {
fMethodType = Definition::MethodType::kNone;
- size_t doubleColons = fName.find("::", 0);
+ size_t doubleColons = fName.rfind("::");
SkASSERT(string::npos != doubleColons);
string base = fName.substr(0, doubleColons);
string result = base + "_";
@@ -535,6 +535,7 @@
const char* descEnd = nullptr;
const Definition* defEnd = nullptr;
const Definition* priorDef = nullptr;
+ bool incomplete = false;
for (auto& child : fChildren) {
if (MarkType::kAnchor == child->fMarkType) {
continue;
@@ -552,6 +553,11 @@
if (MarkType::kFormula == child->fMarkType) {
continue;
}
+ if (MarkType::kLine == child->fMarkType) {
+ SkASSERT(child->fChildren.size() > 0);
+ TextParser childDesc(child->fChildren[0]);
+ incomplete |= childDesc.startsWith("incomplete");
+ }
if (MarkType::kList == child->fMarkType) {
priorDef = child;
continue;
@@ -577,7 +583,7 @@
priorDef = nullptr;
}
if (!descEnd) {
- return methodParser.reportError<bool>("missing description");
+ return incomplete ? true : methodParser.reportError<bool>("missing description");
}
TextParser description(fFileName, descStart, descEnd, fLineCount);
// expect first word capitalized and pluralized. expect a trailing period
@@ -586,7 +592,9 @@
description.reportWarning("expected capital");
} else if ('.' != descEnd[-1]) {
if (!defEnd || defEnd->fTerminator != descEnd) {
- description.reportWarning("expected period");
+ if (!incomplete) {
+ description.reportWarning("expected period");
+ }
}
} else {
if (!description.startsWith("For use by Android")) {
@@ -595,7 +603,9 @@
--description.fChar;
}
if ('s' != description.fChar[-1]) {
- description.reportWarning("expected plural");
+ if (!incomplete) {
+ description.reportWarning("expected plural");
+ }
}
}
}
diff --git a/tools/bookmaker/includeParser.cpp b/tools/bookmaker/includeParser.cpp
index d6594ea..eca7296 100644
--- a/tools/bookmaker/includeParser.cpp
+++ b/tools/bookmaker/includeParser.cpp
@@ -16,6 +16,7 @@
{ "", KeyWord::kNone, KeyProperty::kNone },
{ "SK_API", KeyWord::kSK_API, KeyProperty::kModifier },
{ "SK_BEGIN_REQUIRE_DENSE", KeyWord::kSK_BEGIN_REQUIRE_DENSE, KeyProperty::kModifier },
+ { "alignas", KeyWord::kAlignAs, KeyProperty::kModifier },
{ "bool", KeyWord::kBool, KeyProperty::kNumber },
{ "char", KeyWord::kChar, KeyProperty::kNumber },
{ "class", KeyWord::kClass, KeyProperty::kObject },
@@ -578,6 +579,9 @@
this->dumpMember(token);
continue;
break;
+ case MarkType::kTypedef:
+ this->dumpTypedef(token, classDef.fName);
+ break;
default:
SkASSERT(0);
}
@@ -878,9 +882,10 @@
this->lf(2);
}
-bool IncludeParser::dumpGlobals() {
- if (fIDefineMap.empty() && fIFunctionMap.empty() && fIEnumMap.empty() && fITemplateMap.empty()
- && fITypedefMap.empty() && fIUnionMap.empty()) {
+bool IncludeParser::dumpGlobals(string* globalFileName, long int* globalTell) {
+ bool hasGlobals = !fIDefineMap.empty() || !fIFunctionMap.empty() || !fIEnumMap.empty()
+ || !fITemplateMap.empty()|| !fITypedefMap.empty() || !fIUnionMap.empty();
+ if (!hasGlobals) {
return true;
}
size_t lastBSlash = fFileName.rfind('\\');
@@ -896,6 +901,7 @@
lastSlash += 1;
string globalsName = fFileName.substr(lastSlash, lastDotH - lastSlash);
string fileName = globalsName + "_Reference.bmh";
+ *globalFileName = fileName;
fOut = fopen(fileName.c_str(), "wb");
if (!fOut) {
SkDebugf("could not open output file %s\n", globalsName.c_str());
@@ -1007,9 +1013,10 @@
}
this->dumpCommonTail(*def);
}
+ *globalTell = ftell(fOut);
this->writeEndTag("Topic", topicName);
this->lfAlways(1);
- fclose(fOut);
+// fclose(fOut); // defer closing in case class needs to be also written here
SkDebugf("wrote %s\n", fileName.c_str());
return true;
}
@@ -1038,6 +1045,45 @@
|| 0 == token.fName.find("private_");
}
+bool IncludeParser::isMember(const Definition& token) const {
+ if ('f' == token.fStart[0] && isupper(token.fStart[1])) {
+ return true;
+ }
+ if (!islower(token.fStart[0])) {
+ return false;
+ }
+ // make an exception for SkTextBlob::RunBuffer, sole struct with members not in fXxxx format
+ if (string::npos != token.fFileName.find("SkTextBlob.h")) {
+ const Definition* structToken = token.fParent;
+ if (!structToken) {
+ return false;
+ }
+ if (KeyWord::kStruct != structToken->fKeyWord) {
+ structToken = token.fParent->fParent;
+ if (!structToken) {
+ return false;
+ }
+ if (KeyWord::kStruct != structToken->fKeyWord) {
+ return false;
+ }
+ }
+ SkASSERT(structToken->fTokens.size() > 0);
+ const Definition& child = structToken->fTokens.front();
+ string structName(child.fContentStart, child.length());
+ if ("RunBuffer" != structName) {
+ return false;
+ }
+ string tokenName(token.fContentStart, token.length());
+ string allowed[] = { "glyphs", "pos", "utf8text", "clusters" };
+ for (auto allow : allowed) {
+ if (allow == tokenName) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
bool IncludeParser::isOperator(const Definition& token) {
return "operator" == token.fName.substr(0, 8);
}
@@ -1083,34 +1129,48 @@
}
bool IncludeParser::dumpTokens() {
- if (!this->dumpGlobals()) {
+ string globalFileName;
+ long int globalTell = 0;
+ if (!this->dumpGlobals(&globalFileName, &globalTell)) {
return false;
}
for (const auto& member : fIClassMap) {
if (string::npos != member.first.find("::")) {
continue;
}
- if (!this->dumpTokens(member.first)) {
+ if (!this->dumpTokens(member.first, globalFileName, &globalTell)) {
return false;
}
}
+ if (globalTell) {
+ fclose(fOut);
+ }
return true;
}
// dump equivalent markup
-bool IncludeParser::dumpTokens(string skClassName) {
+bool IncludeParser::dumpTokens(string skClassName, string globalFileName, long int* globalTell) {
string fileName = skClassName + "_Reference.bmh";
- fOut = fopen(fileName.c_str(), "wb");
- if (!fOut) {
- SkDebugf("could not open output file %s\n", fileName.c_str());
- return false;
+ if (globalFileName != fileName) {
+ fOut = fopen(fileName.c_str(), "wb");
+ if (!fOut) {
+ SkDebugf("could not open output file %s\n", fileName.c_str());
+ return false;
+ }
+ } else {
+ fseek(fOut, *globalTell, SEEK_SET);
+ this->lf(2);
+ this->writeBlockSeparator();
+ *globalTell = 0;
}
string prefixName = skClassName.substr(0, 2);
string topicName = skClassName.length() > 2 && isupper(skClassName[2]) &&
("Sk" == prefixName || "Gr" == prefixName) ? skClassName.substr(2) : skClassName;
- this->writeTagNoLF("Topic", topicName);
- this->writeEndTag("Alias", topicName + "_Reference");
- this->lf(2);
+ if (globalFileName != fileName) {
+ this->writeTagNoLF("Topic", topicName);
+ this->writeEndTag("Alias", topicName + "_Reference");
+ this->lf(2);
+ }
auto& classMap = fIClassMap[skClassName];
SkASSERT(KeyWord::kClass == classMap.fKeyWord || KeyWord::kStruct == classMap.fKeyWord);
const char* containerType = KeyWord::kClass == classMap.fKeyWord ? "Class" : "Struct";
@@ -1258,6 +1318,15 @@
return true;
}
+void IncludeParser::dumpTypedef(const Definition& token, string className) {
+ this->writeTag("Typedef");
+ this->writeSpace();
+ this->writeString(token.fName);
+ this->writeTagTable("Line", "incomplete");
+ this->lf(2);
+ this->dumpComment(token);
+}
+
bool IncludeParser::findComments(const Definition& includeDef, Definition* markupDef) {
// add comment preceding class, if any
const Definition* parent = includeDef.fParent;
@@ -1341,6 +1410,32 @@
return parent ? parent->fBracket : Bracket::kNone;
}
+bool IncludeParser::inAlignAs() const {
+ if (fParent->fTokens.size() < 2) {
+ return false;
+ }
+ auto reverseIter = fParent->fTokens.end();
+ bool checkForBracket = true;
+ while (fParent->fTokens.begin() != reverseIter) {
+ std::advance(reverseIter, -1);
+ if (checkForBracket) {
+ if (Definition::Type::kBracket != reverseIter->fType) {
+ return false;
+ }
+ if (Bracket::kParen != reverseIter->fBracket) {
+ return false;
+ }
+ checkForBracket = false;
+ continue;
+ }
+ if (Definition::Type::kKeyWord != reverseIter->fType) {
+ return false;
+ }
+ return KeyWord::kAlignAs == reverseIter->fKeyWord;
+ }
+ return false;
+}
+
// caller just returns, so report error here
bool IncludeParser::parseClass(Definition* includeDef, IsStruct isStruct) {
SkASSERT(includeDef->fTokens.size() > 0);
@@ -1350,6 +1445,14 @@
// todo : documentation is ignoring this for now
iter = std::next(iter);
}
+ bool hasAlignAs = iter->fKeyWord == KeyWord::kAlignAs;
+ if (hasAlignAs) {
+ iter = std::next(iter);
+ if (Definition::Type::kBracket != iter->fType || Bracket::kParen != iter->fBracket) {
+ return includeDef->reportError<bool>("expected alignas argument");
+ }
+ iter = std::next(iter);
+ }
string nameStr(iter->fStart, iter->fContentEnd - iter->fStart);
includeDef->fName = nameStr;
iter = std::next(iter);
@@ -1378,7 +1481,18 @@
// if (1 != includeDef->fChildren.size()) {
// return false; // fix me: SkCanvasClipVisitor isn't correctly parsed
// }
- includeDef = includeDef->fChildren.front();
+ auto includeDefIter = includeDef->fChildren.begin();
+ if (hasAlignAs) {
+ SkASSERT(includeDef->fChildren.end() != includeDefIter);
+ SkASSERT(Bracket::kParen == (*includeDefIter)->fBracket);
+ std::advance(includeDefIter, 1);
+ }
+ if (includeDef->fChildren.end() != includeDefIter
+ && Bracket::kAngle == (*includeDefIter)->fBracket) {
+ std::advance(includeDefIter, 1);
+ }
+ includeDef = *includeDefIter;
+ SkASSERT(Bracket::kBrace == includeDef->fBracket);
iter = includeDef->fTokens.begin();
// skip until public
int publicIndex = 0;
@@ -1402,7 +1516,7 @@
const char* privateName = kKeyWords[(int) KeyWord::kPrivate].fName;
size_t privateLen = strlen(privateName);
auto childIter = includeDef->fChildren.begin();
- while ((*childIter)->fPrivate) {
+ while (includeDef->fChildren.end() != childIter && (*childIter)->fPrivate) {
std::advance(childIter, 1);
}
while (childIter != includeDef->fChildren.end()) {
@@ -1861,9 +1975,6 @@
tokenIter = operatorCheck;
}
string nameStr(tokenIter->fStart, nameEnd - tokenIter->fStart);
- if (string::npos != nameStr.find("sizeof")) {
- SkDebugf("");
- }
if (addConst) {
nameStr += "_const";
}
@@ -2070,7 +2181,7 @@
fAttrDeprecated = &*tokenIter;
break;
}
- if ('f' == previousToken.fStart[0] && isupper(previousToken.fStart[1])) {
+ if (this->isMember(*tokenIter)) {
break;
}
if (Bracket::kPound == child->fParent->fBracket &&
@@ -2391,7 +2502,7 @@
if (match == this->topBracket()) {
this->popBracket();
if (!fInFunction) {
- fInFunction = ')' == test;
+ fInFunction = ')' == test && !this->inAlignAs();
} else {
fInFunction = '}' != test;
}
@@ -2587,7 +2698,7 @@
fParent->fTokens.begin() != tokenIter; ) {
--tokenIter;
if (tokenIter->fLineCount == fLineCount) {
- if ('f' == tokenIter->fStart[0] && isupper(tokenIter->fStart[1])) {
+ if (this->isMember(*tokenIter)) {
if (namedIter != fParent->fTokens.end()) {
return reportError<bool>("found two named member tokens");
}
diff --git a/tools/bookmaker/includeWriter.cpp b/tools/bookmaker/includeWriter.cpp
index 922f220..d0981ec 100644
--- a/tools/bookmaker/includeWriter.cpp
+++ b/tools/bookmaker/includeWriter.cpp
@@ -1218,6 +1218,7 @@
case KeyWord::kSize_t:
case KeyWord::kFloat:
case KeyWord::kBool:
+ case KeyWord::kChar:
case KeyWord::kVoid:
if (!typeStart) {
typeStart = &token;
@@ -1781,6 +1782,7 @@
memberStart = &child;
}
break;
+ case KeyWord::kAlignAs:
case KeyWord::kPublic:
case KeyWord::kPrivate:
case KeyWord::kProtected:
@@ -2691,6 +2693,7 @@
// find end of copyright header
fChar = fStart;
+ this->skipWhiteSpace();
if (!this->skipExact(
"/*\n"
" * Copyright ")) {
diff --git a/tools/bookmaker/mdOut.cpp b/tools/bookmaker/mdOut.cpp
index 4fdc206..c3a985c 100644
--- a/tools/bookmaker/mdOut.cpp
+++ b/tools/bookmaker/mdOut.cpp
@@ -2121,7 +2121,7 @@
void MdOut::subtopicOut(string name) {
const Definition* topicParent = fSubtopic ? fSubtopic->topicParent() : nullptr;
- Definition* csParent = this->csParent();
+ Definition* csParent = fRoot && fRoot->isStructOrClass() ? fRoot : this->csParent();
if (!csParent) {
auto csIter = std::find_if(topicParent->fChildren.begin(), topicParent->fChildren.end(),
[](const Definition* def){ return MarkType::kEnum == def->fMarkType
diff --git a/tools/bookmaker/spellCheck.cpp b/tools/bookmaker/spellCheck.cpp
index 39621db..5b1ab1d 100644
--- a/tools/bookmaker/spellCheck.cpp
+++ b/tools/bookmaker/spellCheck.cpp
@@ -22,6 +22,8 @@
words in external not seen
look for x-bit but allow x bits
+
+don't treat 'pos' or 'glyphs' as spell-checkable as in 'RunBuffer.pos' or 'RunBuffer.glyphs'
*/
struct CheckEntry {
@@ -469,6 +471,11 @@
allLower = false;
case '-': // note that dash doesn't clear allLower
break;
+ case '!':
+ if (!inQuotes) {
+ wordEnd = chPtr;
+ }
+ break;
case '\n':
++fLocalLine;
// fall through
@@ -663,9 +670,6 @@
}
iter->second.fCount += 1;
} else {
- if ("e" == str) {
- SkDebugf("");
- }
CheckEntry* entry = &mappy[str];
entry->fFile = fFileName;
entry->fLine = fLineCount + fLocalLine;