aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--docs/SkBitmap_Reference.bmh3631
-rw-r--r--docs/SkCanvas_Reference.bmh126
-rw-r--r--docs/SkIRect_Reference.bmh1043
-rw-r--r--docs/SkMatrix_Reference.bmh2388
-rw-r--r--docs/SkPaint_Reference.bmh41
-rw-r--r--docs/SkPixmap_Reference.bmh146
-rw-r--r--docs/SkRect_Reference.bmh1320
-rw-r--r--docs/undocumented.bmh99
-rw-r--r--site/user/api/SkBitmap_Reference.md3632
-rw-r--r--site/user/api/SkCanvas_Reference.md421
-rw-r--r--site/user/api/SkPaint_Reference.md95
-rw-r--r--site/user/api/SkPath_Reference.md112
-rw-r--r--site/user/api/SkPixmap_Reference.md148
-rw-r--r--site/user/api/undocumented.md282
-rw-r--r--tools/bookmaker/bookmaker.cpp75
-rw-r--r--tools/bookmaker/mdOut.cpp19
-rw-r--r--tools/bookmaker/spellCheck.cpp4
17 files changed, 12884 insertions, 698 deletions
diff --git a/docs/SkBitmap_Reference.bmh b/docs/SkBitmap_Reference.bmh
new file mode 100644
index 0000000000..03e8a103bb
--- /dev/null
+++ b/docs/SkBitmap_Reference.bmh
@@ -0,0 +1,3631 @@
+#Topic Bitmap
+#Alias Bitmaps
+#Alias Bitmap_Reference
+
+#Class SkBitmap
+
+Bitmap describes a two-dimensional raster pixel array. Bitmap is built on
+Image_Info, containing integer width and height, Color_Type and Alpha_Type
+describing the pixel format, and Color_Space describing the range of colors.
+Bitmap points to Pixel_Ref, which describes the physical array of pixels.
+Image_Info bounds may be located anywhere fully inside Pixel_Ref bounds.
+
+Bitmap can be drawn using Canvas. Bitmap can be a drawing destination for Canvas
+draw methods. Bitmap flexibility as a pixel container limits some optimizations
+available to the target platform.
+
+If pixel array is primarily read-only, use Image for better performance.
+If pixel array is primarily written to, use Surface for better performance.
+
+Declaring SkBitmap const prevents altering Image_Info: the Bitmap height, width,
+and so on cannot change. It does not affect Pixel_Ref: a caller may write its
+pixels. Declaring SkBitmap const affects Bitmap configuration, not its contents.
+
+Bitmap is not thread safe. Each thread must have its own copy if Bitmap fields,
+although threads may share the underlying pixel array.
+
+#Topic Row_Bytes
+Bitmap pixels may be contiguous, or may have a gap at the end of each row.
+Row_Bytes is the interval from one row to the next. Row_Bytes may be specified;
+sometimes passing zero will compute the Row_Bytes from the row width and the
+number of bytes in a pixel. Row_Bytes may be larger than the row requires. This
+is useful to position one or more Bitmaps within a shared pixel array.
+##
+
+#Topic Overview
+
+#Subtopic Subtopics
+#ToDo manually add subtopics ##
+#Table
+#Legend
+# topics # description ##
+#Legend ##
+#Table ##
+##
+
+#Subtopic Structs
+#Table
+#Legend
+# description # struct ##
+#Legend ##
+# Allocator # ##
+# HeapAllocator # ##
+#Table ##
+#Subtopic ##
+
+#Subtopic Constructors
+#Table
+#Legend
+# description # function ##
+#Legend ##
+# SkBitmap() # Constructs with default values. ##
+# SkBitmap(SkBitmap&& src) # Takes ownership of pixels. ##
+# SkBitmap(const SkBitmap& src) # Shares ownership of pixels. ##
+# ~SkBitmap() # Releases ownership of pixels. ##
+#Table ##
+#Subtopic ##
+
+#Subtopic Operators
+#Table
+#Legend
+# description # function ##
+#Legend ##
+# SkBitmap& operator=(SkBitmap&& src) # Takes ownership of pixels. ##
+# SkBitmap& operator=(const SkBitmap& src) # Shares ownership of pixels. ##
+#Table ##
+#Subtopic ##
+
+#Subtopic Member_Functions
+#Table
+#Legend
+# description # function ##
+#Legend ##
+# ComputeIsOpaque # Returns true if all pixels are opaque. ##
+# allocN32Pixels # Allocates compatible Color_ARGB pixels, or aborts. ##
+# allocPixels # Allocates pixels from Image_Info, or aborts. ##
+# allocPixelsFlags # Allocates pixels from Image_Info with options, or aborts. ##
+# alphaType # Returns Image_Info Alpha_Type. ##
+# bounds() # Returns width and height as Rectangle. ##
+# bytesPerPixel # Returns number of bytes in pixel based on Color_Type. ##
+# colorSpace # Returns Image_Info Color_Space. ##
+# colorType # Returns Image_Info Color_Type. ##
+# computeSafeSize64 # Returns minimum size required for pixels in 64 bits. ##
+# computeSize64 # Returns conservative size required for pixels. ##
+# dimensions # Returns width and height. ##
+# drawsNothing # Returns true if no width, no height, or no Pixel_Ref. ##
+# empty() # Returns true if Image_Info has zero width or height. ##
+# erase() # Writes Color to rectangle of pixels. ##
+# eraseARGB # Writes Color to pixels. ##
+# eraseArea # Deprecated ##
+# eraseColor # Writes Color to pixels. ##
+# eraseRGB # Writes opaque Color to pixels. ##
+# extractAlpha # Creates Bitmap containing Alpha of pixels. ##
+# extractSubset # Creates Bitmap, sharing pixels if possible. ##
+# getAddr # Returns readable pixel address as void pointer. ##
+# getAddr16 # Returns readable pixel address as 16-bit pointer. ##
+# getAddr32 # Returns readable pixel address as 32-bit pointer. ##
+# getAddr8 # Returns readable pixel address as 8-bit pointer. ##
+# getBounds # Returns width and height as Rectangle. ##
+# getColor # Returns one pixel as Unpremultiplied Color. ##
+# getGenerationID # Returns unique ID. ##
+# getPixels # Returns address of pixels. ##
+# getSafeSize # Returns minimum size required for pixels in 32 bits. ##
+# getSize # Returns conservative size required for pixels in 32 bits. ##
+# getSubset # Returns bounds offset by origin. ##
+# hasHardwareMipMap # Returns Mip_Map support present; Android only. ##
+# height # Returns pixel row count. ##
+# info() # Returns Image_Info. ##
+# installMaskPixels # Creates Pixel_Ref from Mask. ##
+# installPixels # Creates Pixel_Ref, with optional release function. ##
+# isImmutable # Returns true if pixels will not change. ##
+# isNull # Returns true if Pixel_Ref is nullptr. ##
+# isOpaque # Returns true if Image_Info describes opaque pixels. ##
+# isVolatile # Returns true if pixels should not be cached. ##
+# notifyPixelsChanged # Marks pixels as changed, altering the unique ID. ##
+# peekPixels # Returns Pixmap if possible. ##
+# pixelRef # Returns Pixel_Ref, or nullptr. ##
+# pixelRefOrigin # Returns offset within Pixel_Ref. ##
+# readPixels # Copies and converts pixels. ##
+# readyToDraw # Returns true if address of pixels is not nullptr. ##
+# refColorSpace # Returns Image_Info Color_Space. ##
+# reset() # Sets to default values, releases pixel ownership. ##
+# rowBytes # Returns interval between rows in bytes. ##
+# rowBytesAsPixels # Returns interval between rows in pixels. ##
+# setAlphaType # Sets Alpha_Type of shared pixels. ##
+# setHasHardwareMipMap # Sets Mip_Map support present; Android only. ##
+# setImmutable # Marks that pixels will not change. ##
+# setInfo # Sets height, width, Color_Type, and so on, releasing pixels. ##
+# setIsVolatile # Marks if pixels should not be cached. ##
+# setPixelRef # Sets Pixel_Ref and offset. ##
+# setPixels # Sets Pixel_Ref without an offset. ##
+# shiftPerPixel # Returns bit shift from pixels to bytes. ##
+# swap() # Exchanges Bitmap pair. ##
+# toString # Converts Bitmap to machine readable form. ##
+# tryAllocN32Pixels # Allocates compatible Color_ARGB pixels if possible. ##
+# tryAllocPixels # Allocates pixels from Image_Info if possible. ##
+# tryAllocPixelsFlags # Allocates pixels from Image_Info with options if possible. ##
+# width() # Returns pixel column count. ##
+# writePixels # Copies and converts pixels. ##
+#Table ##
+#Subtopic ##
+
+#Topic ##
+
+# ------------------------------------------------------------------------------
+
+#Class Allocator
+
+#Code
+ class Allocator : public SkRefCnt {
+ public:
+ virtual bool allocPixelRef(SkBitmap* bitmap) = 0;
+ };
+##
+
+Abstract subclass of HeapAllocator.
+
+# ------------------------------------------------------------------------------
+
+#Method virtual bool allocPixelRef(SkBitmap* bitmap) = 0
+
+Allocates the pixel memory for the bitmap, given its dimensions and
+Color_Type. Returns true on success, where success means either setPixels
+or setPixelRef was called.
+
+#Param bitmap Bitmap containing Image_Info as input, and Pixel_Ref as output ##
+
+#Return true if Pixel_Ref was allocated ##
+
+#NoExample
+##
+
+#SeeAlso HeapAllocator
+
+##
+
+#Class Allocator ##
+
+# ------------------------------------------------------------------------------
+
+#Class HeapAllocator
+
+#Code
+ class HeapAllocator : public Allocator {
+ public:
+ bool allocPixelRef(SkBitmap* bitmap) override;
+ };
+##
+
+Subclass of Allocator that returns a Pixel_Ref that allocates its pixel
+memory from the heap. This is the default Allocator invoked by
+allocPixels.
+
+# ------------------------------------------------------------------------------
+
+#Method bool allocPixelRef(SkBitmap* bitmap) override
+
+Allocates the pixel memory for the bitmap, given its dimensions and
+Color_Type. Returns true on success, where success means either setPixels
+or setPixelRef was called.
+
+#Param bitmap Bitmap containing Image_Info as input, and Pixel_Ref as output ##
+
+#Return true if pixels are allocated ##
+
+#Example
+ SkBitmap bitmap;
+ bitmap.setInfo(SkImageInfo::MakeN32(16, 16, kPremul_SkAlphaType));
+ SkDebugf("pixel address = %p\n", bitmap.getPixels());
+ SkBitmap::HeapAllocator stdalloc;
+ if (!stdalloc.allocPixelRef(&bitmap)) {
+ SkDebugf("pixel allocation failed\n");
+ } else {
+ SkDebugf("pixel address = %p\n", bitmap.getPixels());
+ }
+#StdOut
+pixel address = (nil)
+pixel address = 0x560ddd0ac670
+##
+##
+
+#SeeAlso Allocator tryAllocPixels
+
+##
+
+#class HeapAllocator ##
+
+# ------------------------------------------------------------------------------
+
+#Method SkBitmap()
+
+Creates an empty Bitmap without pixels, with kUnknown_SkColorType,
+kUnknown_SkAlphaType, and with a width and height of zero. Pixel_Ref origin is
+set to (0, 0). Bitmap is not volatile.
+
+Use setInfo to associate SkColorType, SkAlphaType, width, and height
+after Bitmap has been created.
+
+#Return empty Bitmap ##
+
+#Example
+void draw(SkCanvas* canvas) {
+ const char* alphas[] = {"Unknown", "Opaque", "Premul", "Unpremul"};
+ const char* colors[] = {"Unknown", "Alpha", "RGB_565", "ARGB_4444", "RGBA_8888", "BGRA_8888",
+ "Gray_8", "RGBA_F16"};
+ SkBitmap bitmap;
+ for (int i = 0; i < 2; ++i) {
+ SkDebugf("width: %2d height: %2d", bitmap.width(), bitmap.height());
+ SkDebugf(" color: k%s_SkColorType", colors[bitmap.colorType()]);
+ SkDebugf(" alpha: k%s_SkAlphaType\n", alphas[bitmap.alphaType()]);
+ bitmap.setInfo(SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType),
+ 0);
+ }
+}
+#StdOut
+width: 0 height: 0 color: kUnknown_SkColorType alpha: kUnknown_SkAlphaType
+width: 25 height: 35 color: kRGBA_8888_SkColorType alpha: kOpaque_SkAlphaType
+##
+##
+
+#SeeAlso setInfo
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkBitmap(const SkBitmap& src)
+
+Copies settings from src to returned Bitmap. Shares pixels if src has pixels
+allocated, so both bitmaps reference the same pixels.
+
+#Param src Bitmap to copy Image_Info, and share Pixel_Ref ##
+
+#Return copy of src ##
+
+#Example
+void draw(SkCanvas* canvas) {
+ SkBitmap original;
+ original.tryAllocPixels(SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType));
+ SkDebugf("original has pixels before copy: %s\n", original.getPixels() ? "true" : "false");
+ SkBitmap copy(original);
+ SkDebugf("original has pixels after copy: %s\n", original.getPixels() ? "true" : "false");
+ SkDebugf("copy has pixels: %s\n", copy.getPixels() ? "true" : "false");
+}
+#StdOut
+original has pixels before copy: true
+original has pixels after copy: true
+copy has pixels: true
+##
+##
+
+#SeeAlso setInfo setPixelRef setPixels swap
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkBitmap(SkBitmap&& src)
+
+Copies settings from src to returned Bitmap. Moves ownership of src pixels to
+Bitmap.
+
+#Param src Bitmap to copy Image_Info, and reassign Pixel_Ref ##
+
+#Return copy of src ##
+
+#Example
+void draw(SkCanvas* canvas) {
+ SkBitmap original;
+ original.tryAllocPixels(SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType));
+ SkDebugf("original has pixels before move: %s\n", original.getPixels() ? "true" : "false");
+ SkBitmap copy(std::move(original));
+ SkDebugf("original has pixels after move: %s\n", original.getPixels() ? "true" : "false");
+ SkDebugf("copy has pixels: %s\n", copy.getPixels() ? "true" : "false");
+}
+#StdOut
+original has pixels before move: true
+original has pixels after move: false
+copy has pixels: true
+##
+##
+
+#SeeAlso setInfo setPixelRef setPixels swap
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method ~SkBitmap()
+
+Decrements Pixel_Ref reference count, if Pixel_Ref is not nullptr.
+
+#NoExample
+##
+
+#SeeAlso Pixel_Ref
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkBitmap& operator=(const SkBitmap& src)
+
+Copies settings from src to returned Bitmap. Shares pixels if src has pixels
+allocated, so both bitmaps reference the same pixels.
+
+#Param src Bitmap to copy Image_Info, and share Pixel_Ref ##
+
+#Return copy of src ##
+
+#Example
+void draw(SkCanvas* canvas) {
+ SkBitmap original;
+ original.tryAllocPixels(SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType));
+ SkDebugf("original has pixels before copy: %s\n", original.getPixels() ? "true" : "false");
+ SkBitmap copy = original;
+ SkDebugf("original has pixels after copy: %s\n", original.getPixels() ? "true" : "false");
+ SkDebugf("copy has pixels: %s\n", copy.getPixels() ? "true" : "false");
+}
+#StdOut
+original has pixels before copy: true
+original has pixels after copy: true
+copy has pixels: true
+##
+##
+
+#SeeAlso setInfo setPixelRef setPixels swap
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkBitmap& operator=(SkBitmap&& src)
+
+Copies settings from src to returned Bitmap. Moves ownership of src pixels to
+Bitmap.
+
+#Param src Bitmap to copy Image_Info, and reassign Pixel_Ref ##
+
+#Return copy of src ##
+
+#Example
+void draw(SkCanvas* canvas) {
+ SkBitmap original;
+ original.tryAllocPixels(SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType));
+ SkDebugf("original has pixels before move: %s\n", original.getPixels() ? "true" : "false");
+ SkBitmap copy = std::move(original);
+ SkDebugf("original has pixels after move: %s\n", original.getPixels() ? "true" : "false");
+ SkDebugf("copy has pixels: %s\n", copy.getPixels() ? "true" : "false");
+}
+#StdOut
+original has pixels before move: true
+original has pixels after move: false
+copy has pixels: true
+##
+##
+
+#SeeAlso setInfo setPixelRef setPixels swap
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void swap(SkBitmap& other)
+
+Swaps the fields of the two bitmaps.
+
+#Param other Bitmap exchanged with original ##
+
+#Example
+void draw(SkCanvas* canvas) {
+ auto debugster = [](const char* prefix, const SkBitmap& b) -> void {
+ const char* alphas[] = {"Unknown", "Opaque", "Premul", "Unpremul"};
+ const char* colors[] = {"Unknown", "Alpha", "RGB_565", "ARGB_4444", "RGBA_8888", "BGRA_8888",
+ "Gray_8", "RGBA_F16"};
+ SkDebugf("%s width:%d height:%d colorType:k%s_SkColorType alphaType:k%s_SkAlphaType\n",
+ prefix, b.width(), b.height(), colors[b.colorType()], alphas[b.alphaType()]);
+ };
+ SkBitmap one, two;
+ one.tryAllocPixels(SkImageInfo::Make(1, 1, kRGBA_8888_SkColorType, kOpaque_SkAlphaType));
+ two.tryAllocPixels(SkImageInfo::Make(2, 2, kBGRA_8888_SkColorType, kPremul_SkAlphaType));
+ for (int index = 0; index < 2; ++index) {
+ debugster("one", one);
+ debugster("two", two);
+ one.swap(two);
+ }
+}
+#StdOut
+one width:1 height:1 colorType:kRGBA_8888_SkColorType alphaType:kOpaque_SkAlphaType
+two width:2 height:2 colorType:kBGRA_8888_SkColorType alphaType:kPremul_SkAlphaType
+one width:2 height:2 colorType:kBGRA_8888_SkColorType alphaType:kPremul_SkAlphaType
+two width:1 height:1 colorType:kRGBA_8888_SkColorType alphaType:kOpaque_SkAlphaType
+##
+##
+
+#SeeAlso SkBitmap(SkBitmap&& src) operator=(SkBitmap&& src)
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method const SkImageInfo& info() const
+
+Returns width, height, Alpha_Type, Color_Type, and Color_Space.
+
+#Return reference to Image_Info ##
+
+#Example
+#Image 4
+void draw(SkCanvas* canvas) {
+ // SkBitmap source; // pre-populated with soccer ball by fiddle.skia.org
+ const SkImageInfo& info = source.info();
+ const char* alphas[] = {"Unknown", "Opaque", "Premul", "Unpremul"};
+ const char* colors[] = {"Unknown", "Alpha", "RGB_565", "ARGB_4444",
+ "RGBA_8888", "BGRA_8888", "Gray_8", "RGBA_F16"};
+ SkDebugf("width: %d height: %d color: %s alpha: %s\n", info.width(), info.height(),
+ colors[info.colorType()], alphas[info.alphaType()]);
+#StdOut
+width: 56 height: 56 color: BGRA_8888 alpha: Opaque
+##
+}
+##
+
+#SeeAlso Image_Info
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int width() const
+
+Returns pixel count in each pixel row. Should be equal or less than:
+#Formula
+rowBytes() / info().bytesPerPixel()
+##
+.
+
+Maybe be less than pixelRef().width(). Will not exceed pixelRef().width() less
+pixelRefOrigin().fX.
+
+#Return pixel width in Image_Info ##
+
+#Example
+ SkImageInfo info = SkImageInfo::MakeA8(16, 32);
+ SkBitmap bitmap;
+ bitmap.setInfo(info);
+ SkDebugf("bitmap width: %d info width: %d\n", bitmap.width(), info.width());
+#StdOut
+bitmap width: 16 info width: 16
+##
+##
+
+#SeeAlso height() SkPixelRef::width() SkImageInfo::width()
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int height() const
+
+Returns pixel row count.
+
+Maybe be less than pixelRef().height(). Will not exceed pixelRef().height() less
+pixelRefOrigin().fY.
+
+#Return pixel height in Image_Info ##
+
+#Example
+ SkImageInfo info = SkImageInfo::MakeA8(16, 32);
+ SkBitmap bitmap;
+ bitmap.setInfo(info);
+ SkDebugf("bitmap height: %d info height: %d\n", bitmap.height(), info.height());
+#StdOut
+bitmap height: 32 info height: 32
+##
+##
+
+#SeeAlso width() SkPixelRef::height() SkImageInfo::height()
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkColorType colorType() const
+
+Returns Color_Type, one of: kUnknown_SkColorType, kAlpha_8_SkColorType,
+kRGB_565_SkColorType, kARGB_4444_SkColorType, kRGBA_8888_SkColorType,
+kBGRA_8888_SkColorType, kGray_8_SkColorType, kRGBA_F16_SkColorType.
+
+#Return Color_Type in Image_Info ##
+
+#Example
+ const char* colors[] = {"Unknown", "Alpha", "RGB_565", "ARGB_4444",
+ "RGBA_8888", "BGRA_8888", "Gray_8", "RGBA_F16"};
+ SkBitmap bitmap;
+ bitmap.setInfo(SkImageInfo::MakeA8(16, 32));
+ SkDebugf("color type: k" "%s" "_SkColorType\n", colors[bitmap.colorType()]);
+#StdOut
+color type: kAlpha_SkColorType
+##
+##
+
+#SeeAlso alphaType() SkImageInfo::colorType
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkAlphaType alphaType() const
+
+Returns Alpha_Type, one of: kUnknown_SkAlphaType, kOpaque_SkAlphaType,
+kPremul_SkAlphaType, kUnpremul_SkAlphaType.
+
+#Return Alpha_Type in Image_Info ##
+
+#Example
+ const char* alphas[] = {"Unknown", "Opaque", "Premul", "Unpremul"};
+ SkPixmap pixmap(SkImageInfo::MakeA8(16, 32), nullptr, 64);
+ SkDebugf("alpha type: k" "%s" "_SkAlphaType\n", alphas[pixmap.alphaType()]);
+#StdOut
+alpha type: kPremul_SkAlphaType
+##
+##
+
+#SeeAlso colorType() SkImageInfo::alphaType
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkColorSpace* colorSpace() const
+
+Returns Color_Space, the range of colors, associated with Image_Info. The
+reference count of Color_Space is unchanged. The returned Color_Space is
+immutable.
+
+#Return Color_Space in Image_Info ##
+
+#Example
+#Description
+SkColorSpace::MakeSRGBLinear creates Color_Space with linear gamma
+and an sRGB gamut. This Color_Space gamma is not close to sRGB gamma.
+##
+ SkBitmap bitmap;
+ bitmap.setInfo(SkImageInfo::MakeN32(16, 32, kPremul_SkAlphaType,
+ SkColorSpace::MakeSRGBLinear()));
+ SkColorSpace* colorSpace = bitmap.colorSpace();
+ SkDebugf("gammaCloseToSRGB: %s gammaIsLinear: %s isSRGB: %s\n",
+ colorSpace->gammaCloseToSRGB() ? "true" : "false",
+ colorSpace->gammaIsLinear() ? "true" : "false",
+ colorSpace->isSRGB() ? "true" : "false");
+#StdOut
+gammaCloseToSRGB: false gammaIsLinear: true isSRGB: false
+##
+##
+
+#SeeAlso Color_Space SkImageInfo::colorSpace
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method sk_sp<SkColorSpace> refColorSpace() const
+
+Returns a smart pointer to Color_Space, the range of colors, associated with
+Image_Info. The smart pointer tracks the number of objects sharing this
+Color_Space reference so the memory is released when the owners destruct.
+
+The returned Color_Space is immutable.
+
+#Return Color_Space in Image_Info wrapped in a smart pointer ##
+
+#Example
+ SkBitmap bitmap1, bitmap2;
+ bitmap1.setInfo(SkImageInfo::MakeN32(16, 32, kPremul_SkAlphaType,
+ SkColorSpace::MakeSRGBLinear()));
+ bitmap2.setInfo(SkImageInfo::MakeN32(16, 32, kPremul_SkAlphaType,
+ bitmap1.refColorSpace()));
+ SkColorSpace* colorSpace = bitmap2.colorSpace();
+ SkDebugf("gammaCloseToSRGB: %s gammaIsLinear: %s isSRGB: %s\n",
+ colorSpace->gammaCloseToSRGB() ? "true" : "false",
+ colorSpace->gammaIsLinear() ? "true" : "false",
+ colorSpace->isSRGB() ? "true" : "false");
+#StdOut
+gammaCloseToSRGB: false gammaIsLinear: true isSRGB: false
+##
+##
+
+#SeeAlso Color_Space SkImageInfo::colorSpace
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int bytesPerPixel() const
+
+Returns number of bytes per pixel required by Color_Type.
+Returns zero if colorType( is kUnknown_SkColorType.
+
+#Return bytes in pixel ##
+
+#Example
+ const char* colors[] = {"Unknown", "Alpha", "RGB_565", "ARGB_4444",
+ "RGBA_8888", "BGRA_8888", "Gray_8", "RGBA_F16"};
+ SkImageInfo info = SkImageInfo::MakeA8(1, 1);
+ SkBitmap bitmap;
+ for (SkColorType colorType : { kUnknown_SkColorType, kAlpha_8_SkColorType,
+ kRGB_565_SkColorType, kARGB_4444_SkColorType,
+ kRGBA_8888_SkColorType, kBGRA_8888_SkColorType,
+ kGray_8_SkColorType, kRGBA_F16_SkColorType } ) {
+ bitmap.setInfo(info.makeColorType(colorType));
+ SkDebugf("color: k" "%s" "_SkColorType" "%*s" "bytesPerPixel: %d\n",
+ colors[colorType], 10 - strlen(colors[colorType]), " ",
+ bitmap.bytesPerPixel());
+ }
+#StdOut
+color: kUnknown_SkColorType bytesPerPixel: 0
+color: kAlpha_SkColorType bytesPerPixel: 1
+color: kRGB_565_SkColorType bytesPerPixel: 2
+color: kARGB_4444_SkColorType bytesPerPixel: 2
+color: kRGBA_8888_SkColorType bytesPerPixel: 4
+color: kBGRA_8888_SkColorType bytesPerPixel: 4
+color: kGray_8_SkColorType bytesPerPixel: 1
+color: kRGBA_F16_SkColorType bytesPerPixel: 8
+##
+##
+
+#SeeAlso rowBytes rowBytesAsPixels width shiftPerPixel
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int rowBytesAsPixels() const
+
+Returns number of pixels that fit on row. Should be greater than or equal to
+width().
+
+#Return maximum pixels per row ##
+
+#Example
+ SkBitmap bitmap;
+ for (int rowBytes : { 4, 5, 6, 7, 8} ) {
+ bitmap.setInfo(SkImageInfo::MakeN32(1, 1, kPremul_SkAlphaType), rowBytes);
+ SkDebugf("rowBytes: %d rowBytesAsPixels: %d\n", rowBytes, bitmap.rowBytesAsPixels());
+ }
+#StdOut
+rowBytes: 4 rowBytesAsPixels: 1
+rowBytes: 5 rowBytesAsPixels: 1
+rowBytes: 6 rowBytesAsPixels: 1
+rowBytes: 7 rowBytesAsPixels: 1
+rowBytes: 8 rowBytesAsPixels: 2
+##
+##
+
+#SeeAlso rowBytes shiftPerPixel width bytesPerPixel
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int shiftPerPixel() const
+
+Returns bit shift converting row bytes to row pixels.
+Returns zero for kUnknown_SkColorType.
+
+#Return one of: 0, 1, 2, 3; left shift to convert pixels to bytes ##
+
+#Example
+ const char* colors[] = {"Unknown", "Alpha", "RGB_565", "ARGB_4444",
+ "RGBA_8888", "BGRA_8888", "Gray_8", "RGBA_F16"};
+ SkImageInfo info = SkImageInfo::MakeA8(1, 1);
+ SkBitmap bitmap;
+ for (SkColorType colorType : { kUnknown_SkColorType, kAlpha_8_SkColorType,
+ kRGB_565_SkColorType, kARGB_4444_SkColorType,
+ kRGBA_8888_SkColorType, kBGRA_8888_SkColorType,
+ kGray_8_SkColorType, kRGBA_F16_SkColorType } ) {
+ bitmap.setInfo(info.makeColorType(colorType));
+ SkDebugf("color: k" "%s" "_SkColorType" "%*s" "shiftPerPixel: %d\n",
+ colors[colorType], 10 - strlen(colors[colorType]), " ",
+ bitmap.shiftPerPixel());
+ }
+#StdOut
+color: kUnknown_SkColorType shiftPerPixel: 0
+color: kAlpha_SkColorType shiftPerPixel: 0
+color: kRGB_565_SkColorType shiftPerPixel: 1
+color: kARGB_4444_SkColorType shiftPerPixel: 1
+color: kRGBA_8888_SkColorType shiftPerPixel: 2
+color: kBGRA_8888_SkColorType shiftPerPixel: 2
+color: kGray_8_SkColorType shiftPerPixel: 0
+color: kRGBA_F16_SkColorType shiftPerPixel: 3
+##
+##
+
+#SeeAlso rowBytes rowBytesAsPixels width bytesPerPixel
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool empty() const
+
+Returns true if either width() or height() are zero.
+
+Does not check if Pixel_Ref is nullptr; call drawsNothing to check width(),
+height(), and Pixel_Ref.
+
+#Return true if dimensions do not enclose area ##
+
+#Example
+ SkBitmap bitmap;
+ for (int width : { 0, 2 } ) {
+ for (int height : { 0, 2 } ) {
+ bitmap.setInfo(SkImageInfo::MakeA8(width, height));
+ SkDebugf("width: %d height: %d empty: %s\n", width, height,
+ bitmap.empty() ? "true" : "false");
+ }
+ }
+#StdOut
+width: 0 height: 0 empty: true
+width: 0 height: 2 empty: true
+width: 2 height: 0 empty: true
+width: 2 height: 2 empty: false
+##
+##
+
+#SeeAlso height() width() drawsNothing
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isNull() const
+
+Return true if Pixel_Ref is nullptr.
+
+Does not check if width() or height() are zero; call drawsNothing to check
+width(), height(), and Pixel_Ref.
+
+#Return true if no Pixel_Ref is associated ##
+
+#Example
+ SkBitmap bitmap;
+ SkDebugf("empty bitmap does %shave pixels\n", bitmap.isNull() ? "not " : "");
+ bitmap.setInfo(SkImageInfo::MakeA8(8, 8));
+ SkDebugf("bitmap with dimensions does %shave pixels\n", bitmap.isNull() ? "not " : "");
+ bitmap.allocPixels();
+ SkDebugf("allocated bitmap does %shave pixels\n", bitmap.isNull() ? "not " : "");
+#StdOut
+empty bitmap does not have pixels
+bitmap with dimensions does not have pixels
+allocated bitmap does have pixels
+##
+##
+
+#SeeAlso empty() drawsNothing pixelRef
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool drawsNothing() const
+
+Return true if width() or height() are zero, or if Pixel_Ref is nullptr.
+If true, Bitmap has no effect when drawn or drawn into.
+
+#Return true if drawing has no effect ##
+
+#Example
+ SkBitmap bitmap;
+ for (int w : { 0, 8 } ) {
+ for (bool allocate : { false, true} ) {
+ bitmap.setInfo(SkImageInfo::MakeA8(w, 8));
+ allocate ? bitmap.allocPixels() : (void) 0 ;
+ SkDebugf("empty:%s isNull:%s drawsNothing:%s\n", bitmap.empty() ? "true " : "false",
+ bitmap.isNull() ? "true " : "false", bitmap.drawsNothing() ? "true" : "false");
+ }
+ }
+#StdOut
+empty:true isNull:true drawsNothing:true
+empty:true isNull:false drawsNothing:true
+empty:false isNull:true drawsNothing:true
+empty:false isNull:false drawsNothing:false
+##
+##
+
+#SeeAlso empty() isNull pixelRef
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t rowBytes() const
+
+Returns row bytes, the interval from one pixel row to the next. Row bytes
+is at least as large as
+#Formula
+width() * info().bytesPerPixel()
+##
+.
+
+Returns zero if colorType is kUnknown_SkColorType, or if row bytes supplied to
+setInfo is not large enough to hold a row of pixels.
+
+#Return byte length of pixel row ##
+
+#Example
+ SkBitmap bitmap;
+ for (int rowBytes : { 2, 8 } ) {
+ bool result = bitmap.setInfo(SkImageInfo::MakeA8(4, 4), rowBytes);
+ SkDebugf("setInfo returned:%s rowBytes:%d\n", result ? "true " : "false", bitmap.rowBytes());
+ }
+#StdOut
+setInfo returned:false rowBytes:0
+setInfo returned:true rowBytes:8
+##
+##
+
+#SeeAlso info() setInfo SkImageInfo::minRowBytes
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool setAlphaType(SkAlphaType alphaType)
+
+Sets Alpha_Type, if alphaType is compatible with Color_Type.
+Returns true unless alphaType is kUnknown_SkAlphaType and current Alpha_Type
+is not kUnknown_SkAlphaType.
+
+Returns true if Color_Type is kUnknown_SkColorType. alphaType is ignored, and
+Alpha_Type remains kUnknown_SkAlphaType.
+
+Returns true if Color_Type is kRGB_565_SkColorType or kGray_8_SkColorType.
+alphaType is ignored, and Alpha_Type remains kOpaque_SkAlphaType.
+
+If Color_Type is kARGB_4444_SkColorType, kRGBA_8888_SkColorType,
+kBGRA_8888_SkColorType, or kRGBA_F16_SkColorType: returns true unless
+alphaType is kUnknown_SkAlphaType and Alpha_Type is not kUnknown_SkAlphaType.
+If Alpha_Type is kUnknown_SkAlphaType, alphaType is ignored.
+
+If Color_Type is kAlpha_8_SkColorType, returns true unless
+alphaType is kUnknown_SkAlphaType and Alpha_Type is not kUnknown_SkAlphaType.
+If Alpha_Type is kUnknown_SkAlphaType, alphaType is ignored. If alphaType is
+kUnpremul_SkAlphaType, it is treated as kPremul_SkAlphaType.
+
+This changes Alpha_Type in Pixel_Ref; all bitmaps sharing Pixel_Ref
+are affected.
+
+#Param alphaType one of: kUnknown_SkAlphaType, kOpaque_SkAlphaType,
+ kPremul_SkAlphaType, kUnpremul_SkAlphaType
+##
+
+#Return true if Alpha_Type is set ##
+
+#Example
+void draw(SkCanvas* canvas) {
+ const char* colors[] = {"Unknown", "Alpha_8", "RGB_565", "ARGB_4444",
+ "RGBA_8888", "BGRA_8888", "Gray_8", "RGBA_F16"};
+ const char* alphas[] = {"Unknown ", "Opaque ", "Premul ", "Unpremul"};
+
+ SkBitmap bitmap;
+ SkAlphaType alphaTypes[] = { kUnknown_SkAlphaType, kOpaque_SkAlphaType,
+ kPremul_SkAlphaType, kUnpremul_SkAlphaType };
+ SkDebugf("%88s", "Canonical Unknown Opaque Premul Unpremul\n");
+ for (SkColorType colorType : { kUnknown_SkColorType, kAlpha_8_SkColorType, kRGB_565_SkColorType,
+ kARGB_4444_SkColorType, kRGBA_8888_SkColorType, kBGRA_8888_SkColorType,
+ kGray_8_SkColorType, kRGBA_F16_SkColorType } ) {
+ for (SkAlphaType canonicalAlphaType : alphaTypes) {
+ SkColorTypeValidateAlphaType(colorType, kUnknown_SkAlphaType, &canonicalAlphaType );
+ SkDebugf("%10s %10s ", colors[(int) colorType], alphas[(int) canonicalAlphaType ]);
+ for (SkAlphaType alphaType : alphaTypes) {
+ bitmap.setInfo(SkImageInfo::Make(4, 4, colorType, canonicalAlphaType));
+ bool result = bitmap.setAlphaType(alphaType);
+ SkDebugf("%s %s ", result ? "true " : "false", alphas[(int) bitmap.alphaType()]);
+ }
+ SkDebugf("\n");
+ }
+ }
+}
+##
+
+#SeeAlso Alpha_Type Color_Type Image_Info setInfo
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void* getPixels() const
+
+Returns pixel address, the base address corresponding to the pixel origin.
+
+#Return pixel address ##
+
+#Example
+ SkBitmap bitmap;
+ bitmap.setInfo(SkImageInfo::MakeN32(4, 4, kPremul_SkAlphaType));
+ bitmap.allocPixels();
+ bitmap.eraseColor(0x00000000);
+ void* baseAddr = bitmap.getPixels();
+ *(SkPMColor*)baseAddr = 0xFFFFFFFF;
+ SkDebugf("bitmap.getColor(0, 1) %c= 0x00000000\n",
+ bitmap.getColor(0, 1) == 0x00000000 ? '=' : '!');
+ SkDebugf("bitmap.getColor(0, 0) %c= 0xFFFFFFFF\n",
+ bitmap.getColor(0, 0) == 0xFFFFFFFF ? '=' : '!');
+#StdOut
+bitmap.getColor(0, 1) == 0x00000000
+bitmap.getColor(0, 0) == 0xFFFFFFFF
+##
+##
+
+#SeeAlso isNull drawsNothing
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t computeByteSize() const
+
+Returns minimum memory required for pixel storage.
+Does not include unused memory on last row when rowBytesAsPixels exceeds width().
+Returns zero if result does not fit in size_t.
+Returns zero if height() or width() is 0.
+Returns height() times rowBytes if colorType is kUnknown_SkColorType.
+
+#Return size in bytes of image buffer ##
+
+#Example
+ SkBitmap bitmap;
+ for (int width : { 1, 1000, 1000000 } ) {
+ for (int height: { 1, 1000, 1000000 } ) {
+ SkImageInfo imageInfo = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
+ bitmap.setInfo(imageInfo, width * 5);
+ SkDebugf("width: %7d height: %7d computeByteSize: %13lld\n", width, height,
+ bitmap.computeByteSize());
+ }
+ }
+#StdOut
+width: 1 height: 1 computeByteSize: 4
+width: 1 height: 1000 computeByteSize: 4999
+width: 1 height: 1000000 computeByteSize: 4999999
+width: 1000 height: 1 computeByteSize: 4000
+width: 1000 height: 1000 computeByteSize: 4999000
+width: 1000 height: 1000000 computeByteSize: 4999999000
+width: 1000000 height: 1 computeByteSize: 4000000
+width: 1000000 height: 1000 computeByteSize: 4999000000
+width: 1000000 height: 1000000 computeByteSize: 4999999000000
+##
+##
+
+#SeeAlso SkImageInfo::computeByteSize
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t getSize() const
+
+Returns conservative memory required for pixel storage.
+Includes unused memory on last row when rowBytesAsPixels exceeds width().
+
+Does not check to see if result fits in 32 bits. Use getSize64() if the
+result may exceed 32 bits.
+
+#Return height() times rowBytes() ##
+
+#Example
+#Description
+getSize results are not useful when width() and height() are large.
+##
+void draw(SkCanvas* canvas) {
+ SkBitmap bitmap;
+ for (int width : { 1, 1000, 1000000 } ) {
+ for (int height: { 1, 1000, 1000000 } ) {
+ SkImageInfo imageInfo = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
+ bitmap.setInfo(imageInfo, width * 5);
+ SkDebugf("width: %7d height: %7d getSize: %9zu\n", width, height, bitmap.getSize());
+ }
+ }
+}
+#StdOut
+width: 1 height: 1 getSize: 5
+width: 1 height: 1000 getSize: 5000
+width: 1 height: 1000000 getSize: 5000000
+width: 1000 height: 1 getSize: 5000
+width: 1000 height: 1000 getSize: 5000000
+width: 1000 height: 1000000 getSize: 705032704
+width: 1000000 height: 1 getSize: 5000000
+width: 1000000 height: 1000 getSize: 705032704
+width: 1000000 height: 1000000 getSize: 658067456
+##
+##
+
+#SeeAlso getSafeSize computeSize64 rowBytes width()
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t getSafeSize() const
+
+Returns minimum memory required for pixel storage.
+Does not include unused memory on last row when rowBytesAsPixels exceeds width().
+
+Returns zero if size does not fit in 32 bits. Use computeSafeSize64 if the
+result may exceed 32 bits.
+
+The pixel storage visible may be a subset of the Pixel_Ref. Accessing memory
+beyond the result may generate an exception.
+
+#Return exact pixel storage size ##
+
+#Example
+#Description
+getSafeSize results are not useful when width() and height() are large.
+##
+void draw(SkCanvas* canvas) {
+ SkBitmap bitmap;
+ for (int width : { 1, 1000, 1000000 } ) {
+ for (int height: { 1, 1000, 1000000 } ) {
+ SkImageInfo imageInfo = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
+ bitmap.setInfo(imageInfo, width * 5);
+ SkDebugf("width: %7d height: %7d getSafeSize: %9zu\n", width, height, bitmap.getSafeSize());
+ }
+ }
+}
+#StdOut
+width: 1 height: 1 getSafeSize: 4
+width: 1 height: 1000 getSafeSize: 4999
+width: 1 height: 1000000 getSafeSize: 4999999
+width: 1000 height: 1 getSafeSize: 4000
+width: 1000 height: 1000 getSafeSize: 4999000
+width: 1000 height: 1000000 getSafeSize: 0
+width: 1000000 height: 1 getSafeSize: 4000000
+width: 1000000 height: 1000 getSafeSize: 0
+width: 1000000 height: 1000000 getSafeSize: 0
+##
+##
+
+#SeeAlso getSize computeSafeSize64 rowBytes width()
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int64_t computeSize64() const
+
+Returns conservative memory required for pixel storage.
+Includes unused memory on last row when rowBytesAsPixels exceeds width().
+
+#Return conservative pixel storage size ##
+
+#Example
+void draw(SkCanvas* canvas) {
+ SkBitmap bitmap;
+ for (int width : { 1, 1000, 1000000 } ) {
+ for (int height: { 1, 1000, 1000000 } ) {
+ SkImageInfo imageInfo = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
+ bitmap.setInfo(imageInfo, width * 5);
+ SkDebugf("width: %7d height: %7d computeSize64: %13lld\n", width, height,
+ bitmap.computeSize64());
+ }
+ }
+}
+#StdOut
+width: 1 height: 1 computeSize64: 5
+width: 1 height: 1000 computeSize64: 5000
+width: 1 height: 1000000 computeSize64: 5000000
+width: 1000 height: 1 computeSize64: 5000
+width: 1000 height: 1000 computeSize64: 5000000
+width: 1000 height: 1000000 computeSize64: 5000000000
+width: 1000000 height: 1 computeSize64: 5000000
+width: 1000000 height: 1000 computeSize64: 5000000000
+width: 1000000 height: 1000000 computeSize64: 5000000000000
+##
+##
+
+#SeeAlso getSize computeSafeSize64 rowBytes width()
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int64_t computeSafeSize64() const
+
+Returns minimum memory required for pixel storage.
+Does not include unused memory on last row when rowBytesAsPixels exceeds width().
+
+#Return exact pixel storage size ##
+
+#Example
+void draw(SkCanvas* canvas) {
+ SkBitmap bitmap;
+ for (int width : { 1, 1000, 1000000 } ) {
+ for (int height: { 1, 1000, 1000000 } ) {
+ SkImageInfo imageInfo = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
+ bitmap.setInfo(imageInfo, width * 5);
+ SkDebugf("width: %7d height: %7d computeSafeSize64: %13lld\n", width, height,
+ bitmap.computeSafeSize64());
+ }
+ }
+}
+#StdOut
+width: 1 height: 1 computeSafeSize64: 4
+width: 1 height: 1000 computeSafeSize64: 4999
+width: 1 height: 1000000 computeSafeSize64: 4999999
+width: 1000 height: 1 computeSafeSize64: 4000
+width: 1000 height: 1000 computeSafeSize64: 4999000
+width: 1000 height: 1000000 computeSafeSize64: 4999999000
+width: 1000000 height: 1 computeSafeSize64: 4000000
+width: 1000000 height: 1000 computeSafeSize64: 4999000000
+width: 1000000 height: 1000000 computeSafeSize64: 4999999000000
+##
+##
+
+#SeeAlso getSafeSize computeSize64 rowBytes width()
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isImmutable() const
+
+Returns true if pixels can not change.
+
+Most immutable Bitmap checks trigger an assert only on debug builds.
+
+#Return true if pixels are immutable ##
+
+#Example
+ SkBitmap original;
+ SkImageInfo info = SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType);
+ if (original.tryAllocPixels(info)) {
+ original.setImmutable();
+ SkBitmap copy;
+ original.extractSubset(&copy, {5, 10, 15, 20});
+ SkDebugf("original is " "%s" "immutable\n", original.isImmutable() ? "" : "not ");
+ SkDebugf("copy is " "%s" "immutable\n", copy.isImmutable() ? "" : "not ");
+ }
+#StdOut
+original is immutable
+copy is immutable
+##
+##
+
+#SeeAlso setImmutable SkPixelRef::isImmutable SkImage
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setImmutable()
+
+Once set, pixels can not change. Any other bitmap sharing the same Pixel_Ref
+are also marked as immutable. Once Pixel_Ref is marked immutable, the setting
+cannot be cleared.
+
+Writing to immutable Bitmap pixels triggers an assert on debug builds.
+
+#Example
+#Description
+Triggers assert if SK_DEBUG is true, runs fine otherwise.
+##
+ SkBitmap bitmap;
+ bitmap.setInfo(SkImageInfo::MakeN32(4, 4, kPremul_SkAlphaType));
+ bitmap.allocPixels();
+ SkCanvas offscreen(bitmap);
+ SkDebugf("draw white\n");
+ offscreen.clear(SK_ColorWHITE);
+ bitmap.setImmutable();
+ SkDebugf("draw black\n");
+ offscreen.clear(SK_ColorBLACK);
+##
+
+#SeeAlso isImmutable SkPixelRef::setImmutable SkImage
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isOpaque() const
+
+Returns true if Alpha_Type is kOpaque_SkAlphaType.
+Does not check if Color_Type allows Alpha, or if any pixel value has
+transparency.
+
+#Return true if Image_Info describes opaque Alpha ##
+
+#Example
+#Description
+ isOpaque ignores whether all pixels are opaque or not.
+##
+ const int height = 2;
+ const int width = 2;
+ SkBitmap bitmap;
+ bitmap.setInfo(SkImageInfo::Make(width, height, kN32_SkColorType, kPremul_SkAlphaType));
+ for (int index = 0; index < 2; ++index) {
+ bitmap.allocPixels();
+ bitmap.eraseColor(0x00000000);
+ SkDebugf("isOpaque: %s\n", bitmap.isOpaque() ? "true" : "false");
+ bitmap.eraseColor(0xFFFFFFFF);
+ SkDebugf("isOpaque: %s\n", bitmap.isOpaque() ? "true" : "false");
+ bitmap.setInfo(bitmap.info().makeAlphaType(kOpaque_SkAlphaType));
+ }
+#StdOut
+isOpaque: false
+isOpaque: false
+isOpaque: true
+isOpaque: true
+##
+##
+
+#SeeAlso ComputeIsOpaque SkImageInfo::isOpaque
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isVolatile() const
+
+If true, provides a hint to caller that pixels should not
+be cached. Only true if setIsVolatile has been called to mark as volatile.
+
+Volatile state is not shared by other bitmaps sharing the same Pixel_Ref.
+
+#Return true if marked volatile ##
+
+#Example
+ SkBitmap original;
+ SkImageInfo info = SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType);
+ if (original.tryAllocPixels(info)) {
+ original.setIsVolatile(true);
+ SkBitmap copy;
+ original.extractSubset(&copy, {5, 10, 15, 20});
+ SkDebugf("original is " "%s" "volatile\n", original.isVolatile() ? "" : "not ");
+ SkDebugf("copy is " "%s" "volatile\n", copy.isImmutable() ? "" : "not ");
+ }
+#StdOut
+original is volatile
+copy is not volatile
+##
+##
+
+#SeeAlso setIsVolatile
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setIsVolatile(bool isVolatile)
+
+Sets if pixels should be read from Pixel_Ref on every access. Bitmaps are not
+volatile by default; a GPU back end may upload pixel values expecting them to be
+accessed repeatedly. Marking temporary Bitmaps as volatile provides a hint to
+Device that the Bitmap pixels should not be cached. This can
+improve performance by avoiding overhead and reducing resource
+consumption on Device.
+
+#Param isVolatile true if backing pixels are temporary ##
+
+#Example
+#Height 20
+ SkBitmap bitmap;
+ bitmap.setInfo(SkImageInfo::Make(1, 1, kRGBA_8888_SkColorType, kOpaque_SkAlphaType));
+ bitmap.allocPixels();
+ bitmap.eraseColor(SK_ColorRED);
+ canvas->scale(16, 16);
+ canvas->drawBitmap(bitmap, 0, 0);
+ *(SkPMColor*) bitmap.getPixels() = SkPreMultiplyColor(SK_ColorBLUE);
+ canvas->drawBitmap(bitmap, 2, 0);
+ bitmap.setIsVolatile(true);
+ *(SkPMColor*) bitmap.getPixels() = SkPreMultiplyColor(SK_ColorGREEN);
+ canvas->drawBitmap(bitmap, 4, 0);
+##
+
+#SeeAlso isVolatile
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void reset()
+
+Resets to its initial state; all fields are set to zero, as if Bitmap had
+been initialized by SkBitmap().
+
+Sets width, height, row bytes to zero; pixel address to nullptr; SkColorType to
+kUnknown_SkColorType; and SkAlphaType to kUnknown_SkAlphaType.
+
+If Pixel_Ref is allocated, its reference count is decreased by one, releasing
+its memory if Bitmap is the sole owner.
+
+#Example
+ SkBitmap bitmap;
+ bitmap.setInfo(SkImageInfo::Make(1, 1, kRGBA_8888_SkColorType, kOpaque_SkAlphaType));
+ bitmap.allocPixels();
+ SkDebugf("width:%d height:%d isNull:%s\n", bitmap.width(), bitmap.height(),
+ bitmap.isNull() ? "true" : "false");
+ bitmap.reset();
+ SkDebugf("width:%d height:%d isNull:%s\n", bitmap.width(), bitmap.height(),
+ bitmap.isNull() ? "true" : "false");
+#StdOut
+width:1 height:1 isNull:false
+width:0 height:0 isNull:true
+##
+##
+
+#SeeAlso SkBitmap() SkAlphaType SkColorType
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static bool ComputeIsOpaque(const SkBitmap& bm)
+
+Returns true if all pixels are opaque. Color_Type determines how pixels
+are encoded, and whether pixel describes Alpha. Returns true for Color_Types
+without alpha in each pixel; for other Color_Types, returns true if all
+pixels have alpha values equivalent to 1.0 or greater.
+
+For Color_Types kRGB_565_SkColorType or kGray_8_SkColorType: always
+returns true. For Color_Types kAlpha_8_SkColorType, kBGRA_8888_SkColorType,
+kRGBA_8888_SkColorType: returns true if all pixel Alpha values are 255.
+For Color_Type kARGB_4444_SkColorType: returns true if all pixel Alpha values are 15.
+For kRGBA_F16_SkColorType: returns true if all pixel Alpha values are 1.0 or
+greater.
+
+Returns false for kUnknown_SkColorType.
+
+#Param bm Bitmap to check ##
+
+#Return true if all pixels have opaque values or Color_Type is opaque ##
+
+#Example
+ SkBitmap bitmap;
+ bitmap.setInfo(SkImageInfo::Make(2, 2, kN32_SkColorType, kPremul_SkAlphaType));
+ for (int index = 0; index < 2; ++index) {
+ bitmap.allocPixels();
+ bitmap.eraseColor(0x00000000);
+ SkDebugf("computeIsOpaque: %s\n", SkBitmap::ComputeIsOpaque(bitmap) ? "true" : "false");
+ bitmap.eraseColor(0xFFFFFFFF);
+ SkDebugf("computeIsOpaque: %s\n", SkBitmap::ComputeIsOpaque(bitmap) ? "true" : "false");
+ bitmap.setInfo(bitmap.info().makeAlphaType(kOpaque_SkAlphaType));
+ }
+#StdOut
+computeIsOpaque: false
+computeIsOpaque: true
+computeIsOpaque: false
+computeIsOpaque: true
+##
+##
+
+#SeeAlso isOpaque Color_Type Alpha
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void getBounds(SkRect* bounds) const
+
+Returns Rect { 0, 0, width(), height() }.
+
+#Param bounds container for floating point rectangle ##
+
+#Example
+#Height 160
+#Image 3
+ SkRect bounds;
+ source.getBounds(&bounds);
+ bounds.offset(100, 100);
+ SkPaint paint;
+ paint.setColor(SK_ColorGRAY);
+ canvas->scale(.25f, .25f);
+ canvas->drawRect(bounds, paint);
+ canvas->drawBitmap(source, 40, 40);
+##
+
+#SeeAlso bounds()
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void getBounds(SkIRect* bounds) const
+
+Returns IRect { 0, 0, width(), height() }.
+
+#Param bounds container for integral rectangle ##
+
+#Example
+#Image 3
+ SkIRect bounds;
+ source.getBounds(&bounds);
+ bounds.inset(100, 100);
+ SkBitmap bitmap;
+ source.extractSubset(&bitmap, bounds);
+ canvas->scale(.5f, .5f);
+ canvas->drawBitmap(bitmap, 10, 10);
+##
+
+#SeeAlso bounds()
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkIRect bounds() const
+
+Returns IRect { 0, 0, width(), height() }.
+
+#Return integral rectangle from origin to width() and height() ##
+
+#Example
+#Image 4
+ SkIRect bounds = source.bounds();
+ for (int x : { 0, bounds.width() } ) {
+ for (int y : { 0, bounds.height() } ) {
+ canvas->drawBitmap(source, x, y);
+ }
+ }
+##
+
+#SeeAlso getBounds
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkISize dimensions() const
+
+Returns ISize { width(), height() }.
+
+#Return integral size of width() and height() ##
+
+#Example
+ SkBitmap bitmap;
+ bitmap.setInfo(SkImageInfo::MakeN32(33, 55, kOpaque_SkAlphaType));
+ SkISize dimensions = bitmap.dimensions();
+ SkRect bounds;
+ bitmap.getBounds(&bounds);
+ SkRect dimensionsAsBounds = SkRect::Make(dimensions);
+ SkDebugf("dimensionsAsBounds %c= bounds\n", dimensionsAsBounds == bounds ? '=' : '!');
+##
+
+#SeeAlso height() width()
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkIRect getSubset() const
+
+Returns the bounds of this bitmap, offset by its Pixel_Ref origin.
+
+#Return bounds within Pixel_Ref bounds ##
+
+#Example
+#Image 3
+ SkIRect bounds;
+ source.getBounds(&bounds);
+ bounds.inset(100, 100);
+ SkBitmap subset;
+ source.extractSubset(&subset, bounds);
+ SkIRect r = source.getSubset();
+ SkDebugf("source: %d, %d, %d, %d\n", r.fLeft, r.fTop, r.fRight, r.fBottom);
+ r = subset.getSubset();
+ SkDebugf("subset: %d, %d, %d, %d\n", r.fLeft, r.fTop, r.fRight, r.fBottom);
+#StdOut
+source: 0, 0, 512, 512
+subset: 100, 100, 412, 412
+##
+##
+
+#SeeAlso extractSubset getBounds
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool setInfo(const SkImageInfo& imageInfo, size_t rowBytes = 0)
+
+Sets width, height, Alpha_Type, Color_Type, Color_Space, and optional
+rowBytes. Frees pixels, and returns true if successful.
+
+imageInfo.alphaType may be altered to a value permitted by imageInfo.colorSpace.
+If imageInfo.colorType is kUnknown_SkColorType, imageInfo.alphaType is
+set to kUnknown_SkAlphaType.
+If imageInfo.colorType is kAlpha_8_SkColorType and imageInfo.alphaType is
+kUnpremul_SkAlphaType, imageInfo.alphaType is replaced by kPremul_SkAlphaType.
+If imageInfo.colorType is kRGB_565_SkColorType or kGray_8_SkColorType,
+imageInfo.alphaType is set to kOpaque_SkAlphaType.
+If imageInfo.colorType is kARGB_4444_SkColorType, kRGBA_8888_SkColorType,
+kBGRA_8888_SkColorType, or kRGBA_F16_SkColorType: imageInfo.alphaType remains
+unchanged.
+
+rowBytes must equal or exceed imageInfo.minRowBytes. If imageInfo.colorSpace is
+kUnknown_SkColorType, rowBytes is ignored and treated as zero; for all other
+Color_Space values, rowBytes of zero is treated as imageInfo.minRowBytes.
+
+Calls reset() and returns false if:
+#List
+# rowBytes exceeds 31 bits ##
+# imageInfo.width() times imageInfo.bytesPerPixel exceeds 31 bits ##
+# imageInfo.width() is negative ##
+# imageInfo.height() is negative ##
+# rowBytes is positive and less than imageInfo.width() times imageInfo.bytesPerPixel ##
+##
+
+#Param imageInfo contains width, height, Alpha_Type, Color_Type, Color_Space ##
+#Param rowBytes imageInfo.minRowBytes or larger; or zero ##
+
+#Return true if Image_Info set successfully ##
+
+#Example
+#Height 96
+###^
+SkBitmap bitmap;
+bitmap.setInfo(SkImageInfo::MakeN32(44, 16, kOpaque_SkAlphaType));
+bitmap.allocPixels();
+bitmap.eraseColor(SK_ColorGREEN);
+SkCanvas offscreen(bitmap);
+SkPaint paint;
+offscreen.drawString("!@#$%", 0, 12, paint);
+canvas->scale(6, 6);
+canvas->drawBitmap(bitmap, 0, 0);
+^^^#
+##
+
+#SeeAlso Alpha_Type Color_Type Color_Space height rowBytes width
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Enum AllocFlags
+
+#Code
+ enum AllocFlags {
+ kZeroPixels_AllocFlag = 1 << 0,
+ };
+##
+
+AllocFlags provides the option to zero pixel memory when allocated.
+
+#Const kZeroPixels_AllocFlag 1
+ Instructs tryAllocPixelsFlags and allocPixelsFlags to zero pixel memory.
+##
+
+#NoExample
+##
+
+#SeeAlso tryAllocPixelsFlags allocPixelsFlags erase() eraseColor
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT tryAllocPixelsFlags(const SkImageInfo& info, uint32_t flags)
+
+Sets Image_Info to info following the rules in setInfo and allocates pixel
+memory. If flags is kZeroPixels_AllocFlag, memory is zeroed.
+
+Returns false and calls reset() if Image_Info could not be set, or memory could
+not be allocated, or memory size exceeds 31 bits, or memory could not optionally
+be zeroed.
+
+On most platforms, allocating pixel memory may succeed even though there is
+not sufficient memory to hold pixels; allocation does not take place
+until the pixels are written to. The actual behavior depends on the platform
+implementation of malloc(), if flags is zero, and calloc(), if flags is
+kZeroPixels_AllocFlag.
+
+Passing kZeroPixels_AllocFlag is usually faster than separately calling
+eraseColor(SK_ColorTRANSPARENT).
+
+#Param info contains width, height, Alpha_Type, Color_Type, Color_Space ##
+#Param flags kZeroPixels_AllocFlag, or zero ##
+
+#Return true if pixels allocation is successful ##
+
+#Example
+#Description
+For width of 100,000, height of 100,000, and 4 bytes per pixel, Pixel_Ref
+requires 40,000,000,000 bytes of storage. Allocator implemented
+internally by SkMallocPixelRef::MakeZeroed limits the maximum memory allowed;
+the allocation must fit in 31 bits.
+##
+ SkBitmap bitmap;
+ int loop = 0;
+ while (++loop) {
+ SkDebugf("attempt %d\n", loop);
+ if (!bitmap.tryAllocPixelsFlags(SkImageInfo::MakeN32(100000, 100000, kOpaque_SkAlphaType),
+ SkBitmap::kZeroPixels_AllocFlag)) {
+ SkDebugf("failed!\n");
+ break;
+ }
+ }
+#StdOut
+attempt 1
+failed!
+##
+##
+
+#SeeAlso allocPixelsFlags tryAllocPixels SkMallocPixelRef::MakeZeroed
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void allocPixelsFlags(const SkImageInfo& info, uint32_t flags)
+
+Sets Image_Info to info following the rules in setInfo and allocates pixel
+memory. If flags is kZeroPixels_AllocFlag, memory is zeroed.
+
+Aborts execution if Image_Info could not be set, or memory could
+not be allocated, or memory size exceeds 31 bits, or memory could not optionally
+be zeroed. Abort steps may be provided by the user at compile time by defining
+SK_ABORT.
+
+On most platforms, allocating pixel memory may succeed even though there is
+not sufficient memory to hold pixels; allocation does not take place
+until the pixels are written to. The actual behavior depends on the platform
+implementation of malloc(), if flags is zero, and calloc(), if flags is
+kZeroPixels_AllocFlag.
+
+Passing kZeroPixels_AllocFlag is usually faster than separately calling
+eraseColor(SK_ColorTRANSPARENT).
+
+#Param info contains width, height, Alpha_Type, Color_Type, Color_Space ##
+#Param flags kZeroPixels_AllocFlag, or zero ##
+
+#Example
+#Height 128
+#Description
+Text is drawn on a transparent background; drawing the bitmap a second time
+lets the first draw show through.
+##
+###^
+SkBitmap bitmap;
+bitmap.allocPixelsFlags(SkImageInfo::MakeN32(44, 16, kPremul_SkAlphaType),
+ SkBitmap::kZeroPixels_AllocFlag);
+SkCanvas offscreen(bitmap);
+SkPaint paint;
+offscreen.drawString("!@#$%", 0, 12, paint);
+canvas->scale(6, 6);
+canvas->drawBitmap(bitmap, 0, 0);
+canvas->drawBitmap(bitmap, 8, 8);
+^^^#
+##
+
+#SeeAlso tryAllocPixelsFlags allocPixels SkMallocPixelRef::MakeZeroed
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT tryAllocPixels(const SkImageInfo& info, size_t rowBytes)
+
+#ToDo am I ever conflicted about setInfo rules. It needs to be able to be replicated
+ if, for instance, I generate one-page-per-method HTML-style documentation
+ I'm not so sure it makes sense to put the indirection in for .h either unless
+ my mantra is that .h should abbreviate full documentation. And, what to do
+ for generated markdown? At least there the rules are a click away, although
+ a pop-down in place would be way better. Hmmm.
+##
+
+Sets Image_Info to info following the rules in setInfo and allocates pixel
+memory. rowBytes must equal or exceed info.width() times info.bytesPerPixel(),
+or equal zero. Pass in zero for rowBytes to compute the minimum valid value.
+
+Returns false and calls reset() if Image_Info could not be set, or memory could
+not be allocated.
+
+On most platforms, allocating pixel memory may succeed even though there is
+not sufficient memory to hold pixels; allocation does not take place
+until the pixels are written to. The actual behavior depends on the platform
+implementation of malloc().
+
+#Param info contains width, height, Alpha_Type, Color_Type, Color_Space ##
+#Param rowBytes size of pixel row or larger; may be zero ##
+
+#Return true if pixel storage is allocated ##
+
+#Example
+#Image 3
+SkBitmap bitmap;
+SkImageInfo info = SkImageInfo::Make(64, 256, kGray_8_SkColorType, kOpaque_SkAlphaType);
+if (bitmap.tryAllocPixels(info, 0)) {
+ SkCanvas offscreen(bitmap);
+ offscreen.scale(.5f, .5f);
+ for (int x : { 0, 64, 128, 192 } ) {
+ offscreen.drawBitmap(source, -x, 0);
+ canvas->drawBitmap(bitmap, x, 0);
+ }
+}
+##
+
+#SeeAlso tryAllocPixelsFlags allocPixels SkMallocPixelRef::MakeAllocate
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void allocPixels(const SkImageInfo& info, size_t rowBytes)
+
+Sets Image_Info to info following the rules in setInfo and allocates pixel
+memory. rowBytes must equal or exceed info.width() times info.bytesPerPixel(),
+or equal zero. Pass in zero for rowBytes to compute the minimum valid value.
+
+Aborts execution if Image_Info could not be set, or memory could
+not be allocated, or memory size exceeds 31 bits. Abort steps may be provided by
+the user at compile time by defining SK_ABORT.
+
+On most platforms, allocating pixel memory may succeed even though there is
+not sufficient memory to hold pixels; allocation does not take place
+until the pixels are written to. The actual behavior depends on the platform
+implementation of malloc().
+
+#Param info contains width, height, Alpha_Type, Color_Type, Color_Space ##
+#Param rowBytes size of pixel row or larger; may be zero ##
+
+#Example
+#Image 3
+SkBitmap bitmap;
+SkImageInfo info = SkImageInfo::Make(256, 64, kGray_8_SkColorType, kOpaque_SkAlphaType);
+bitmap.allocPixels(info, info.width() * info.bytesPerPixel() + 64);
+SkCanvas offscreen(bitmap);
+offscreen.scale(.5f, .5f);
+for (int y : { 0, 64, 128, 192 } ) {
+ offscreen.drawBitmap(source, 0, -y);
+ canvas->drawBitmap(bitmap, 0, y);
+}
+##
+
+#SeeAlso tryAllocPixels allocPixelsFlags SkMallocPixelRef::MakeAllocate
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT tryAllocPixels(const SkImageInfo& info)
+
+Sets Image_Info to info following the rules in setInfo and allocates pixel
+memory.
+
+Returns false and calls reset() if Image_Info could not be set, or memory could
+not be allocated.
+
+On most platforms, allocating pixel memory may succeed even though there is
+not sufficient memory to hold pixels; allocation does not take place
+until the pixels are written to. The actual behavior depends on the platform
+implementation of malloc().
+
+#Param info contains width, height, Alpha_Type, Color_Type, Color_Space ##
+
+#Return true if pixel storage is allocated ##
+
+#Example
+#Image 3
+SkBitmap bitmap;
+if (bitmap.tryAllocPixels(SkImageInfo::Make(64, 64, kGray_8_SkColorType, kOpaque_SkAlphaType))) {
+ SkCanvas offscreen(bitmap);
+ offscreen.scale(.25f, .5f);
+ for (int y : { 0, 64, 128, 192 } ) {
+ offscreen.drawBitmap(source, -y, -y);
+ canvas->drawBitmap(bitmap, y, y);
+ }
+}
+##
+
+#SeeAlso tryAllocPixelsFlags allocPixels SkMallocPixelRef::MakeAllocate
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void allocPixels(const SkImageInfo& info)
+
+Sets Image_Info to info following the rules in setInfo and allocates pixel
+memory.
+
+Aborts execution if Image_Info could not be set, or memory could
+not be allocated, or memory size exceeds 31 bits. Abort steps may be provided by
+the user at compile time by defining SK_ABORT.
+
+On most platforms, allocating pixel memory may succeed even though there is
+not sufficient memory to hold pixels; allocation does not take place
+until the pixels are written to. The actual behavior depends on the platform
+implementation of malloc().
+
+#Param info contains width, height, Alpha_Type, Color_Type, Color_Space ##
+
+#Example
+#Image 4
+SkBitmap bitmap;
+bitmap.allocPixels(SkImageInfo::Make(64, 64, kGray_8_SkColorType, kOpaque_SkAlphaType));
+SkCanvas offscreen(bitmap);
+offscreen.scale(.5f, .5f);
+for (int y : { 0, 64, 128, 192 } ) {
+ offscreen.drawBitmap(source, -y, -y);
+ canvas->drawBitmap(bitmap, y, y);
+}
+##
+
+#SeeAlso tryAllocPixels allocPixelsFlags SkMallocPixelRef::MakeAllocate
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT tryAllocN32Pixels(int width, int height, bool isOpaque = false)
+
+Sets Image_Info to width, height, and the native Color_Type; and allocates
+pixel memory. If isOpaque is true, sets Image_Info to kOpaque_SkAlphaType;
+otherwise, sets to kPremul_SkAlphaType.
+
+Calls reset() and returns false if width exceeds 29 bits or is negative,
+or height is negative.
+
+Returns false if allocation fails.
+
+Use to create Bitmap that matches native pixel arrangement on the platform,
+to draw without converting its pixel format.
+
+#Param width pixel column count; must be zero or greater ##
+#Param height pixel row count; must be zero or greater ##
+#Param isOpaque true if pixels do not have transparency ##
+
+#Return true if pixel storage is allocated ##
+
+#Example
+#Height 160
+ SkBitmap bitmap;
+ if (bitmap.tryAllocN32Pixels(80, 80)) {
+ bitmap.eraseColor(SK_ColorTRANSPARENT);
+ bitmap.erase(0x7f3f7fff, SkIRect::MakeWH(50, 30));
+ bitmap.erase(0x3f7fff3f, SkIRect::MakeXYWH(20, 10, 50, 30));
+ bitmap.erase(0x5fff3f7f, SkIRect::MakeXYWH(40, 20, 50, 30));
+ canvas->drawBitmap(bitmap, 0, 0);
+ for (int x : { 0, 30, 60, 90 } ) {
+ canvas->drawBitmap(bitmap, x, 70);
+ }
+ }
+##
+
+#SeeAlso tryAllocPixels allocN32Pixels SkMallocPixelRef::MakeAllocate
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void allocN32Pixels(int width, int height, bool isOpaque = false)
+
+Sets Image_Info to width, height, and the native Color_Type; and allocates
+pixel memory. If isOpaque is true, sets Image_Info to kPremul_SkAlphaType;
+otherwise, sets to kOpaque_SkAlphaType.
+
+Aborts if width exceeds 29 bits or is negative, or height is negative, or
+allocation fails. Abort steps may be provided by the user at compile time by
+defining SK_ABORT.
+
+Use to create Bitmap that matches native pixel arrangement on the platform,
+to draw without converting its pixel format.
+
+#Param width pixel column count; must be zero or greater ##
+#Param height pixel row count; must be zero or greater ##
+#Param isOpaque true if pixels do not have transparency ##
+
+#Example
+ SkRandom random;
+ SkBitmap bitmap;
+ bitmap.allocN32Pixels(64, 64);
+ bitmap.eraseColor(SK_ColorTRANSPARENT);
+ for (int y = 0; y < 256; y += 64) {
+ for (int x = 0; x < 256; x += 64) {
+ SkColor color = random.nextU();
+ uint32_t w = random.nextRangeU(4, 32);
+ uint32_t cx = random.nextRangeU(0, 64 - w);
+ uint32_t h = random.nextRangeU(4, 32);
+ uint32_t cy = random.nextRangeU(0, 64 - h);
+ bitmap.erase(color, SkIRect::MakeXYWH(cx, cy, w, h));
+ canvas->drawBitmap(bitmap, x, y);
+ }
+ }
+##
+
+#SeeAlso allocPixels tryAllocN32Pixels SkMallocPixelRef::MakeAllocate
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool installPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
+ void (*releaseProc)(void* addr, void* context), void* context)
+
+Sets Image_Info to info following the rules in setInfo, and creates Pixel_Ref
+containing pixels and rowBytes. releaseProc, if not nullptr, is called
+immediately on failure or when pixels are no longer referenced. context may be
+nullptr.
+
+If Image_Info could not be set, or rowBytes is less than info.minRowBytes:
+calls releaseProc if present, calls reset(), and returns false.
+
+Otherwise, if pixels equals nullptr: sets Image_Info, calls releaseProc if
+present, returns true.
+
+If Image_Info is set, pixels is not nullptr, and releaseProc is not nullptr:
+when pixels are no longer referenced, calls releaseProc with pixels and context
+as parameters.
+
+#Param info contains width, height, Alpha_Type, Color_Type, Color_Space ##
+#Param pixels address or pixel storage; may be nullptr ##
+#Param rowBytes size of pixel row or larger ##
+#Param releaseProc function called when pixels can be deleted; may be nullptr ##
+#Param context caller state passed to releaseProc; may be nullptr ##
+
+#Return true if Image_Info is set to info ##
+
+#Example
+#Description
+releaseProc is called immediately because rowBytes is too small for Pixel_Ref.
+##
+#Function
+static void releaseProc(void* addr, void* ) {
+ SkDebugf("releaseProc called\n");
+ delete[] (uint32_t*) addr;
+}
+
+##
+
+void draw(SkCanvas* canvas) {
+ SkBitmap bitmap;
+ void* pixels = new uint32_t[8 * 8];
+ SkImageInfo info = SkImageInfo::MakeN32(8, 8, kOpaque_SkAlphaType);
+ SkDebugf("before installPixels\n");
+ bool installed = bitmap.installPixels(info, pixels, 16, releaseProc, nullptr);
+ SkDebugf("install " "%s" "successful\n", installed ? "" : "not ");
+}
+#StdOut
+before installPixels
+releaseProc called
+install not successful
+##
+##
+
+#SeeAlso allocPixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool installPixels(const SkImageInfo& info, void* pixels, size_t rowBytes)
+
+Sets Image_Info to info following the rules in setInfo, and creates Pixel_Ref
+containing pixels and rowBytes.
+
+If Image_Info could not be set, or rowBytes is less than info.minRowBytes:
+calls reset(), and returns false.
+
+Otherwise, if pixels equals nullptr: sets Image_Info, returns true.
+
+Caller must ensure that pixels are valid for the lifetime of Bitmap and Pixel_Ref.
+
+#Param info contains width, height, Alpha_Type, Color_Type, Color_Space ##
+#Param pixels address or pixel storage; may be nullptr ##
+#Param rowBytes size of pixel row or larger ##
+
+#Return true if Image_Info is set to info ##
+
+#Example
+#Description
+#Bug 7079 ##
+GPU does not support kUnpremul_SkAlphaType, does not assert that it does not.
+##
+void draw(SkCanvas* canvas) {
+ SkRandom random;
+ SkBitmap bitmap;
+ const int width = 8;
+ const int height = 8;
+ uint32_t pixels[width * height];
+ for (unsigned x = 0; x < width * height; ++x) {
+ pixels[x] = random.nextU();
+ }
+ SkImageInfo info = SkImageInfo::MakeN32(width, height, kUnpremul_SkAlphaType);
+ if (bitmap.installPixels(info, pixels, info.minRowBytes())) {
+ canvas->scale(32, 32);
+ canvas->drawBitmap(bitmap, 0, 0);
+ }
+}
+##
+
+#SeeAlso allocPixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool installPixels(const SkPixmap& pixmap)
+
+Sets Image_Info to pixmap.info() following the rules in setInfo, and creates
+Pixel_Ref containing pixmap.addr() and pixmap.rowBytes.
+
+If Image_Info could not be set, or pixmap.rowBytes is less than
+SkImageInfo::minRowBytes: calls reset(), and returns false.
+
+Otherwise, if pixmap.addr() equals nullptr: sets Image_Info, returns true.
+
+Caller must ensure that pixmap is valid for the lifetime of Bitmap and Pixel_Ref.
+
+#Param pixmap Image_Info, pixel address, and rowBytes ##
+
+#Return true if Image_Info was set to pixmap.info() ##
+
+#Example
+#Description
+Draw a five by five bitmap, and draw it again with a center white pixel.
+##
+#Height 64
+ uint8_t storage[][5] = {{ 0xCA, 0xDA, 0xCA, 0xC9, 0xA3 },
+ { 0xAC, 0xA8, 0x89, 0x47, 0x87 },
+ { 0x4B, 0x25, 0x25, 0x25, 0x46 },
+ { 0x90, 0x81, 0x25, 0x41, 0x33 },
+ { 0x75, 0x55, 0x44, 0x20, 0x00 }};
+ SkImageInfo imageInfo = SkImageInfo::Make(5, 5, kGray_8_SkColorType, kOpaque_SkAlphaType);
+ SkPixmap pixmap(imageInfo, storage[0], sizeof(storage) / 5);
+ SkBitmap bitmap;
+ bitmap.installPixels(pixmap);
+ canvas->scale(10, 10);
+ canvas->drawBitmap(bitmap, 0, 0);
+ *pixmap.writable_addr8(2, 2) = 0xFF;
+ bitmap.installPixels(pixmap);
+ canvas->drawBitmap(bitmap, 10, 0);
+##
+
+#SeeAlso allocPixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool installMaskPixels(const SkMask& mask)
+
+Sets Image_Info to mask width, mask height, kAlpha_8_SkColorType, and
+kPremul_SkAlphaType. Sets Pixel_Ref to mask image and mask rowBytes.
+
+Returns false and calls reset() if mask format is not SkMask::kA8_Format,
+or if mask width or mask height is negative, or if mask rowBytes is less
+than mask width.
+
+Caller must ensure that mask is valid for the lifetime of Bitmap and Pixel_Ref.
+
+#Param mask Alpha 8-bit bitmap ##
+
+#Return true if Image_Info and Pixel_Ref refer to mask ##
+
+#Example
+#Description
+Draw a five by five bitmap, and draw it again with a center white pixel.
+##
+#Height 64
+ uint8_t storage[][5] = {{ 0xCA, 0xDA, 0xCA, 0xC9, 0xA3 },
+ { 0xAC, 0xA8, 0x89, 0x47, 0x87 },
+ { 0x4B, 0x25, 0x25, 0x25, 0x46 },
+ { 0x90, 0x81, 0x25, 0x41, 0x33 },
+ { 0x75, 0x55, 0x44, 0x20, 0x00 }};
+ SkMask mask;
+ mask.fImage = storage[0];
+ mask.fBounds = SkIRect::MakeWH(5, 5);
+ mask.fRowBytes = 5;
+ mask.fFormat = SkMask::kA8_Format;
+ SkBitmap bitmap;
+ bitmap.installMaskPixels(mask);
+ canvas->scale(10, 10);
+ canvas->drawBitmap(bitmap, 0, 0);
+ storage[2][2] = 0xFF;
+ bitmap.installMaskPixels(mask);
+ canvas->drawBitmap(bitmap, 10, 0);
+##
+
+#SeeAlso installPixels allocPixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setPixels(void* pixels)
+
+Replaces Pixel_Ref with pixels, preserving Image_Info and rowBytes.
+Sets Pixel_Ref origin to (0, 0).
+
+If pixels is nullptr, or if info().colorType equals kUnknown_SkColorType;
+release reference to Pixel_Ref, and set Pixel_Ref to nullptr.
+
+Caller is responsible for handling ownership pixel memory for the lifetime
+of Bitmap and Pixel_Ref.
+
+#Param pixels address of pixel storage, managed by caller ##
+
+#Example
+#Height 50
+ uint8_t set1[5] = { 0xCA, 0xDA, 0xCA, 0xC9, 0xA3 };
+ uint8_t set2[5] = { 0xAC, 0xA8, 0x89, 0x47, 0x87 };
+ SkBitmap bitmap;
+ bitmap.installPixels(SkImageInfo::Make(5, 1, kGray_8_SkColorType, kOpaque_SkAlphaType), set1, 5);
+ canvas->scale(10, 50);
+ canvas->drawBitmap(bitmap, 0, 0);
+ bitmap.setPixels(set2);
+ canvas->drawBitmap(bitmap, 10, 0);
+##
+
+#SeeAlso installPixels allocPixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT tryAllocPixels()
+
+Allocates pixel memory with HeapAllocator, and replaces existing Pixel_Ref.
+The allocation size is determined by Image_Info width, height, and Color_Type.
+
+Returns false if info().colorType is kUnknown_SkColorType, or allocation exceeds
+31 bits, or allocation fails.
+
+#Return true if the allocation succeeds
+##
+
+#Example
+#Height 50
+#Description
+Bitmap hosts and draws gray values in set1. tryAllocPixels replaces Pixel_Ref
+and erases it to black, but does not alter set1. setPixels replaces black
+Pixel_Ref with set1.
+##
+ uint8_t set1[5] = { 0xCA, 0xDA, 0xCA, 0xC9, 0xA3 };
+ SkBitmap bitmap;
+ bitmap.installPixels(SkImageInfo::Make(5, 1, kGray_8_SkColorType, kOpaque_SkAlphaType), set1, 5);
+ canvas->scale(10, 50);
+ canvas->drawBitmap(bitmap, 0, 0);
+ if (bitmap.tryAllocPixels()) {
+ bitmap.eraseColor(SK_ColorBLACK);
+ canvas->drawBitmap(bitmap, 8, 0);
+ bitmap.setPixels(set1);
+ canvas->drawBitmap(bitmap, 16, 0);
+ }
+##
+
+#SeeAlso allocPixels installPixels setPixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void allocPixels()
+
+Allocates pixel memory with HeapAllocator, and replaces existing Pixel_Ref.
+The allocation size is determined by Image_Info width, height, and Color_Type.
+
+Aborts if info().colorType is kUnknown_SkColorType, or allocation exceeds
+31 bits, or allocation fails. Abort steps may be provided by the user at compile
+time by defining SK_ABORT.
+
+#Example
+#Height 50
+#Description
+Bitmap hosts and draws gray values in set1. allocPixels replaces Pixel_Ref
+and erases it to black, but does not alter set1. setPixels replaces black
+Pixel_Ref with set2.
+##
+ uint8_t set1[5] = { 0xCA, 0xDA, 0xCA, 0xC9, 0xA3 };
+ uint8_t set2[5] = { 0xAC, 0xA8, 0x89, 0x47, 0x87 };
+ SkBitmap bitmap;
+ bitmap.installPixels(SkImageInfo::Make(5, 1, kGray_8_SkColorType, kOpaque_SkAlphaType), set1, 5);
+ canvas->scale(10, 50);
+ canvas->drawBitmap(bitmap, 0, 0);
+ bitmap.allocPixels();
+ bitmap.eraseColor(SK_ColorBLACK);
+ canvas->drawBitmap(bitmap, 8, 0);
+ bitmap.setPixels(set2);
+ canvas->drawBitmap(bitmap, 16, 0);
+##
+
+#SeeAlso tryAllocPixels installPixels setPixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT tryAllocPixels(Allocator* allocator)
+
+Allocates pixel memory with allocator, and replaces existing Pixel_Ref.
+The allocation size is determined by Image_Info width, height, and Color_Type.
+If allocator is nullptr, use HeapAllocator instead.
+
+Returns false if allocator allocPixelRef return false.
+
+#Param allocator instance of SkBitmap::Allocator instantiation ##
+
+#Return true if custom allocator reports success
+##
+
+#Example
+#Height 100
+#Description
+HeapAllocator limits the maximum size of Bitmap to two gigabytes. Using
+a custom allocator, this limitation may be relaxed. This example can be
+modified to allocate an eight gigabyte Bitmap on a 64 bit platform with
+sufficient memory.
+##
+#Function
+class LargePixelRef : public SkPixelRef {
+public:
+ LargePixelRef(const SkImageInfo& info, char* storage, size_t rowBytes)
+ : SkPixelRef(info.width(), info.height(), storage, rowBytes) {
+ }
+
+ ~LargePixelRef() override {
+ delete[] (char* ) this->pixels();
+ }
+};
+
+class LargeAllocator : public SkBitmap::Allocator {
+public:
+ bool allocPixelRef(SkBitmap* bitmap) override {
+ const SkImageInfo& info = bitmap->info();
+ uint64_t rowBytes = info.minRowBytes64();
+ uint64_t size = info.height() * rowBytes;
+ char* addr = new char[size];
+ if (nullptr == addr) {
+ return false;
+ }
+ sk_sp<SkPixelRef> pr = sk_sp<SkPixelRef>(new LargePixelRef(info, addr, rowBytes));
+ if (!pr) {
+ return false;
+ }
+ bitmap->setPixelRef(std::move(pr), 0, 0);
+ return true;
+ }
+};
+
+##
+
+void draw(SkCanvas* canvas) {
+ LargeAllocator largeAllocator;
+ SkBitmap bitmap;
+ int width = 100; // make this 20000
+ int height = 100; // and this 100000 to allocate 8 gigs on a 64-bit platform
+ bitmap.setInfo(SkImageInfo::MakeN32(width, height, kOpaque_SkAlphaType));
+ if (bitmap.tryAllocPixels(&largeAllocator)) {
+ bitmap.eraseColor(0xff55aa33);
+ canvas->drawBitmap(bitmap, 0, 0);
+ }
+}
+
+##
+
+#SeeAlso allocPixels Allocator Pixel_Ref
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void allocPixels(Allocator* allocator)
+
+Allocates pixel memory with allocator, and replaces existing Pixel_Ref.
+The allocation size is determined by Image_Info width, height, and Color_Type.
+If allocator is nullptr, use HeapAllocator instead.
+
+Aborts if allocator allocPixelRef return false. Abort steps may be provided by
+the user at compile time by defining SK_ABORT.
+
+#Param allocator instance of SkBitmap::Allocator instantiation ##
+
+#Example
+#Height 32
+#Function
+class TinyAllocator : public SkBitmap::Allocator {
+public:
+ bool allocPixelRef(SkBitmap* bitmap) override {
+ const SkImageInfo& info = bitmap->info();
+ if (info.height() * info.minRowBytes() > sizeof(storage)) {
+ return false;
+ }
+ sk_sp<SkPixelRef> pr = sk_sp<SkPixelRef>(
+ new SkPixelRef(info.width(), info.height(), storage, info.minRowBytes()));
+ bitmap->setPixelRef(std::move(pr), 0, 0);
+ return true;
+ }
+
+ char storage[16];
+};
+
+##
+
+void draw(SkCanvas* canvas) {
+ TinyAllocator tinyAllocator;
+ SkBitmap bitmap;
+ bitmap.setInfo(SkImageInfo::MakeN32(2, 2, kOpaque_SkAlphaType));
+ if (bitmap.tryAllocPixels(&tinyAllocator)) {
+ bitmap.eraseColor(0xff55aa33);
+ bitmap.erase(0xffaa3355, SkIRect::MakeXYWH(1, 1, 1, 1));
+ canvas->scale(16, 16);
+ canvas->drawBitmap(bitmap, 0, 0);
+ }
+}
+##
+
+#SeeAlso allocPixels Allocator Pixel_Ref
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkPixelRef* pixelRef() const
+
+Returns Pixel_Ref, which contains: pixel base address; its dimensions; and
+rowBytes, the interval from one row to the next. Does not change Pixel_Ref
+reference count. Pixel_Ref may be shared by multiple bitmaps.
+If Pixel_Ref has not been set, returns nullptr.
+
+#Return Pixel_Ref, or nullptr ##
+
+#Example
+#Image 3
+ SkBitmap subset;
+ source.extractSubset(&subset, SkIRect::MakeXYWH(32, 64, 128, 256));
+ SkDebugf("src ref %c= sub ref\n", source.pixelRef() == subset.pixelRef() ? '=' : '!');
+ SkDebugf("src pixels %c= sub pixels\n", source.getPixels() == subset.getPixels() ? '=' : '!');
+ SkDebugf("src addr %c= sub addr\n", source.getAddr(32, 64) == subset.getAddr(0, 0) ? '=' : '!');
+##
+
+#SeeAlso getPixels getAddr
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkIPoint pixelRefOrigin() const
+
+Returns origin of pixels within Pixel_Ref. Bitmap bounds is always contained
+by Pixel_Ref bounds, which may be the same size or larger. Multiple Bitmaps
+can share the same Pixel_Ref, where each Bitmap has different bounds.
+
+The returned origin added to Bitmap dimensions equals or is smaller than the
+Pixel_Ref dimensions.
+
+Returns (0, 0) if Pixel_Ref is nullptr.
+
+#Return pixel origin within Pixel_Ref ##
+
+#Example
+#Image 3
+ SkBitmap subset;
+ source.extractSubset(&subset, SkIRect::MakeXYWH(32, 64, 128, 256));
+ SkIPoint sourceOrigin = source.pixelRefOrigin();
+ SkIPoint subsetOrigin = subset.pixelRefOrigin();
+ SkDebugf("source origin: %d, %d\n", sourceOrigin.fX, sourceOrigin.fY);
+ SkDebugf("subset origin: %d, %d\n", subsetOrigin.fX, subsetOrigin.fY);
+#StdOut
+source origin: 0, 0
+subset origin: 32, 64
+##
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setPixelRef(sk_sp<SkPixelRef> pixelRef, int dx, int dy)
+
+Replaces pixelRef and origin in Bitmap. dx and dy specify the offset
+within the Pixel_Ref pixels for the top-left corner of the bitmap.
+
+Asserts in debug builds if dx or dy are out of range. Pins dx and dy
+to legal range in release builds.
+
+The caller is responsible for ensuring that the pixels match the
+Color_Type and Alpha_Type in Image_Info.
+
+#Param pixelRef Pixel_Ref describing pixel address and rowBytes ##
+#Param dx column offset in Pixel_Ref for bitmap origin ##
+#Param dy row offset in Pixel_Ref for bitmap origin ##
+
+#Example
+#Height 140
+#Image 5
+#Description
+Treating 32 bit data as 8 bit data is unlikely to produce useful results.
+##
+ SkBitmap bitmap;
+ bitmap.setInfo(SkImageInfo::Make(source.width() - 5, source.height() - 5,
+ kGray_8_SkColorType, kOpaque_SkAlphaType), source.rowBytes());
+ bitmap.setPixelRef(sk_ref_sp(source.pixelRef()), 5, 5);
+ canvas->drawBitmap(bitmap, 10, 10);
+##
+
+#SeeAlso setInfo
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool readyToDraw() const
+
+Returns true if Bitmap is can be drawn.
+
+#Return true if getPixels() is not nullptr ##
+
+#Example
+#Image 5
+#Height 160
+ if (source.readyToDraw()) {
+ canvas->drawBitmap(source, 10, 10);
+ }
+##
+
+#SeeAlso getPixels drawsNothing
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method uint32_t getGenerationID() const
+
+Returns a unique value corresponding to the pixels in Pixel_Ref.
+Returns a different value after notifyPixelsChanged has been called.
+Returns zero if Pixel_Ref is nullptr.
+
+Determines if pixels have changed since last examined.
+
+#Return unique value for pixels in Pixel_Ref ##
+
+#Example
+ SkBitmap bitmap;
+ SkDebugf("empty id %u\n", bitmap.getGenerationID());
+ bitmap.allocPixels(SkImageInfo::MakeN32(64, 64, kOpaque_SkAlphaType));
+ SkDebugf("alloc id %u\n", bitmap.getGenerationID());
+ bitmap.eraseColor(SK_ColorRED);
+ SkDebugf("erase id %u\n", bitmap.getGenerationID());
+#StdOut
+#Volatile
+empty id 0
+alloc id 4
+erase id 6
+##
+##
+
+#SeeAlso notifyPixelsChanged Pixel_Ref
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void notifyPixelsChanged() const
+
+Marks that pixels in Pixel_Ref have changed. Subsequent calls to
+getGenerationID() return a different value.
+
+#Example
+#Height 20
+ SkBitmap bitmap;
+ bitmap.setInfo(SkImageInfo::Make(1, 1, kRGBA_8888_SkColorType, kOpaque_SkAlphaType));
+ bitmap.allocPixels();
+ bitmap.eraseColor(SK_ColorRED);
+ canvas->scale(16, 16);
+ canvas->drawBitmap(bitmap, 0, 0);
+ *(SkPMColor*) bitmap.getPixels() = SkPreMultiplyColor(SK_ColorBLUE);
+ canvas->drawBitmap(bitmap, 2, 0);
+ bitmap.notifyPixelsChanged();
+ *(SkPMColor*) bitmap.getPixels() = SkPreMultiplyColor(SK_ColorGREEN);
+ canvas->drawBitmap(bitmap, 4, 0);
+##
+
+#SeeAlso getGenerationID isVolatile Pixel_Ref
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void eraseColor(SkColor c) const
+
+Replaces pixel values with c. All pixels contained by bounds() are affected.
+If the colorType is kGray_8_SkColorType or k565_SkColorType, then Color_Alpha
+is ignored; Color_RGB is treated as opaque. If colorType is kAlpha_8_SkColorType,
+then Color_RGB is ignored.
+
+#Param c Unpremultiplied Color ##
+
+#Example
+#Height 20
+ SkBitmap bitmap;
+ bitmap.allocPixels(SkImageInfo::MakeN32(1, 1, kOpaque_SkAlphaType));
+ bitmap.eraseColor(SK_ColorRED);
+ canvas->scale(16, 16);
+ canvas->drawBitmap(bitmap, 0, 0);
+##
+
+#SeeAlso eraseARGB eraseRGB erase
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void eraseARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b) const
+
+Replaces pixel values with Unpremultiplied Color built from a, r, g, and b.
+All pixels contained by bounds() are affected.
+If the colorType is kGray_8_SkColorType or k565_SkColorType, then a
+is ignored; r, g, and b are treated as opaque. If colorType is kAlpha_8_SkColorType,
+then r, g, and b are ignored.
+
+#Param a amount of Color_Alpha, from fully transparent (0) to fully opaque (255) ##
+#Param r amount of Color_RGB_Red, from no red (0) to full red (255) ##
+#Param g amount of Color_RGB_Green, from no green (0) to full green (255) ##
+#Param b amount of Color_RGB_Blue, from no blue (0) to full blue (255) ##
+
+#Example
+#Height 80
+ SkBitmap bitmap;
+ bitmap.allocPixels(SkImageInfo::MakeN32(1, 1, kPremul_SkAlphaType));
+ bitmap.eraseARGB(0x7f, 0xff, 0x7f, 0x3f);
+ canvas->scale(50, 50);
+ canvas->drawBitmap(bitmap, 0, 0);
+ canvas->drawBitmap(bitmap, .5f, .5f);
+##
+
+#SeeAlso eraseColor eraseRGB erase
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void eraseRGB(U8CPU r, U8CPU g, U8CPU b) const
+
+Replaces pixel values with Color built from r, g, and b with Color_Alpha set
+to 255. All pixels contained by bounds() are affected.
+If colorType is kAlpha_8_SkColorType, all pixels are set to 255.
+
+#Param r amount of Color_RGB_Red, from no red (0) to full red (255) ##
+#Param g amount of Color_RGB_Green, from no green (0) to full green (255) ##
+#Param b amount of Color_RGB_Blue, from no blue (0) to full blue (255) ##
+
+#Example
+#Height 80
+ SkBitmap bitmap;
+ bitmap.allocPixels(SkImageInfo::MakeN32(1, 1, kPremul_SkAlphaType));
+ bitmap.eraseRGB(0xff, 0x7f, 0x3f);
+ canvas->scale(50, 50);
+ canvas->drawBitmap(bitmap, 0, 0);
+ canvas->drawBitmap(bitmap, .5f, .5f);
+##
+
+#SeeAlso eraseColor eraseARGB erase
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void erase(SkColor c, const SkIRect& area) const
+
+Replaces pixel values inside area with c. If area does not intersect bounds(),
+call has no effect.
+
+If the colorType is kGray_8_SkColorType or k565_SkColorType, then Color_Alpha
+is ignored; Color_RGB is treated as opaque. If colorType is kAlpha_8_SkColorType,
+then Color_RGB is ignored.
+
+#Param c Unpremultiplied Color ##
+#Param area rectangle to fill ##
+
+#Example
+#Height 70
+ SkBitmap bitmap;
+ bitmap.allocPixels(SkImageInfo::MakeN32(2, 2, kPremul_SkAlphaType));
+ bitmap.erase(0x7fff7f3f, SkIRect::MakeWH(1, 1));
+ bitmap.erase(0x7f7f3fff, SkIRect::MakeXYWH(0, 1, 1, 1));
+ bitmap.erase(0x7f3fff7f, SkIRect::MakeXYWH(1, 0, 1, 1));
+ bitmap.erase(0x7f1fbf5f, SkIRect::MakeXYWH(1, 1, 1, 1));
+ canvas->scale(25, 25);
+ canvas->drawBitmap(bitmap, 0, 0);
+ canvas->drawBitmap(bitmap, .5f, .5f);
+
+##
+
+#SeeAlso eraseColor eraseARGB eraseRGB SkCanvas::drawRect
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void eraseArea(const SkIRect& area, SkColor c) const
+
+Legacy call to be deprecated.
+
+#Deprecated
+##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkColor getColor(int x, int y) const
+
+Returns pixel at (x, y) as Unpremultiplied Color.
+Returns black with Alpha if Color_Type is kAlpha_8_SkColorType.
+
+Input is not validated: out of bounds values of x or y trigger an assert() if
+built with SK_DEBUG defined; and returns undefined values or may crash if
+SK_RELEASE is defined. Fails if Color_Type is kUnknown_SkColorType or
+pixel address is nullptr.
+
+Color_Space in Image_Info is ignored. Some Color precision may be lost in the
+conversion to Unpremultiplied Color; original pixel data may have additional
+precision.
+
+#Param x column index, zero or greater, and less than width() ##
+#Param y row index, zero or greater, and less than height() ##
+
+#Return pixel converted to Unpremultiplied Color ##
+
+#Example
+ const int w = 4;
+ const int h = 4;
+ SkColor colors[][w] = {
+ 0x00000000, 0x2a0e002a, 0x55380055, 0x7f7f007f,
+ 0x2a000e2a, 0x551c1c55, 0x7f542a7f, 0xaaaa38aa,
+ 0x55003855, 0x7f2a547f, 0xaa7171aa, 0xd4d48dd4,
+ 0x7f007f7f, 0xaa38aaaa, 0xd48dd4d4, 0xffffffff,
+ };
+ SkDebugf("Premultiplied:\n");
+ for (int y = 0; y < h; ++y) {
+ SkDebugf("(0, %d) ", y);
+ for (int x = 0; x < w; ++x) {
+ SkDebugf("0x%08x%c", colors[y][x], x == w - 1 ? '\n' : ' ');
+ }
+ }
+ SkPixmap pixmap(SkImageInfo::MakeN32(w, h, kPremul_SkAlphaType), colors, w * 4);
+ SkBitmap bitmap;
+ bitmap.installPixels(pixmap);
+ SkDebugf("Unpremultiplied:\n");
+ for (int y = 0; y < h; ++y) {
+ SkDebugf("(0, %d) ", y);
+ for (int x = 0; x < w; ++x) {
+ SkDebugf("0x%08x%c", bitmap.getColor(x, y), x == w - 1 ? '\n' : ' ');
+ }
+ }
+#StdOut
+Premultiplied:
+(0, 0) 0x00000000 0x2a0e002a 0x55380055 0x7f7f007f
+(0, 1) 0x2a000e2a 0x551c1c55 0x7f542a7f 0xaaaa38aa
+(0, 2) 0x55003855 0x7f2a547f 0xaa7171aa 0xd4d48dd4
+(0, 3) 0x7f007f7f 0xaa38aaaa 0xd48dd4d4 0xffffffff
+Unpremultiplied:
+(0, 0) 0x00000000 0x2a5500ff 0x55a800ff 0x7fff00ff
+(0, 1) 0x2a0055ff 0x555454ff 0x7fa954ff 0xaaff54ff
+(0, 2) 0x5500a8ff 0x7f54a9ff 0xaaaaaaff 0xd4ffaaff
+(0, 3) 0x7f00ffff 0xaa54ffff 0xd4aaffff 0xffffffff
+##
+##
+
+#SeeAlso getAddr readPixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void* getAddr(int x, int y) const
+
+Returns pixel address at (x, y).
+
+Input is not validated: out of bounds values of x or y, or kUnknown_SkColorType,
+trigger an assert() if built with SK_DEBUG defined. Returns nullptr if
+Color_Type is kUnknown_SkColorType, or Pixel_Ref is nullptr.
+
+Performs a lookup of pixel size; for better performance, call
+one of: getAddr8, getAddr16, or getAddr32.
+
+#Param x column index, zero or greater, and less than width() ##
+#Param y row index, zero or greater, and less than height() ##
+
+#Return generic pointer to pixel ##
+
+#Example
+#Image 3
+ char* row0 = (char* ) source.getAddr(0, 0);
+ char* row1 = (char* ) source.getAddr(0, 1);
+ SkDebugf("addr interval %c= rowBytes\n", row1 - row0 == source.rowBytes() ? '=' : '!');
+#StdOut
+addr interval == rowBytes
+##
+##
+
+#SeeAlso getAddr8 getAddr16 getAddr32 readPixels SkPixmap::addr
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method inline uint32_t* getAddr32(int x, int y) const
+
+Returns address at (x, y).
+
+Input is not validated. Triggers an assert() if built with SK_DEBUG defined and:
+#List
+# Pixel_Ref is nullptr ##
+# bytesPerPixel() is not four ##
+# x is negative, or not less than width() ##
+# y is negative, or not less than height() ##
+##
+
+#Param x column index, zero or greater, and less than width() ##
+#Param y row index, zero or greater, and less than height() ##
+
+#Return unsigned 32-bit pointer to pixel at (x, y) ##
+
+#Example
+#Image 3
+ uint32_t* row0 = source.getAddr32(0, 0);
+ uint32_t* row1 = source.getAddr32(0, 1);
+ size_t interval = (row1 - row0) * source.bytesPerPixel();
+ SkDebugf("addr interval %c= rowBytes\n", interval == source.rowBytes() ? '=' : '!');
+#StdOut
+addr interval == rowBytes
+##
+##
+
+#SeeAlso getAddr8 getAddr16 getAddr readPixels SkPixmap::addr32
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method inline uint16_t* getAddr16(int x, int y) const
+
+Returns address at (x, y).
+
+Input is not validated. Triggers an assert() if built with SK_DEBUG defined and:
+#List
+# Pixel_Ref is nullptr ##
+# bytesPerPixel() is not two ##
+# x is negative, or not less than width() ##
+# y is negative, or not less than height() ##
+##
+
+#Param x column index, zero or greater, and less than width() ##
+#Param y row index, zero or greater, and less than height() ##
+
+#Return unsigned 16-bit pointer to pixel at (x, y)##
+
+#Example
+#Image 3
+ SkBitmap bitmap16;
+ SkImageInfo dstInfo = SkImageInfo::Make(source.width(), source.height(), kARGB_4444_SkColorType,
+ kPremul_SkAlphaType);
+ bitmap16.allocPixels(dstInfo);
+ if (source.readPixels(dstInfo, bitmap16.getPixels(), bitmap16.rowBytes(), 0, 0)) {
+ uint16_t* row0 = bitmap16.getAddr16(0, 0);
+ uint16_t* row1 = bitmap16.getAddr16(0, 1);
+ size_t interval = (row1 - row0) * bitmap16.bytesPerPixel();
+ SkDebugf("addr interval %c= rowBytes\n", interval == bitmap16.rowBytes() ? '=' : '!');
+ }
+#StdOut
+addr interval == rowBytes
+##
+##
+
+#SeeAlso getAddr8 getAddr getAddr32 readPixels SkPixmap::addr16
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method inline uint8_t* getAddr8(int x, int y) const
+
+Returns address at (x, y).
+
+Input is not validated. Triggers an assert() if built with SK_DEBUG defined and:
+#List
+# Pixel_Ref is nullptr ##
+# bytesPerPixel() is not one ##
+# x is negative, or not less than width() ##
+# y is negative, or not less than height() ##
+##
+
+#Param x column index, zero or greater, and less than width() ##
+#Param y row index, zero or greater, and less than height() ##
+
+#Return unsigned 8-bit pointer to pixel at (x, y) ##
+
+#Example
+ SkBitmap bitmap;
+ const int width = 8;
+ const int height = 8;
+ uint8_t pixels[height][width];
+ SkImageInfo info = SkImageInfo::Make(width, height, kGray_8_SkColorType, kOpaque_SkAlphaType);
+ if (bitmap.installPixels(info, pixels, info.minRowBytes())) {
+ SkDebugf("&pixels[4][2] %c= bitmap.getAddr8(2, 4)\n",
+ &pixels[4][2] == bitmap.getAddr8(2, 4) ? '=' : '!');
+ }
+#StdOut
+&pixels[4][2] == bitmap.getAddr8(2, 4)
+##
+##
+
+#SeeAlso getAddr getAddr16 getAddr32 readPixels SkPixmap::addr8
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool extractSubset(SkBitmap* dst, const SkIRect& subset) const
+
+Shares Pixel_Ref with dst. Pixels are not copied; Bitmap and dst point
+to the same pixels; dst bounds() are set to the intersection of subset
+and the original bounds().
+
+subset may be larger than bounds(). Any area outside of bounds() is ignored.
+
+Any contents of dst are discarded. isVolatile setting is copied to dst.
+dst is set to colorType, alphaType, and colorSpace.
+
+Return false if:
+#List
+# dst is nullptr ##
+# Pixel_Ref is nullptr ##
+# subset does not intersect bounds() ##
+##
+
+
+#Param dst Bitmap set to subset ##
+#Param subset rectangle of pixels to reference ##
+
+#Return true if dst is replaced by subset
+##
+
+#Example
+#Image 3
+ SkIRect bounds, s;
+ source.getBounds(&bounds);
+ SkDebugf("bounds: %d, %d, %d, %d\n", bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);
+ SkBitmap subset;
+ for (int left: { -100, 0, 100, 1000 } ) {
+ for (int right: { 0, 100, 1000 } ) {
+ SkIRect b = SkIRect::MakeLTRB(left, 100, right, 200);
+ bool success = source.extractSubset(&subset, b);
+ SkDebugf("subset: %4d, %4d, %4d, %4d ", b.fLeft, b.fTop, b.fRight, b.fBottom);
+ SkDebugf("success; %s", success ? "true" : "false");
+ if (success) {
+ subset.getBounds(&s);
+ SkDebugf(" subset: %d, %d, %d, %d", s.fLeft, s.fTop, s.fRight, s.fBottom);
+ }
+ SkDebugf("\n");
+ }
+ }
+#StdOut
+bounds: 0, 0, 512, 512
+subset: -100, 100, 0, 200 success; false
+subset: -100, 100, 100, 200 success; true subset: 0, 0, 100, 100
+subset: -100, 100, 1000, 200 success; true subset: 0, 0, 512, 100
+subset: 0, 100, 0, 200 success; false
+subset: 0, 100, 100, 200 success; true subset: 0, 0, 100, 100
+subset: 0, 100, 1000, 200 success; true subset: 0, 0, 512, 100
+subset: 100, 100, 0, 200 success; false
+subset: 100, 100, 100, 200 success; false
+subset: 100, 100, 1000, 200 success; true subset: 0, 0, 412, 100
+subset: 1000, 100, 0, 200 success; false
+subset: 1000, 100, 100, 200 success; false
+subset: 1000, 100, 1000, 200 success; false
+##
+##
+
+#SeeAlso readPixels writePixels SkCanvas::drawBitmap
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
+ int srcX, int srcY, SkTransferFunctionBehavior behavior) const
+
+Copies a Rect of pixels to dstPixels. Copy starts at (srcX, srcY), and does not exceed
+(this->width(), this->height()).
+
+dstInfo specifies width, height, Color_Type, Alpha_Type, and
+Color_Space of destination. dstRowBytes specifics the gap from one destination
+row to the next. Returns true if pixels are copied. Returns false if:
+#List
+# dstInfo.addr() equals nullptr ##
+# dstRowBytes is less than dstInfo.minRowBytes ##
+# Pixel_Ref is nullptr ##
+##
+
+Pixels are copied only if pixel conversion is possible. If this->colorType is
+kGray_8_SkColorType, or kAlpha_8_SkColorType; dstInfo.colorType must match.
+If this->colorType is kGray_8_SkColorType, dstInfo.colorSpace must match.
+If this->alphaType is kOpaque_SkAlphaType, dstInfo.alphaType must
+match. If this->colorSpace is nullptr, dstInfo.colorSpace must match. Returns
+false if pixel conversion is not possible.
+
+srcX and srcY may be negative to copy only top or left of source. Returns
+false if width() or height() is zero or negative. Returns false if
+#Formula
+abs(srcX) >= this->width()
+##
+, or if
+#Formula
+abs(srcY) >= this->height()
+##
+.
+
+If behavior is SkTransferFunctionBehavior::kRespect: converts source
+pixels to a linear space before converting to dstInfo.
+If behavior is SkTransferFunctionBehavior::kIgnore: source
+pixels are treated as if they are linear, regardless of how they are encoded.
+
+#Param dstInfo destination width, height, Color_Type, Alpha_Type, Color_Space ##
+#Param dstPixels destination pixel storage ##
+#Param dstRowBytes destination row length ##
+#Param srcX column index whose absolute value is less than width() ##
+#Param srcY row index whose absolute value is less than height() ##
+#Param behavior one of: SkTransferFunctionBehavior::kRespect,
+ SkTransferFunctionBehavior::kIgnore
+##
+
+#Return true if pixels are copied to dstPixels ##
+
+#Example
+#Height 64
+void draw(SkCanvas* canvas) {
+ const int width = 256;
+ const int height = 32;
+ std::vector<int32_t> dstPixels;
+ dstPixels.resize(height * width * 4);
+ SkImageInfo info = SkImageInfo::MakeN32Premul(width, height);
+ SkColor gradColors[] = { 0xFFAA3300, 0x7F881122 };
+ SkPoint gradPoints[] = { { 0, 0 }, { width, 0 } };
+ SkPaint gradPaint;
+ gradPaint.setShader(SkGradientShader::MakeLinear(gradPoints, gradColors, nullptr,
+ SK_ARRAY_COUNT(gradColors), SkShader::kClamp_TileMode));
+ for (auto behavior : { SkTransferFunctionBehavior::kRespect,
+ SkTransferFunctionBehavior::kIgnore} ) {
+ SkBitmap bitmap;
+ bitmap.allocPixels(info);
+ SkCanvas srcCanvas(bitmap);
+ srcCanvas.drawRect(SkRect::MakeWH(width, height), gradPaint);
+ if (bitmap.readPixels(info, &dstPixels.front(), width * 4, 0, 0, behavior)) {
+ SkPixmap dstPixmap(info, &dstPixels.front(), width * 4);
+ bitmap.installPixels(dstPixmap);
+ canvas->drawBitmap(bitmap, 0, 0);
+ }
+ canvas->translate(0, height);
+ }
+}
+##
+
+#SeeAlso writePixels SkPixmap::readPixels SkCanvas::readPixels SkImage::readPixels SkSurface::readPixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
+ int srcX, int srcY) const
+
+Copies a Rect of pixels to dstPixels. Copy starts at (srcX, srcY), and does not exceed
+(this->width(), this->height()).
+
+dstInfo specifies width, height, Color_Type, Alpha_Type, and
+Color_Space of destination. dstRowBytes specifics the gap from one destination
+row to the next. Returns true if pixels are copied. Returns false if:
+#List
+# dstInfo.addr() equals nullptr ##
+# dstRowBytes is less than dstInfo.minRowBytes ##
+# Pixel_Ref is nullptr ##
+##
+
+Pixels are copied only if pixel conversion is possible. If this->colorType is
+kGray_8_SkColorType, or kAlpha_8_SkColorType; dstInfo.colorType must match.
+If this->colorType is kGray_8_SkColorType, dstInfo.colorSpace must match.
+If this->alphaType is kOpaque_SkAlphaType, dstInfo.alphaType must
+match. If this->colorSpace is nullptr, dstInfo.colorSpace must match. Returns
+false if pixel conversion is not possible.
+
+srcX and srcY may be negative to copy only top or left of source. Returns
+false if width() or height() is zero or negative. Returns false if
+#Formula
+abs(srcX) >= this->width()
+##
+, or if
+#Formula
+abs(srcY) >= this->height()
+##
+.
+
+#Param dstInfo destination width, height, Color_Type, Alpha_Type, Color_Space ##
+#Param dstPixels destination pixel storage ##
+#Param dstRowBytes destination row length ##
+#Param srcX column index whose absolute value is less than width() ##
+#Param srcY row index whose absolute value is less than height() ##
+
+#Return true if pixels are copied to dstPixels ##
+
+#Example
+#Height 128
+#Description
+Transferring the gradient from 8 bits per component to 4 bits per component
+creates visible banding.
+##
+ const int width = 256;
+ const int height = 64;
+ SkImageInfo srcInfo = SkImageInfo::MakeN32Premul(width, height);
+ SkColor gradColors[] = { 0xFFAA3300, 0x7F881122 };
+ SkPoint gradPoints[] = { { 0, 0 }, { 256, 0 } };
+ SkPaint paint;
+ paint.setShader(SkGradientShader::MakeLinear(gradPoints, gradColors, nullptr,
+ SK_ARRAY_COUNT(gradColors), SkShader::kClamp_TileMode));
+ SkBitmap bitmap;
+ bitmap.allocPixels(srcInfo);
+ SkCanvas srcCanvas(bitmap);
+ srcCanvas.drawRect(SkRect::MakeWH(width, height), paint);
+ canvas->drawBitmap(bitmap, 0, 0);
+ SkImageInfo dstInfo = srcInfo.makeColorType(kARGB_4444_SkColorType);
+ std::vector<int16_t> dstPixels;
+ dstPixels.resize(height * width);
+ bitmap.readPixels(dstInfo, &dstPixels.front(), width * 2, 0, 0);
+ SkPixmap dstPixmap(dstInfo, &dstPixels.front(), width * 2);
+ bitmap.installPixels(dstPixmap);
+ canvas->drawBitmap(bitmap, 0, 64);
+##
+
+#SeeAlso writePixels SkPixmap::readPixels SkCanvas::readPixels SkImage::readPixels SkSurface::readPixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool readPixels(const SkPixmap& dst, int srcX, int srcY) const
+
+Copies a Rect of pixels to dst. Copy starts at (srcX, srcY), and does not exceed
+(this->width(), this->height()).
+
+dst specifies width, height, Color_Type, Alpha_Type, Color_Space, pixel storage,
+and row bytes of destination. dst.rowBytes specifics the gap from one destination
+row to the next. Returns true if pixels are copied. Returns false if:
+#List
+# dst pixel storage equals nullptr ##
+# dst.rowBytes is less than SkImageInfo::minRowBytes ##
+# Pixel_Ref is nullptr ##
+##
+
+Pixels are copied only if pixel conversion is possible. If this->colorType is
+kGray_8_SkColorType, or kAlpha_8_SkColorType; dst Color_Type must match.
+If this->colorType is kGray_8_SkColorType, dst Color_Space must match.
+If this->alphaType is kOpaque_SkAlphaType, dst Alpha_Type must
+match. If this->colorSpace is nullptr, dst Color_Space must match. Returns
+false if pixel conversion is not possible.
+
+srcX and srcY may be negative to copy only top or left of source. Returns
+false if width() or height() is zero or negative. Returns false if
+#Formula
+abs(srcX) >= this->width()
+##
+, or if
+#Formula
+abs(srcY) >= this->height()
+##
+.
+
+#Param dst destination Pixmap: Image_Info, pixels, row bytes ##
+#Param srcX column index whose absolute value is less than width() ##
+#Param srcY row index whose absolute value is less than height() ##
+
+#Return true if pixels are copied to dst ##
+
+#Example
+#Image 3
+ std::vector<int32_t> srcPixels;
+ srcPixels.resize(source.height() * source.rowBytes());
+ for (int y = 0; y < 4; ++y) {
+ for (int x = 0; x < 4; ++x) {
+ SkPixmap pixmap(SkImageInfo::MakeN32Premul(source.width() / 4, source.height() / 4),
+ &srcPixels.front() + x * source.height() * source.width() / 4 +
+ y * source.width() / 4, source.rowBytes());
+ source.readPixels(pixmap, x * source.width() / 4, y * source.height() / 4);
+ }
+ }
+ canvas->scale(.5f, .5f);
+ SkBitmap bitmap;
+ bitmap.installPixels(SkImageInfo::MakeN32Premul(source.width(), source.height()),
+ &srcPixels.front(), source.rowBytes());
+ canvas->drawBitmap(bitmap, 0, 0);
+##
+
+#SeeAlso writePixels SkPixmap::readPixels SkCanvas::readPixels SkImage::readPixels SkSurface::readPixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool readPixels(const SkPixmap& dst) const
+
+Copies a Rect of pixels to dst. Copy starts at (0, 0), and does not exceed
+(this->width(), this->height()).
+
+dst specifies width, height, Color_Type, Alpha_Type, Color_Space, pixel storage,
+and row bytes of destination. dst.rowBytes specifics the gap from one destination
+row to the next. Returns true if pixels are copied. Returns false if:
+#List
+# dst pixel storage equals nullptr ##
+# dst.rowBytes is less than SkImageInfo::minRowBytes ##
+# Pixel_Ref is nullptr ##
+##
+
+Pixels are copied only if pixel conversion is possible. If this->colorType is
+kGray_8_SkColorType, or kAlpha_8_SkColorType; dst Color_Type must match.
+If this->colorType is kGray_8_SkColorType, dst Color_Space must match.
+If this->alphaType is kOpaque_SkAlphaType, dst Alpha_Type must
+match. If this->colorSpace is nullptr, dst Color_Space must match. Returns
+false if pixel conversion is not possible.
+
+#Param dst destination Pixmap: Image_Info, pixels, row bytes ##
+
+#Return true if pixels are copied to dst ##
+
+#Example
+#Height 128
+#Image 3
+ std::vector<int32_t> srcPixels;
+ srcPixels.resize(source.height() * source.width() * 8);
+ for (int i = 0; i < 2; ++i) {
+ SkPixmap pixmap(SkImageInfo::Make(source.width() * 2, source.height(),
+ i ? kRGBA_8888_SkColorType : kBGRA_8888_SkColorType, kPremul_SkAlphaType),
+ &srcPixels.front() + i * source.width(), source.rowBytes() * 2);
+ source.readPixels(pixmap);
+ }
+ canvas->scale(.25f, .25f);
+ SkBitmap bitmap;
+ bitmap.installPixels(SkImageInfo::MakeN32Premul(source.width() * 2, source.height()),
+ &srcPixels.front(), source.rowBytes() * 2);
+ canvas->drawBitmap(bitmap, 0, 0);
+##
+
+#SeeAlso writePixels SkPixmap::readPixels SkCanvas::readPixels SkImage::readPixels SkSurface::readPixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool writePixels(const SkPixmap& src, int dstX, int dstY)
+
+Copies a Rect of pixels from src. Copy starts at (dstX, dstY), and does not exceed
+(src.width(), src.height()).
+
+src specifies width, height, Color_Type, Alpha_Type, Color_Space, pixel storage,
+and row bytes of source. src.rowBytes specifics the gap from one source
+row to the next. Returns true if pixels are copied. Returns false if:
+#List
+# src pixel storage equals nullptr ##
+# src.rowBytes is less than SkImageInfo::minRowBytes ##
+# Pixel_Ref is nullptr ##
+##
+
+Pixels are copied only if pixel conversion is possible. If this->colorType is
+kGray_8_SkColorType, or kAlpha_8_SkColorType; src Color_Type must match.
+If this->colorType is kGray_8_SkColorType, src Color_Space must match.
+If this->alphaType is kOpaque_SkAlphaType, src Alpha_Type must
+match. If this->colorSpace is nullptr, src Color_Space must match. Returns
+false if pixel conversion is not possible.
+
+dstX and dstY may be negative to copy only top or left of source. Returns
+false if width() or height() is zero or negative. Returns false if
+#Formula
+abs(dstX) >= this->width()
+##
+, or if
+#Formula
+abs(dstY) >= this->height()
+##
+.
+
+#Param src source Pixmap: Image_Info, pixels, row bytes ##
+#Param dstX column index whose absolute value is less than width() ##
+#Param dstY row index whose absolute value is less than height() ##
+
+#Return true if src pixels are copied to Bitmap ##
+
+#Example
+#Image 3
+ std::vector<int32_t> srcPixels;
+ int width = image->width();
+ int height = image->height();
+ srcPixels.resize(height * width * 4);
+ SkPixmap pixmap(SkImageInfo::MakeN32Premul(width, height), (const void*) &srcPixels.front(),
+ width * 4);
+ image->readPixels(pixmap, 0, 0);
+ canvas->scale(.5f, .5f);
+ width /= 4;
+ height /= 4;
+ for (int y = 0; y < 4; ++y) {
+ for (int x = 0; x < 4; ++x) {
+ SkBitmap bitmap;
+ bitmap.allocPixels(SkImageInfo::MakeN32Premul(width, height));
+ bitmap.writePixels(pixmap, -y * width, -x * height);
+ canvas->drawBitmap(bitmap, x * width, y * height);
+ }
+ }
+##
+
+#SeeAlso readPixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool writePixels(const SkPixmap& src)
+
+Copies a Rect of pixels from src. Copy starts at (0, 0), and does not exceed
+(src.width(), src.height()).
+
+src specifies width, height, Color_Type, Alpha_Type, Color_Space, pixel storage,
+and row bytes of source. src.rowBytes specifics the gap from one source
+row to the next. Returns true if pixels are copied. Returns false if:
+#List
+# src pixel storage equals nullptr ##
+# src.rowBytes is less than SkImageInfo::minRowBytes ##
+# Pixel_Ref is nullptr ##
+##
+
+Pixels are copied only if pixel conversion is possible. If this->colorType is
+kGray_8_SkColorType, or kAlpha_8_SkColorType; src Color_Type must match.
+If this->colorType is kGray_8_SkColorType, src Color_Space must match.
+If this->alphaType is kOpaque_SkAlphaType, src Alpha_Type must
+match. If this->colorSpace is nullptr, src Color_Space must match. Returns
+false if pixel conversion is not possible.
+
+#Param src source Pixmap: Image_Info, pixels, row bytes ##
+
+#Return true if src pixels are copied to Bitmap ##
+
+#Example
+#Height 80
+ SkBitmap bitmap;
+ bitmap.allocPixels(SkImageInfo::MakeN32Premul(2, 2));
+ bitmap.eraseColor(SK_ColorGREEN);
+ SkPMColor color = 0xFF5599BB;
+ SkPixmap src(SkImageInfo::MakeN32Premul(1, 1), &color, 4);
+ bitmap.writePixels(src);
+ canvas->scale(40, 40);
+ canvas->drawBitmap(bitmap, 0, 0);
+##
+
+#SeeAlso readPixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool writePixels(const SkPixmap& src, int x, int y, SkTransferFunctionBehavior behavior)
+
+Copies a Rect of pixels from src. Copy starts at (0, 0), and does not exceed
+(src.width(), src.height()).
+
+src specifies width, height, Color_Type, Alpha_Type, Color_Space, pixel storage,
+and row bytes of source. src.rowBytes specifics the gap from one source
+row to the next. Returns true if pixels are copied. Returns false if:
+#List
+# src pixel storage equals nullptr ##
+# src.rowBytes is less than SkImageInfo::minRowBytes ##
+# Pixel_Ref is nullptr ##
+##
+
+Pixels are copied only if pixel conversion is possible. If this->colorType is
+kGray_8_SkColorType, or kAlpha_8_SkColorType; src Color_Type must match.
+If this->colorType is kGray_8_SkColorType, src Color_Space must match.
+If this->alphaType is kOpaque_SkAlphaType, src Alpha_Type must
+match. If this->colorSpace is nullptr, src Color_Space must match. Returns
+false if pixel conversion is not possible. Returns false if width() or height()
+is zero or negative.
+
+If behavior is SkTransferFunctionBehavior::kRespect: converts src
+pixels to a linear space before converting to Image_Info.
+If behavior is SkTransferFunctionBehavior::kIgnore: src
+pixels are treated as if they are linear, regardless of how they are encoded.
+
+#Param src source Pixmap: Image_Info, pixels, row bytes ##
+#Param x column index whose absolute value is less than width() ##
+#Param y row index whose absolute value is less than height() ##
+#Param behavior one of: SkTransferFunctionBehavior::kRespect,
+ SkTransferFunctionBehavior::kIgnore
+##
+
+#Return true if src pixels are copied to Bitmap ##
+
+#Example
+#Height 64
+ const int width = 256;
+ const int height = 32;
+ std::vector<int32_t> dstPixels;
+ dstPixels.resize(height * width * 4);
+ SkImageInfo info = SkImageInfo::MakeN32Premul(width, height);
+ SkColor gradColors[] = { 0xFFAA3300, 0x7F881122 };
+ SkPoint gradPoints[] = { { 0, 0 }, { width, 0 } };
+ SkPaint gradPaint;
+ gradPaint.setShader(SkGradientShader::MakeLinear(gradPoints, gradColors, nullptr,
+ SK_ARRAY_COUNT(gradColors), SkShader::kClamp_TileMode));
+ for (auto behavior : { SkTransferFunctionBehavior::kRespect,
+ SkTransferFunctionBehavior::kIgnore} ) {
+ SkPixmap dstPixmap(info, &dstPixels.front(), width * 4);
+ SkBitmap bitmap;
+ bitmap.installPixels(dstPixmap);
+ SkCanvas srcCanvas(bitmap);
+ srcCanvas.drawRect(SkRect::MakeWH(width, height), gradPaint);
+ if (bitmap.writePixels(dstPixmap, 0, 0, behavior)) {
+ canvas->drawBitmap(bitmap, 0, 0);
+ }
+ canvas->translate(0, height);
+ }
+##
+
+#SeeAlso readPixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool hasHardwareMipMap() const
+
+#Private
+Android framework only.
+##
+
+#Return true if setHasHardwareMipMap has been called with true ##
+
+#NoExample
+##
+
+#SeeAlso setHasHardwareMipMap
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setHasHardwareMipMap(bool hasHardwareMipMap)
+
+#Private
+Android framework only.
+##
+
+#Param hasHardwareMipMap sets state ##
+
+#NoExample
+##
+
+#SeeAlso hasHardwareMipMap
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool extractAlpha(SkBitmap* dst) const
+
+Sets dst to Alpha described by pixels. Returns false if dst cannot be written to
+or dst pixels cannot be allocated.
+
+Uses HeapAllocator to reserve memory for dst Pixel_Ref.
+
+#Param dst holds Pixel_Ref to fill with alpha layer ##
+
+#Return true if Alpha layer was constructed in dst Pixel_Ref ##
+
+#Example
+#Height 100
+ SkBitmap alpha, bitmap;
+ bitmap.allocN32Pixels(100, 100);
+ SkCanvas offscreen(bitmap);
+ offscreen.clear(0);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setColor(SK_ColorBLUE);
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(20);
+ offscreen.drawCircle(50, 50, 39, paint);
+ offscreen.flush();
+ bitmap.extractAlpha(&alpha);
+ paint.setColor(SK_ColorRED);
+ canvas->drawBitmap(bitmap, 0, 0, &paint);
+ canvas->drawBitmap(alpha, 100, 0, &paint);
+##
+
+#SeeAlso extractSubset
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool extractAlpha(SkBitmap* dst, const SkPaint* paint,
+ SkIPoint* offset) const
+
+Sets dst to Alpha described by pixels. Returns false if dst cannot be written to
+or dst pixels cannot be allocated.
+
+If paint is not nullptr and contains Mask_Filter, SkMaskFilter::filterMask
+generates Mask_Alpha from Bitmap. Uses HeapAllocator to reserve memory for dst
+Pixel_Ref. Sets offset to top-left position for dst for alignment with Bitmap;
+(0, 0) unless SkMaskFilter generates mask.
+
+#Param dst holds Pixel_Ref to fill with alpha layer ##
+#Param paint holds optional Mask_Filter; may be nullptr ##
+#Param offset top-left position for dst; may be nullptr ##
+
+#Return true if Alpha layer was constructed in dst Pixel_Ref ##
+
+#Bug 7103 ##
+#Example
+#Height 160
+ SkBitmap alpha, bitmap;
+ bitmap.allocN32Pixels(100, 100);
+ SkCanvas offscreen(bitmap);
+ offscreen.clear(0);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setColor(SK_ColorBLUE);
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(20);
+ offscreen.drawCircle(50, 50, 39, paint);
+ offscreen.flush();
+ const SkScalar kBlurSigma = SkBlurMaskFilter::ConvertRadiusToSigma(SkIntToScalar(25));
+ paint.setMaskFilter(SkBlurMaskFilter::Make(kNormal_SkBlurStyle, kBlurSigma,
+ SkBlurMaskFilter::kHighQuality_BlurFlag));
+ SkIPoint offset;
+ bitmap.extractAlpha(&alpha, &paint, &offset);
+ paint.setColor(SK_ColorRED);
+ canvas->drawBitmap(bitmap, 0, -offset.fY, &paint);
+ canvas->drawBitmap(alpha, 100 + offset.fX, 0, &paint);
+##
+
+#SeeAlso extractSubset
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool extractAlpha(SkBitmap* dst, const SkPaint* paint, Allocator* allocator,
+ SkIPoint* offset) const
+
+Sets dst to Alpha described by pixels. Returns false if dst cannot be written to
+or dst pixels cannot be allocated.
+
+If paint is not nullptr and contains Mask_Filter, SkMaskFilter::filterMask
+generates Mask_Alpha from Bitmap. allocator may reference a custom allocation
+class or be set to nullptr to use HeapAllocator. Sets offset to top-left
+position for dst for alignment with Bitmap; (0, 0) unless SkMaskFilter generates
+mask.
+
+#Param dst holds Pixel_Ref to fill with alpha layer ##
+#Param paint holds optional Mask_Filter; may be nullptr ##
+#Param allocator method to reserve memory for Pixel_Ref; may be nullptr ##
+#Param offset top-left position for dst; may be nullptr ##
+
+#Return true if Alpha layer was constructed in dst Pixel_Ref ##
+
+#Bug 7104 ##
+#Example
+#Height 128
+ SkBitmap alpha, bitmap;
+ bitmap.allocN32Pixels(100, 100);
+ SkCanvas offscreen(bitmap);
+ offscreen.clear(0);
+ SkPaint paint;
+ paint.setAntiAlias(true);
+ paint.setColor(SK_ColorBLUE);
+ paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStrokeWidth(20);
+ offscreen.drawCircle(50, 50, 39, paint);
+ offscreen.flush();
+ paint.setMaskFilter(SkBlurMaskFilter::Make(kOuter_SkBlurStyle, 3));
+ SkIPoint offset;
+ bitmap.extractAlpha(&alpha, &paint, nullptr, &offset);
+ paint.setColor(SK_ColorRED);
+ canvas->drawBitmap(bitmap, 0, -offset.fY, &paint);
+ canvas->drawBitmap(alpha, 100 + offset.fX, 0, &paint);
+##
+
+#SeeAlso extractSubset
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool peekPixels(SkPixmap* pixmap) const
+
+If the pixels are available from this bitmap return true, and fill out the
+specified pixmap (if not null). If there are no pixels, return false and
+ignore the pixmap parameter.
+Note: if this returns true, the results (in the pixmap) are only valid until the bitmap
+is changed in any way, in which case the results are invalid.
+
+#Param pixmap storage for pixel state if pixels are readable; otherwise, ignored ##
+
+#Return true if Bitmap has direct access to pixels ##
+
+#Example
+ SkBitmap bitmap;
+ bitmap.allocPixels(SkImageInfo::MakeN32Premul(6, 11));
+ SkCanvas offscreen(bitmap);
+ offscreen.clear(SK_ColorWHITE);
+ SkPaint paint;
+ offscreen.drawString("?", 0, 10, paint);
+ SkPixmap pixmap;
+ if (bitmap.peekPixels(&pixmap)) {
+ const SkPMColor* pixels = pixmap.addr32();
+ SkPMColor pmWhite = pixels[0];
+ for (int y = 0; y < bitmap.height(); ++y) {
+ for (int x = 0; x < bitmap.width(); ++x) {
+ SkDebugf("%c", *pixels++ == pmWhite ? '-' : 'x');
+ }
+ SkDebugf("\n");
+ }
+ }
+ #StdOut
+ ------
+ --xxx-
+ -x--x-
+ ----x-
+ ---xx-
+ --xx--
+ --x---
+ ------
+ --x---
+ --x---
+ ------
+ #StdOut ##
+##
+
+#SeeAlso installPixels readPixels writePixels
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void toString(SkString* str) const;
+
+#DefinedBy SK_TO_STRING_NONVIRT() ##
+
+#Private
+macro expands to: void toString(SkString* str) const;
+##
+
+Creates string representation. The representation is read by
+internal debugging tools. The interface and implementation may be
+suppressed by defining SK_IGNORE_TO_STRING.
+
+#Param str storage for string representation ##
+
+#Example
+ SkBitmap bitmap;
+ int width = 6;
+ int height = 11;
+ bitmap.allocPixels(SkImageInfo::MakeN32Premul(width, height));
+ SkString string;
+ bitmap.toString(&string);
+ SkString match;
+ match.printf("(%d, %d)", width, height);
+ int start = string.find(match.c_str());
+ if (start >= 0) {
+ SkString whStr(&string.c_str()[start], match.size());
+ SkDebugf("bitmap dimensions %s\n", whStr.c_str());
+ }
+ #StdOut
+ bitmap dimensions (6, 11)
+ ##
+##
+
+#SeeAlso SkPaint::toString
+
+##
+
+#Class SkBitmap ##
+
+#Topic Bitmap ##
diff --git a/docs/SkCanvas_Reference.bmh b/docs/SkCanvas_Reference.bmh
index d3121ba899..3e7369176e 100644
--- a/docs/SkCanvas_Reference.bmh
+++ b/docs/SkCanvas_Reference.bmh
@@ -261,7 +261,7 @@ width times bytes required for Image_Color_Type.
Pixel buffer size should be height times rowBytes.
#Param width pixel column count on Raster_Surface created; must be zero or greater ##
-#Param height pixel row count on Raster_Surface created.; must be zero or greater ##
+#Param height pixel row count on Raster_Surface created; must be zero or greater ##
#Param pixels pointer to destination pixels buffer; buffer size should be height
times rowBytes
##
@@ -284,7 +284,7 @@ void draw(SkCanvas* ) {
std::unique_ptr<SkCanvas> canvas = SkCanvas::MakeRasterDirectN32(
width,
height,
- pixels[0], // top left of the bitmap
+ pixels[0], // top-left of the bitmap
sizeof(pixels[0])); // byte width of the each row
// write a premultiplied value for white into all pixels in the bitmap
canvas->clear(SK_ColorWHITE);
@@ -453,7 +453,7 @@ The actual output depends on the installed fonts.
if (!canvas.peekPixels(&pixmap)) {
SkDebugf("peekPixels should never fail.\n");
}
- const SkPMColor* pixels = pixmap.addr32(); // points to top left of bitmap
+ const SkPMColor* pixels = pixmap.addr32(); // points to top-left of bitmap
SkPMColor pmWhite = pixels[0]; // the Premultiplied format may vary
SkPaint paint; // by default, draws black, 12 point text
canvas.drawString("!", 1, 10, paint); // 1 char at baseline (1, 10)
@@ -545,7 +545,7 @@ The actual output depends on the installed fonts.
if (!canvas.peekPixels(&pixmap)) {
SkDebugf("peekPixels should never fail.\n");
}
- const SkPMColor* pixels = pixmap.addr32(); // points to top left of bitmap
+ const SkPMColor* pixels = pixmap.addr32(); // points to top-left of bitmap
SkPMColor pmWhite = pixels[0]; // the Premultiplied format may vary
SkPaint paint; // by default, draws black, 12 point text
canvas.drawString("!", 1, 10, paint); // 1 char at baseline (1, 10)
@@ -814,7 +814,7 @@ If pixels are inaccessible, info, rowBytes, and origin are unchanged.
#Param info storage for writable pixels' Image_Info; may be nullptr ##
#Param rowBytes storage for writable pixels' row bytes; may be nullptr ##
-#Param origin storage for Canvas top Layer origin, its top left corner;
+#Param origin storage for Canvas top Layer origin, its top-left corner;
may be nullptr
##
@@ -888,7 +888,7 @@ void draw(SkCanvas* canvas) {
Returns custom context that tracks the Matrix and Clip.
Use Raster_Handle_Allocator to blend Skia drawing with custom drawing, typically performed
-by the host platform's user interface. The custom context returned is generated by
+by the host platform user interface. The custom context returned is generated by
SkRasterHandleAllocator::MakeCanvas, which creates a custom canvas with raster storage for
the drawing destination.
@@ -954,9 +954,7 @@ like SkDumpCanvas.
pixmap is valid only while Canvas is in scope and unchanged. Any
Canvas or Surface call may invalidate the pixmap values.
-#Param pixmap storage for Canvas pixel state if Canvas pixels are readable;
- otherwise, ignored
-##
+#Param pixmap storage for pixel state if pixels are readable; otherwise, ignored ##
#Return true if Canvas has direct access to pixels ##
@@ -2651,7 +2649,7 @@ before it is combined with Clip.
#Example
#Description
-Overlapping Rects form a clip. When clip's Path_Fill_Type is set to
+Overlapping Rects form a clip. When clip Path_Fill_Type is set to
SkPath::kWinding_FillType, the overlap is included. Set to
SkPath::kEvenOdd_FillType, the overlap is excluded and forms a hole.
##
@@ -2692,7 +2690,7 @@ path is transformed by Matrix before it is combined with Clip.
#Example
#Height 212
#Description
-Clip loops over itself covering its center twice. When clip's Path_Fill_Type
+Clip loops over itself covering its center twice. When clip Path_Fill_Type
is set to SkPath::kWinding_FillType, the overlap is included. Set to
SkPath::kEvenOdd_FillType, the overlap is excluded and forms a hole.
##
@@ -3367,7 +3365,7 @@ In paint: Paint_Style determines if rectangle is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness, and
Paint_Stroke_Join draws the corners rounded or square.
-#Param rect rectangle to be drawn ##
+#Param rect rectangle to draw ##
#Param paint stroke or fill, blend, color, and so on, used to draw ##
#Example
@@ -3403,7 +3401,7 @@ In paint: Paint_Style determines if rectangle is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness, and
Paint_Stroke_Join draws the corners rounded or square.
-#Param rect rectangle to be drawn ##
+#Param rect rectangle to draw ##
#Param paint stroke or fill, blend, color, and so on, used to draw ##
#Example
@@ -3433,7 +3431,7 @@ In paint: Paint_Style determines if rectangle is stroked or filled;
if stroked, Paint_Stroke_Width describes the line thickness, and
Paint_Stroke_Join draws the corners rounded or square.
-#Param region region to be drawn ##
+#Param region region to draw ##
#Param paint Paint stroke or fill, blend, color, and so on, used to draw ##
#Example
@@ -3825,7 +3823,7 @@ and Draw_Looper. If image is kAlpha_8_SkColorType, apply Shader.
If paint contains Mask_Filter, generate mask from image bounds. If generated
mask extends beyond image bounds, replicate image edge colors, just as Shader
made from SkImage::makeShader with SkShader::kClamp_TileMode set replicates the
-image's edge color when it samples outside of its bounds.
+image edge color when it samples outside of its bounds.
#Param image uncompressed rectangular map of pixels ##
#Param left left side of image ##
@@ -3865,7 +3863,7 @@ Blend_Mode, and Draw_Looper. If image is kAlpha_8_SkColorType, apply Shader.
If paint contains Mask_Filter, generate mask from image bounds. If generated
mask extends beyond image bounds, replicate image edge colors, just as Shader
made from SkImage::makeShader with SkShader::kClamp_TileMode set replicates the
-image's edge color when it samples outside of its bounds.
+image edge color when it samples outside of its bounds.
#Param image uncompressed rectangular map of pixels ##
#Param left left side of image ##
@@ -3974,7 +3972,7 @@ If paint contains Mask_Filter, generate mask from image bounds.
If generated mask extends beyond image bounds, replicate image edge colors, just
as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
-replicates the image's edge color when it samples outside of its bounds.
+replicates the image edge color when it samples outside of its bounds.
constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
sample within src; set to kFast_SrcRectConstraint allows sampling outside to
@@ -3992,7 +3990,7 @@ improve performance.
#Height 64
#Description
The left bitmap draws with Paint default kNone_SkFilterQuality, and stays within
- its bounds; there's no bleeding with kFast_SrcRectConstraint.
+ its bounds; there is no bleeding with kFast_SrcRectConstraint.
the middle and right bitmaps draw with kLow_SkFilterQuality; with
kStrict_SrcRectConstraint, the filter remains within the checkerboard, and
with kFast_SrcRectConstraint red bleeds on the edges.
@@ -4040,7 +4038,7 @@ If paint contains Mask_Filter, generate mask from image bounds.
If generated mask extends beyond image bounds, replicate image edge colors, just
as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
-replicates the image's edge color when it samples outside of its bounds.
+replicates the image edge color when it samples outside of its bounds.
constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
sample within isrc; set to kFast_SrcRectConstraint allows sampling outside to
@@ -4083,7 +4081,7 @@ If paint contains Mask_Filter, generate mask from image bounds.
If generated mask extends beyond image bounds, replicate image edge colors, just
as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
-replicates the image's edge color when it samples outside of its bounds.
+replicates the image edge color when it samples outside of its bounds.
constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
sample within image; set to kFast_SrcRectConstraint allows sampling outside to
@@ -4125,7 +4123,7 @@ If paint contains Mask_Filter, generate mask from image bounds.
If generated mask extends beyond image bounds, replicate image edge colors, just
as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
-replicates the image's edge color when it samples outside of its bounds.
+replicates the image edge color when it samples outside of its bounds.
constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
sample within src; set to kFast_SrcRectConstraint allows sampling outside to
@@ -4181,7 +4179,7 @@ If paint contains Mask_Filter, generate mask from image bounds.
If generated mask extends beyond image bounds, replicate image edge colors, just
as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
-replicates the image's edge color when it samples outside of its bounds.
+replicates the image edge color when it samples outside of its bounds.
constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
sample within image; set to kFast_SrcRectConstraint allows sampling outside to
@@ -4231,7 +4229,7 @@ If paint contains Mask_Filter, generate mask from image bounds.
If generated mask extends beyond image bounds, replicate image edge colors, just
as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
-replicates the image's edge color when it samples outside of its bounds.
+replicates the image edge color when it samples outside of its bounds.
constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
sample within image; set to kFast_SrcRectConstraint allows sampling outside to
@@ -4285,7 +4283,7 @@ If paint contains Mask_Filter, generate mask from image bounds.
If generated mask extends beyond image bounds, replicate image edge colors, just
as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
-replicates the image's edge color when it samples outside of its bounds.
+replicates the image edge color when it samples outside of its bounds.
#Param image Image containing pixels, dimensions, and format ##
#Param center IRect edge of image corners and sides ##
@@ -4351,7 +4349,7 @@ If paint contains Mask_Filter, generate mask from image bounds.
If generated mask extends beyond image bounds, replicate image edge colors, just
as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
-replicates the image's edge color when it samples outside of its bounds.
+replicates the image edge color when it samples outside of its bounds.
#Param image Image containing pixels, dimensions, and format ##
#Param center IRect edge of image corners and sides ##
@@ -4414,7 +4412,7 @@ If paint contains Mask_Filter, generate mask from bitmap bounds.
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
just as Shader made from SkShader::MakeBitmapShader with
-SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
+SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
outside of its bounds.
#Param bitmap Bitmap containing pixels, dimensions, and format ##
@@ -4466,7 +4464,7 @@ If paint contains Mask_Filter, generate mask from bitmap bounds.
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
just as Shader made from SkShader::MakeBitmapShader with
-SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
+SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
outside of its bounds.
constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
@@ -4524,7 +4522,7 @@ If paint contains Mask_Filter, generate mask from bitmap bounds.
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
just as Shader made from SkShader::MakeBitmapShader with
-SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
+SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
outside of its bounds.
constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
@@ -4582,7 +4580,7 @@ If paint contains Mask_Filter, generate mask from bitmap bounds.
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
just as Shader made from SkShader::MakeBitmapShader with
-SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
+SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
outside of its bounds.
constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
@@ -4637,7 +4635,7 @@ If paint contains Mask_Filter, generate mask from bitmap bounds.
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
just as Shader made from SkShader::MakeBitmapShader with
-SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
+SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
outside of its bounds.
#Param bitmap Bitmap containing pixels, dimensions, and format ##
@@ -4777,7 +4775,7 @@ Draw Bitmap bitmap stretched proportionally to fit into Rect dst.
Lattice lattice divides bitmap into a rectangular grid.
Each intersection of an even-numbered row and column is fixed; like the corners
of drawBitmapNine, fixed lattice elements never scale larger than their initial
-size and shrink proportionately when all fixed elements exceed the bitmap's
+size and shrink proportionately when all fixed elements exceed the bitmap
dimension. All other grid elements scale to fill the available space, if any.
Additionally transform draw using Clip, Matrix, and optional Paint paint.
@@ -4788,7 +4786,7 @@ If paint contains Mask_Filter, generate mask from bitmap bounds.
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
just as Shader made from SkShader::MakeBitmapShader with
-SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
+SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
outside of its bounds.
#Param bitmap Bitmap containing pixels, dimensions, and format ##
@@ -4854,7 +4852,7 @@ Draw Image image stretched proportionally to fit into Rect dst.
Lattice lattice divides image into a rectangular grid.
Each intersection of an even-numbered row and column is fixed; like the corners
of drawBitmapNine, fixed lattice elements never scale larger than their initial
-size and shrink proportionately when all fixed elements exceed the bitmap's
+size and shrink proportionately when all fixed elements exceed the bitmap
dimension. All other grid elements scale to fill the available space, if any.
Additionally transform draw using Clip, Matrix, and optional Paint paint.
@@ -4865,7 +4863,7 @@ If paint contains Mask_Filter, generate mask from bitmap bounds.
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
just as Shader made from SkShader::MakeBitmapShader with
-SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
+SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
outside of its bounds.
#Param image Image containing pixels, dimensions, and format ##
@@ -4930,11 +4928,11 @@ void draw(SkCanvas* canvas) {
Draw text, with origin at (x, y), using Clip, Matrix, and Paint paint.
-text's meaning depends on Paint_Text_Encoding; by default, text encoding is
+text meaning depends on Paint_Text_Encoding; by default, text is encoded as
UTF-8.
x and y meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default
-text draws left to right, positioning the first glyph's left side bearing at x
+text draws left to right, positioning the first glyph left side bearing at x
and its baseline at y. Text size is affected by Matrix and Paint_Text_Size.
All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader,
@@ -4985,12 +4983,12 @@ void draw(SkCanvas* canvas) {
Draw null terminated string, with origin at (x, y), using Clip, Matrix, and
Paint paint.
-string's meaning depends on Paint_Text_Encoding; by default, string encoding is
-UTF-8. Other values of Paint_Text_Encoding are unlikely to produce the desired
+string meaning depends on Paint_Text_Encoding; by default, strings are encoded
+as UTF-8. Other values of Paint_Text_Encoding are unlikely to produce the desired
results, since zero bytes may be embedded in the string.
x and y meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default
-string draws left to right, positioning the first glyph's left side bearing at x
+string draws left to right, positioning the first glyph left side bearing at x
and its baseline at y. Text size is affected by Matrix and Paint_Text_Size.
All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader,
@@ -5018,12 +5016,12 @@ filled 12 point black Glyphs.
Draw null terminated string, with origin at (x, y), using Clip, Matrix, and
Paint paint.
-string's meaning depends on Paint_Text_Encoding; by default, string encoding is
-UTF-8. Other values of Paint_Text_Encoding are unlikely to produce the desired
+string meaning depends on Paint_Text_Encoding; by default, strings are encoded
+as UTF-8. Other values of Paint_Text_Encoding are unlikely to produce the desired
results, since zero bytes may be embedded in the string.
x and y meaning depends on Paint_Text_Align and Paint_Vertical_Text; by default
-string draws left to right, positioning the first glyph's left side bearing at x
+string draws left to right, positioning the first glyph left side bearing at x
and its baseline at y. Text size is affected by Matrix and Paint_Text_Size.
All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader,
@@ -5056,9 +5054,9 @@ Draw each glyph in text with the origin in pos array, using Clip, Matrix, and
Paint paint. The number of entries in pos array must match the number of Glyphs
described by byteLength of text.
-text's meaning depends on Paint_Text_Encoding; by default, text encoding is
+text meaning depends on Paint_Text_Encoding; by default, text is encoded as
UTF-8. pos elements' meaning depends on Paint_Text_Align and Paint_Vertical_Text;
-by default each glyph's left side bearing is positioned at x and its
+by default each glyph left side bearing is positioned at x and its
baseline is positioned at y. Text size is affected by Matrix and
Paint_Text_Size.
@@ -5067,7 +5065,7 @@ Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
filled 12 point black Glyphs.
Layout engines such as Harfbuzz typically position each glyph
-rather than using the font's advance widths.
+rather than using the font advance widths.
#Param text character code points or Glyphs drawn ##
#Param byteLength byte length of text array ##
@@ -5099,9 +5097,9 @@ Draw each glyph in text with its (x, y) origin composed from xpos array and
constY, using Clip, Matrix, and Paint paint. The number of entries in xpos array
must match the number of Glyphs described by byteLength of text.
-text's meaning depends on Paint_Text_Encoding; by default, text encoding is
+text meaning depends on Paint_Text_Encoding; by default, text is encoded as
UTF-8. xpos elements' meaning depends on Paint_Text_Align and Paint_Vertical_Text;
-by default each glyph's left side bearing is positioned at an xpos element and
+by default each glyph left side bearing is positioned at an xpos element and
its baseline is positioned at constY. Text size is affected by Matrix and
Paint_Text_Size.
@@ -5110,7 +5108,7 @@ Color_Filter, Image_Filter, and Draw_Looper; apply to text. By default, draws
filled 12 point black Glyphs.
Layout engines such as Harfbuzz typically position each glyph
-rather than using the font's advance widths if all Glyphs share the same
+rather than using the font advance widths if all Glyphs share the same
baseline.
#Param text character code points or Glyphs drawn ##
@@ -5142,12 +5140,12 @@ Draw text on Path path, using Clip, Matrix, and Paint paint.
Origin of text is at distance hOffset along the path, offset by a perpendicular
vector of length vOffset. If the path section corresponding the glyph advance is
curved, the glyph is drawn curved to match; control points in the glyph are
-mapped to projected points parallel to the path. If the text's advance is larger
+mapped to projected points parallel to the path. If the text advance is larger
than the path length, the excess text is clipped.
-text's meaning depends on Paint_Text_Encoding; by default, text encoding is
+text meaning depends on Paint_Text_Encoding; by default, text is encoded as
UTF-8. Origin meaning depends on Paint_Text_Align and Paint_Vertical_Text; by
-default text positions the first glyph's left side bearing at origin x and its
+default text positions the first glyph left side bearing at origin x and its
baseline at origin y. Text size is affected by Matrix and Paint_Text_Size.
All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader,
@@ -5190,12 +5188,12 @@ Draw text on Path path, using Clip, Matrix, and Paint paint.
Origin of text is at beginning of path offset by matrix, if provided, before it
is mapped to path. If the path section corresponding the glyph advance is
curved, the glyph is drawn curved to match; control points in the glyph are
-mapped to projected points parallel to the path. If the text's advance is larger
+mapped to projected points parallel to the path. If the text advance is larger
than the path length, the excess text is clipped.
-text's meaning depends on Paint_Text_Encoding; by default, text encoding is
+text meaning depends on Paint_Text_Encoding; by default, text is encoded as
UTF-8. Origin meaning depends on Paint_Text_Align and Paint_Vertical_Text; by
-default text positions the first glyph's left side bearing at origin x and its
+default text positions the first glyph left side bearing at origin x and its
baseline at origin y. Text size is affected by Matrix and Paint_Text_Size.
All elements of paint: Path_Effect, Rasterizer, Mask_Filter, Shader,
@@ -5598,20 +5596,20 @@ void draw(SkCanvas* canvas) {
Draws a Coons patch: the interpolation of four cubics with shared corners,
associating a color, and optionally a texture coordinate, with each corner.
-The Coons patch uses Clip and Matrix, Paint paint's Shader, Color_Filter,
+The Coons patch uses Clip and Matrix, paint Shader, Color_Filter,
Color_Alpha, Image_Filter, and Blend_Mode. If Shader is provided it is treated
as the Coons patch texture; Blend_Mode mode combines Color colors and Shader if
both are provided.
-Point array cubics specifies four Cubics starting at the top left corner,
+Point array cubics specifies four Cubics starting at the top-left corner,
in clockwise order, sharing every fourth point. The last Cubic ends at the
first point.
-Color array color associates colors with corners in top left, top right,
-bottom right, bottom left order.
+Color array color associates colors with corners in top-left, top-right,
+bottom-right, bottom-left order.
If paint contains Shader, Point array texCoords maps Shader as texture to
-corners in top left, top right, bottom right, bottom left order.
+corners in top-left, top-right, bottom-right, bottom-left order.
#Param cubics Path_Cubic array, sharing common points ##
#Param colors Color array, one for each corner ##
@@ -5656,20 +5654,20 @@ void draw(SkCanvas* canvas) {
Draws Cubic Coons patch: the interpolation of four cubics with shared corners,
associating a color, and optionally a texture coordinate, with each corner.
-The Coons patch uses Clip and Matrix, Paint paint's Shader, Color_Filter,
+The Coons patch uses Clip and Matrix, paint Shader, Color_Filter,
Color_Alpha, Image_Filter, and Blend_Mode. If Shader is provided it is treated
as the Coons patch texture; Blend_Mode mode combines Color colors and Shader if
both are provided.
-Point array cubics specifies four Cubics starting at the top left corner,
+Point array cubics specifies four Cubics starting at the top-left corner,
in clockwise order, sharing every fourth point. The last Cubic ends at the
first point.
-Color array color associates colors with corners in top left, top right,
-bottom right, bottom left order.
+Color array color associates colors with corners in top-left, top-right,
+bottom-right, bottom-left order.
If paint contains Shader, Point array texCoords maps Shader as texture to
-corners in top left, top right, bottom right, bottom left order.
+corners in top-left, top-right, bottom-right, bottom-left order.
#Param cubics Path_Cubic array, sharing common points ##
#Param colors Color array, one for each corner ##
diff --git a/docs/SkIRect_Reference.bmh b/docs/SkIRect_Reference.bmh
new file mode 100644
index 0000000000..06bcdf0905
--- /dev/null
+++ b/docs/SkIRect_Reference.bmh
@@ -0,0 +1,1043 @@
+#Topic IRect
+#Alias IRect_Reference
+
+#Struct SkIRect
+
+SkIRect holds four 32 bit integer coordinates for a rectangle
+
+#Topic Overview
+
+#Subtopic Subtopics
+#ToDo manually add subtopics ##
+#Table
+#Legend
+# topics # description ##
+#Legend ##
+#Table ##
+##
+
+#Subtopic Operators
+#Table
+#Legend
+# description # function ##
+#Legend ##
+# friend bool operator!=(const SkIRect& a, const SkIRect& b) # ##
+# friend bool operator==(const SkIRect& a, const SkIRect& b) # ##
+#Table ##
+#Subtopic ##
+
+#Subtopic Member_Functions
+#Table
+#Legend
+# description # function ##
+#Legend ##
+# EmptyIRect # ##
+# Intersects # ##
+# IntersectsNoEmptyCheck # ##
+# MakeEmpty # ##
+# MakeLTRB # ##
+# MakeLargest # ##
+# MakeSize # ##
+# MakeWH # ##
+# MakeXYWH # ##
+# bottom # ##
+# centerX # ##
+# centerY # ##
+# contains # ##
+# containsNoEmptyCheck # ##
+# height # ##
+# inset # ##
+# intersect # ##
+# intersectNoEmptyCheck # ##
+# is16Bit # ##
+# isEmpty # ##
+# isLargest # ##
+# join # ##
+# left # ##
+# makeInset # ##
+# makeOffset # ##
+# makeOutset # ##
+# makeSorted # ##
+# offset # ##
+# offsetTo # ##
+# outset # ##
+# quickReject # ##
+# right # ##
+# set # ##
+# setEmpty # ##
+# setLTRB # ##
+# setLargest # ##
+# setLargestInverted # ##
+# setXYWH # ##
+# size # ##
+# sort # ##
+# top # ##
+# width # ##
+# x # ##
+# y # ##
+#Table ##
+#Subtopic ##
+
+#Topic ##
+
+#Member int32_t fLeft
+##
+
+#Member int32_t fTop
+##
+
+#Member int32_t fRight
+##
+
+#Member int32_t fBottom
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkIRect SK_WARN_UNUSED_RESULT MakeEmpty()
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkIRect SK_WARN_UNUSED_RESULT MakeLargest()
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkIRect SK_WARN_UNUSED_RESULT MakeWH(int32_t w, int32_t h)
+
+#Param w incomplete ##
+#Param h incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkIRect SK_WARN_UNUSED_RESULT MakeSize(const SkISize& size)
+
+#Param size incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkIRect SK_WARN_UNUSED_RESULT MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b)
+
+#Param l incomplete ##
+#Param t incomplete ##
+#Param r incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkIRect SK_WARN_UNUSED_RESULT MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
+
+#Param x incomplete ##
+#Param y incomplete ##
+#Param w incomplete ##
+#Param h incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int left() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int top() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int right() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int bottom() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int x() const
+
+return the left edge of the rectangle
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int y() const
+
+return the top edge of the rectangle
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int width() const
+
+Returns the rectangle width. This does not check for a valid rectangle
+(i.e. left <= right) so the result may be negative.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int height() const
+
+Returns the rectangle height. This does not check for a valid rectangle
+(i.e. top <= bottom) so the result may be negative.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkISize size() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int centerX() const
+
+Since the center of an integer rectangle may fall on a factional value, this
+method is defined to return (right + left) >> 1.
+This is a specific "truncation" of the average, which is different than
+(right + left) / 2 when the sum is negative.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method int centerY() const
+
+Since the center of an integer rectangle may fall on a factional value, this
+method is defined to return (bottom + top) >> 1.
+This is a specific "truncation" of the average, which is different than
+(bottom + top) / 2 when the sum is negative.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isEmpty() const
+
+Return true if the rectangle width or height are <= 0
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isLargest() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method friend bool operator==(const SkIRect& a, const SkIRect& b)
+
+#Param a incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method friend bool operator!=(const SkIRect& a, const SkIRect& b)
+
+#Param a incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool is16Bit() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setEmpty()
+
+Set the rectangle to (0,0,0,0)
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void set(int32_t left, int32_t top, int32_t right, int32_t bottom)
+
+#Param left incomplete ##
+#Param top incomplete ##
+#Param right incomplete ##
+#Param bottom incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setLTRB(int32_t left, int32_t top, int32_t right, int32_t bottom)
+
+alias for set(l, t, r, b)
+
+#Param left incomplete ##
+#Param top incomplete ##
+#Param right incomplete ##
+#Param bottom incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setXYWH(int32_t x, int32_t y, int32_t width, int32_t height)
+
+#Param x incomplete ##
+#Param y incomplete ##
+#Param width incomplete ##
+#Param height incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setLargest()
+
+Sets rectangle left and top to most negative value, and sets
+right and bottom to most positive value.
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setLargestInverted()
+
+Sets rectangle left and top to most positive value, and sets
+right and bottom to most negative value.
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkIRect makeOffset(int32_t dx, int32_t dy) const
+
+Return a new IRect, built as an offset of this rectangle.
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkIRect makeInset(int32_t dx, int32_t dy) const
+
+Return a new IRect, built as an inset of this rectangle.
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkIRect makeOutset(int32_t dx, int32_t dy) const
+
+Return a new Rect, built as an outset of this rectangle.
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void offset(int32_t dx, int32_t dy)
+
+Offset set the rectangle by adding dx to its left and right,
+and adding dy to its top and bottom.
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void offset(const SkIPoint& delta)
+
+#Param delta incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void offsetTo(int32_t newX, int32_t newY)
+
+Offset this rectangle such its new x() and y() will equal newX and newY.
+
+#Param newX incomplete ##
+#Param newY incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void inset(int32_t dx, int32_t dy)
+
+Inset the rectangle by (dx,dy). If dx is positive, then the sides are moved inwards,
+making the rectangle narrower. If dx is negative, then the sides are moved outwards,
+making the rectangle wider. The same holds true for dy and the top and bottom.
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void outset(int32_t dx, int32_t dy)
+
+Outset the rectangle by (dx,dy). If dx is positive, then the sides are
+moved outwards, making the rectangle wider. If dx is negative, then the
+sides are moved inwards, making the rectangle narrower. The same holds
+true for dy and the top and bottom.
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool quickReject(int l, int t, int r, int b) const
+
+#Param l incomplete ##
+#Param t incomplete ##
+#Param r incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool contains(int32_t x, int32_t y) const
+
+Returns true if (x,y) is inside the rectangle and the rectangle is not
+empty. The left and top are considered to be inside, while the right
+and bottom are not. Thus for the rectangle (0, 0, 5, 10), the
+points (0,0) and (0,9) are inside, while (-1,0) and (5,9) are not.
+
+#Param x incomplete ##
+#Param y incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool contains(int32_t left, int32_t top, int32_t right, int32_t bottom) const
+
+Returns true if the 4 specified sides of a rectangle are inside or equal to this rectangle.
+If either rectangle is empty, contains() returns false.
+
+#Param left incomplete ##
+#Param top incomplete ##
+#Param right incomplete ##
+#Param bottom incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool contains(const SkIRect& r) const
+
+Returns true if the specified rectangle r is inside or equal to this rectangle.
+
+#Param r incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool contains(const SkRect& r) const
+
+Returns true if the specified rectangle r is inside or equal to this rectangle.
+
+#Param r incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool containsNoEmptyCheck(int32_t left, int32_t top,
+ int32_t right, int32_t bottom) const
+
+Return true if this rectangle contains the specified rectangle.
+For speed, this method does not check if either this or the specified
+rectangles are empty, and if either is, its return value is undefined.
+In the debugging build however, we assert that both this and the
+specified rectangles are non-empty.
+
+#Param left incomplete ##
+#Param top incomplete ##
+#Param right incomplete ##
+#Param bottom incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool containsNoEmptyCheck(const SkIRect& r) const
+
+#Param r incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool intersect(const SkIRect& r)
+
+If r intersects this rectangle, return true and set this rectangle to that
+intersection, otherwise return false and do not change this rectangle.
+If either rectangle is empty, do nothing and return false.
+
+#Param r incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT intersect(const SkIRect& a, const SkIRect& b)
+
+If rectangles a and b intersect, return true and set this rectangle to
+that intersection, otherwise return false and do not change this
+rectangle. If either rectangle is empty, do nothing and return false.
+
+#Param a incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT intersectNoEmptyCheck(const SkIRect& a, const SkIRect& b)
+
+If rectangles a and b intersect, return true and set this rectangle to
+that intersection, otherwise return false and do not change this
+rectangle. For speed, no check to see if a or b are empty is performed.
+If either is, then the return result is undefined. In the debug build,
+we assert that both rectangles are non-empty.
+
+#Param a incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool intersect(int32_t left, int32_t top, int32_t right, int32_t bottom)
+
+If the rectangle specified by left,top,right,bottom intersects this rectangle,
+return true and set this rectangle to that intersection,
+otherwise return false and do not change this rectangle.
+If either rectangle is empty, do nothing and return false.
+
+#Param left incomplete ##
+#Param top incomplete ##
+#Param right incomplete ##
+#Param bottom incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static bool Intersects(const SkIRect& a, const SkIRect& b)
+
+Returns true if a and b are not empty, and they intersect
+
+#Param a incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static bool IntersectsNoEmptyCheck(const SkIRect& a, const SkIRect& b)
+
+Returns true if a and b intersect. debug-asserts that neither are empty.
+
+#Param a incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void join(int32_t left, int32_t top, int32_t right, int32_t bottom)
+
+Update this rectangle to enclose itself and the specified rectangle.
+If this rectangle is empty, just set it to the specified rectangle. If the specified
+rectangle is empty, do nothing.
+
+#Param left incomplete ##
+#Param top incomplete ##
+#Param right incomplete ##
+#Param bottom incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void join(const SkIRect& r)
+
+Update this rectangle to enclose itself and the specified rectangle.
+If this rectangle is empty, just set it to the specified rectangle. If the specified
+rectangle is empty, do nothing.
+
+#Param r incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void sort()
+
+Swap top/bottom or left/right if there are flipped.
+This can be called if the edges are computed separately,
+and may have crossed over each other.
+When this returns, left <= right && top <= bottom
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkIRect makeSorted() const
+
+Return a new Rect that is the sorted version of this rectangle (left <= right, top <= bottom).
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static const SkIRect& SK_WARN_UNUSED_RESULT EmptyIRect()
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+#Struct SkIRect ##
+
+#Topic IRect ##
diff --git a/docs/SkMatrix_Reference.bmh b/docs/SkMatrix_Reference.bmh
new file mode 100644
index 0000000000..db7e7c3c73
--- /dev/null
+++ b/docs/SkMatrix_Reference.bmh
@@ -0,0 +1,2388 @@
+#Topic Matrix
+#Alias Matrix_Reference
+
+#Class SkMatrix
+
+The SkMatrix class holds a 3x3 matrix for transforming coordinates.
+SkMatrix does not have a constructor, so it must be explicitly initialized
+using either reset() - to construct an identity matrix, or one of the set
+functions (e.g. setTranslate, setRotate, etc.).
+SkMatrix is not thread safe unless getType is called first.
+
+#Topic Overview
+
+#Subtopic Subtopics
+#ToDo manually add subtopics ##
+#Table
+#Legend
+# topics # description ##
+#Legend ##
+#Table ##
+##
+
+#Subtopic Operators
+#Table
+#Legend
+# description # function ##
+#Legend ##
+# friend SK_API bool operator!=(const SkMatrix& a, const SkMatrix& b) # ##
+# friend SK_API bool operator==(const SkMatrix& a, const SkMatrix& b) # ##
+#Table ##
+#Subtopic ##
+
+#Subtopic Member_Functions
+#Table
+#Legend
+# description # function ##
+#Legend ##
+# Concat # ##
+# GetMapPtsProc # ##
+# GetMapXYProc # ##
+# I # ##
+# InvalidMatrix # ##
+# MakeRectToRect # ##
+# MakeScale # ##
+# MakeTrans # ##
+# SetAffineIdentity # ##
+# [ # ##
+# asAffine # ##
+# cheapEqualTo # ##
+# decomposeScale # ##
+# dirtyMatrixTypeCache # ##
+# dump # ##
+# fixedStepInX # ##
+# get # ##
+# get9 # ##
+# getMapPtsProc # ##
+# getMapXYProc # ##
+# getMaxScale # ##
+# getMinMaxScales # ##
+# getMinScale # ##
+# getPerspX # ##
+# getPerspY # ##
+# getScaleX # ##
+# getScaleY # ##
+# getSkewX # ##
+# getSkewY # ##
+# getTranslateX # ##
+# getTranslateY # ##
+# getType # ##
+# hasPerspective # ##
+# invert # ##
+# isFinite # ##
+# isFixedStepInX # ##
+# isIdentity # ##
+# isScaleTranslate # ##
+# isSimilarity # ##
+# isTranslate # ##
+# mapHomogeneousPoints # ##
+# mapPoints # ##
+# mapPointsWithStride # ##
+# mapRadius # ##
+# mapRect # ##
+# mapRectScaleTranslate # ##
+# mapRectToQuad # ##
+# mapVector # ##
+# mapVectors # ##
+# mapXY # ##
+# postConcat # ##
+# postIDiv # ##
+# postRotate # ##
+# postScale # ##
+# postSkew # ##
+# postTranslate # ##
+# preConcat # ##
+# preRotate # ##
+# preScale # ##
+# preSkew # ##
+# preTranslate # ##
+# preservesAxisAlignment # ##
+# preservesRightAngles # ##
+# readFromMemory # ##
+# rectStaysRect # ##
+# reset # ##
+# set # ##
+# set9 # ##
+# setAffine # ##
+# setAll # ##
+# setConcat # ##
+# setIDiv # ##
+# setIdentity # ##
+# setPerspX # ##
+# setPerspY # ##
+# setPolyToPoly # ##
+# setRSXform # ##
+# setRectToRect # ##
+# setRotate # ##
+# setScale # ##
+# setScaleTranslate # ##
+# setScaleX # ##
+# setScaleY # ##
+# setSinCos # ##
+# setSkew # ##
+# setSkewX # ##
+# setSkewY # ##
+# setTranslate # ##
+# setTranslateX # ##
+# setTranslateY # ##
+# toString # ##
+# writeToMemory # ##
+#Table ##
+#Subtopic ##
+
+#Topic ##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkMatrix SK_WARN_UNUSED_RESULT MakeScale(SkScalar sx, SkScalar sy)
+
+#Param sx incomplete ##
+#Param sy incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkMatrix SK_WARN_UNUSED_RESULT MakeScale(SkScalar scale)
+
+#Param scale incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkMatrix SK_WARN_UNUSED_RESULT MakeTrans(SkScalar dx, SkScalar dy)
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Enum TypeMask
+
+#Code
+ enum TypeMask {
+ kIdentity_Mask = 0,
+ kTranslate_Mask = 0x01,
+ kScale_Mask = 0x02,
+ kAffine_Mask = 0x04,
+ kPerspective_Mask = 0x08,
+ };
+##
+
+Enum of bit fields for the mask return by getType().
+Use this to identify the complexity of the matrix.
+
+#Const kIdentity_Mask = 0
+##
+#Const kTranslate_Mask = 0x01
+set if the matrix has translation
+##
+#Const kScale_Mask = 0x02
+set if the matrix has x or y scale
+##
+#Const kAffine_Mask = 0x04
+set if the matrix skews or rotates
+##
+#Const kPerspective_Mask = 0x08
+set if the matrix is in perspective
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method TypeMask getType() const
+
+Returns a bit field describing the transformations the matrix may
+perform. The bit field is computed conservatively, so it may include
+false positives. For example, when kPerspective_Mask is true, all
+other bits may be set to true even in the case of a pure perspective
+transform.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isIdentity() const
+
+Returns true if the matrix is identity.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isScaleTranslate() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isTranslate() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool rectStaysRect() const
+
+Returns true if will map a rectangle to another rectangle. This can be
+true if the matrix is identity, scale-only, or rotates a multiple of
+90 degrees, or mirrors in x or y.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool preservesAxisAlignment() const
+
+alias for rectStaysRect()
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool hasPerspective() const
+
+Returns true if the matrix contains perspective elements.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isSimilarity(SkScalar tol = SK_ScalarNearlyZero) const
+
+Returns true if the matrix contains only translation, rotation/reflection or uniform scale.
+Returns false if other transformation types are included or is degenerate
+
+#Param tol incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool preservesRightAngles(SkScalar tol = SK_ScalarNearlyZero) const
+
+Returns true if the matrix contains only translation, rotation/reflection or scale
+(non-uniform scale is allowed).
+Returns false if other transformation types are included or is degenerate
+
+#Param tol incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Enum _anonymous
+
+#Code
+ enum {
+ kMScaleX,
+ kMSkewX,
+ kMTransX,
+ kMSkewY,
+ kMScaleY,
+ kMTransY,
+ kMPersp0,
+ kMPersp1,
+ kMPersp2,
+ };
+##
+
+#Const kMScaleX 0
+##
+#Const kMSkewX 1
+##
+#Const kMTransX 2
+##
+#Const kMSkewY 3
+##
+#Const kMScaleY 4
+##
+#Const kMTransY 5
+##
+#Const kMPersp0 6
+##
+#Const kMPersp1 7
+##
+#Const kMPersp2 8
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Enum _anonymous_2
+
+#Code
+ enum {
+ kAScaleX,
+ kASkewY,
+ kASkewX,
+ kAScaleY,
+ kATransX,
+ kATransY,
+ };
+##
+
+Affine arrays are in column major order
+because that is how PDF and XPS like it.
+
+#Const kAScaleX 0
+##
+#Const kASkewY 1
+##
+#Const kASkewX 2
+##
+#Const kAScaleY 3
+##
+#Const kATransX 4
+##
+#Const kATransY 5
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar operator[](int index) const
+
+#Param index incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar get(int index) const
+
+#Param index incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar getScaleX() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar getScaleY() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar getSkewY() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar getSkewX() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar getTranslateX() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar getTranslateY() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar getPerspX() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar getPerspY() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar operator[](int index)
+
+#Param index incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void set(int index, SkScalar value)
+
+#Param index incomplete ##
+#Param value incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setScaleX(SkScalar v)
+
+#Param v incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setScaleY(SkScalar v)
+
+#Param v incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setSkewY(SkScalar v)
+
+#Param v incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setSkewX(SkScalar v)
+
+#Param v incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setTranslateX(SkScalar v)
+
+#Param v incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setTranslateY(SkScalar v)
+
+#Param v incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setPerspX(SkScalar v)
+
+#Param v incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setPerspY(SkScalar v)
+
+#Param v incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setAll(SkScalar scaleX, SkScalar skewX, SkScalar transX,
+ SkScalar skewY, SkScalar scaleY, SkScalar transY,
+ SkScalar persp0, SkScalar persp1, SkScalar persp2)
+
+#Param scaleX incomplete ##
+#Param skewX incomplete ##
+#Param transX incomplete ##
+#Param skewY incomplete ##
+#Param scaleY incomplete ##
+#Param transY incomplete ##
+#Param persp0 incomplete ##
+#Param persp1 incomplete ##
+#Param persp2 incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void get9(SkScalar buffer[9]) const
+
+Copy the 9 scalars for this matrix into buffer, in member value ascending order:
+kMScaleX, kMSkewX, kMTransX, kMSkewY, kMScaleY, kMTransY, kMPersp0, kMPersp1, kMPersp2.
+
+#Param buffer incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void set9(const SkScalar buffer[9])
+
+Set this matrix to the 9 scalars from the buffer, in member value ascending order:
+kMScaleX, kMSkewX, kMTransX, kMSkewY, kMScaleY, kMTransY, kMPersp0, kMPersp1, kMPersp2.
+
+Note: calling set9 followed by get9 may not return the exact same values. Since the matrix
+is used to map non-homogeneous coordinates, it is free to scale the 9 values as needed.
+
+#Param buffer incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void reset()
+
+Set the matrix to identity
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setIdentity()
+
+alias for reset()
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setTranslate(SkScalar dx, SkScalar dy)
+
+Set the matrix to translate by (dx, dy).
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setTranslate(const SkVector& v)
+
+#Param v incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
+
+Set the matrix to scale by sx and sy, with a pivot point at (px, py).
+The pivot point is the coordinate that should remain unchanged by the
+specified transformation.
+
+#Param sx incomplete ##
+#Param sy incomplete ##
+#Param px incomplete ##
+#Param py incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setScale(SkScalar sx, SkScalar sy)
+
+Set the matrix to scale by sx and sy.
+
+#Param sx incomplete ##
+#Param sy incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool setIDiv(int divx, int divy)
+
+Set the matrix to scale by 1/divx and 1/divy. Returns false and does not
+touch the matrix if either divx or divy is zero.
+
+#Param divx incomplete ##
+#Param divy incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setRotate(SkScalar degrees, SkScalar px, SkScalar py)
+
+Set the matrix to rotate by the specified number of degrees, with a
+pivot point at (px, py). The pivot point is the coordinate that should
+remain unchanged by the specified transformation.
+
+#Param degrees incomplete ##
+#Param px incomplete ##
+#Param py incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setRotate(SkScalar degrees)
+
+Set the matrix to rotate about (0,0) by the specified number of degrees.
+
+#Param degrees incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setSinCos(SkScalar sinValue, SkScalar cosValue,
+ SkScalar px, SkScalar py)
+
+Set the matrix to rotate by the specified sine and cosine values, with
+a pivot point at (px, py). The pivot point is the coordinate that
+should remain unchanged by the specified transformation.
+
+#Param sinValue incomplete ##
+#Param cosValue incomplete ##
+#Param px incomplete ##
+#Param py incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setSinCos(SkScalar sinValue, SkScalar cosValue)
+
+Set the matrix to rotate by the specified sine and cosine values.
+
+#Param sinValue incomplete ##
+#Param cosValue incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkMatrix& setRSXform(const SkRSXform& rsxForm)
+
+#Param rsxForm incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setSkew(SkScalar kx, SkScalar ky, SkScalar px, SkScalar py)
+
+Set the matrix to skew by kx and ky, with a pivot point at (px, py).
+The pivot point is the coordinate that should remain unchanged by the
+specified transformation.
+
+#Param kx incomplete ##
+#Param ky incomplete ##
+#Param px incomplete ##
+#Param py incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setSkew(SkScalar kx, SkScalar ky)
+
+Set the matrix to skew by kx and ky.
+
+#Param kx incomplete ##
+#Param ky incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setConcat(const SkMatrix& a, const SkMatrix& b)
+
+Set the matrix to the concatenation of the two specified matrices.
+Either of the two matrices may also be the target matrix.
+this = a * b;
+
+#Param a incomplete ##
+#Param b incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void preTranslate(SkScalar dx, SkScalar dy)
+
+Preconcats the matrix with the specified translation.
+#Formula
+M' = M * T(dx, dy)
+##
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void preScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
+
+Preconcats the matrix with the specified scale.
+#Formula
+M' = M * S(sx, sy, px, py)
+##
+
+#Param sx incomplete ##
+#Param sy incomplete ##
+#Param px incomplete ##
+#Param py incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void preScale(SkScalar sx, SkScalar sy)
+
+Preconcats the matrix with the specified scale.
+#Formula
+M' = M * S(sx, sy)
+##
+
+#Param sx incomplete ##
+#Param sy incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void preRotate(SkScalar degrees, SkScalar px, SkScalar py)
+
+Preconcats the matrix with the specified rotation.
+#Formula
+M' = M * R(degrees, px, py)
+##
+
+#Param degrees incomplete ##
+#Param px incomplete ##
+#Param py incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void preRotate(SkScalar degrees)
+
+Preconcats the matrix with the specified rotation.
+#Formula
+M' = M * R(degrees)
+##
+
+#Param degrees incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void preSkew(SkScalar kx, SkScalar ky, SkScalar px, SkScalar py)
+
+Preconcats the matrix with the specified skew.
+#Formula
+M' = M * K(kx, ky, px, py)
+##
+
+#Param kx incomplete ##
+#Param ky incomplete ##
+#Param px incomplete ##
+#Param py incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void preSkew(SkScalar kx, SkScalar ky)
+
+Preconcats the matrix with the specified skew.
+#Formula
+M' = M * K(kx, ky)
+##
+
+#Param kx incomplete ##
+#Param ky incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void preConcat(const SkMatrix& other)
+
+Preconcats the matrix with the specified matrix.
+#Formula
+M' = M * other
+##
+
+#Param other incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void postTranslate(SkScalar dx, SkScalar dy)
+
+Postconcats the matrix with the specified translation.
+#Formula
+M' = T(dx, dy) * M
+##
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
+
+Postconcats the matrix with the specified scale.
+#Formula
+M' = S(sx, sy, px, py) * M
+##
+
+#Param sx incomplete ##
+#Param sy incomplete ##
+#Param px incomplete ##
+#Param py incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void postScale(SkScalar sx, SkScalar sy)
+
+Postconcats the matrix with the specified scale.
+#Formula
+M' = S(sx, sy) * M
+##
+
+#Param sx incomplete ##
+#Param sy incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool postIDiv(int divx, int divy)
+
+Postconcats the matrix by dividing it by the specified integers.
+#Formula
+M' = S(1/divx, 1/divy, 0, 0) * M
+##
+
+#Param divx incomplete ##
+#Param divy incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void postRotate(SkScalar degrees, SkScalar px, SkScalar py)
+
+Postconcats the matrix with the specified rotation.
+#Formula
+M' = R(degrees, px, py) * M
+##
+
+#Param degrees incomplete ##
+#Param px incomplete ##
+#Param py incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void postRotate(SkScalar degrees)
+
+Postconcats the matrix with the specified rotation.
+#Formula
+M' = R(degrees) * M
+##
+
+#Param degrees incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void postSkew(SkScalar kx, SkScalar ky, SkScalar px, SkScalar py)
+
+Postconcats the matrix with the specified skew.
+#Formula
+M' = K(kx, ky, px, py) * M
+##
+
+#Param kx incomplete ##
+#Param ky incomplete ##
+#Param px incomplete ##
+#Param py incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void postSkew(SkScalar kx, SkScalar ky)
+
+Postconcats the matrix with the specified skew.
+#Formula
+M' = K(kx, ky) * M
+##
+
+#Param kx incomplete ##
+#Param ky incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void postConcat(const SkMatrix& other)
+
+Postconcats the matrix with the specified matrix.
+#Formula
+M' = other * M
+##
+
+#Param other incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Enum ScaleToFit
+
+#Code
+ enum ScaleToFit {
+ kFill_ScaleToFit,
+ kStart_ScaleToFit,
+ kCenter_ScaleToFit,
+ kEnd_ScaleToFit,
+ };
+##
+
+#Const kFill_ScaleToFit
+Scale in X and Y independently, so that src matches dst exactly.
+This may change the aspect ratio of the src.
+##
+#Const kStart_ScaleToFit
+Compute a scale that will maintain the original src aspect ratio,
+but will also ensure that src fits entirely inside dst. At least one
+axis (x or y) will fit exactly. Aligns the result to the
+left and top edges of dst.
+##
+#Const kCenter_ScaleToFit
+Compute a scale that will maintain the original src aspect ratio,
+but will also ensure that src fits entirely inside dst. At least one
+axis (x or y) will fit exactly. The result is centered inside dst.
+##
+#Const kEnd_ScaleToFit
+Compute a scale that will maintain the original src aspect ratio,
+but will also ensure that src fits entirely inside dst. At least one
+axis (x or y) will fit exactly. Aligns the result to the
+right and bottom edges of dst.
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool setRectToRect(const SkRect& src, const SkRect& dst, ScaleToFit stf)
+
+Set the matrix to the scale and translate values that map the source
+rectangle to the destination rectangle, returning true if the the result
+can be represented.
+
+#Param src the source rectangle to map from
+##
+#Param dst the destination rectangle to map to
+##
+#Param stf the ScaleToFit option
+##
+
+#Return true if the matrix can be represented by the rectangle mapping
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkMatrix MakeRectToRect(const SkRect& src, const SkRect& dst, ScaleToFit stf)
+
+#Param src incomplete ##
+#Param dst incomplete ##
+#Param stf incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool setPolyToPoly(const SkPoint src[], const SkPoint dst[], int count)
+
+Set the matrix such that the specified src points would map to the
+specified dst points. count must be within [0..4].
+
+#Param src array of src points
+##
+#Param dst array of dst points
+##
+#Param count number of points to use for the transformation
+##
+
+#Return true if the matrix was set to the specified transformation
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT invert(SkMatrix* inverse) const
+
+If this matrix can be inverted, return true and if inverse is not null,
+set inverse to be the inverse of this matrix. If this matrix cannot be
+inverted, ignore inverse and return false
+
+#Param inverse incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static void SetAffineIdentity(SkScalar affine[6])
+
+Fills the passed array with affine identity values
+in column major order.
+
+#Param affine array to fill with affine identity values; must not be nullptr
+##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT asAffine(SkScalar affine[6]) const
+
+Fills the passed array with the affine values in column major order.
+If the matrix is a perspective transform, returns false
+and does not change the passed array.
+
+#Param affine array to fill with affine values; ignored if nullptr
+##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setAffine(const SkScalar affine[6])
+
+Set the matrix to the specified affine values.
+Note: these are passed in column major order.
+
+#Param affine incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void mapPoints(SkPoint dst[], const SkPoint src[], int count) const
+
+Apply this matrix to the array of points specified by src, and write
+the transformed points into the array of points specified by dst.
+#Formula
+dst[] = M * src[]
+##
+
+#Param dst storage for transformed coordinates; must
+ allow count entries
+##
+#Param src original coordinates that are to be transformed;
+ must allow count entries
+##
+#Param count number of points in src to read, and then transform
+ into dst
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void mapPoints(SkPoint pts[], int count) const
+
+Apply this matrix to the array of points, overwriting it with the
+transformed values.
+#Formula
+dst[] = M * pts[]
+##
+
+#Param pts storage for transformed points; must allow count entries
+##
+#Param count number of points in pts
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void mapPointsWithStride(SkPoint pts[], size_t stride, int count) const
+
+Like mapPoints but with custom byte stride between the points. Stride
+should be a multiple of
+#Formula
+sizeof(SkScalar)
+##
+.
+
+#Param pts incomplete ##
+#Param stride incomplete ##
+#Param count incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void mapPointsWithStride(SkPoint dst[], const SkPoint src[], size_t stride, int count) const
+
+Like mapPoints but with custom byte stride between the points.
+
+#Param dst incomplete ##
+#Param src incomplete ##
+#Param stride incomplete ##
+#Param count incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void mapHomogeneousPoints(SkScalar dst[], const SkScalar src[], int count) const
+
+Apply this matrix to the array of homogeneous points, specified by src,
+where a homogeneous point is defined by 3 contiguous scalar values,
+and write the transformed points into the array of scalars specified by dst.
+#Formula
+dst[] = M * src[]
+##
+
+#Param dst storage for transformed coordinates; must
+ allow 3 * count entries
+##
+#Param src original coordinates to be transformed;
+ must contain at least 3 * count entries
+##
+#Param count number of triples (homogeneous points) in src to read,
+ and then transform into dst
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void mapXY(SkScalar x, SkScalar y, SkPoint* result) const
+
+#Param x incomplete ##
+#Param y incomplete ##
+#Param result incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkPoint mapXY(SkScalar x, SkScalar y) const
+
+#Param x incomplete ##
+#Param y incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void mapVectors(SkVector dst[], const SkVector src[], int count) const
+
+Apply this matrix to the array of vectors specified by src, and write
+the transformed vectors into the array of vectors specified by dst.
+This is similar to mapPoints, but ignores any translation in the matrix.
+
+#Param dst storage for transformed coordinates; must
+ allow count entries
+##
+#Param src coordinates to be transformed;
+ must contain at least count entries
+##
+#Param count number of vectors in src to read and transform
+ into dst
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void mapVectors(SkVector vecs[], int count) const
+
+Apply this matrix to count vectors in array vecs.
+This is similar to mapPoints, but ignores any translation in the matrix.
+
+#Param vecs vectors to transform; must contain at least
+ count entries
+##
+#Param count number of vectors in vecs
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void mapVector(SkScalar dx, SkScalar dy, SkVector* result) const
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+#Param result incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkVector mapVector(SkScalar dx, SkScalar dy) const
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool mapRect(SkRect* dst, const SkRect& src) const
+
+Apply this matrix to the src rectangle, and write the transformed
+rectangle into dst. This is accomplished by transforming the 4 corners
+of src, and then setting dst to the bounds of those points.
+
+#Param dst storage for transformed rectangle ##
+#Param src rectangle to transform ##
+
+#Return result of calling rectStaysRect
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool mapRect(SkRect* rect) const
+
+Apply this matrix to the rectangle, and write the transformed rectangle
+back into it. This is accomplished by transforming the 4 corners of
+rect, and then setting it to the bounds of those points
+
+#Param rect rectangle to transform
+##
+
+#Return the result of calling rectStaysRect
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void mapRectToQuad(SkPoint dst[4], const SkRect& rect) const
+
+Applies Matrix to rect, and write the four transformed
+points into dst. The points written to dst will be the original top-left, top-right,
+bottom-right, and bottom-left points transformed by Matrix.
+
+#Param dst storage for transformed quad
+##
+#Param rect rectangle to transform
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void mapRectScaleTranslate(SkRect* dst, const SkRect& src) const
+
+Maps a rectangle to another rectangle, asserting (in debug mode) that the matrix only contains
+scale and translate elements. If it contains other elements, the results are undefined.
+
+#Param dst incomplete ##
+#Param src incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar mapRadius(SkScalar radius) const
+
+Return the mean radius of a circle after it has been mapped by
+this matrix. NOTE: in perspective this value assumes the circle
+has its center at the origin.
+
+#Param radius incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static MapXYProc GetMapXYProc(TypeMask mask)
+
+#Param mask incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method MapXYProc getMapXYProc() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static MapPtsProc GetMapPtsProc(TypeMask mask)
+
+#Param mask incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method MapPtsProc getMapPtsProc() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isFixedStepInX() const
+
+Returns true if the matrix can be stepped in x (not complex
+perspective).
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkVector fixedStepInX(SkScalar y) const
+
+If the matrix can be stepped in x (not complex perspective)
+then return the step value.
+If it cannot, behavior is undefined.
+
+#Param y incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool cheapEqualTo(const SkMatrix& m) const
+
+Returns true if Matrix equals m, using an efficient comparison.
+
+Return false when the sign of zero values is the different, that is, one
+matrix has positive zero value and the other has negative zero value.
+
+Normally, comparing NaN prevents the value from equaling any other value,
+including itself. To improve performance, NaN values are treated as bit patterns
+that are equal if their bit patterns are equal.
+
+#Param m incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method friend SK_API bool operator==(const SkMatrix& a, const SkMatrix& b)
+
+mac chromium debug build requires SK_API to make operator== visible
+
+#Param a incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method friend SK_API bool operator!=(const SkMatrix& a, const SkMatrix& b)
+
+#Param a incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Enum _anonymous_3
+
+#Code
+ enum {
+ kMaxFlattenSize = 9 * sizeof(SkScalar) + sizeof(uint32_t),
+ };
+##
+
+#Const kMaxFlattenSize = 9 * sizeof(SkScalar) + sizeof(uint32_t)
+ writeToMemory and readFromMemory will never return a value larger than this
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t writeToMemory(void* buffer) const
+
+return the number of bytes written, whether or not buffer is null
+
+#Param buffer incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method size_t readFromMemory(const void* buffer, size_t length)
+
+Reads data from the buffer parameter
+
+#Param buffer memory to read from
+##
+#Param length amount of memory available in the buffer
+##
+
+#Return number of bytes read (must be a multiple of 4) or
+ 0 if there was not enough memory available
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void dump() const
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void toString(SkString* str) const
+
+#Param str incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar getMinScale() const
+
+Calculates the minimum scaling factor of the matrix as computed from the
+singular value decomposition of the upper
+left 2x2. If the max scale factor cannot be computed (for example overflow or perspective)
+-1 is returned.
+
+#Return minimum scale factor
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar getMaxScale() const
+
+Calculates the maximum scaling factor of the matrix as computed from the
+singular value decomposition of the upper
+left 2x2. If the max scale factor cannot be computed (for example overflow or perspective)
+-1 is returned.
+
+#Return maximum scale factor
+##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT getMinMaxScales(SkScalar scaleFactors[2]) const
+
+Gets both the min and max scale factors. The min scale factor is scaleFactors[0] and the max
+is scaleFactors[1]. If the min/max scale factors cannot be computed false is returned and the
+values of scaleFactors[] are undefined.
+
+#Param scaleFactors incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool decomposeScale(SkSize* scale, SkMatrix* remaining = nullptr) const
+
+Attempt to decompose this matrix into a scale-only component and whatever remains, where
+the scale component is to be applied first.
+#Formula
+M -> Remaining * Scale
+##
+On success, return true and assign the scale and remaining components (assuming their
+respective parameters are not null). On failure return false and ignore the parameters.
+Possible reasons to fail: perspective, one or more scale factors are zero.
+
+#Param scale incomplete ##
+#Param remaining incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static const SkMatrix& I()
+
+Return a reference to a const identity matrix
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static const SkMatrix& InvalidMatrix()
+
+Return a reference to a const matrix that is "invalid", one that could
+never be used.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkMatrix Concat(const SkMatrix& a, const SkMatrix& b)
+
+Return the concatenation of two matrices, a * b.
+
+#Param a incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void dirtyMatrixTypeCache()
+
+Testing routine; the matrix type cache should never need to be
+manually invalidated during normal use.
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setScaleTranslate(SkScalar sx, SkScalar sy, SkScalar tx, SkScalar ty)
+
+Initialize the matrix to be scale + post-translate.
+
+#Param sx incomplete ##
+#Param sy incomplete ##
+#Param tx incomplete ##
+#Param ty incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isFinite() const
+
+Are all elements of the matrix finite?
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+#Class SkMatrix ##
+
+#Topic Matrix ##
diff --git a/docs/SkPaint_Reference.bmh b/docs/SkPaint_Reference.bmh
index 91644d8aa5..96822f950f 100644
--- a/docs/SkPaint_Reference.bmh
+++ b/docs/SkPaint_Reference.bmh
@@ -93,7 +93,7 @@ Shader attached to Paint.
# Hinting # Level of glyph outline adjustment. ##
# Join # Corner geometry on stroked shapes. ##
# Style # Stroke, fill, or both. ##
-# TextEncoding # Character or glyph encoding size. ##
+# TextEncoding # Character or glyph encoded size. ##
#Table ##
#Subtopic ##
@@ -171,7 +171,7 @@ Shader attached to Paint.
# getStyle # Returns Style: stroke, fill, or both. ##
# getTextAlign # Returns Align: left, center, or right. ##
# getTextBlobIntercepts # Returns where lines intersect Text_Blob; underlines. ##
-# getTextEncoding # Returns character or glyph encoding size. ##
+# getTextEncoding # Returns character or glyph encoded size. b ##
# getTextIntercepts # Returns where lines intersect text; underlines. ##
# getTextPath # Returns Path equivalent to text. ##
# getTextScaleX # Returns the text horizontal scale; condensed text. ##
@@ -229,7 +229,7 @@ Shader attached to Paint.
# setStyle # Sets Style: stroke, fill, or both. ##
# setSubpixelText # Sets or clears Subpixel_Text. ##
# setTextAlign # Sets Align: left, center, or right. ##
-# setTextEncoding # Sets character or glyph encoding size. ##
+# setTextEncoding # Sets character or glyph encoded size. ##
# setTextScaleX # Sets the text horizontal scale; condensed text. ##
# setTextSkewX # Sets the text horizontal skew; oblique text. ##
# setTextSize # Sets text size in points. ##
@@ -375,8 +375,8 @@ This prevents objects with Reference_Count from being modified once Paint refers
#Method void reset()
-Sets all paint's contents to their initial values. This is equivalent to replacing
-the paint with the result of SkPaint().
+Sets all Paint contents to their initial values. This is equivalent to replacing
+Paint with the result of SkPaint().
#Example
SkPaint paint1, paint2;
@@ -1626,7 +1626,7 @@ void draw(SkCanvas* canvas) {
Fake_Bold approximates the bold font style accompanying a normal font when a bold font face
is not available. Skia does not provide font substitution; it is up to the client to find the
-bold font face using the platform's Font_Manager.
+bold font face using the platform Font_Manager.
Use Text_Skew_X to approximate an italic font style when the italic font face
is not available.
@@ -1713,7 +1713,7 @@ Right_Side_Bearing. Full_Hinting_Spacing only applies to platforms that use
FreeType as their Font_Engine.
Full_Hinting_Spacing is not related to text Kerning, where the space between
-a specific pair of characters is adjusted using data in the font's Kerning tables.
+a specific pair of characters is adjusted using data in the font Kerning tables.
#Method bool isDevKernText() const
@@ -2019,10 +2019,10 @@ Set Style to kStroke_Style to stroke the shape.
#Subtopic ##
#Subtopic Stroke
-The stroke covers the area described by following the shape's edge with a pen or brush of
+The stroke covers the area described by following the shape edge with a pen or brush of
Stroke_Width. The area covered where the shape starts and stops is described by Stroke_Cap.
The area covered where the shape turns a corner is described by Stroke_Join.
-The stroke is centered on the shape; it extends equally on either side of the shape's edge.
+The stroke is centered on the shape; it extends equally on either side of the shape edge.
As Stroke_Width gets smaller, the drawn path frame is thinner. Stroke_Width less than one
may have gaps, and if kAntiAlias_Flag is set, Color_Alpha will increase to visually decrease coverage.
@@ -2170,14 +2170,14 @@ May be used to verify that Style is a legal value.
#Topic Stroke_Width
Stroke_Width sets the width for stroking. The width is the thickness
-of the stroke perpendicular to the path's direction when the paint's style is
+of the stroke perpendicular to the path direction when the paint style is
set to kStroke_Style or kStrokeAndFill_Style.
When width is greater than zero, the stroke encompasses as many pixels partially
or fully as needed. When the width equals zero, the paint enables hairlines;
the stroke is always one pixel wide.
-The stroke's dimensions are scaled by the canvas matrix, but Hairline stroke
+The stroke dimensions are scaled by the canvas matrix, but Hairline stroke
remains one pixel wide regardless of scaling.
The default width for the paint is zero.
@@ -2187,7 +2187,7 @@ The default width for the paint is zero.
#Platform raster gpu
#Description
The pixels hit to represent thin lines vary with the angle of the
- line and the platform's implementation.
+ line and the platform implementation.
##
void draw(SkCanvas* canvas) {
SkPaint paint;
@@ -2415,7 +2415,7 @@ Stroke_Cap draws at the beginning and end of an open Path_Contour.
#Enum ##
Stroke describes the area covered by a pen of Stroke_Width as it
-follows the Path_Contour, moving parallel to the contours's direction.
+follows the Path_Contour, moving parallel to the contour direction.
If the Path_Contour is not terminated by SkPath::kClose_Verb, the contour has a
visible beginning and end.
@@ -2495,7 +2495,7 @@ Stroke_Cap is kButt_Cap by default.
Stroke_Join draws at the sharp corners of an open or closed Path_Contour.
Stroke describes the area covered by a pen of Stroke_Width as it
-follows the Path_Contour, moving parallel to the contours's direction.
+follows the Path_Contour, moving parallel to the contour direction.
If the contour direction changes abruptly, because the tangent direction leading
to the end of a curve within the contour does not match the tangent direction of
@@ -4007,12 +4007,12 @@ Text_Skew_X defaults to 0.
##
TextEncoding determines whether text specifies character codes and their encoded
-size, or glyph indices. Character codes use the encoding specified by the
+size, or glyph indices. Characters are encoded as specified by the
#A Unicode standard # http://unicode.org/standard/standard.html ##
.
Character codes encoded size are specified by UTF-8, UTF-16, or UTF-32.
-All character encodings are able to represent all of Unicode, differing only
+All character code formats are able to represent all of Unicode, differing only
in the total storage required.
#A UTF-8 (RFC 3629) # https://tools.ietf.org/html/rfc3629 ##
@@ -4047,9 +4047,9 @@ Uses two byte words to represent glyph indices.
#Example
#Height 128
#Description
-First line has UTF-8 encoding.
-Second line has UTF-16 encoding.
-Third line has UTF-32 encoding.
+First line is encoded in UTF-8.
+Second line is encoded in UTF-16.
+Third line is encoded in UTF-32.
Fourth line has 16 bit glyph indices.
##
void draw(SkCanvas* canvas) {
@@ -4504,8 +4504,7 @@ Returns the number of glyph indices represented by text.
Text_Encoding specifies how text represents characters or glyphs.
glyphs may be nullptr, to compute the glyph count.
-Does not check text for valid character encoding or valid
-glyph indices.
+Does not check text for valid character codes or valid glyph indices.
If byteLength equals zero, returns zero.
If byteLength includes a partial character, the partial character is ignored.
diff --git a/docs/SkPixmap_Reference.bmh b/docs/SkPixmap_Reference.bmh
index 521d6dea15..09fb1a68fe 100644
--- a/docs/SkPixmap_Reference.bmh
+++ b/docs/SkPixmap_Reference.bmh
@@ -11,8 +11,8 @@ a direct drawing destination.
Use Bitmap to draw pixels referenced by Pixmap; use Surface to draw into
pixels referenced by Pixmap.
-Pixmap does not try to manage the lifetime of the pixel memory. Use PixelRef
-to manage pixel memory; PixelRef is safe across threads.
+Pixmap does not try to manage the lifetime of the pixel memory. Use Pixel_Ref
+to manage pixel memory; Pixel_Ref is safe across threads.
#Topic Overview
@@ -401,7 +401,8 @@ width() * info().bytesPerPixel()
##
.
-It is up to the Pixmap creator to ensure that row bytes is a useful value.
+Returns zero if colorType is kUnknown_SkColorType.
+It is up to the Bitmap creator to ensure that row bytes is a useful value.
#Return byte length of pixel row ##
@@ -461,7 +462,7 @@ inset address: 0x7f2a440fb210
Returns pixel count in each pixel row. Should be equal or less than:
#Formula
-rowBytes() / info.bytesPerPixel()
+rowBytes() / info().bytesPerPixel()
##
.
@@ -476,7 +477,7 @@ pixmap width: 16 info width: 16
##
##
-#SeeAlso height()
+#SeeAlso height() SkImageInfo::width()
##
@@ -489,15 +490,14 @@ Returns pixel row count.
#Return pixel height in Image_Info ##
#Example
- SkImageInfo info = SkImageInfo::MakeA8(16, 32);
- SkPixmap pixmap(info, nullptr, 64);
- SkDebugf("pixmap height: %d info height: %d\n", pixmap.height(), info.height());
+ SkPixmap pixmap(SkImageInfo::MakeA8(16, 32), nullptr, 64);
+ SkDebugf("pixmap height: %d info height: %d\n", pixmap.height(), pixmap.info().height());
#StdOut
pixmap height: 32 info height: 32
##
##
-#SeeAlso width()
+#SeeAlso width() ImageInfo::height()
##
@@ -521,7 +521,7 @@ color type: kAlpha_SkColorType
##
##
-#SeeAlso alphaType()
+#SeeAlso alphaType() SkImageInfo::colorType
##
@@ -543,7 +543,7 @@ alpha type: kPremul_SkAlphaType
##
##
-#SeeAlso colorType()
+#SeeAlso colorType() SkImageInfo::alphaType
##
@@ -551,9 +551,11 @@ alpha type: kPremul_SkAlphaType
#Method SkColorSpace* colorSpace() const
-Returns Color_Space associated with Image_Info.
+Returns Color_Space associated with Image_Info. The
+reference count of Color_Space is unchanged. The returned Color_Space is
+immutable.
-#Return Color_Space in Image_Info ##
+#Return Color_Space, the range of colors, in Image_Info ##
#Example
#Description
@@ -572,7 +574,7 @@ gammaCloseToSRGB: false gammaIsLinear: true isSRGB: false
##
##
-#SeeAlso Color_Space
+#SeeAlso Color_Space SkImageInfo::colorSpace
##
@@ -581,7 +583,8 @@ gammaCloseToSRGB: false gammaIsLinear: true isSRGB: false
#Method bool isOpaque() const
Returns true if Alpha_Type is kOpaque_SkAlphaType.
-Does not check if Color_Type allows Alpha, or Alpha in pixel values.
+Does not check if Color_Type allows Alpha, or if any pixel value has
+transparency.
#Return true if Image_Info has opaque Alpha_Type ##
@@ -717,31 +720,15 @@ color: kRGBA_F16_SkColorType bytesPerPixel: 8 shiftPerPixel: 3
#Method uint64_t getSize64() const
+#Deprecated
+##
+
Returns conservative memory required for pixel storage.
Includes unused memory on last row when rowBytesAsPixels exceeds width().
#Return conservative pixel storage size ##
-#Example
- SkPixmap pixmap;
- for (int width : { 1, 1000, 1000000 } ) {
- for (int height: { 1, 1000, 1000000 } ) {
- SkImageInfo imageInfo = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
- pixmap.reset(imageInfo , nullptr, width * 5);
- SkDebugf("width: %7d height: %7d getSize64: %13lld\n", width, height, pixmap.getSize64());
- }
- }
-#StdOut
-width: 1 height: 1 getSize64: 5
-width: 1 height: 1000 getSize64: 5000
-width: 1 height: 1000000 getSize64: 5000000
-width: 1000 height: 1 getSize64: 5000
-width: 1000 height: 1000 getSize64: 5000000
-width: 1000 height: 1000000 getSize64: 5000000000
-width: 1000000 height: 1 getSize64: 5000000
-width: 1000000 height: 1000 getSize64: 5000000000
-width: 1000000 height: 1000000 getSize64: 5000000000000
-##
+#NoExample
##
#SeeAlso getSafeSize64 getSafeSize height() rowBytes width() SkImageInfo::bytesPerPixel
@@ -752,32 +739,15 @@ width: 1000000 height: 1000000 getSize64: 5000000000000
#Method uint64_t getSafeSize64() const
+#Deprecated
+##
+
Returns minimum memory required for pixel storage.
Does not include unused memory on last row when rowBytesAsPixels exceeds width().
#Return exact pixel storage size ##
-#Example
- SkPixmap pixmap;
- for (int width : { 1, 1000, 1000000 } ) {
- for (int height: { 1, 1000, 1000000 } ) {
- SkImageInfo imageInfo = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
- pixmap.reset(imageInfo , nullptr, width * 5);
- SkDebugf("width: %7d height: %7d getSafeSize64: %13lld\n", width, height,
- pixmap.getSafeSize64());
- }
- }
-#StdOut
-width: 1 height: 1 getSafeSize64: 4
-width: 1 height: 1000 getSafeSize64: 4999
-width: 1 height: 1000000 getSafeSize64: 4999999
-width: 1000 height: 1 getSafeSize64: 4000
-width: 1000 height: 1000 getSafeSize64: 4999000
-width: 1000 height: 1000000 getSafeSize64: 4999999000
-width: 1000000 height: 1 getSafeSize64: 4000000
-width: 1000000 height: 1000 getSafeSize64: 4999000000
-width: 1000000 height: 1000000 getSafeSize64: 4999999000000
-##
+#NoExample
##
#SeeAlso getSize64 getSafeSize height() rowBytes width() SkImageInfo::bytesPerPixel
@@ -788,6 +758,9 @@ width: 1000000 height: 1000000 getSafeSize64: 4999999000000
#Method size_t getSafeSize() const
+#Deprecated
+##
+
Returns minimum memory required for pixel storage.
Does not include unused memory on last row when rowBytesAsPixels exceeds width().
Returns zero if value is does not fit in a signed 32-bit integer.
@@ -795,31 +768,50 @@ The largest value than can be returned is 2,147,483,647.
#Return exact pixel storage size if size fits in signed 32 bits ##
+#NoExample
+##
+
+#SeeAlso getSize64 getSafeSize64 height() rowBytes width() SkImageInfo::bytesPerPixel sk_64_isS32
+
+##
+
+
+# ------------------------------------------------------------------------------
+
+#Method size_t computeByteSize() const
+
+Returns minimum memory required for pixel storage.
+Does not include unused memory on last row when rowBytesAsPixels exceeds width().
+Returns zero if result does not fit in size_t.
+Returns zero if height() or width() is 0.
+Returns height() times rowBytes if colorType is kUnknown_SkColorType.
+
+#Return size in bytes of image buffer ##
+
#Example
-void draw(SkCanvas* canvas) {
SkPixmap pixmap;
for (int width : { 1, 1000, 1000000 } ) {
for (int height: { 1, 1000, 1000000 } ) {
SkImageInfo imageInfo = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
- pixmap.reset(imageInfo , nullptr, width * 5);
- SkDebugf("width: %7d height: %7d getSafeSize: %7d\n", width, height, pixmap.getSafeSize());
+ pixmap.reset(imageInfo, nullptr, width * 5);
+ SkDebugf("width: %7d height: %7d computeByteSize: %13lld\n", width, height,
+ pixmap.computeByteSize());
}
}
-}
#StdOut
-width: 1 height: 1 getSafeSize: 4
-width: 1 height: 1000 getSafeSize: 4999
-width: 1 height: 1000000 getSafeSize: 4999999
-width: 1000 height: 1 getSafeSize: 4000
-width: 1000 height: 1000 getSafeSize: 4999000
-width: 1000 height: 1000000 getSafeSize: 0
-width: 1000000 height: 1 getSafeSize: 4000000
-width: 1000000 height: 1000 getSafeSize: 0
-width: 1000000 height: 1000000 getSafeSize: 0
+width: 1 height: 1 computeByteSize: 4
+width: 1 height: 1000 computeByteSize: 4999
+width: 1 height: 1000000 computeByteSize: 4999999
+width: 1000 height: 1 computeByteSize: 4000
+width: 1000 height: 1000 computeByteSize: 4999000
+width: 1000 height: 1000000 computeByteSize: 4999999000
+width: 1000000 height: 1 computeByteSize: 4000000
+width: 1000000 height: 1000 computeByteSize: 4999000000
+width: 1000000 height: 1000000 computeByteSize: 4999999000000
##
##
-#SeeAlso getSize64 getSafeSize64 height() rowBytes width() SkImageInfo::bytesPerPixel sk_64_isS32
+#SeeAlso SkImageInfo::computeByteSize
##
@@ -845,7 +837,7 @@ greater.
Returns false for kUnknown_SkColorType.
-#Return true all pixels have opaque values or Color_Type is opaque ##
+#Return true if all pixels have opaque values or Color_Type is opaque ##
#Example
std::vector<uint32_t> pixels;
@@ -943,10 +935,13 @@ Unpremultiplied:
#Method const void* addr(int x, int y) const
-Returns readable pixel address at (x, y).
+Returns readable pixel address at (x, y). Returns nullptr if Pixel_Ref is nullptr.
Input is not validated: out of bounds values of x or y trigger an assert() if
-built with SK_DEBUG defined. Returns zero if Color_Type is kUnknown_SkColorType.
+built with SK_DEBUG defined. Returns nullptr if Color_Type is kUnknown_SkColorType.
+
+Performs a lookup of pixel size; for better performance, call
+one of: addr8, addr16, addr32, addr64, or addrF16.
#Param x column index, zero or greater, and less than width() ##
#Param y row index, zero or greater, and less than height() ##
@@ -966,7 +961,7 @@ pixmap.addr(1, 2) == &storage[1 + 2 * w]
##
##
-#SeeAlso addr8 addr16 addr32 addr64 addrF16 getColor writable_addr
+#SeeAlso addr8 addr16 addr32 addr64 addrF16 getColor writable_addr SkBitmap::getAddr
##
@@ -1611,7 +1606,7 @@ abs(srcY) >= this->height()
If behavior is SkTransferFunctionBehavior::kRespect: converts source
pixels to a linear space before converting to dstInfo.
If behavior is SkTransferFunctionBehavior::kIgnore: source
-pixels are treated as if they are linear, regardless of their encoding.
+pixels are treated as if they are linear, regardless of how they are encoded.
#Param dstInfo destination width, height, Color_Type, Alpha_Type, Color_Space ##
#Param dstPixels destination pixel storage ##
@@ -1625,6 +1620,7 @@ pixels are treated as if they are linear, regardless of their encoding.
#Return true if pixels are copied to dstPixels ##
#Example
+#ToDo example doesn't do anything interesting since info colorSpace is nullptr ##
#Image 3
void draw(SkCanvas* canvas) {
SkImageInfo info = SkImageInfo::MakeN32Premul(image->width(), image->height(),
diff --git a/docs/SkRect_Reference.bmh b/docs/SkRect_Reference.bmh
new file mode 100644
index 0000000000..33d9e54591
--- /dev/null
+++ b/docs/SkRect_Reference.bmh
@@ -0,0 +1,1320 @@
+#Topic Rect
+#Alias Rects
+#Alias Rect_Reference
+
+#Struct SkRect
+
+#Topic Overview
+
+#Subtopic Subtopics
+#ToDo manually add subtopics ##
+#Table
+#Legend
+# topics # description ##
+#Legend ##
+#Table ##
+##
+
+#Subtopic Operators
+#Table
+#Legend
+# description # function ##
+#Legend ##
+# friend bool operator!=(const SkRect& a, const SkRect& b) # ##
+# friend bool operator==(const SkRect& a, const SkRect& b) # ##
+#Table ##
+#Subtopic ##
+
+#Subtopic Member_Functions
+#Table
+#Legend
+# description # function ##
+#Legend ##
+# Make # ##
+# MakeEmpty # ##
+# MakeFromIRect # ##
+# MakeIWH # ##
+# MakeLTRB # ##
+# MakeLargest # ##
+# MakeSize # ##
+# MakeWH # ##
+# MakeXYWH # ##
+# bottom # ##
+# centerX # ##
+# centerY # ##
+# height # ##
+# inset # ##
+# intersect # ##
+# isEmpty # ##
+# isFinite # ##
+# isLargest # ##
+# isSorted # ##
+# iset # ##
+# isetWH # ##
+# left # ##
+# makeInset # ##
+# makeOffset # ##
+# makeOutset # ##
+# offset # ##
+# offsetTo # ##
+# outset # ##
+# right # ##
+# set # ##
+# setBounds # ##
+# setBoundsCheck # ##
+# setEmpty # ##
+# setLTRB # ##
+# setLargest # ##
+# setLargestInverted # ##
+# setWH # ##
+# setXYWH # ##
+# toQuad # ##
+# top # ##
+# width # ##
+# x # ##
+# y # ##
+#Table ##
+#Subtopic ##
+
+#Topic ##
+
+#Member SkScalar fLeft
+##
+
+#Member SkScalar fTop
+##
+
+#Member SkScalar fRight
+##
+
+#Member SkScalar fBottom
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static constexpr SkRect SK_WARN_UNUSED_RESULT MakeEmpty()
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkRect SK_WARN_UNUSED_RESULT MakeLargest()
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkRect SK_WARN_UNUSED_RESULT MakeWH(SkScalar w, SkScalar h)
+
+#Param w incomplete ##
+#Param h incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkRect SK_WARN_UNUSED_RESULT MakeIWH(int w, int h)
+
+#Param w incomplete ##
+#Param h incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkRect SK_WARN_UNUSED_RESULT MakeSize(const SkSize& size)
+
+#Param size incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static constexpr SkRect SK_WARN_UNUSED_RESULT MakeLTRB(SkScalar l, SkScalar t, SkScalar r,
+ SkScalar b)
+
+#Param l incomplete ##
+#Param t incomplete ##
+#Param r incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkRect SK_WARN_UNUSED_RESULT MakeXYWH(SkScalar x, SkScalar y, SkScalar w, SkScalar h)
+
+#Param x incomplete ##
+#Param y incomplete ##
+#Param w incomplete ##
+#Param h incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkRect SK_WARN_UNUSED_RESULT MakeFromIRect(const SkIRect& irect)
+
+#Param irect incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkRect Make(const SkISize& size)
+
+#Param size incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method static SkRect SK_WARN_UNUSED_RESULT Make(const SkIRect& irect)
+
+#Param irect incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isEmpty() const
+
+Return true if the rectangle width or height are <= 0
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isSorted() const
+
+Return true if the rectangle width and height are >= 0
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isLargest() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool isFinite() const
+
+Returns true if and only if all values in the rectangle are finite. If any are
+infinite or NaN then this returns false.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar x() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar y() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar left() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar top() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar right() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar bottom() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar width() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar height() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar centerX() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkScalar centerY() const
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method friend bool operator==(const SkRect& a, const SkRect& b)
+
+#Param a incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method friend bool operator!=(const SkRect& a, const SkRect& b)
+
+#Param a incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void toQuad(SkPoint quad[4]) const
+
+return the 4 points that enclose the rectangle (top-left, top-right, bottom-right,
+bottom-left).
+#ToDo
+Consider adding param to control whether quad is CW or CCW.
+##
+
+#Param quad incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setEmpty()
+
+Set this rectangle to the empty rectangle (0,0,0,0)
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void set(const SkIRect& src)
+
+#Param src incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void set(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom)
+
+#Param left incomplete ##
+#Param top incomplete ##
+#Param right incomplete ##
+#Param bottom incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setLTRB(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom)
+
+alias for set(l, t, r, b)
+
+#Param left incomplete ##
+#Param top incomplete ##
+#Param right incomplete ##
+#Param bottom incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void iset(int left, int top, int right, int bottom)
+
+Initialize the rectangle with the 4 specified integers. The routine handles
+converting them to scalars (by calling SkIntToScalar)
+
+#Param left incomplete ##
+#Param top incomplete ##
+#Param right incomplete ##
+#Param bottom incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void isetWH(int width, int height)
+
+Set this rectangle to be left/top at 0,0, and have the specified width
+and height (automatically converted to SkScalar).
+
+#Param width incomplete ##
+#Param height incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void set(const SkPoint pts[], int count)
+
+Set this rectangle to be the bounds of the array of points.
+If the array is empty (count == 0), then set this rectangle
+to the empty rectangle (0,0,0,0)
+
+#Param pts incomplete ##
+#Param count incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setBounds(const SkPoint pts[], int count)
+
+alias for set(pts, count)
+
+#Param pts incomplete ##
+#Param count incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool setBoundsCheck(const SkPoint pts[], int count)
+
+Compute the bounds of the array of points, and set this rectangle to that
+bounds and return true... unless a non-finite value is encountered,
+in which case this rectangle is set to empty and false is returned.
+
+#Param pts incomplete ##
+#Param count incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void set(const SkPoint& p0, const SkPoint& p1)
+
+#Param p0 incomplete ##
+#Param p1 incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setXYWH(SkScalar x, SkScalar y, SkScalar width, SkScalar height)
+
+#Param x incomplete ##
+#Param y incomplete ##
+#Param width incomplete ##
+#Param height incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setWH(SkScalar width, SkScalar height)
+
+#Param width incomplete ##
+#Param height incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setLargest()
+
+Sets rectangle left and top to most negative value, and sets
+right and bottom to most positive value.
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void setLargestInverted()
+
+Sets rectangle left and top to most positive value, and sets
+right and bottom to most negative value.
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkRect makeOffset(SkScalar dx, SkScalar dy) const
+
+Return a new Rect, built as an offset of this rectangle.
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkRect makeInset(SkScalar dx, SkScalar dy) const
+
+Return a new Rect, built as an inset of this rectangle.
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method SkRect makeOutset(SkScalar dx, SkScalar dy) const
+
+Return a new Rect, built as an outset of this rectangle.
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void offset(SkScalar dx, SkScalar dy)
+
+Offset set the rectangle by adding dx to its left and right,
+and adding dy to its top and bottom.
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void offset(const SkPoint& delta)
+
+#Param delta incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void offsetTo(SkScalar newX, SkScalar newY)
+
+Offset this rectangle such its new x() and y() will equal newX and newY.
+
+#Param newX incomplete ##
+#Param newY incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void inset(SkScalar dx, SkScalar dy)
+
+Inset the rectangle by (dx,dy). If dx is positive, then the sides are
+moved inwards, making the rectangle narrower. If dx is negative, then
+the sides are moved outwards, making the rectangle wider. The same holds
+true for dy and the top and bottom.
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method void outset(SkScalar dx, SkScalar dy)
+
+Outset the rectangle by (dx,dy). If dx is positive, then the sides are
+moved outwards, making the rectangle wider. If dx is negative, then the
+sides are moved inwards, making the rectangle narrower. The same holds
+true for dy and the top and bottom.
+
+#Param dx incomplete ##
+#Param dy incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool intersect(const SkRect& r)
+
+If this rectangle intersects r, return true and set this rectangle to that
+intersection, otherwise return false and do not change this rectangle.
+If either rectangle is empty, do nothing and return false.
+
+#Param r incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool intersect(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom)
+
+If this rectangle intersects the rectangle specified by left, top, right, bottom,
+return true and set this rectangle to that intersection, otherwise return false
+and do not change this rectangle.
+If either rectangle is empty, do nothing and return false.
+
+#Param left incomplete ##
+#Param top incomplete ##
+#Param right incomplete ##
+#Param bottom incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+# ------------------------------------------------------------------------------
+
+#Method bool SK_WARN_UNUSED_RESULT intersect(const SkRect& a, const SkRect& b)
+
+If rectangles a and b intersect, return true and set this rectangle to
+that intersection, otherwise return false and do not change this
+rectangle. If either rectangle is empty, do nothing and return false.
+
+#Param a incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#ToDo incomplete ##
+
+##
+
+#Method bool intersects(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) const
+
+Returns true if this rectangle is not empty, and the specified sides of
+a rectangle are not empty, and they intersect.
+
+#Param left incomplete ##
+#Param top incomplete ##
+#Param right incomplete ##
+#Param bottom incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method bool intersects(const SkRect& r) const
+
+#Param r incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method static bool Intersects(const SkRect& a, const SkRect& b)
+
+Returns true if rectangles a and b are not empty and intersect.
+
+#Param a incomplete ##
+#Param b incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+
+#Method void join(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom)
+
+Updates rectangle to enclose itself and the specified rectangle.
+If this rectangle is empty, just set it to the specified rectangle.
+If the specified rectangle is empty, do nothing.
+
+#Param left incomplete ##
+#Param top incomplete ##
+#Param right incomplete ##
+#Param bottom incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method void join(const SkRect& r)
+
+If this rectangle is empty, just set it to the specified rectangle. If the specified
+rectangle is empty, do nothing.
+
+#Param r incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method void joinNonEmptyArg(const SkRect& r)
+
+#Param r incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method void joinPossiblyEmptyRect(const SkRect& r)
+
+Joins the rectangle with another without checking if either are empty (may produce unexpected
+results if either rectangle is inverted).
+
+#Param r incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method void growToInclude(SkPoint pt)
+
+Grows rectangle to include the specified (x,y). After this call, the
+following will be true: fLeft <= x <= fRight && fTop <= y <= fBottom.
+
+This is close, but not quite the same contract as contains(), since
+contains() treats the left and top different from the right and bottom.
+contains(x,y) -> fLeft <= x < fRight && fTop <= y < fBottom. Also note
+that contains(x,y) always returns false if the rectangle is empty.
+
+#Param pt incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method void growToInclude(const SkPoint pts[], int count)
+
+Bulk version of growToInclude
+
+#Param pts incomplete ##
+#Param count incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method void growToInclude(const SkPoint pts[], size_t stride, int count)
+
+Bulk version of growToInclude with stride.
+
+#Param pts incomplete ##
+#Param stride incomplete ##
+#Param count incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method bool contains(const SkRect& r) const {
+
+Return true if this rectangle contains r, and if both rectangles are
+not empty.
+
+#Param r incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method bool contains(const SkIRect& r) const
+
+Returns true if the specified rectangle r is inside or equal to this rectangle.
+
+#Param r incomplete ##
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method void round(SkIRect* dst) const
+
+Sets dst rectangle by rounding this rectangle coordinates to their
+nearest integer values using SkScalarRoundToInt.
+
+#Param dst incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method void roundOut(SkIRect* dst) const
+
+Sets dst rectangle by rounding "out" this rectangle, choosing the
+SkScalarFloorToInt of top and left, and the SkScalarCeilToInt of right and bottom.
+
+#Param dst incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method void roundOut(SkRect* dst) const
+
+Sets the dst rectangle by rounding "out" this rectangle, choosing the
+SkScalarFloorToScalar of top and left, and the SkScalarCeilToScalar of right and bottom.
+
+It is safe for this to equal dst.
+
+#Param dst incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method void roundIn(SkIRect* dst) const
+
+Set the dst rectangle by rounding "in" this rectangle, choosing the
+ceil() of top and left, and the floor of right and bottom. This does *not*
+call sort(), so it is possible that the resulting rectangle is inverted;
+either left >= right or top >= bottom. Call isEmpty() to detect that.
+
+#Param dst incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method SkIRect round() const
+
+Returns the result of calling round(&dst)
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method SkIRect roundOut() const
+
+Returns the result of calling roundOut(&dst)
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method void sort()
+
+Swaps top/bottom or left/right if there are flipped; if width()
+or height() would have returned a negative value. This should be called
+if the edges are computed separately, and may have crossed over each
+other. When this returns, left <= right && top <= bottom
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method SkRect makeSorted() const
+
+Returns a new Rect that is the sorted version of this rectangle (left <= right, top <= bottom).
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+#SeeAlso incomplete
+
+##
+
+#Method const SkScalar* asScalars() const
+
+Cast-safe way to treat the rectangle as a SkScalar array with four entries.
+
+#Return incomplete ##
+
+#Example
+// incomplete
+##
+
+##
+
+#Method void dump(bool asHex) const
+
+#Param asHex incomplete ##
+
+#Example
+// incomplete
+##
+
+##
+
+#Method void dump() const
+
+#Example
+// incomplete
+##
+
+##
+
+#Method void dumpHex() const
+
+#Example
+// incomplete
+##
+
+##
+
+#Struct SkRect ##
+
+#Topic Rect ##
diff --git a/docs/undocumented.bmh b/docs/undocumented.bmh
index ad7233f2b6..d66bcf87af 100644
--- a/docs/undocumented.bmh
+++ b/docs/undocumented.bmh
@@ -8,7 +8,9 @@
API
CPU
GPU GPU-backed OpenGL Vulkan
+ PDF XPS
RFC
+ NaN NaNs
Bezier Coons Cartesian
C C++ Destructor Subclasses
SaveLayerFlags # not external; need to add typedef support
@@ -16,6 +18,8 @@
SkXXX.h # ditto
SkXXX_Reference # ditto
Skia # ditto
+ SK_ABORT # ditto
+ SK_API # ditto
SK_DEBUG # ditto
SK_RELEASE # ditto
SK_USE_FREETYPE_EMBOLDEN # ditto
@@ -52,20 +56,6 @@ FT_Load_Glyph
##
##
-#Topic Bitmap
-#Class SkBitmap
- #Subtopic Row_Bytes
- ##
- #Method void erase(SkColor c, const SkIRect& area) const
- ##
- #Method bool installPixels(const SkImageInfo& info, void* pixels, size_t rowBytes)
- ##
- #Method bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
- int srcX, int srcY, SkTransferFunctionBehavior behavior) const
- ##
-#Class ##
-##
-
#Topic Blend_Mode
#EnumClass SkBlendMode
#Const kSrc 1
@@ -325,6 +315,22 @@ FT_Load_Glyph
##
#Method int bytesPerPixel() const
##
+ #Method int height() const
+ ##
+ #Method int width() const
+ ##
+ #Method SkColorType colorType() const
+ ##
+ #Method SkAlphaType alphaType() const
+ ##
+ #Method SkColorSpace* colorSpace() const
+ ##
+ #Method bool isOpaque() const
+ ##
+ #Method size_t minRowBytes() const
+ ##
+ #Method size_t computeByteSize(size_t rowBytes) const
+ ##
##
#Subtopic ##
#Class SkImage
@@ -351,13 +357,6 @@ FT_Load_Glyph
#Topic Image_Scaling
##
-#Topic IRect
-#Struct SkIRect
- #Method bool intersect(const SkIRect& r)
- ##
-##
-##
-
#Topic Left_Side_Bearing
##
@@ -365,6 +364,15 @@ FT_Load_Glyph
#Alias Lines
#Topic ##
+#Topic Malloc_Pixel_Ref
+#Class SkMallocPixelRef
+ #Method static sk_sp<SkPixelRef> MakeZeroed(const SkImageInfo&, size_t rowBytes)
+ ##
+ #Method static sk_sp<SkPixelRef> MakeAllocate(const SkImageInfo&, size_t rowBytes)
+ ##
+##
+##
+
#Topic Mask
#Class SkMask
#Enum Format
@@ -387,18 +395,31 @@ FT_Load_Glyph
#Topic Mask_Filter
#Class SkMaskFilter
+#Method virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix&,
+ SkIPoint* margin) const
+##
#Class ##
#Topic ##
#Topic Math
#Method static inline bool sk_64_isS32(int64_t value)
##
+ #Method SkIntToScalar(x)
+ ##
+ #Method SkScalarRoundToInt(x)
+ ##
+ #Method SkScalarFloorToInt(x)
+ ##
+ #Method SkScalarCeilToInt(x)
+ ##
+ #Method SkScalarFloorToScalar(x)
+ ##
+ #Method SkScalarCeilToScalar(x)
+ ##
##
-#Topic Matrix
-#Struct SkMatrix
-#Struct ##
-#Topic ##
+#Topic Mip_Map
+##
#Topic Nine_Patch
##
@@ -482,8 +503,16 @@ FT_Load_Glyph
##
##
-#Topic PixelRef
+#Topic Pixel_Ref
#Class SkPixelRef
+ #Method int width() const
+ ##
+ #Method int height() const
+ ##
+ #Method bool isImmutable() const
+ ##
+ #Method void setImmutable()
+ ##
##
##
@@ -534,20 +563,10 @@ FT_Load_Glyph
#Subtopic ##
#Topic ##
-#Topic Rect
-#Alias Rects
- #Struct SkRect
- #Method static constexpr SkRect SK_WARN_UNUSED_RESULT MakeEmpty()
- ##
- #Method void dump() const
- ##
- #Method void dumpHex() const
- ##
- #Struct ##
-#Topic ##
-
#Topic Reference_Count
#Substitute SkRefCnt
+#Class SkRefCnt
+#Class ##
#Class sk_sp
#Class ##
#Topic ##
@@ -588,6 +607,10 @@ FT_Load_Glyph
#Subtopic ##
#Topic ##
+#Topic Size
+#Alias ISize
+##
+
#Topic Sprite
#Alias Sprites
#Topic ##
diff --git a/site/user/api/SkBitmap_Reference.md b/site/user/api/SkBitmap_Reference.md
new file mode 100644
index 0000000000..076cebac50
--- /dev/null
+++ b/site/user/api/SkBitmap_Reference.md
@@ -0,0 +1,3632 @@
+SkBitmap Reference
+===
+
+# <a name="Bitmap"></a> Bitmap
+
+# <a name="SkBitmap"></a> Class SkBitmap
+<a href="#Bitmap">Bitmap</a> describes a two-dimensional raster pixel array. <a href="#Bitmap">Bitmap</a> is built on
+<a href="#Info">Image Info</a>, containing integer <a href="#SkBitmap_width">width</a> and <a href="#SkBitmap_height">height</a>, <a href="undocumented#Color_Type">Color Type</a> and <a href="undocumented#Alpha_Type">Alpha Type</a>
+describing the pixel format, and <a href="undocumented#Color_Space">Color Space</a> describing the range of colors.
+<a href="#Bitmap">Bitmap</a> points to <a href="undocumented#Pixel_Ref">Pixel Ref</a>, which describes the physical array of pixels.
+<a href="#Info">Image Info</a> <a href="#SkBitmap_bounds">bounds</a> may be located anywhere fully inside <a href="undocumented#Pixel_Ref">Pixel Ref</a> <a href="#SkBitmap_bounds">bounds</a>.
+
+<a href="#Bitmap">Bitmap</a> can be drawn using <a href="SkCanvas_Reference#Canvas">Canvas</a>. <a href="#Bitmap">Bitmap</a> can be a drawing destination for <a href="SkCanvas_Reference#Canvas">Canvas</a>
+draw methods. <a href="#Bitmap">Bitmap</a> flexibility as a pixel container limits some optimizations
+available to the target platform.
+
+If pixel array is primarily read-only, use <a href="undocumented#Image">Image</a> for better performance.
+If pixel array is primarily written to, use <a href="undocumented#Surface">Surface</a> for better performance.
+
+Declaring <a href="#SkBitmap">SkBitmap</a> const prevents altering <a href="#Info">Image Info</a>: the <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_height">height</a>, <a href="#SkBitmap_width">width</a>,
+and so on cannot change. It does not affect <a href="undocumented#Pixel_Ref">Pixel Ref</a>: a caller may write its
+pixels. Declaring <a href="#SkBitmap">SkBitmap</a> const affects <a href="#Bitmap">Bitmap</a> configuration, not its contents.
+
+<a href="#Bitmap">Bitmap</a> is not thread safe. Each thread must have its own copy if <a href="#Bitmap">Bitmap</a> fields,
+although threads may share the underlying pixel array.
+
+# <a name="Row_Bytes"></a> Row Bytes
+<a href="#Bitmap">Bitmap</a> pixels may be contiguous, or may have a gap at the end of each row.
+<a href="#Row_Bytes">Row Bytes</a> is the interval from one row to the next. <a href="#Row_Bytes">Row Bytes</a> may be specified;
+sometimes passing zero will compute the <a href="#Row_Bytes">Row Bytes</a> from the row <a href="#SkBitmap_width">width</a> and the
+number of bytes in a pixel. <a href="#Row_Bytes">Row Bytes</a> may be larger than the row requires. This
+is useful to position one or more <a href="#Bitmap">Bitmaps</a> within a shared pixel array.
+
+# <a name="Overview"></a> Overview
+
+## <a name="Subtopics"></a> Subtopics
+
+| topics | description |
+| --- | --- |
+
+## <a name="Structs"></a> Structs
+
+| description | struct |
+| --- | --- |
+| <a href="#SkBitmap_Allocator">Allocator</a> | |
+| <a href="#SkBitmap_HeapAllocator">HeapAllocator</a> | |
+
+## <a name="Constructors"></a> Constructors
+
+| description | function |
+| --- | --- |
+| <a href="#SkBitmap_empty_constructor">SkBitmap()</a> | Constructs with default values. |
+| <a href="#SkBitmap_move_SkBitmap">SkBitmap(SkBitmap&& src)</a> | Takes ownership of pixels. |
+| <a href="#SkBitmap_copy_const_SkBitmap">SkBitmap(const SkBitmap& src)</a> | Shares ownership of pixels. |
+| | Releases ownership of pixels. |
+
+## <a name="Operators"></a> Operators
+
+| description | function |
+| --- | --- |
+| <a href="#SkBitmap">SkBitmap</a>& <a href="#SkBitmap_move_assignment_operator">operator=(SkBitmap&& src)</a> | Takes ownership of pixels. |
+| <a href="#SkBitmap">SkBitmap</a>& <a href="#SkBitmap_copy_assignment_operator">operator=(const SkBitmap& src)</a> | Shares ownership of pixels. |
+
+## <a name="Member_Functions"></a> Member Functions
+
+| description | function |
+| --- | --- |
+| <a href="#SkBitmap_ComputeIsOpaque">ComputeIsOpaque</a> | Returns true if all pixels are opaque. |
+| <a href="#SkBitmap_allocN32Pixels">allocN32Pixels</a> | Allocates compatible <a href="#ARGB">Color ARGB</a> pixels, or aborts. |
+| <a href="#SkBitmap_allocPixels">allocPixels</a> | Allocates pixels from <a href="#Info">Image Info</a>, or aborts. |
+| <a href="#SkBitmap_allocPixelsFlags">allocPixelsFlags</a> | Allocates pixels from <a href="#Info">Image Info</a> with options, or aborts. |
+| <a href="#SkBitmap_alphaType">alphaType</a> | Returns <a href="#Info">Image Info</a> <a href="undocumented#Alpha_Type">Alpha Type</a>. |
+| <a href="#SkBitmap_bounds">bounds</a> | Returns <a href="#SkBitmap_width">width</a> and <a href="#SkBitmap_height">height</a> as Rectangle. |
+| <a href="#SkBitmap_bytesPerPixel">bytesPerPixel</a> | Returns number of bytes in pixel based on <a href="undocumented#Color_Type">Color Type</a>. |
+| <a href="#SkBitmap_colorSpace">colorSpace</a> | Returns <a href="#Info">Image Info</a> <a href="undocumented#Color_Space">Color Space</a>. |
+| <a href="#SkBitmap_colorType">colorType</a> | Returns <a href="#Info">Image Info</a> <a href="undocumented#Color_Type">Color Type</a>. |
+| <a href="#SkBitmap_computeSafeSize64">computeSafeSize64</a> | Returns minimum size required for pixels in 64 bits. |
+| <a href="#SkBitmap_computeSize64">computeSize64</a> | Returns conservative size required for pixels. |
+| <a href="#SkBitmap_dimensions">dimensions</a> | Returns <a href="#SkBitmap_width">width</a> and <a href="#SkBitmap_height">height</a>. |
+| <a href="#SkBitmap_drawsNothing">drawsNothing</a> | Returns true if no <a href="#SkBitmap_width">width</a>, no <a href="#SkBitmap_height">height</a>, or no <a href="undocumented#Pixel_Ref">Pixel Ref</a>. |
+| <a href="#SkBitmap_empty">empty</a> | Returns true if <a href="#Info">Image Info</a> has zero <a href="#SkBitmap_width">width</a> or <a href="#SkBitmap_height">height</a>. |
+| <a href="#SkBitmap_erase">erase</a> | Writes <a href="undocumented#Color">Color</a> to rectangle of pixels. |
+| <a href="#SkBitmap_eraseARGB">eraseARGB</a> | Writes <a href="undocumented#Color">Color</a> to pixels. |
+| <a href="#SkBitmap_eraseArea">eraseArea</a> | Deprecated |
+| <a href="#SkBitmap_eraseColor">eraseColor</a> | Writes <a href="undocumented#Color">Color</a> to pixels. |
+| <a href="#SkBitmap_eraseRGB">eraseRGB</a> | Writes opaque <a href="undocumented#Color">Color</a> to pixels. |
+| <a href="#SkBitmap_extractAlpha">extractAlpha</a> | Creates <a href="#Bitmap">Bitmap</a> containing <a href="#Alpha">Alpha</a> of pixels. |
+| <a href="#SkBitmap_extractSubset">extractSubset</a> | Creates <a href="#Bitmap">Bitmap</a>, sharing pixels if possible. |
+| <a href="#SkBitmap_getAddr">getAddr</a> | Returns readable pixel address as void pointer. |
+| <a href="#SkBitmap_getAddr16">getAddr16</a> | Returns readable pixel address as 16-bit pointer. |
+| <a href="#SkBitmap_getAddr32">getAddr32</a> | Returns readable pixel address as 32-bit pointer. |
+| <a href="#SkBitmap_getAddr8">getAddr8</a> | Returns readable pixel address as 8-bit pointer. |
+| <a href="#SkBitmap_getBounds">getBounds</a> | Returns <a href="#SkBitmap_width">width</a> and <a href="#SkBitmap_height">height</a> as Rectangle. |
+| <a href="#SkBitmap_getColor">getColor</a> | Returns one pixel as <a href="#Unpremultiply">Unpremultiplied</a> <a href="undocumented#Color">Color</a>. |
+| <a href="#SkBitmap_getGenerationID">getGenerationID</a> | Returns unique ID. |
+| <a href="#SkBitmap_getPixels">getPixels</a> | Returns address of pixels. |
+| <a href="#SkBitmap_getSafeSize">getSafeSize</a> | Returns minimum size required for pixels in 32 bits. |
+| <a href="#SkBitmap_getSize">getSize</a> | Returns conservative size required for pixels in 32 bits. |
+| <a href="#SkBitmap_getSubset">getSubset</a> | Returns <a href="#SkBitmap_bounds">bounds</a> offset by origin. |
+| <a href="#SkBitmap_hasHardwareMipMap">hasHardwareMipMap</a> | Returns <a href="undocumented#Mip_Map">Mip Map</a> support present; <a href="undocumented#Android">Android</a> only. |
+| <a href="#SkBitmap_height">height</a> | Returns pixel row count. |
+| <a href="#SkBitmap_info">info</a> | Returns <a href="#Info">Image Info</a>. |
+| <a href="#SkBitmap_installMaskPixels">installMaskPixels</a> | Creates <a href="undocumented#Pixel_Ref">Pixel Ref</a> from <a href="undocumented#Mask">Mask</a>. |
+| <a href="#SkBitmap_installPixels">installPixels</a> | Creates <a href="undocumented#Pixel_Ref">Pixel Ref</a>, with optional release function. |
+| <a href="#SkBitmap_isImmutable">isImmutable</a> | Returns true if pixels will not change. |
+| <a href="#SkBitmap_isNull">isNull</a> | Returns true if <a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr. |
+| <a href="#SkBitmap_isOpaque">isOpaque</a> | Returns true if <a href="#Info">Image Info</a> describes opaque pixels. |
+| <a href="#SkBitmap_isVolatile">isVolatile</a> | Returns true if pixels should not be cached. |
+| <a href="#SkBitmap_notifyPixelsChanged">notifyPixelsChanged</a> | Marks pixels as changed, altering the unique ID. |
+| <a href="#SkBitmap_peekPixels">peekPixels</a> | Returns <a href="SkPixmap_Reference#Pixmap">Pixmap</a> if possible. |
+| <a href="#SkBitmap_pixelRef">pixelRef</a> | Returns <a href="undocumented#Pixel_Ref">Pixel Ref</a>, or nullptr. |
+| <a href="#SkBitmap_pixelRefOrigin">pixelRefOrigin</a> | Returns offset within <a href="undocumented#Pixel_Ref">Pixel Ref</a>. |
+| <a href="#SkBitmap_readPixels">readPixels</a> | Copies and converts pixels. |
+| <a href="#SkBitmap_readyToDraw">readyToDraw</a> | Returns true if address of pixels is not nullptr. |
+| <a href="#SkBitmap_refColorSpace">refColorSpace</a> | Returns <a href="#Info">Image Info</a> <a href="undocumented#Color_Space">Color Space</a>. |
+| <a href="#SkBitmap_reset">reset</a> | Sets to default values, releases pixel ownership. |
+| <a href="#SkBitmap_rowBytes">rowBytes</a> | Returns interval between rows in bytes. |
+| <a href="#SkBitmap_rowBytesAsPixels">rowBytesAsPixels</a> | Returns interval between rows in pixels. |
+| <a href="#SkBitmap_setAlphaType">setAlphaType</a> | Sets <a href="undocumented#Alpha_Type">Alpha Type</a> of shared pixels. |
+| <a href="#SkBitmap_setHasHardwareMipMap">setHasHardwareMipMap</a> | Sets <a href="undocumented#Mip_Map">Mip Map</a> support present; <a href="undocumented#Android">Android</a> only. |
+| <a href="#SkBitmap_setImmutable">setImmutable</a> | Marks that pixels will not change. |
+| <a href="#SkBitmap_setInfo">setInfo</a> | Sets <a href="#SkBitmap_height">height</a>, <a href="#SkBitmap_width">width</a>, <a href="undocumented#Color_Type">Color Type</a>, and so on, releasing pixels. |
+| <a href="#SkBitmap_setIsVolatile">setIsVolatile</a> | Marks if pixels should not be cached. |
+| <a href="#SkBitmap_setPixelRef">setPixelRef</a> | Sets <a href="undocumented#Pixel_Ref">Pixel Ref</a> and offset. |
+| <a href="#SkBitmap_setPixels">setPixels</a> | Sets <a href="undocumented#Pixel_Ref">Pixel Ref</a> without an offset. |
+| <a href="#SkBitmap_shiftPerPixel">shiftPerPixel</a> | Returns bit shift from pixels to bytes. |
+| <a href="#SkBitmap_swap">swap</a> | Exchanges <a href="#Bitmap">Bitmap</a> pair. |
+| <a href="#SkBitmap_toString">toString</a> | Converts <a href="#Bitmap">Bitmap</a> to machine readable form. |
+| <a href="#SkBitmap_tryAllocN32Pixels">tryAllocN32Pixels</a> | Allocates compatible <a href="#ARGB">Color ARGB</a> pixels if possible. |
+| <a href="#SkBitmap_tryAllocPixels">tryAllocPixels</a> | Allocates pixels from <a href="#Info">Image Info</a> if possible. |
+| <a href="#SkBitmap_tryAllocPixelsFlags">tryAllocPixelsFlags</a> | Allocates pixels from <a href="#Info">Image Info</a> with options if possible. |
+| <a href="#SkBitmap_width">width</a> | Returns pixel column count. |
+| <a href="#SkBitmap_writePixels">writePixels</a> | Copies and converts pixels. |
+
+# <a name="SkBitmap::Allocator"></a> Class SkBitmap::Allocator
+
+<pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0">
+class <a href="#SkBitmap_Allocator">Allocator</a> : public <a href="undocumented#SkRefCnt">SkRefCnt</a> {
+public:
+virtual bool <a href="#SkBitmap_Allocator_allocPixelRef">allocPixelRef(SkBitmap* bitmap)</a> = 0;
+};</pre>
+
+Abstract subclass of <a href="#SkBitmap_HeapAllocator">HeapAllocator</a>.
+
+<a name="SkBitmap_Allocator_allocPixelRef"></a>
+## allocPixelRef
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+virtual bool allocPixelRef(SkBitmap* bitmap) = 0
+</pre>
+
+Allocates the pixel memory for the <a href="#SkBitmap_Allocator_allocPixelRef_bitmap">bitmap</a>, given its <a href="#SkBitmap_dimensions">dimensions</a> and
+<a href="undocumented#Color_Type">Color Type</a>. Returns true on success, where success means either <a href="#SkBitmap_setPixels">setPixels</a>
+or <a href="#SkBitmap_setPixelRef">setPixelRef</a> was called.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_Allocator_allocPixelRef_bitmap"> <code><strong>bitmap </strong></code> </a></td> <td>
+<a href="#Bitmap">Bitmap</a> containing <a href="#Info">Image Info</a> as input, and <a href="undocumented#Pixel_Ref">Pixel Ref</a> as output</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href="undocumented#Pixel_Ref">Pixel Ref</a> was allocated
+
+### See Also
+
+<a href="#SkBitmap_HeapAllocator">HeapAllocator</a>
+
+---
+
+# <a name="SkBitmap::HeapAllocator"></a> Class SkBitmap::HeapAllocator
+
+<pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0">
+class <a href="#SkBitmap_HeapAllocator">HeapAllocator</a> : public <a href="#SkBitmap_Allocator">Allocator</a> {
+public:
+bool <a href="#SkBitmap_HeapAllocator_allocPixelRef">allocPixelRef(SkBitmap* bitmap)</a> override;
+};</pre>
+
+Subclass of <a href="#SkBitmap_Allocator">Allocator</a> that returns a <a href="undocumented#Pixel_Ref">Pixel Ref</a> that allocates its pixel
+memory from the heap. This is the default <a href="#SkBitmap_Allocator">Allocator</a> invoked by
+<a href="#SkBitmap_allocPixels">allocPixels</a>.
+
+<a name="SkBitmap_HeapAllocator_allocPixelRef"></a>
+## allocPixelRef
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool allocPixelRef(SkBitmap* bitmap) override
+</pre>
+
+Allocates the pixel memory for the <a href="#SkBitmap_HeapAllocator_allocPixelRef_bitmap">bitmap</a>, given its <a href="#SkBitmap_dimensions">dimensions</a> and
+<a href="undocumented#Color_Type">Color Type</a>. Returns true on success, where success means either <a href="#SkBitmap_setPixels">setPixels</a>
+or <a href="#SkBitmap_setPixelRef">setPixelRef</a> was called.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_HeapAllocator_allocPixelRef_bitmap"> <code><strong>bitmap </strong></code> </a></td> <td>
+<a href="#Bitmap">Bitmap</a> containing <a href="#Info">Image Info</a> as input, and <a href="undocumented#Pixel_Ref">Pixel Ref</a> as output</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if pixels are allocated
+
+### Example
+
+<div><fiddle-embed name="fe79a9c1ec350264eb9c7b2509dd3638">
+
+#### Example Output
+
+~~~~
+pixel address = (nil)
+pixel address = 0x560ddd0ac670
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_Allocator">Allocator</a> <a href="#SkBitmap_tryAllocPixels">tryAllocPixels</a>
+
+---
+
+<a name="SkBitmap_empty_constructor"></a>
+## SkBitmap
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkBitmap()
+</pre>
+
+Creates an <a href="#SkBitmap_empty">empty</a> <a href="#Bitmap">Bitmap</a> without pixels, with <a href="undocumented#SkColorType">kUnknown SkColorType</a>,
+<a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>, and with a <a href="#SkBitmap_width">width</a> and <a href="#SkBitmap_height">height</a> of zero. <a href="undocumented#Pixel_Ref">Pixel Ref</a> origin is
+set to (0, 0). <a href="#Bitmap">Bitmap</a> is not volatile.
+
+Use <a href="#SkBitmap_setInfo">setInfo</a> to associate <a href="undocumented#SkColorType">SkColorType</a>, <a href="undocumented#SkAlphaType">SkAlphaType</a>, <a href="#SkBitmap_width">width</a>, and <a href="#SkBitmap_height">height</a>
+after <a href="#Bitmap">Bitmap</a> has been created.
+
+### Return Value
+
+<a href="#SkBitmap_empty">empty</a> <a href="#Bitmap">Bitmap</a>
+
+### Example
+
+<div><fiddle-embed name="8bf225da00df80970271722cd3d1ced4">
+
+#### Example Output
+
+~~~~
+width: 0 height: 0 color: kUnknown_SkColorType alpha: kUnknown_SkAlphaType
+width: 25 height: 35 color: kRGBA_8888_SkColorType alpha: kOpaque_SkAlphaType
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_setInfo">setInfo</a>
+
+---
+
+<a name="SkBitmap_copy_const_SkBitmap"></a>
+## SkBitmap
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkBitmap(const SkBitmap& src)
+</pre>
+
+Copies settings from <a href="#SkBitmap_copy_const_SkBitmap_src">src</a> to returned <a href="#Bitmap">Bitmap</a>. Shares pixels if <a href="#SkBitmap_copy_const_SkBitmap_src">src</a> has pixels
+allocated, so both bitmaps reference the same pixels.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_copy_const_SkBitmap_src"> <code><strong>src </strong></code> </a></td> <td>
+<a href="#Bitmap">Bitmap</a> to copy <a href="#Info">Image Info</a>, and share <a href="undocumented#Pixel_Ref">Pixel Ref</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+copy of <a href="#SkBitmap_copy_const_SkBitmap_src">src</a>
+
+### Example
+
+<div><fiddle-embed name="dbf46a0b60324ec611cc18d86772e7b9">
+
+#### Example Output
+
+~~~~
+original has pixels before copy: true
+original has pixels after copy: true
+copy has pixels: true
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_setInfo">setInfo</a> <a href="#SkBitmap_setPixelRef">setPixelRef</a> <a href="#SkBitmap_setPixels">setPixels</a> <a href="#SkBitmap_swap">swap</a>
+
+---
+
+<a name="SkBitmap_move_SkBitmap"></a>
+## SkBitmap
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkBitmap(SkBitmap&& src)
+</pre>
+
+Copies settings from <a href="#SkBitmap_move_SkBitmap_src">src</a> to returned <a href="#Bitmap">Bitmap</a>. Moves ownership of <a href="#SkBitmap_move_SkBitmap_src">src</a> pixels to
+<a href="#Bitmap">Bitmap</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_move_SkBitmap_src"> <code><strong>src </strong></code> </a></td> <td>
+<a href="#Bitmap">Bitmap</a> to copy <a href="#Info">Image Info</a>, and reassign <a href="undocumented#Pixel_Ref">Pixel Ref</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+copy of <a href="#SkBitmap_move_SkBitmap_src">src</a>
+
+### Example
+
+<div><fiddle-embed name="8172a14e66cb763b7133f70dc4ff601e">
+
+#### Example Output
+
+~~~~
+original has pixels before move: true
+original has pixels after move: false
+copy has pixels: true
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_setInfo">setInfo</a> <a href="#SkBitmap_setPixelRef">setPixelRef</a> <a href="#SkBitmap_setPixels">setPixels</a> <a href="#SkBitmap_swap">swap</a>
+
+---
+
+<a name="SkBitmap_destructor"></a>
+## ~SkBitmap
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+~SkBitmap()
+</pre>
+
+Decrements <a href="undocumented#Pixel_Ref">Pixel Ref</a> reference count, if <a href="undocumented#Pixel_Ref">Pixel Ref</a> is not nullptr.
+
+### See Also
+
+<a href="undocumented#Pixel_Ref">Pixel Ref</a>
+
+---
+
+<a name="SkBitmap_copy_assignment_operator"></a>
+## operator=
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkBitmap& operator=(const SkBitmap& src)
+</pre>
+
+Copies settings from <a href="#SkBitmap_copy_assignment_operator_src">src</a> to returned <a href="#Bitmap">Bitmap</a>. Shares pixels if <a href="#SkBitmap_copy_assignment_operator_src">src</a> has pixels
+allocated, so both bitmaps reference the same pixels.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_copy_assignment_operator_src"> <code><strong>src </strong></code> </a></td> <td>
+<a href="#Bitmap">Bitmap</a> to copy <a href="#Info">Image Info</a>, and share <a href="undocumented#Pixel_Ref">Pixel Ref</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+copy of <a href="#SkBitmap_copy_assignment_operator_src">src</a>
+
+### Example
+
+<div><fiddle-embed name="6366fa1b1b3df1bebbfa3ed1c5a43457">
+
+#### Example Output
+
+~~~~
+original has pixels before copy: true
+original has pixels after copy: true
+copy has pixels: true
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_setInfo">setInfo</a> <a href="#SkBitmap_setPixelRef">setPixelRef</a> <a href="#SkBitmap_setPixels">setPixels</a> <a href="#SkBitmap_swap">swap</a>
+
+---
+
+<a name="SkBitmap_move_assignment_operator"></a>
+## operator=
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkBitmap& operator=(SkBitmap&& src)
+</pre>
+
+Copies settings from <a href="#SkBitmap_move_assignment_operator_src">src</a> to returned <a href="#Bitmap">Bitmap</a>. Moves ownership of <a href="#SkBitmap_move_assignment_operator_src">src</a> pixels to
+<a href="#Bitmap">Bitmap</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_move_assignment_operator_src"> <code><strong>src </strong></code> </a></td> <td>
+<a href="#Bitmap">Bitmap</a> to copy <a href="#Info">Image Info</a>, and reassign <a href="undocumented#Pixel_Ref">Pixel Ref</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+copy of <a href="#SkBitmap_move_assignment_operator_src">src</a>
+
+### Example
+
+<div><fiddle-embed name="5066583054077df5098bb1d2aa402149">
+
+#### Example Output
+
+~~~~
+original has pixels before move: true
+original has pixels after move: false
+copy has pixels: true
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_setInfo">setInfo</a> <a href="#SkBitmap_setPixelRef">setPixelRef</a> <a href="#SkBitmap_setPixels">setPixels</a> <a href="#SkBitmap_swap">swap</a>
+
+---
+
+<a name="SkBitmap_swap"></a>
+## swap
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void swap(SkBitmap& other)
+</pre>
+
+Swaps the fields of the two bitmaps.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_swap_other"> <code><strong>other </strong></code> </a></td> <td>
+<a href="#Bitmap">Bitmap</a> exchanged with original</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="aaf9157531f4969b4ec048e9edcdb069">
+
+#### Example Output
+
+~~~~
+one width:1 height:1 colorType:kRGBA_8888_SkColorType alphaType:kOpaque_SkAlphaType
+two width:2 height:2 colorType:kBGRA_8888_SkColorType alphaType:kPremul_SkAlphaType
+one width:2 height:2 colorType:kBGRA_8888_SkColorType alphaType:kPremul_SkAlphaType
+two width:1 height:1 colorType:kRGBA_8888_SkColorType alphaType:kOpaque_SkAlphaType
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_move_SkBitmap">SkBitmap(SkBitmap&& src)</a> <a href="#SkBitmap_move_assignment_operator">operator=(SkBitmap&& src)</a>
+
+---
+
+<a name="SkBitmap_info"></a>
+## info
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+const SkImageInfo& info() const
+</pre>
+
+Returns <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Type">Color Type</a>, and <a href="undocumented#Color_Space">Color Space</a>.
+
+### Return Value
+
+reference to <a href="#Info">Image Info</a>
+
+### Example
+
+<div><fiddle-embed name="2932fccfb074cf52b17cec238f70d888">
+
+#### Example Output
+
+~~~~
+width: 56 height: 56 color: BGRA_8888 alpha: Opaque
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#Info">Image Info</a>
+
+---
+
+<a name="SkBitmap_width"></a>
+## width
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+int width() const
+</pre>
+
+Returns pixel count in each pixel row. Should be equal or less than:
+<a href="#SkBitmap_rowBytes">rowBytes</a> / <a href="#SkBitmap_info">info</a>.<a href="#SkBitmap_bytesPerPixel">bytesPerPixel</a>.
+
+Maybe be less than <a href="#SkBitmap_pixelRef">pixelRef</a>.<a href="#SkBitmap_width">width</a>. Will not exceed <a href="#SkBitmap_pixelRef">pixelRef</a>.<a href="#SkBitmap_width">width</a> less
+<a href="#SkBitmap_pixelRefOrigin">pixelRefOrigin</a>.fX.
+
+### Return Value
+
+pixel <a href="#SkBitmap_width">width</a> in <a href="#Info">Image Info</a>
+
+### Example
+
+<div><fiddle-embed name="d06880c42f8bb3b4c3b67bd988046049">
+
+#### Example Output
+
+~~~~
+bitmap width: 16 info width: 16
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_height">height</a> <a href="#SkPixelRef_width">SkPixelRef::width()</a> <a href="#SkImageInfo_width">SkImageInfo::width()</a>
+
+---
+
+<a name="SkBitmap_height"></a>
+## height
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+int height() const
+</pre>
+
+Returns pixel row count.
+
+Maybe be less than <a href="#SkBitmap_pixelRef">pixelRef</a>.<a href="#SkBitmap_height">height</a>. Will not exceed <a href="#SkBitmap_pixelRef">pixelRef</a>.<a href="#SkBitmap_height">height</a> less
+<a href="#SkBitmap_pixelRefOrigin">pixelRefOrigin</a>.fY.
+
+### Return Value
+
+pixel <a href="#SkBitmap_height">height</a> in <a href="#Info">Image Info</a>
+
+### Example
+
+<div><fiddle-embed name="c79a196278c58b34cd5f551b0124ecc9">
+
+#### Example Output
+
+~~~~
+bitmap height: 32 info height: 32
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_width">width</a> <a href="#SkPixelRef_height">SkPixelRef::height()</a> <a href="#SkImageInfo_height">SkImageInfo::height()</a>
+
+---
+
+<a name="SkBitmap_colorType"></a>
+## colorType
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkColorType colorType() const
+</pre>
+
+Returns <a href="undocumented#Color_Type">Color Type</a>, one of: <a href="undocumented#SkColorType">kUnknown SkColorType</a>, <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>,
+<a href="undocumented#SkColorType">kRGB 565 SkColorType</a>, <a href="undocumented#SkColorType">kARGB 4444 SkColorType</a>, <a href="undocumented#SkColorType">kRGBA 8888 SkColorType</a>,
+<a href="undocumented#SkColorType">kBGRA 8888 SkColorType</a>, <a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="undocumented#SkColorType">kRGBA F16 SkColorType</a>.
+
+### Return Value
+
+<a href="undocumented#Color_Type">Color Type</a> in <a href="#Info">Image Info</a>
+
+### Example
+
+<div><fiddle-embed name="8aa2ab0565091082a874c23886ddb0c5">
+
+#### Example Output
+
+~~~~
+color type: kAlpha_SkColorType
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_alphaType">alphaType</a> <a href="#SkImageInfo_colorType">SkImageInfo::colorType</a>
+
+---
+
+<a name="SkBitmap_alphaType"></a>
+## alphaType
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkAlphaType alphaType() const
+</pre>
+
+Returns <a href="undocumented#Alpha_Type">Alpha Type</a>, one of: <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>, <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>,
+<a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>, <a href="undocumented#SkAlphaType">kUnpremul SkAlphaType</a>.
+
+### Return Value
+
+<a href="undocumented#Alpha_Type">Alpha Type</a> in <a href="#Info">Image Info</a>
+
+### Example
+
+<div><fiddle-embed name="070b1a60232be499eb10c6ea62371804">
+
+#### Example Output
+
+~~~~
+alpha type: kPremul_SkAlphaType
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_colorType">colorType</a> <a href="#SkImageInfo_alphaType">SkImageInfo::alphaType</a>
+
+---
+
+<a name="SkBitmap_colorSpace"></a>
+## colorSpace
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkColorSpace* colorSpace() const
+</pre>
+
+Returns <a href="undocumented#Color_Space">Color Space</a>, the range of colors, associated with <a href="#Info">Image Info</a>. The
+reference count of <a href="undocumented#Color_Space">Color Space</a> is unchanged. The returned <a href="undocumented#Color_Space">Color Space</a> is
+immutable.
+
+### Return Value
+
+<a href="undocumented#Color_Space">Color Space</a> in <a href="#Info">Image Info</a>
+
+### Example
+
+<div><fiddle-embed name="7ade8a1a21ea5197e565c86740b47b73"><div><a href="#SkColorSpace_MakeSRGBLinear">SkColorSpace::MakeSRGBLinear</a> creates <a href="undocumented#Color_Space">Color Space</a> with linear gamma
+and an sRGB gamut. This <a href="undocumented#Color_Space">Color Space</a> gamma is not close to sRGB gamma.</div>
+
+#### Example Output
+
+~~~~
+gammaCloseToSRGB: false gammaIsLinear: true isSRGB: false
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="undocumented#Color_Space">Color Space</a> <a href="#SkImageInfo_colorSpace">SkImageInfo::colorSpace</a>
+
+---
+
+<a name="SkBitmap_refColorSpace"></a>
+## refColorSpace
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+sk_sp&lt;SkColorSpace&gt; refColorSpace() const
+</pre>
+
+Returns a smart pointer to <a href="undocumented#Color_Space">Color Space</a>, the range of colors, associated with
+<a href="#Info">Image Info</a>. The smart pointer tracks the number of objects sharing this
+<a href="undocumented#Color_Space">Color Space</a> reference so the memory is released when the owners destruct.
+
+The returned <a href="undocumented#Color_Space">Color Space</a> is immutable.
+
+### Return Value
+
+<a href="undocumented#Color_Space">Color Space</a> in <a href="#Info">Image Info</a> wrapped in a smart pointer
+
+### Example
+
+<div><fiddle-embed name="972e9bb22c1ce94bb97b2d106168280e">
+
+#### Example Output
+
+~~~~
+gammaCloseToSRGB: false gammaIsLinear: true isSRGB: false
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="undocumented#Color_Space">Color Space</a> <a href="#SkImageInfo_colorSpace">SkImageInfo::colorSpace</a>
+
+---
+
+<a name="SkBitmap_bytesPerPixel"></a>
+## bytesPerPixel
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+int bytesPerPixel() const
+</pre>
+
+Returns number of bytes per pixel required by <a href="undocumented#Color_Type">Color Type</a>.
+Returns zero if <a href="#SkBitmap_colorType">colorType</a>( is <a href="undocumented#SkColorType">kUnknown SkColorType</a>.
+
+### Return Value
+
+bytes in pixel
+
+### Example
+
+<div><fiddle-embed name="f09e181f3210d427e4b3d2ae6667ae6a">
+
+#### Example Output
+
+~~~~
+color: kUnknown_SkColorType bytesPerPixel: 0
+color: kAlpha_SkColorType bytesPerPixel: 1
+color: kRGB_565_SkColorType bytesPerPixel: 2
+color: kARGB_4444_SkColorType bytesPerPixel: 2
+color: kRGBA_8888_SkColorType bytesPerPixel: 4
+color: kBGRA_8888_SkColorType bytesPerPixel: 4
+color: kGray_8_SkColorType bytesPerPixel: 1
+color: kRGBA_F16_SkColorType bytesPerPixel: 8
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_rowBytes">rowBytes</a> <a href="#SkBitmap_rowBytesAsPixels">rowBytesAsPixels</a> <a href="#SkBitmap_width">width</a> <a href="#SkBitmap_shiftPerPixel">shiftPerPixel</a>
+
+---
+
+<a name="SkBitmap_rowBytesAsPixels"></a>
+## rowBytesAsPixels
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+int rowBytesAsPixels() const
+</pre>
+
+Returns number of pixels that fit on row. Should be greater than or equal to
+<a href="#SkBitmap_width">width</a>.
+
+### Return Value
+
+maximum pixels per row
+
+### Example
+
+<div><fiddle-embed name="03a9e08082a23a98de17c3e24871d61a">
+
+#### Example Output
+
+~~~~
+rowBytes: 4 rowBytesAsPixels: 1
+rowBytes: 5 rowBytesAsPixels: 1
+rowBytes: 6 rowBytesAsPixels: 1
+rowBytes: 7 rowBytesAsPixels: 1
+rowBytes: 8 rowBytesAsPixels: 2
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_rowBytes">rowBytes</a> <a href="#SkBitmap_shiftPerPixel">shiftPerPixel</a> <a href="#SkBitmap_width">width</a> <a href="#SkBitmap_bytesPerPixel">bytesPerPixel</a>
+
+---
+
+<a name="SkBitmap_shiftPerPixel"></a>
+## shiftPerPixel
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+int shiftPerPixel() const
+</pre>
+
+Returns bit shift converting row bytes to row pixels.
+Returns zero for <a href="undocumented#SkColorType">kUnknown SkColorType</a>.
+
+### Return Value
+
+one of: 0, 1, 2, 3; left shift to convert pixels to bytes
+
+### Example
+
+<div><fiddle-embed name="8fa214f2b9a655d7b492181d2143538c">
+
+#### Example Output
+
+~~~~
+color: kUnknown_SkColorType shiftPerPixel: 0
+color: kAlpha_SkColorType shiftPerPixel: 0
+color: kRGB_565_SkColorType shiftPerPixel: 1
+color: kARGB_4444_SkColorType shiftPerPixel: 1
+color: kRGBA_8888_SkColorType shiftPerPixel: 2
+color: kBGRA_8888_SkColorType shiftPerPixel: 2
+color: kGray_8_SkColorType shiftPerPixel: 0
+color: kRGBA_F16_SkColorType shiftPerPixel: 3
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_rowBytes">rowBytes</a> <a href="#SkBitmap_rowBytesAsPixels">rowBytesAsPixels</a> <a href="#SkBitmap_width">width</a> <a href="#SkBitmap_bytesPerPixel">bytesPerPixel</a>
+
+---
+
+<a name="SkBitmap_empty"></a>
+## empty
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool empty() const
+</pre>
+
+Returns true if either <a href="#SkBitmap_width">width</a> or <a href="#SkBitmap_height">height</a> are zero.
+
+Does not check if <a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr; call <a href="#SkBitmap_drawsNothing">drawsNothing</a> to check <a href="#SkBitmap_width">width</a>,
+<a href="#SkBitmap_height">height</a>, and <a href="undocumented#Pixel_Ref">Pixel Ref</a>.
+
+### Return Value
+
+true if <a href="#SkBitmap_dimensions">dimensions</a> do not enclose area
+
+### Example
+
+<div><fiddle-embed name="a3762c2722b56ba55e42689c527f146c">
+
+#### Example Output
+
+~~~~
+width: 0 height: 0 empty: true
+width: 0 height: 2 empty: true
+width: 2 height: 0 empty: true
+width: 2 height: 2 empty: false
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_height">height</a> <a href="#SkBitmap_width">width</a> <a href="#SkBitmap_drawsNothing">drawsNothing</a>
+
+---
+
+<a name="SkBitmap_isNull"></a>
+## isNull
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool isNull() const
+</pre>
+
+Return true if <a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr.
+
+Does not check if <a href="#SkBitmap_width">width</a> or <a href="#SkBitmap_height">height</a> are zero; call <a href="#SkBitmap_drawsNothing">drawsNothing</a> to check
+<a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, and <a href="undocumented#Pixel_Ref">Pixel Ref</a>.
+
+### Return Value
+
+true if no <a href="undocumented#Pixel_Ref">Pixel Ref</a> is associated
+
+### Example
+
+<div><fiddle-embed name="211ec89418011aa6e54aa2cc9567e003">
+
+#### Example Output
+
+~~~~
+empty bitmap does not have pixels
+bitmap with dimensions does not have pixels
+allocated bitmap does have pixels
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_empty">empty</a> <a href="#SkBitmap_drawsNothing">drawsNothing</a> <a href="#SkBitmap_pixelRef">pixelRef</a>
+
+---
+
+<a name="SkBitmap_drawsNothing"></a>
+## drawsNothing
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool drawsNothing() const
+</pre>
+
+Return true if <a href="#SkBitmap_width">width</a> or <a href="#SkBitmap_height">height</a> are zero, or if <a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr.
+If true, <a href="#Bitmap">Bitmap</a> has no effect when drawn or drawn into.
+
+### Return Value
+
+true if drawing has no effect
+
+### Example
+
+<div><fiddle-embed name="daacf43394ce4045a362a48b5774deed">
+
+#### Example Output
+
+~~~~
+empty:true isNull:true drawsNothing:true
+empty:true isNull:false drawsNothing:true
+empty:false isNull:true drawsNothing:true
+empty:false isNull:false drawsNothing:false
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_empty">empty</a> <a href="#SkBitmap_isNull">isNull</a> <a href="#SkBitmap_pixelRef">pixelRef</a>
+
+---
+
+<a name="SkBitmap_rowBytes"></a>
+## rowBytes
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+size_t rowBytes() const
+</pre>
+
+Returns row bytes, the interval from one pixel row to the next. Row bytes
+is at least as large as<a href="#SkBitmap_width">width</a> * <a href="#SkBitmap_info">info</a>.<a href="#SkBitmap_bytesPerPixel">bytesPerPixel</a>.
+
+Returns zero if <a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kUnknown SkColorType</a>, or if row bytes supplied to
+<a href="#SkBitmap_setInfo">setInfo</a> is not large enough to hold a row of pixels.
+
+### Return Value
+
+byte length of pixel row
+
+### Example
+
+<div><fiddle-embed name="a654fd0b73f424859ae6c95e03f55099">
+
+#### Example Output
+
+~~~~
+setInfo returned:false rowBytes:0
+setInfo returned:true rowBytes:8
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_info">info</a> <a href="#SkBitmap_setInfo">setInfo</a> <a href="#SkImageInfo_minRowBytes">SkImageInfo::minRowBytes</a>
+
+---
+
+<a name="SkBitmap_setAlphaType"></a>
+## setAlphaType
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool setAlphaType(SkAlphaType alphaType)
+</pre>
+
+Sets <a href="undocumented#Alpha_Type">Alpha Type</a>, if <a href="#SkBitmap_alphaType">alphaType</a> is compatible with <a href="undocumented#Color_Type">Color Type</a>.
+Returns true unless <a href="#SkBitmap_alphaType">alphaType</a> is <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a> and current <a href="undocumented#Alpha_Type">Alpha Type</a>
+is not <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>.
+
+Returns true if <a href="undocumented#Color_Type">Color Type</a> is <a href="undocumented#SkColorType">kUnknown SkColorType</a>. <a href="#SkBitmap_alphaType">alphaType</a> is ignored, and
+<a href="undocumented#Alpha_Type">Alpha Type</a> remains <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>.
+
+Returns true if <a href="undocumented#Color_Type">Color Type</a> is <a href="undocumented#SkColorType">kRGB 565 SkColorType</a> or <a href="undocumented#SkColorType">kGray 8 SkColorType</a>.
+<a href="#SkBitmap_alphaType">alphaType</a> is ignored, and <a href="undocumented#Alpha_Type">Alpha Type</a> remains <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>.
+
+If <a href="undocumented#Color_Type">Color Type</a> is <a href="undocumented#SkColorType">kARGB 4444 SkColorType</a>, <a href="undocumented#SkColorType">kRGBA 8888 SkColorType</a>,
+<a href="undocumented#SkColorType">kBGRA 8888 SkColorType</a>, or <a href="undocumented#SkColorType">kRGBA F16 SkColorType</a>: returns true unless
+<a href="#SkBitmap_alphaType">alphaType</a> is <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a> and <a href="undocumented#Alpha_Type">Alpha Type</a> is not <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>.
+If <a href="undocumented#Alpha_Type">Alpha Type</a> is <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>, <a href="#SkBitmap_alphaType">alphaType</a> is ignored.
+
+If <a href="undocumented#Color_Type">Color Type</a> is <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>, returns true unless
+<a href="#SkBitmap_alphaType">alphaType</a> is <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a> and <a href="undocumented#Alpha_Type">Alpha Type</a> is not <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>.
+If <a href="undocumented#Alpha_Type">Alpha Type</a> is <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>, <a href="#SkBitmap_alphaType">alphaType</a> is ignored. If <a href="#SkBitmap_alphaType">alphaType</a> is
+<a href="undocumented#SkAlphaType">kUnpremul SkAlphaType</a>, it is treated as <a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>.
+
+This changes <a href="undocumented#Alpha_Type">Alpha Type</a> in <a href="undocumented#Pixel_Ref">Pixel Ref</a>; all bitmaps sharing <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+are affected.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_setAlphaType_alphaType"> <code><strong>alphaType </strong></code> </a></td> <td>
+one of: <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>, <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>,
+<a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>, <a href="undocumented#SkAlphaType">kUnpremul SkAlphaType</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href="undocumented#Alpha_Type">Alpha Type</a> is set
+
+### Example
+
+<div><fiddle-embed name="786005ff582d0369c83e7d686d94138d"></fiddle-embed></div>
+
+### See Also
+
+<a href="undocumented#Alpha_Type">Alpha Type</a> <a href="undocumented#Color_Type">Color Type</a> <a href="#Info">Image Info</a> <a href="#SkBitmap_setInfo">setInfo</a>
+
+---
+
+<a name="SkBitmap_getPixels"></a>
+## getPixels
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void* getPixels() const
+</pre>
+
+Returns pixel address, the base address corresponding to the pixel origin.
+
+### Return Value
+
+pixel address
+
+### Example
+
+<div><fiddle-embed name="e006bb05cf74ec8d2b3d6adeb5dba11b">
+
+#### Example Output
+
+~~~~
+bitmap.getColor(0, 1) == 0x00000000
+bitmap.getColor(0, 0) == 0xFFFFFFFF
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_isNull">isNull</a> <a href="#SkBitmap_drawsNothing">drawsNothing</a>
+
+---
+
+<a name="SkBitmap_computeByteSize"></a>
+## computeByteSize
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+size_t computeByteSize() const
+</pre>
+
+Returns minimum memory required for pixel storage.
+Does not include unused memory on last row when <a href="#SkBitmap_rowBytesAsPixels">rowBytesAsPixels</a> exceeds <a href="#SkBitmap_width">width</a>.
+Returns zero if result does not fit in size_t.
+Returns zero if <a href="#SkBitmap_height">height</a> or <a href="#SkBitmap_width">width</a> is 0.
+Returns <a href="#SkBitmap_height">height</a> times <a href="#SkBitmap_rowBytes">rowBytes</a> if <a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kUnknown SkColorType</a>.
+
+### Return Value
+
+size in bytes of image buffer
+
+### Example
+
+<div><fiddle-embed name="165c8f208829fc0908e8a50da60c0076">
+
+#### Example Output
+
+~~~~
+width: 1 height: 1 computeByteSize: 4
+width: 1 height: 1000 computeByteSize: 4999
+width: 1 height: 1000000 computeByteSize: 4999999
+width: 1000 height: 1 computeByteSize: 4000
+width: 1000 height: 1000 computeByteSize: 4999000
+width: 1000 height: 1000000 computeByteSize: 4999999000
+width: 1000000 height: 1 computeByteSize: 4000000
+width: 1000000 height: 1000 computeByteSize: 4999000000
+width: 1000000 height: 1000000 computeByteSize: 4999999000000
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkImageInfo_computeByteSize">SkImageInfo::computeByteSize</a>
+
+---
+
+<a name="SkBitmap_getSize"></a>
+## getSize
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+size_t getSize() const
+</pre>
+
+Returns conservative memory required for pixel storage.
+Includes unused memory on last row when <a href="#SkBitmap_rowBytesAsPixels">rowBytesAsPixels</a> exceeds <a href="#SkBitmap_width">width</a>.
+
+Does not check to see if result fits in 32 bits. Use getSize64() if the
+result may exceed 32 bits.
+
+### Return Value
+
+<a href="#SkBitmap_height">height</a> times <a href="#SkBitmap_rowBytes">rowBytes</a>
+
+### Example
+
+<div><fiddle-embed name="798d5f259dbd1ead4f3b1eac955c2cde"><div><a href="#SkBitmap_getSize">getSize</a> results are not useful when <a href="#SkBitmap_width">width</a> and <a href="#SkBitmap_height">height</a> are large.</div>
+
+#### Example Output
+
+~~~~
+width: 1 height: 1 getSize: 5
+width: 1 height: 1000 getSize: 5000
+width: 1 height: 1000000 getSize: 5000000
+width: 1000 height: 1 getSize: 5000
+width: 1000 height: 1000 getSize: 5000000
+width: 1000 height: 1000000 getSize: 705032704
+width: 1000000 height: 1 getSize: 5000000
+width: 1000000 height: 1000 getSize: 705032704
+width: 1000000 height: 1000000 getSize: 658067456
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_getSafeSize">getSafeSize</a> <a href="#SkBitmap_computeSize64">computeSize64</a> <a href="#SkBitmap_rowBytes">rowBytes</a> <a href="#SkBitmap_width">width</a>
+
+---
+
+<a name="SkBitmap_getSafeSize"></a>
+## getSafeSize
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+size_t getSafeSize() const
+</pre>
+
+Returns minimum memory required for pixel storage.
+Does not include unused memory on last row when <a href="#SkBitmap_rowBytesAsPixels">rowBytesAsPixels</a> exceeds <a href="#SkBitmap_width">width</a>.
+
+Returns zero if size does not fit in 32 bits. Use <a href="#SkBitmap_computeSafeSize64">computeSafeSize64</a> if the
+result may exceed 32 bits.
+
+The pixel storage visible may be a subset of the <a href="undocumented#Pixel_Ref">Pixel Ref</a>. Accessing memory
+beyond the result may generate an exception.
+
+### Return Value
+
+exact pixel storage size
+
+### Example
+
+<div><fiddle-embed name="47a93c44326c86371dbf42d2544e76be"><div><a href="#SkBitmap_getSafeSize">getSafeSize</a> results are not useful when <a href="#SkBitmap_width">width</a> and <a href="#SkBitmap_height">height</a> are large.</div>
+
+#### Example Output
+
+~~~~
+width: 1 height: 1 getSafeSize: 4
+width: 1 height: 1000 getSafeSize: 4999
+width: 1 height: 1000000 getSafeSize: 4999999
+width: 1000 height: 1 getSafeSize: 4000
+width: 1000 height: 1000 getSafeSize: 4999000
+width: 1000 height: 1000000 getSafeSize: 0
+width: 1000000 height: 1 getSafeSize: 4000000
+width: 1000000 height: 1000 getSafeSize: 0
+width: 1000000 height: 1000000 getSafeSize: 0
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_getSize">getSize</a> <a href="#SkBitmap_computeSafeSize64">computeSafeSize64</a> <a href="#SkBitmap_rowBytes">rowBytes</a> <a href="#SkBitmap_width">width</a>
+
+---
+
+<a name="SkBitmap_computeSize64"></a>
+## computeSize64
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+int64_t computeSize64() const
+</pre>
+
+Returns conservative memory required for pixel storage.
+Includes unused memory on last row when <a href="#SkBitmap_rowBytesAsPixels">rowBytesAsPixels</a> exceeds <a href="#SkBitmap_width">width</a>.
+
+### Return Value
+
+conservative pixel storage size
+
+### Example
+
+<div><fiddle-embed name="e7deb420416751aa68c1bd7956596833">
+
+#### Example Output
+
+~~~~
+width: 1 height: 1 computeSize64: 5
+width: 1 height: 1000 computeSize64: 5000
+width: 1 height: 1000000 computeSize64: 5000000
+width: 1000 height: 1 computeSize64: 5000
+width: 1000 height: 1000 computeSize64: 5000000
+width: 1000 height: 1000000 computeSize64: 5000000000
+width: 1000000 height: 1 computeSize64: 5000000
+width: 1000000 height: 1000 computeSize64: 5000000000
+width: 1000000 height: 1000000 computeSize64: 5000000000000
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_getSize">getSize</a> <a href="#SkBitmap_computeSafeSize64">computeSafeSize64</a> <a href="#SkBitmap_rowBytes">rowBytes</a> <a href="#SkBitmap_width">width</a>
+
+---
+
+<a name="SkBitmap_computeSafeSize64"></a>
+## computeSafeSize64
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+int64_t computeSafeSize64() const
+</pre>
+
+Returns minimum memory required for pixel storage.
+Does not include unused memory on last row when <a href="#SkBitmap_rowBytesAsPixels">rowBytesAsPixels</a> exceeds <a href="#SkBitmap_width">width</a>.
+
+### Return Value
+
+exact pixel storage size
+
+### Example
+
+<div><fiddle-embed name="ff12ff8354c1add9ea00797412f6342c">
+
+#### Example Output
+
+~~~~
+width: 1 height: 1 computeSafeSize64: 4
+width: 1 height: 1000 computeSafeSize64: 4999
+width: 1 height: 1000000 computeSafeSize64: 4999999
+width: 1000 height: 1 computeSafeSize64: 4000
+width: 1000 height: 1000 computeSafeSize64: 4999000
+width: 1000 height: 1000000 computeSafeSize64: 4999999000
+width: 1000000 height: 1 computeSafeSize64: 4000000
+width: 1000000 height: 1000 computeSafeSize64: 4999000000
+width: 1000000 height: 1000000 computeSafeSize64: 4999999000000
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_getSafeSize">getSafeSize</a> <a href="#SkBitmap_computeSize64">computeSize64</a> <a href="#SkBitmap_rowBytes">rowBytes</a> <a href="#SkBitmap_width">width</a>
+
+---
+
+<a name="SkBitmap_isImmutable"></a>
+## isImmutable
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool isImmutable() const
+</pre>
+
+Returns true if pixels can not change.
+
+Most immutable <a href="#Bitmap">Bitmap</a> checks trigger an assert only on debug builds.
+
+### Return Value
+
+true if pixels are immutable
+
+### Example
+
+<div><fiddle-embed name="cca4f94232e5e1fcee9a841b13df9d9c">
+
+#### Example Output
+
+~~~~
+original is immutable
+copy is immutable
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_setImmutable">setImmutable</a> <a href="#SkPixelRef_isImmutable">SkPixelRef::isImmutable</a> <a href="undocumented#SkImage">SkImage</a>
+
+---
+
+<a name="SkBitmap_setImmutable"></a>
+## setImmutable
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void setImmutable()
+</pre>
+
+Once set, pixels can not change. Any other bitmap sharing the same <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+are also marked as immutable. Once <a href="undocumented#Pixel_Ref">Pixel Ref</a> is marked immutable, the setting
+cannot be cleared.
+
+Writing to immutable <a href="#Bitmap">Bitmap</a> pixels triggers an assert on debug builds.
+
+### Example
+
+<div><fiddle-embed name="9210060d1f4ca46e1375496237902ef3"><div>Triggers assert if <a href="undocumented#SK_DEBUG">SK DEBUG</a> is true, runs fine otherwise.</div></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_isImmutable">isImmutable</a> <a href="#SkPixelRef_setImmutable">SkPixelRef::setImmutable</a> <a href="undocumented#SkImage">SkImage</a>
+
+---
+
+<a name="SkBitmap_isOpaque"></a>
+## isOpaque
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool isOpaque() const
+</pre>
+
+Returns true if <a href="undocumented#Alpha_Type">Alpha Type</a> is <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>.
+Does not check if <a href="undocumented#Color_Type">Color Type</a> allows <a href="#Alpha">Alpha</a>, or if any pixel value has
+transparency.
+
+### Return Value
+
+true if <a href="#Info">Image Info</a> describes opaque <a href="#Alpha">Alpha</a>
+
+### Example
+
+<div><fiddle-embed name="5e76b68bb46d54315eb0c12d83bd6949"><div><a href="#SkBitmap_isOpaque">isOpaque</a> ignores whether all pixels are opaque or not.</div>
+
+#### Example Output
+
+~~~~
+isOpaque: false
+isOpaque: false
+isOpaque: true
+isOpaque: true
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_ComputeIsOpaque">ComputeIsOpaque</a> <a href="#SkImageInfo_isOpaque">SkImageInfo::isOpaque</a>
+
+---
+
+<a name="SkBitmap_isVolatile"></a>
+## isVolatile
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool isVolatile() const
+</pre>
+
+If true, provides a hint to caller that pixels should not
+be cached. Only true if <a href="#SkBitmap_setIsVolatile">setIsVolatile</a> has been called to mark as volatile.
+
+Volatile state is not shared by other bitmaps sharing the same <a href="undocumented#Pixel_Ref">Pixel Ref</a>.
+
+### Return Value
+
+true if marked volatile
+
+### Example
+
+<div><fiddle-embed name="4f3e4d39cf34ea52fcd933dbafc46dfa">
+
+#### Example Output
+
+~~~~
+original is volatile
+copy is not volatile
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_setIsVolatile">setIsVolatile</a>
+
+---
+
+<a name="SkBitmap_setIsVolatile"></a>
+## setIsVolatile
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void setIsVolatile(bool isVolatile)
+</pre>
+
+Sets if pixels should be read from <a href="undocumented#Pixel_Ref">Pixel Ref</a> on every access. <a href="#Bitmap">Bitmaps</a> are not
+volatile by default; a <a href="undocumented#GPU">GPU</a> back end may upload pixel values expecting them to be
+accessed repeatedly. Marking temporary <a href="#Bitmap">Bitmaps</a> as volatile provides a hint to
+<a href="undocumented#Device">Device</a> that the <a href="#Bitmap">Bitmap</a> pixels should not be cached. This can
+improve performance by avoiding overhead and reducing resource
+consumption on <a href="undocumented#Device">Device</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_setIsVolatile_isVolatile"> <code><strong>isVolatile </strong></code> </a></td> <td>
+true if backing pixels are temporary</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="9443ada07e6123fc895be4c958244218"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_isVolatile">isVolatile</a>
+
+---
+
+<a name="SkBitmap_reset"></a>
+## reset
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void reset()
+</pre>
+
+Resets to its initial state; all fields are set to zero, as if <a href="#Bitmap">Bitmap</a> had
+been initialized by <a href="#SkBitmap_empty_constructor">SkBitmap()</a>.
+
+Sets <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, row bytes to zero; pixel address to nullptr; <a href="undocumented#SkColorType">SkColorType</a> to
+<a href="undocumented#SkColorType">kUnknown SkColorType</a>; and <a href="undocumented#SkAlphaType">SkAlphaType</a> to <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>.
+
+If <a href="undocumented#Pixel_Ref">Pixel Ref</a> is allocated, its reference count is decreased by one, releasing
+its memory if <a href="#Bitmap">Bitmap</a> is the sole owner.
+
+### Example
+
+<div><fiddle-embed name="458f838acf38302abec477cec3102f0f">
+
+#### Example Output
+
+~~~~
+width:1 height:1 isNull:false
+width:0 height:0 isNull:true
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_empty_constructor">SkBitmap()</a> <a href="undocumented#SkAlphaType">SkAlphaType</a> <a href="undocumented#SkColorType">SkColorType</a>
+
+---
+
+<a name="SkBitmap_ComputeIsOpaque"></a>
+## ComputeIsOpaque
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+static bool ComputeIsOpaque(const SkBitmap& bm)
+</pre>
+
+Returns true if all pixels are opaque. <a href="undocumented#Color_Type">Color Type</a> determines how pixels
+are encoded, and whether pixel describes <a href="#Alpha">Alpha</a>. Returns true for <a href="undocumented#Color_Type">Color Types</a>
+without alpha in each pixel; for other <a href="undocumented#Color_Type">Color Types</a>, returns true if all
+pixels have alpha values equivalent to 1.0 or greater.
+
+For <a href="undocumented#Color_Type">Color Types</a> <a href="undocumented#SkColorType">kRGB 565 SkColorType</a> or <a href="undocumented#SkColorType">kGray 8 SkColorType</a>: always
+returns true. For <a href="undocumented#Color_Type">Color Types</a> <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>, <a href="undocumented#SkColorType">kBGRA 8888 SkColorType</a>,
+<a href="undocumented#SkColorType">kRGBA 8888 SkColorType</a>: returns true if all pixel <a href="#Alpha">Alpha</a> values are 255.
+For <a href="undocumented#Color_Type">Color Type</a> <a href="undocumented#SkColorType">kARGB 4444 SkColorType</a>: returns true if all pixel <a href="#Alpha">Alpha</a> values are 15.
+For <a href="undocumented#SkColorType">kRGBA F16 SkColorType</a>: returns true if all pixel <a href="#Alpha">Alpha</a> values are 1.0 or
+greater.
+
+Returns false for <a href="undocumented#SkColorType">kUnknown SkColorType</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_ComputeIsOpaque_bm"> <code><strong>bm </strong></code> </a></td> <td>
+<a href="#Bitmap">Bitmap</a> to check</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if all pixels have opaque values or <a href="undocumented#Color_Type">Color Type</a> is opaque
+
+### Example
+
+<div><fiddle-embed name="9df1baa17658fbd0c419780f26fd854f">
+
+#### Example Output
+
+~~~~
+computeIsOpaque: false
+computeIsOpaque: true
+computeIsOpaque: false
+computeIsOpaque: true
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_isOpaque">isOpaque</a> <a href="undocumented#Color_Type">Color Type</a> <a href="#Alpha">Alpha</a>
+
+---
+
+<a name="SkBitmap_getBounds"></a>
+## getBounds
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void getBounds(SkRect* bounds) const
+</pre>
+
+Returns <a href="SkRect_Reference#Rect">Rect</a> { 0, 0, <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a> }.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_getBounds_bounds"> <code><strong>bounds </strong></code> </a></td> <td>
+container for floating point rectangle</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="2431ebc7e7d1e91e6d9daafd0f7a478f"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_bounds">bounds</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void getBounds(SkIRect* bounds) const
+</pre>
+
+Returns <a href="SkIRect_Reference#IRect">IRect</a> { 0, 0, <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a> }.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_getBounds_2_bounds"> <code><strong>bounds </strong></code> </a></td> <td>
+container for integral rectangle</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="0c45da35172bc0a529b2faecddae62a2"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_bounds">bounds</a>
+
+---
+
+<a name="SkBitmap_bounds"></a>
+## bounds
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkIRect bounds() const
+</pre>
+
+Returns <a href="SkIRect_Reference#IRect">IRect</a> { 0, 0, <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a> }.
+
+### Return Value
+
+integral rectangle from origin to <a href="#SkBitmap_width">width</a> and <a href="#SkBitmap_height">height</a>
+
+### Example
+
+<div><fiddle-embed name="977dd8a850f89a610505e3f4f260d540"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_getBounds">getBounds</a>
+
+---
+
+<a name="SkBitmap_dimensions"></a>
+## dimensions
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkISize dimensions() const
+</pre>
+
+Returns <a href="#Size">ISize</a> { <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a> }.
+
+### Return Value
+
+integral size of <a href="#SkBitmap_width">width</a> and <a href="#SkBitmap_height">height</a>
+
+### Example
+
+<div><fiddle-embed name="647056bcc12c27fb4413f212f33a2898"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_height">height</a> <a href="#SkBitmap_width">width</a>
+
+---
+
+<a name="SkBitmap_getSubset"></a>
+## getSubset
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkIRect getSubset() const
+</pre>
+
+Returns the <a href="#SkBitmap_bounds">bounds</a> of this bitmap, offset by its <a href="undocumented#Pixel_Ref">Pixel Ref</a> origin.
+
+### Return Value
+
+<a href="#SkBitmap_bounds">bounds</a> within <a href="undocumented#Pixel_Ref">Pixel Ref</a> <a href="#SkBitmap_bounds">bounds</a>
+
+### Example
+
+<div><fiddle-embed name="d6dd0b425aa550f21b938a18c2e1a981">
+
+#### Example Output
+
+~~~~
+source: 0, 0, 512, 512
+subset: 100, 100, 412, 412
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_extractSubset">extractSubset</a> <a href="#SkBitmap_getBounds">getBounds</a>
+
+---
+
+<a name="SkBitmap_setInfo"></a>
+## setInfo
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool setInfo(const SkImageInfo& imageInfo, size_t rowBytes = 0)
+</pre>
+
+Sets <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Color_Space">Color Space</a>, and optional
+<a href="#SkBitmap_rowBytes">rowBytes</a>. Frees pixels, and returns true if successful.
+
+<a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_alphaType">alphaType</a> may be altered to a value permitted by <a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_colorSpace">colorSpace</a>.
+If <a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kUnknown SkColorType</a>, <a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_alphaType">alphaType</a> is
+set to <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>.
+If <a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a> and <a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_alphaType">alphaType</a> is
+<a href="undocumented#SkAlphaType">kUnpremul SkAlphaType</a>, <a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_alphaType">alphaType</a> is replaced by <a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>.
+If <a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kRGB 565 SkColorType</a> or <a href="undocumented#SkColorType">kGray 8 SkColorType</a>,
+<a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_alphaType">alphaType</a> is set to <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>.
+If <a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kARGB 4444 SkColorType</a>, <a href="undocumented#SkColorType">kRGBA 8888 SkColorType</a>,
+<a href="undocumented#SkColorType">kBGRA 8888 SkColorType</a>, or <a href="undocumented#SkColorType">kRGBA F16 SkColorType</a>: <a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_alphaType">alphaType</a> remains
+unchanged.
+
+<a href="#SkBitmap_rowBytes">rowBytes</a> must equal or exceed <a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="undocumented#SkImageInfo">minRowBytes</a>. If <a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_colorSpace">colorSpace</a> is
+<a href="undocumented#SkColorType">kUnknown SkColorType</a>, <a href="#SkBitmap_rowBytes">rowBytes</a> is ignored and treated as zero; for all other
+<a href="undocumented#Color_Space">Color Space</a> values, <a href="#SkBitmap_rowBytes">rowBytes</a> of zero is treated as <a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="undocumented#SkImageInfo">minRowBytes</a>.
+
+Calls <a href="#SkBitmap_reset">reset</a> and returns false if:
+
+<table> <tr>
+ <td><a href="#SkBitmap_rowBytes">rowBytes</a> exceeds 31 bits</td> </tr> <tr>
+ <td><a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_width">width</a> times <a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_bytesPerPixel">bytesPerPixel</a> exceeds 31 bits</td> </tr> <tr>
+ <td><a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_width">width</a> is negative</td> </tr> <tr>
+ <td><a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_height">height</a> is negative</td> </tr> <tr>
+ <td><a href="#SkBitmap_rowBytes">rowBytes</a> is positive and less than <a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_width">width</a> times <a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="#SkBitmap_bytesPerPixel">bytesPerPixel</a></td> </tr>
+</table>
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_setInfo_imageInfo"> <code><strong>imageInfo </strong></code> </a></td> <td>
+contains <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Color_Space">Color Space</a></td>
+ </tr> <tr> <td><a name="SkBitmap_setInfo_rowBytes"> <code><strong>rowBytes </strong></code> </a></td> <td>
+<a href="#SkBitmap_setInfo_imageInfo">imageInfo</a>.<a href="undocumented#SkImageInfo">minRowBytes</a> or larger; or zero</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href="#Info">Image Info</a> set successfully
+
+### Example
+
+<div><fiddle-embed name="599ab64d0aea005498176249bbfb64eb"></fiddle-embed></div>
+
+### See Also
+
+<a href="undocumented#Alpha_Type">Alpha Type</a> <a href="undocumented#Color_Type">Color Type</a> <a href="undocumented#Color_Space">Color Space</a> <a href="#SkBitmap_height">height</a> <a href="#SkBitmap_rowBytes">rowBytes</a> <a href="#SkBitmap_width">width</a>
+
+---
+
+## <a name="SkBitmap_AllocFlags"></a> Enum SkBitmap::AllocFlags
+
+<pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0">
+enum <a href="#SkBitmap_AllocFlags">AllocFlags</a> {
+<a href="#SkBitmap_kZeroPixels_AllocFlag">kZeroPixels AllocFlag</a> = 1 << 0,
+};</pre>
+
+<a href="#SkBitmap_AllocFlags">AllocFlags</a> provides the option to zero pixel memory when allocated.
+
+### Constants
+
+<table>
+ <tr>
+ <td><a name="SkBitmap_kZeroPixels_AllocFlag"> <code><strong>SkBitmap::kZeroPixels_AllocFlag </strong></code> </a></td><td>1</td><td>Instructs <a href="#SkBitmap_tryAllocPixelsFlags">tryAllocPixelsFlags</a> and <a href="#SkBitmap_allocPixelsFlags">allocPixelsFlags</a> to zero pixel memory.</td>
+ </tr>
+</table>
+
+### See Also
+
+<a href="#SkBitmap_tryAllocPixelsFlags">tryAllocPixelsFlags</a> <a href="#SkBitmap_allocPixelsFlags">allocPixelsFlags</a> <a href="#SkBitmap_erase">erase</a> <a href="#SkBitmap_eraseColor">eraseColor</a>
+
+
+
+<a name="SkBitmap_tryAllocPixelsFlags"></a>
+## tryAllocPixelsFlags
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool SK_WARN_UNUSED_RESULT tryAllocPixelsFlags(const SkImageInfo& info,
+ uint32_t flags)
+</pre>
+
+Sets <a href="#Info">Image Info</a> to <a href="#SkBitmap_info">info</a> following the rules in <a href="#SkBitmap_setInfo">setInfo</a> and allocates pixel
+memory. If <a href="#SkBitmap_tryAllocPixelsFlags_flags">flags</a> is <a href="#SkBitmap_kZeroPixels_AllocFlag">kZeroPixels AllocFlag</a>, memory is zeroed.
+
+Returns false and calls <a href="#SkBitmap_reset">reset</a> if <a href="#Info">Image Info</a> could not be set, or memory could
+not be allocated, or memory size exceeds 31 bits, or memory could not optionally
+be zeroed.
+
+On most platforms, allocating pixel memory may succeed even though there is
+not sufficient memory to hold pixels; allocation does not take place
+until the pixels are written to. The actual behavior depends on the platform
+implementation of malloc(), if <a href="#SkBitmap_tryAllocPixelsFlags_flags">flags</a> is zero, and calloc(), if <a href="#SkBitmap_tryAllocPixelsFlags_flags">flags</a> is
+<a href="#SkBitmap_kZeroPixels_AllocFlag">kZeroPixels AllocFlag</a>.
+
+Passing <a href="#SkBitmap_kZeroPixels_AllocFlag">kZeroPixels AllocFlag</a> is usually faster than separately calling
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_tryAllocPixelsFlags_info"> <code><strong>info </strong></code> </a></td> <td>
+contains <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Color_Space">Color Space</a></td>
+ </tr> <tr> <td><a name="SkBitmap_tryAllocPixelsFlags_flags"> <code><strong>flags </strong></code> </a></td> <td>
+<a href="#SkBitmap_kZeroPixels_AllocFlag">kZeroPixels AllocFlag</a>, or zero</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if pixels allocation is successful
+
+### Example
+
+<div><fiddle-embed name="01e11c52fe4a3dc7ee800ce8e925b973"><div>For <a href="#SkBitmap_width">width</a> of 100,000, <a href="#SkBitmap_height">height</a> of 100,000, and 4 bytes per pixel, <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+requires 40,000,000,000 bytes of storage. <a href="#SkBitmap_Allocator">Allocator</a> implemented
+internally by <a href="#SkMallocPixelRef_MakeZeroed">SkMallocPixelRef::MakeZeroed</a> limits the maximum memory allowed;
+the allocation must fit in 31 bits.</div>
+
+#### Example Output
+
+~~~~
+attempt 1
+failed!
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_allocPixelsFlags">allocPixelsFlags</a> <a href="#SkBitmap_tryAllocPixels">tryAllocPixels</a> <a href="#SkMallocPixelRef_MakeZeroed">SkMallocPixelRef::MakeZeroed</a>
+
+---
+
+<a name="SkBitmap_allocPixelsFlags"></a>
+## allocPixelsFlags
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void allocPixelsFlags(const SkImageInfo& info, uint32_t flags)
+</pre>
+
+Sets <a href="#Info">Image Info</a> to <a href="#SkBitmap_info">info</a> following the rules in <a href="#SkBitmap_setInfo">setInfo</a> and allocates pixel
+memory. If <a href="#SkBitmap_allocPixelsFlags_flags">flags</a> is <a href="#SkBitmap_kZeroPixels_AllocFlag">kZeroPixels AllocFlag</a>, memory is zeroed.
+
+Aborts execution if <a href="#Info">Image Info</a> could not be set, or memory could
+not be allocated, or memory size exceeds 31 bits, or memory could not optionally
+be zeroed. Abort steps may be provided by the user at compile time by defining
+<a href="undocumented#SK_ABORT">SK ABORT</a>.
+
+On most platforms, allocating pixel memory may succeed even though there is
+not sufficient memory to hold pixels; allocation does not take place
+until the pixels are written to. The actual behavior depends on the platform
+implementation of malloc(), if <a href="#SkBitmap_allocPixelsFlags_flags">flags</a> is zero, and calloc(), if <a href="#SkBitmap_allocPixelsFlags_flags">flags</a> is
+<a href="#SkBitmap_kZeroPixels_AllocFlag">kZeroPixels AllocFlag</a>.
+
+Passing <a href="#SkBitmap_kZeroPixels_AllocFlag">kZeroPixels AllocFlag</a> is usually faster than separately calling
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_allocPixelsFlags_info"> <code><strong>info </strong></code> </a></td> <td>
+contains <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Color_Space">Color Space</a></td>
+ </tr> <tr> <td><a name="SkBitmap_allocPixelsFlags_flags"> <code><strong>flags </strong></code> </a></td> <td>
+<a href="#SkBitmap_kZeroPixels_AllocFlag">kZeroPixels AllocFlag</a>, or zero</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="f21b8965a88c94a32393a8890c4672af"><div><a href="undocumented#Text">Text</a> is drawn on a transparent background; drawing the bitmap a second time
+lets the first draw show through.</div></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_tryAllocPixelsFlags">tryAllocPixelsFlags</a> <a href="#SkBitmap_allocPixels">allocPixels</a> <a href="#SkMallocPixelRef_MakeZeroed">SkMallocPixelRef::MakeZeroed</a>
+
+---
+
+<a name="SkBitmap_tryAllocPixels"></a>
+## tryAllocPixels
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool SK_WARN_UNUSED_RESULT tryAllocPixels(const SkImageInfo& info,
+ size_t rowBytes)
+</pre>
+
+Sets <a href="#Info">Image Info</a> to <a href="#SkBitmap_info">info</a> following the rules in <a href="#SkBitmap_setInfo">setInfo</a> and allocates pixel
+memory. <a href="#SkBitmap_rowBytes">rowBytes</a> must equal or exceed <a href="#SkBitmap_info">info</a>.<a href="#SkBitmap_width">width</a> times <a href="#SkBitmap_info">info</a>.<a href="#SkBitmap_bytesPerPixel">bytesPerPixel</a>,
+or equal zero. Pass in zero for <a href="#SkBitmap_rowBytes">rowBytes</a> to compute the minimum valid value.
+
+Returns false and calls <a href="#SkBitmap_reset">reset</a> if <a href="#Info">Image Info</a> could not be set, or memory could
+not be allocated.
+
+On most platforms, allocating pixel memory may succeed even though there is
+not sufficient memory to hold pixels; allocation does not take place
+until the pixels are written to. The actual behavior depends on the platform
+implementation of malloc().
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_tryAllocPixels_info"> <code><strong>info </strong></code> </a></td> <td>
+contains <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Color_Space">Color Space</a></td>
+ </tr> <tr> <td><a name="SkBitmap_tryAllocPixels_rowBytes"> <code><strong>rowBytes </strong></code> </a></td> <td>
+size of pixel row or larger; may be zero</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if pixel storage is allocated
+
+### Example
+
+<div><fiddle-embed name="34479d5aa23ce9f5e334b0786c9edb22"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_tryAllocPixelsFlags">tryAllocPixelsFlags</a> <a href="#SkBitmap_allocPixels">allocPixels</a> <a href="#SkMallocPixelRef_MakeAllocate">SkMallocPixelRef::MakeAllocate</a>
+
+---
+
+<a name="SkBitmap_allocPixels"></a>
+## allocPixels
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void allocPixels(const SkImageInfo& info, size_t rowBytes)
+</pre>
+
+Sets <a href="#Info">Image Info</a> to <a href="#SkBitmap_info">info</a> following the rules in <a href="#SkBitmap_setInfo">setInfo</a> and allocates pixel
+memory. <a href="#SkBitmap_rowBytes">rowBytes</a> must equal or exceed <a href="#SkBitmap_info">info</a>.<a href="#SkBitmap_width">width</a> times <a href="#SkBitmap_info">info</a>.<a href="#SkBitmap_bytesPerPixel">bytesPerPixel</a>,
+or equal zero. Pass in zero for <a href="#SkBitmap_rowBytes">rowBytes</a> to compute the minimum valid value.
+
+Aborts execution if <a href="#Info">Image Info</a> could not be set, or memory could
+not be allocated, or memory size exceeds 31 bits. Abort steps may be provided by
+the user at compile time by defining <a href="undocumented#SK_ABORT">SK ABORT</a>.
+
+On most platforms, allocating pixel memory may succeed even though there is
+not sufficient memory to hold pixels; allocation does not take place
+until the pixels are written to. The actual behavior depends on the platform
+implementation of malloc().
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_allocPixels_info"> <code><strong>info </strong></code> </a></td> <td>
+contains <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Color_Space">Color Space</a></td>
+ </tr> <tr> <td><a name="SkBitmap_allocPixels_rowBytes"> <code><strong>rowBytes </strong></code> </a></td> <td>
+size of pixel row or larger; may be zero</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="555c0f62f96602a9dcd459badcd005e0"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_tryAllocPixels">tryAllocPixels</a> <a href="#SkBitmap_allocPixelsFlags">allocPixelsFlags</a> <a href="#SkMallocPixelRef_MakeAllocate">SkMallocPixelRef::MakeAllocate</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool SK_WARN_UNUSED_RESULT tryAllocPixels(const SkImageInfo& info)
+</pre>
+
+Sets <a href="#Info">Image Info</a> to <a href="#SkBitmap_info">info</a> following the rules in <a href="#SkBitmap_setInfo">setInfo</a> and allocates pixel
+memory.
+
+Returns false and calls <a href="#SkBitmap_reset">reset</a> if <a href="#Info">Image Info</a> could not be set, or memory could
+not be allocated.
+
+On most platforms, allocating pixel memory may succeed even though there is
+not sufficient memory to hold pixels; allocation does not take place
+until the pixels are written to. The actual behavior depends on the platform
+implementation of malloc().
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_tryAllocPixels_2_info"> <code><strong>info </strong></code> </a></td> <td>
+contains <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Color_Space">Color Space</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+true if pixel storage is allocated
+
+### Example
+
+<div><fiddle-embed name="7ef3d043c4c5885649e591dd7dca92ff"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_tryAllocPixelsFlags">tryAllocPixelsFlags</a> <a href="#SkBitmap_allocPixels">allocPixels</a> <a href="#SkMallocPixelRef_MakeAllocate">SkMallocPixelRef::MakeAllocate</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void allocPixels(const SkImageInfo& info)
+</pre>
+
+Sets <a href="#Info">Image Info</a> to <a href="#SkBitmap_info">info</a> following the rules in <a href="#SkBitmap_setInfo">setInfo</a> and allocates pixel
+memory.
+
+Aborts execution if <a href="#Info">Image Info</a> could not be set, or memory could
+not be allocated, or memory size exceeds 31 bits. Abort steps may be provided by
+the user at compile time by defining <a href="undocumented#SK_ABORT">SK ABORT</a>.
+
+On most platforms, allocating pixel memory may succeed even though there is
+not sufficient memory to hold pixels; allocation does not take place
+until the pixels are written to. The actual behavior depends on the platform
+implementation of malloc().
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_allocPixels_2_info"> <code><strong>info </strong></code> </a></td> <td>
+contains <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Color_Space">Color Space</a></td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="91f474a11a2112cd5c88c40a9015048d"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_tryAllocPixels">tryAllocPixels</a> <a href="#SkBitmap_allocPixelsFlags">allocPixelsFlags</a> <a href="#SkMallocPixelRef_MakeAllocate">SkMallocPixelRef::MakeAllocate</a>
+
+---
+
+<a name="SkBitmap_tryAllocN32Pixels"></a>
+## tryAllocN32Pixels
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool SK_WARN_UNUSED_RESULT tryAllocN32Pixels(int width, int height,
+ bool isOpaque = false)
+</pre>
+
+Sets <a href="#Info">Image Info</a> to <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, and the native <a href="undocumented#Color_Type">Color Type</a>; and allocates
+pixel memory. If <a href="#SkBitmap_isOpaque">isOpaque</a> is true, sets <a href="#Info">Image Info</a> to <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>;
+otherwise, sets to <a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>.
+
+Calls <a href="#SkBitmap_reset">reset</a> and returns false if <a href="#SkBitmap_width">width</a> exceeds 29 bits or is negative,
+or <a href="#SkBitmap_height">height</a> is negative.
+
+Returns false if allocation fails.
+
+Use to create <a href="#Bitmap">Bitmap</a> that matches native pixel arrangement on the platform,
+to draw without converting its pixel format.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_tryAllocN32Pixels_width"> <code><strong>width </strong></code> </a></td> <td>
+pixel column count; must be zero or greater</td>
+ </tr> <tr> <td><a name="SkBitmap_tryAllocN32Pixels_height"> <code><strong>height </strong></code> </a></td> <td>
+pixel row count; must be zero or greater</td>
+ </tr> <tr> <td><a name="SkBitmap_tryAllocN32Pixels_isOpaque"> <code><strong>isOpaque </strong></code> </a></td> <td>
+true if pixels do not have transparency</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if pixel storage is allocated
+
+### Example
+
+<div><fiddle-embed name="a2b1e0910f37066f15ae56368775a6d8"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_tryAllocPixels">tryAllocPixels</a> <a href="#SkBitmap_allocN32Pixels">allocN32Pixels</a> <a href="#SkMallocPixelRef_MakeAllocate">SkMallocPixelRef::MakeAllocate</a>
+
+---
+
+<a name="SkBitmap_allocN32Pixels"></a>
+## allocN32Pixels
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void allocN32Pixels(int width, int height, bool isOpaque = false)
+</pre>
+
+Sets <a href="#Info">Image Info</a> to <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, and the native <a href="undocumented#Color_Type">Color Type</a>; and allocates
+pixel memory. If <a href="#SkBitmap_isOpaque">isOpaque</a> is true, sets <a href="#Info">Image Info</a> to <a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>;
+otherwise, sets to <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>.
+
+Aborts if <a href="#SkBitmap_width">width</a> exceeds 29 bits or is negative, or <a href="#SkBitmap_height">height</a> is negative, or
+allocation fails. Abort steps may be provided by the user at compile time by
+defining <a href="undocumented#SK_ABORT">SK ABORT</a>.
+
+Use to create <a href="#Bitmap">Bitmap</a> that matches native pixel arrangement on the platform,
+to draw without converting its pixel format.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_allocN32Pixels_width"> <code><strong>width </strong></code> </a></td> <td>
+pixel column count; must be zero or greater</td>
+ </tr> <tr> <td><a name="SkBitmap_allocN32Pixels_height"> <code><strong>height </strong></code> </a></td> <td>
+pixel row count; must be zero or greater</td>
+ </tr> <tr> <td><a name="SkBitmap_allocN32Pixels_isOpaque"> <code><strong>isOpaque </strong></code> </a></td> <td>
+true if pixels do not have transparency</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="c717491f9251604724c9cbde7088ec20"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_allocPixels">allocPixels</a> <a href="#SkBitmap_tryAllocN32Pixels">tryAllocN32Pixels</a> <a href="#SkMallocPixelRef_MakeAllocate">SkMallocPixelRef::MakeAllocate</a>
+
+---
+
+<a name="SkBitmap_installPixels"></a>
+## installPixels
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool installPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
+ void (*releaseProc) (void* addr, void* context) , void* context)
+</pre>
+
+Sets <a href="#Info">Image Info</a> to <a href="#SkBitmap_info">info</a> following the rules in <a href="#SkBitmap_setInfo">setInfo</a>, and creates <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+containing <a href="#SkBitmap_installPixels_pixels">pixels</a> and <a href="#SkBitmap_rowBytes">rowBytes</a>. <a href="#SkBitmap_installPixels_releaseProc">releaseProc</a>, if not nullptr, is called
+immediately on failure or when <a href="#SkBitmap_installPixels_pixels">pixels</a> are no longer referenced. <a href="#SkBitmap_installPixels_context">context</a> may be
+nullptr.
+
+If <a href="#Info">Image Info</a> could not be set, or <a href="#SkBitmap_rowBytes">rowBytes</a> is less than <a href="#SkBitmap_info">info</a>.<a href="undocumented#SkImageInfo">minRowBytes</a>:
+calls <a href="#SkBitmap_installPixels_releaseProc">releaseProc</a> if present, calls <a href="#SkBitmap_reset">reset</a>, and returns false.
+
+Otherwise, if <a href="#SkBitmap_installPixels_pixels">pixels</a> equals nullptr: sets <a href="#Info">Image Info</a>, calls <a href="#SkBitmap_installPixels_releaseProc">releaseProc</a> if
+present, returns true.
+
+If <a href="#Info">Image Info</a> is set, <a href="#SkBitmap_installPixels_pixels">pixels</a> is not nullptr, and <a href="#SkBitmap_installPixels_releaseProc">releaseProc</a> is not nullptr:
+when <a href="#SkBitmap_installPixels_pixels">pixels</a> are no longer referenced, calls <a href="#SkBitmap_installPixels_releaseProc">releaseProc</a> with <a href="#SkBitmap_installPixels_pixels">pixels</a> and <a href="#SkBitmap_installPixels_context">context</a>
+as parameters.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_installPixels_info"> <code><strong>info </strong></code> </a></td> <td>
+contains <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Color_Space">Color Space</a></td>
+ </tr> <tr> <td><a name="SkBitmap_installPixels_pixels"> <code><strong>pixels </strong></code> </a></td> <td>
+address or pixel storage; may be nullptr</td>
+ </tr> <tr> <td><a name="SkBitmap_installPixels_rowBytes"> <code><strong>rowBytes </strong></code> </a></td> <td>
+size of pixel row or larger</td>
+ </tr> <tr> <td><a name="SkBitmap_installPixels_releaseProc"> <code><strong>releaseProc </strong></code> </a></td> <td>
+function called when <a href="#SkBitmap_installPixels_pixels">pixels</a> can be deleted; may be nullptr</td>
+ </tr> <tr> <td><a name="SkBitmap_installPixels_context"> <code><strong>context </strong></code> </a></td> <td>
+caller state passed to <a href="#SkBitmap_installPixels_releaseProc">releaseProc</a>; may be nullptr</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href="#Info">Image Info</a> is set to <a href="#SkBitmap_info">info</a>
+
+### Example
+
+<div><fiddle-embed name="ff5b5c349efb5d929ff5dff07b7727e6"><div><a href="#SkBitmap_installPixels_releaseProc">releaseProc</a> is called immediately because <a href="#SkBitmap_rowBytes">rowBytes</a> is too small for <a href="undocumented#Pixel_Ref">Pixel Ref</a>.</div>
+
+#### Example Output
+
+~~~~
+before installPixels
+releaseProc called
+install not successful
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_allocPixels">allocPixels</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool installPixels(const SkImageInfo& info, void* pixels, size_t rowBytes)
+</pre>
+
+Sets <a href="#Info">Image Info</a> to <a href="#SkBitmap_info">info</a> following the rules in <a href="#SkBitmap_setInfo">setInfo</a>, and creates <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+containing <a href="#SkBitmap_installPixels_2_pixels">pixels</a> and <a href="#SkBitmap_rowBytes">rowBytes</a>.
+
+If <a href="#Info">Image Info</a> could not be set, or <a href="#SkBitmap_rowBytes">rowBytes</a> is less than <a href="#SkBitmap_info">info</a>.<a href="undocumented#SkImageInfo">minRowBytes</a>:
+calls <a href="#SkBitmap_reset">reset</a>, and returns false.
+
+Otherwise, if <a href="#SkBitmap_installPixels_2_pixels">pixels</a> equals nullptr: sets <a href="#Info">Image Info</a>, returns true.
+
+Caller must ensure that <a href="#SkBitmap_installPixels_2_pixels">pixels</a> are valid for the lifetime of <a href="#Bitmap">Bitmap</a> and <a href="undocumented#Pixel_Ref">Pixel Ref</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_installPixels_2_info"> <code><strong>info </strong></code> </a></td> <td>
+contains <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Color_Space">Color Space</a></td>
+ </tr> <tr> <td><a name="SkBitmap_installPixels_2_pixels"> <code><strong>pixels </strong></code> </a></td> <td>
+address or pixel storage; may be nullptr</td>
+ </tr> <tr> <td><a name="SkBitmap_installPixels_2_rowBytes"> <code><strong>rowBytes </strong></code> </a></td> <td>
+size of pixel row or larger</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href="#Info">Image Info</a> is set to <a href="#SkBitmap_info">info</a>
+
+### Example
+
+<div><fiddle-embed name="a7e04447b2081010c50d7920e80a6bb2"><div><a href="undocumented#GPU">GPU</a> does not support <a href="undocumented#SkAlphaType">kUnpremul SkAlphaType</a>, does not assert that it does not.</div></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_allocPixels">allocPixels</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool installPixels(const SkPixmap& pixmap)
+</pre>
+
+Sets <a href="#Info">Image Info</a> to <a href="#SkBitmap_installPixels_3_pixmap">pixmap</a>.<a href="#SkBitmap_info">info</a> following the rules in <a href="#SkBitmap_setInfo">setInfo</a>, and creates
+<a href="undocumented#Pixel_Ref">Pixel Ref</a> containing <a href="#SkBitmap_installPixels_3_pixmap">pixmap</a>.addr() and <a href="#SkBitmap_installPixels_3_pixmap">pixmap</a>.<a href="#SkBitmap_rowBytes">rowBytes</a>.
+
+If <a href="#Info">Image Info</a> could not be set, or <a href="#SkBitmap_installPixels_3_pixmap">pixmap</a>.<a href="#SkBitmap_rowBytes">rowBytes</a> is less than
+<a href="#SkImageInfo_minRowBytes">SkImageInfo::minRowBytes</a>: calls <a href="#SkBitmap_reset">reset</a>, and returns false.
+
+Otherwise, if <a href="#SkBitmap_installPixels_3_pixmap">pixmap</a>.addr() equals nullptr: sets <a href="#Info">Image Info</a>, returns true.
+
+Caller must ensure that <a href="#SkBitmap_installPixels_3_pixmap">pixmap</a> is valid for the lifetime of <a href="#Bitmap">Bitmap</a> and <a href="undocumented#Pixel_Ref">Pixel Ref</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_installPixels_3_pixmap"> <code><strong>pixmap </strong></code> </a></td> <td>
+<a href="#Info">Image Info</a>, pixel address, and <a href="#SkBitmap_rowBytes">rowBytes</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href="#Info">Image Info</a> was set to <a href="#SkBitmap_installPixels_3_pixmap">pixmap</a>.<a href="#SkBitmap_info">info</a>
+
+### Example
+
+<div><fiddle-embed name="6e2a8c9358b34aebd2ec586815fe9d3a"><div>Draw a five by five bitmap, and draw it again with a center white pixel.</div></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_allocPixels">allocPixels</a>
+
+---
+
+<a name="SkBitmap_installMaskPixels"></a>
+## installMaskPixels
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool installMaskPixels(const SkMask& mask)
+</pre>
+
+Sets <a href="#Info">Image Info</a> to <a href="#SkBitmap_installMaskPixels_mask">mask</a> <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_installMaskPixels_mask">mask</a> <a href="#SkBitmap_height">height</a>, <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>, and
+<a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>. Sets <a href="undocumented#Pixel_Ref">Pixel Ref</a> to <a href="#SkBitmap_installMaskPixels_mask">mask</a> image and <a href="#SkBitmap_installMaskPixels_mask">mask</a> <a href="#SkBitmap_rowBytes">rowBytes</a>.
+
+Returns false and calls <a href="#SkBitmap_reset">reset</a> if <a href="#SkBitmap_installMaskPixels_mask">mask</a> format is not <a href="#SkMask_kA8_Format">SkMask::kA8 Format</a>,
+or if <a href="#SkBitmap_installMaskPixels_mask">mask</a> <a href="#SkBitmap_width">width</a> or <a href="#SkBitmap_installMaskPixels_mask">mask</a> <a href="#SkBitmap_height">height</a> is negative, or if <a href="#SkBitmap_installMaskPixels_mask">mask</a> <a href="#SkBitmap_rowBytes">rowBytes</a> is less
+than <a href="#SkBitmap_installMaskPixels_mask">mask</a> <a href="#SkBitmap_width">width</a>.
+
+Caller must ensure that <a href="#SkBitmap_installMaskPixels_mask">mask</a> is valid for the lifetime of <a href="#Bitmap">Bitmap</a> and <a href="undocumented#Pixel_Ref">Pixel Ref</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_installMaskPixels_mask"> <code><strong>mask </strong></code> </a></td> <td>
+<a href="#Alpha">Alpha</a> 8-bit bitmap</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href="#Info">Image Info</a> and <a href="undocumented#Pixel_Ref">Pixel Ref</a> refer to <a href="#SkBitmap_installMaskPixels_mask">mask</a>
+
+### Example
+
+<div><fiddle-embed name="b0456fc063ca467ccecf2105160a3d1d"><div>Draw a five by five bitmap, and draw it again with a center white pixel.</div></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_installPixels">installPixels</a> <a href="#SkBitmap_allocPixels">allocPixels</a>
+
+---
+
+<a name="SkBitmap_setPixels"></a>
+## setPixels
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void setPixels(void* pixels)
+</pre>
+
+Replaces <a href="undocumented#Pixel_Ref">Pixel Ref</a> with <a href="#SkBitmap_setPixels_pixels">pixels</a>, preserving <a href="#Info">Image Info</a> and <a href="#SkBitmap_rowBytes">rowBytes</a>.
+Sets <a href="undocumented#Pixel_Ref">Pixel Ref</a> origin to (0, 0).
+
+If <a href="#SkBitmap_setPixels_pixels">pixels</a> is nullptr, or if <a href="#SkBitmap_info">info</a>.<a href="#SkBitmap_colorType">colorType</a> equals <a href="undocumented#SkColorType">kUnknown SkColorType</a>;
+release reference to <a href="undocumented#Pixel_Ref">Pixel Ref</a>, and set <a href="undocumented#Pixel_Ref">Pixel Ref</a> to nullptr.
+
+Caller is responsible for handling ownership pixel memory for the lifetime
+of <a href="#Bitmap">Bitmap</a> and <a href="undocumented#Pixel_Ref">Pixel Ref</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_setPixels_pixels"> <code><strong>pixels </strong></code> </a></td> <td>
+address of pixel storage, managed by caller</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="f0db16e06c9a1436917c8179f8c1718f"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_installPixels">installPixels</a> <a href="#SkBitmap_allocPixels">allocPixels</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool SK_WARN_UNUSED_RESULT tryAllocPixels()
+</pre>
+
+Allocates pixel memory with <a href="#SkBitmap_HeapAllocator">HeapAllocator</a>, and replaces existing <a href="undocumented#Pixel_Ref">Pixel Ref</a>.
+The allocation size is determined by <a href="#Info">Image Info</a> <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, and <a href="undocumented#Color_Type">Color Type</a>.
+
+Returns false if <a href="#SkBitmap_info">info</a>.<a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kUnknown SkColorType</a>, or allocation exceeds
+31 bits, or allocation fails.
+
+### Return Value
+
+true if the allocation succeeds
+
+### Example
+
+<div><fiddle-embed name="720e4c053fae9e929ab6518b47e49370"><div><a href="#Bitmap">Bitmap</a> hosts and draws gray values in set1. <a href="#SkBitmap_tryAllocPixels">tryAllocPixels</a> replaces <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+and erases it to black, but does not alter set1. <a href="#SkBitmap_setPixels">setPixels</a> replaces black
+<a href="undocumented#Pixel_Ref">Pixel Ref</a> with set1.</div></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_allocPixels">allocPixels</a> <a href="#SkBitmap_installPixels">installPixels</a> <a href="#SkBitmap_setPixels">setPixels</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void allocPixels()
+</pre>
+
+Allocates pixel memory with <a href="#SkBitmap_HeapAllocator">HeapAllocator</a>, and replaces existing <a href="undocumented#Pixel_Ref">Pixel Ref</a>.
+The allocation size is determined by <a href="#Info">Image Info</a> <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, and <a href="undocumented#Color_Type">Color Type</a>.
+
+Aborts if <a href="#SkBitmap_info">info</a>.<a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kUnknown SkColorType</a>, or allocation exceeds
+31 bits, or allocation fails. Abort steps may be provided by the user at compile
+time by defining <a href="undocumented#SK_ABORT">SK ABORT</a>.
+
+### Example
+
+<div><fiddle-embed name="1219b38c788bf270fb20f8cd2d78cff8"><div><a href="#Bitmap">Bitmap</a> hosts and draws gray values in set1. <a href="#SkBitmap_allocPixels">allocPixels</a> replaces <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+and erases it to black, but does not alter set1. <a href="#SkBitmap_setPixels">setPixels</a> replaces black
+<a href="undocumented#Pixel_Ref">Pixel Ref</a> with set2.</div></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_tryAllocPixels">tryAllocPixels</a> <a href="#SkBitmap_installPixels">installPixels</a> <a href="#SkBitmap_setPixels">setPixels</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool SK_WARN_UNUSED_RESULT tryAllocPixels(Allocator* allocator)
+</pre>
+
+Allocates pixel memory with <a href="#SkBitmap_tryAllocPixels_4_allocator">allocator</a>, and replaces existing <a href="undocumented#Pixel_Ref">Pixel Ref</a>.
+The allocation size is determined by <a href="#Info">Image Info</a> <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, and <a href="undocumented#Color_Type">Color Type</a>.
+If <a href="#SkBitmap_tryAllocPixels_4_allocator">allocator</a> is nullptr, use <a href="#SkBitmap_HeapAllocator">HeapAllocator</a> instead.
+
+Returns false if <a href="#SkBitmap_tryAllocPixels_4_allocator">allocator</a> <a href="#SkBitmap_HeapAllocator_allocPixelRef">allocPixelRef</a> return false.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_tryAllocPixels_4_allocator"> <code><strong>allocator </strong></code> </a></td> <td>
+instance of <a href="#SkBitmap_Allocator">SkBitmap::Allocator</a> instantiation</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if custom <a href="#SkBitmap_tryAllocPixels_4_allocator">allocator</a> reports success
+
+### Example
+
+<div><fiddle-embed name="eb6f861ca1839146d26e40d56c2a001c"><div><a href="#SkBitmap_HeapAllocator">HeapAllocator</a> limits the maximum size of <a href="#Bitmap">Bitmap</a> to two gigabytes. Using
+a custom <a href="#SkBitmap_tryAllocPixels_4_allocator">allocator</a>, this limitation may be relaxed. This example can be
+modified to allocate an eight gigabyte <a href="#Bitmap">Bitmap</a> on a 64 bit platform with
+sufficient memory.</div></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_allocPixels">allocPixels</a> <a href="#SkBitmap_Allocator">Allocator</a> <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void allocPixels(Allocator* allocator)
+</pre>
+
+Allocates pixel memory with <a href="#SkBitmap_allocPixels_4_allocator">allocator</a>, and replaces existing <a href="undocumented#Pixel_Ref">Pixel Ref</a>.
+The allocation size is determined by <a href="#Info">Image Info</a> <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, and <a href="undocumented#Color_Type">Color Type</a>.
+If <a href="#SkBitmap_allocPixels_4_allocator">allocator</a> is nullptr, use <a href="#SkBitmap_HeapAllocator">HeapAllocator</a> instead.
+
+Aborts if <a href="#SkBitmap_allocPixels_4_allocator">allocator</a> <a href="#SkBitmap_HeapAllocator_allocPixelRef">allocPixelRef</a> return false. Abort steps may be provided by
+the user at compile time by defining <a href="undocumented#SK_ABORT">SK ABORT</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_allocPixels_4_allocator"> <code><strong>allocator </strong></code> </a></td> <td>
+instance of <a href="#SkBitmap_Allocator">SkBitmap::Allocator</a> instantiation</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="1b2800d23c9ea249b45c2c21a34b6d14"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_allocPixels">allocPixels</a> <a href="#SkBitmap_Allocator">Allocator</a> <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+
+---
+
+<a name="SkBitmap_pixelRef"></a>
+## pixelRef
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkPixelRef* pixelRef() const
+</pre>
+
+Returns <a href="undocumented#Pixel_Ref">Pixel Ref</a>, which contains: pixel base address; its <a href="#SkBitmap_dimensions">dimensions</a>; and
+<a href="#SkBitmap_rowBytes">rowBytes</a>, the interval from one row to the next. Does not change <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+reference count. <a href="undocumented#Pixel_Ref">Pixel Ref</a> may be shared by multiple bitmaps.
+If <a href="undocumented#Pixel_Ref">Pixel Ref</a> has not been set, returns nullptr.
+
+### Return Value
+
+<a href="undocumented#Pixel_Ref">Pixel Ref</a>, or nullptr
+
+### Example
+
+<div><fiddle-embed name="5db2d30870a7cc45f28e22578d1880c3"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_getPixels">getPixels</a> <a href="#SkBitmap_getAddr">getAddr</a>
+
+---
+
+<a name="SkBitmap_pixelRefOrigin"></a>
+## pixelRefOrigin
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkIPoint pixelRefOrigin() const
+</pre>
+
+Returns origin of pixels within <a href="undocumented#Pixel_Ref">Pixel Ref</a>. <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_bounds">bounds</a> is always contained
+by <a href="undocumented#Pixel_Ref">Pixel Ref</a> <a href="#SkBitmap_bounds">bounds</a>, which may be the same size or larger. Multiple <a href="#Bitmap">Bitmaps</a>
+can share the same <a href="undocumented#Pixel_Ref">Pixel Ref</a>, where each <a href="#Bitmap">Bitmap</a> has different <a href="#SkBitmap_bounds">bounds</a>.
+
+The returned origin added to <a href="#Bitmap">Bitmap</a> <a href="#SkBitmap_dimensions">dimensions</a> equals or is smaller than the
+<a href="undocumented#Pixel_Ref">Pixel Ref</a> <a href="#SkBitmap_dimensions">dimensions</a>.
+
+Returns (0, 0) if <a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr.
+
+### Return Value
+
+pixel origin within <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+
+### Example
+
+<div><fiddle-embed name="6d31686c6c0829c70f284ae716526d6a">
+
+#### Example Output
+
+~~~~
+source origin: 0, 0
+subset origin: 32, 64
+~~~~
+
+</fiddle-embed></div>
+
+---
+
+<a name="SkBitmap_setPixelRef"></a>
+## setPixelRef
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void setPixelRef(sk_sp&lt;SkPixelRef&gt; pixelRef, int dx, int dy)
+</pre>
+
+Replaces <a href="#SkBitmap_pixelRef">pixelRef</a> and origin in <a href="#Bitmap">Bitmap</a>. <a href="#SkBitmap_setPixelRef_dx">dx</a> and <a href="#SkBitmap_setPixelRef_dy">dy</a> specify the offset
+within the <a href="undocumented#Pixel_Ref">Pixel Ref</a> pixels for the top-left corner of the bitmap.
+
+Asserts in debug builds if <a href="#SkBitmap_setPixelRef_dx">dx</a> or <a href="#SkBitmap_setPixelRef_dy">dy</a> are out of range. Pins <a href="#SkBitmap_setPixelRef_dx">dx</a> and <a href="#SkBitmap_setPixelRef_dy">dy</a>
+to legal range in release builds.
+
+The caller is responsible for ensuring that the pixels match the
+<a href="undocumented#Color_Type">Color Type</a> and <a href="undocumented#Alpha_Type">Alpha Type</a> in <a href="#Info">Image Info</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_setPixelRef_pixelRef"> <code><strong>pixelRef </strong></code> </a></td> <td>
+<a href="undocumented#Pixel_Ref">Pixel Ref</a> describing pixel address and <a href="#SkBitmap_rowBytes">rowBytes</a></td>
+ </tr> <tr> <td><a name="SkBitmap_setPixelRef_dx"> <code><strong>dx </strong></code> </a></td> <td>
+column offset in <a href="undocumented#Pixel_Ref">Pixel Ref</a> for bitmap origin</td>
+ </tr> <tr> <td><a name="SkBitmap_setPixelRef_dy"> <code><strong>dy </strong></code> </a></td> <td>
+row offset in <a href="undocumented#Pixel_Ref">Pixel Ref</a> for bitmap origin</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="13df9e5b1adcec33d11e4b0f8a91ecb8"><div>Treating 32 bit data as 8 bit data is unlikely to produce useful results.</div></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_setInfo">setInfo</a>
+
+---
+
+<a name="SkBitmap_readyToDraw"></a>
+## readyToDraw
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool readyToDraw() const
+</pre>
+
+Returns true if <a href="#Bitmap">Bitmap</a> is can be drawn.
+
+### Return Value
+
+true if <a href="#SkBitmap_getPixels">getPixels</a> is not nullptr
+
+### Example
+
+<div><fiddle-embed name="e89c78ca992e2e789ed50944fe68f920"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_getPixels">getPixels</a> <a href="#SkBitmap_drawsNothing">drawsNothing</a>
+
+---
+
+<a name="SkBitmap_getGenerationID"></a>
+## getGenerationID
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+uint32_t getGenerationID() const
+</pre>
+
+Returns a unique value corresponding to the pixels in <a href="undocumented#Pixel_Ref">Pixel Ref</a>.
+Returns a different value after <a href="#SkBitmap_notifyPixelsChanged">notifyPixelsChanged</a> has been called.
+Returns zero if <a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr.
+
+Determines if pixels have changed since last examined.
+
+### Return Value
+
+unique value for pixels in <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+
+### Example
+
+<div><fiddle-embed name="db9dd91e0207c3941c09538555817b4b">
+
+#### Example Output
+
+~~~~
+#Volatile
+empty id 0
+alloc id 4
+erase id 6
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_notifyPixelsChanged">notifyPixelsChanged</a> <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+
+---
+
+<a name="SkBitmap_notifyPixelsChanged"></a>
+## notifyPixelsChanged
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void notifyPixelsChanged() const
+</pre>
+
+Marks that pixels in <a href="undocumented#Pixel_Ref">Pixel Ref</a> have changed. Subsequent calls to
+<a href="#SkBitmap_getGenerationID">getGenerationID</a> return a different value.
+
+### Example
+
+<div><fiddle-embed name="706e6409c8364e7786d6c69db7242c76"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_getGenerationID">getGenerationID</a> <a href="#SkBitmap_isVolatile">isVolatile</a> <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+
+---
+
+<a name="SkBitmap_eraseColor"></a>
+## eraseColor
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void eraseColor(SkColor c) const
+</pre>
+
+Replaces pixel values with <a href="#SkBitmap_eraseColor_c">c</a>. All pixels contained by <a href="#SkBitmap_bounds">bounds</a> are affected.
+If the <a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kGray 8 SkColorType</a> or k565_SkColorType, then <a href="#Alpha">Color Alpha</a>
+is ignored; <a href="#RGB">Color RGB</a> is treated as opaque. If <a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>,
+then <a href="#RGB">Color RGB</a> is ignored.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_eraseColor_c"> <code><strong>c </strong></code> </a></td> <td>
+<a href="#Unpremultiply">Unpremultiplied</a> <a href="undocumented#Color">Color</a></td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="22804faa423192f96a29578b1d396ace"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_eraseARGB">eraseARGB</a> <a href="#SkBitmap_eraseRGB">eraseRGB</a> <a href="#SkBitmap_erase">erase</a>
+
+---
+
+<a name="SkBitmap_eraseARGB"></a>
+## eraseARGB
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void eraseARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b) const
+</pre>
+
+Replaces pixel values with <a href="#Unpremultiply">Unpremultiplied</a> <a href="undocumented#Color">Color</a> built from <a href="#SkBitmap_eraseARGB_a">a</a>, <a href="#SkBitmap_eraseARGB_r">r</a>, <a href="#SkBitmap_eraseARGB_g">g</a>, and <a href="#SkBitmap_eraseARGB_b">b</a>.
+All pixels contained by <a href="#SkBitmap_bounds">bounds</a> are affected.
+If the <a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kGray 8 SkColorType</a> or k565_SkColorType, then <a href="#SkBitmap_eraseARGB_a">a</a>
+is ignored; <a href="#SkBitmap_eraseARGB_r">r</a>, <a href="#SkBitmap_eraseARGB_g">g</a>, and <a href="#SkBitmap_eraseARGB_b">b</a> are treated as opaque. If <a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>,
+then <a href="#SkBitmap_eraseARGB_r">r</a>, <a href="#SkBitmap_eraseARGB_g">g</a>, and <a href="#SkBitmap_eraseARGB_b">b</a> are ignored.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_eraseARGB_a"> <code><strong>a </strong></code> </a></td> <td>
+amount of <a href="#Alpha">Color Alpha</a>, from fully transparent (0) to fully opaque (255)</td>
+ </tr> <tr> <td><a name="SkBitmap_eraseARGB_r"> <code><strong>r </strong></code> </a></td> <td>
+amount of <a href="#RGB_Red">Color RGB Red</a>, from no red (0) to full red (255)</td>
+ </tr> <tr> <td><a name="SkBitmap_eraseARGB_g"> <code><strong>g </strong></code> </a></td> <td>
+amount of <a href="#RGB_Green">Color RGB Green</a>, from no green (0) to full green (255)</td>
+ </tr> <tr> <td><a name="SkBitmap_eraseARGB_b"> <code><strong>b </strong></code> </a></td> <td>
+amount of <a href="#RGB_Blue">Color RGB Blue</a>, from no blue (0) to full blue (255)</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="ebaa436565ce9c0f883bef871d099654"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_eraseColor">eraseColor</a> <a href="#SkBitmap_eraseRGB">eraseRGB</a> <a href="#SkBitmap_erase">erase</a>
+
+---
+
+<a name="SkBitmap_eraseRGB"></a>
+## eraseRGB
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void eraseRGB(U8CPU r, U8CPU g, U8CPU b) const
+</pre>
+
+Replaces pixel values with <a href="undocumented#Color">Color</a> built from <a href="#SkBitmap_eraseRGB_r">r</a>, <a href="#SkBitmap_eraseRGB_g">g</a>, and <a href="#SkBitmap_eraseRGB_b">b</a> with <a href="#Alpha">Color Alpha</a> set
+to 255. All pixels contained by <a href="#SkBitmap_bounds">bounds</a> are affected.
+If <a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>, all pixels are set to 255.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_eraseRGB_r"> <code><strong>r </strong></code> </a></td> <td>
+amount of <a href="#RGB_Red">Color RGB Red</a>, from no red (0) to full red (255)</td>
+ </tr> <tr> <td><a name="SkBitmap_eraseRGB_g"> <code><strong>g </strong></code> </a></td> <td>
+amount of <a href="#RGB_Green">Color RGB Green</a>, from no green (0) to full green (255)</td>
+ </tr> <tr> <td><a name="SkBitmap_eraseRGB_b"> <code><strong>b </strong></code> </a></td> <td>
+amount of <a href="#RGB_Blue">Color RGB Blue</a>, from no blue (0) to full blue (255)</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="3088f4d6cf8a01644ffd41bfddad5e03"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_eraseColor">eraseColor</a> <a href="#SkBitmap_eraseARGB">eraseARGB</a> <a href="#SkBitmap_erase">erase</a>
+
+---
+
+<a name="SkBitmap_erase"></a>
+## erase
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void erase(SkColor c, const SkIRect& area) const
+</pre>
+
+Replaces pixel values inside <a href="#SkBitmap_erase_area">area</a> with <a href="#SkBitmap_erase_c">c</a>. If <a href="#SkBitmap_erase_area">area</a> does not intersect <a href="#SkBitmap_bounds">bounds</a>,
+call has no effect.
+
+If the <a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kGray 8 SkColorType</a> or k565_SkColorType, then <a href="#Alpha">Color Alpha</a>
+is ignored; <a href="#RGB">Color RGB</a> is treated as opaque. If <a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>,
+then <a href="#RGB">Color RGB</a> is ignored.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_erase_c"> <code><strong>c </strong></code> </a></td> <td>
+<a href="#Unpremultiply">Unpremultiplied</a> <a href="undocumented#Color">Color</a></td>
+ </tr> <tr> <td><a name="SkBitmap_erase_area"> <code><strong>area </strong></code> </a></td> <td>
+rectangle to fill</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="116baaa35348b5c0a353fb6d4917d574"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_eraseColor">eraseColor</a> <a href="#SkBitmap_eraseARGB">eraseARGB</a> <a href="#SkBitmap_eraseRGB">eraseRGB</a> <a href="#SkCanvas_drawRect">SkCanvas::drawRect</a>
+
+---
+
+<a name="SkBitmap_eraseArea"></a>
+## eraseArea
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void eraseArea(const SkIRect& area, SkColor c) const
+</pre>
+
+Legacy call to be deprecated.
+
+---
+
+<a name="SkBitmap_getColor"></a>
+## getColor
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkColor getColor(int x, int y) const
+</pre>
+
+Returns pixel at (<a href="#SkBitmap_getColor_x">x</a>, <a href="#SkBitmap_getColor_y">y</a>) as <a href="#Unpremultiply">Unpremultiplied</a> <a href="undocumented#Color">Color</a>.
+Returns black with <a href="#Alpha">Alpha</a> if <a href="undocumented#Color_Type">Color Type</a> is <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>.
+
+Input is not validated: out of <a href="#SkBitmap_bounds">bounds</a> values of <a href="#SkBitmap_getColor_x">x</a> or <a href="#SkBitmap_getColor_y">y</a> trigger an assert() if
+built with <a href="undocumented#SK_DEBUG">SK DEBUG</a> defined; and returns undefined values or may crash if
+<a href="undocumented#SK_RELEASE">SK RELEASE</a> is defined. Fails if <a href="undocumented#Color_Type">Color Type</a> is <a href="undocumented#SkColorType">kUnknown SkColorType</a> or
+pixel address is nullptr.
+
+<a href="undocumented#Color_Space">Color Space</a> in <a href="#Info">Image Info</a> is ignored. Some <a href="undocumented#Color">Color</a> precision may be lost in the
+conversion to <a href="#Unpremultiply">Unpremultiplied</a> <a href="undocumented#Color">Color</a>; original pixel data may have additional
+precision.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_getColor_x"> <code><strong>x </strong></code> </a></td> <td>
+column index, zero or greater, and less than <a href="#SkBitmap_width">width</a></td>
+ </tr> <tr> <td><a name="SkBitmap_getColor_y"> <code><strong>y </strong></code> </a></td> <td>
+row index, zero or greater, and less than <a href="#SkBitmap_height">height</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+pixel converted to <a href="#Unpremultiply">Unpremultiplied</a> <a href="undocumented#Color">Color</a>
+
+### Example
+
+<div><fiddle-embed name="2e49fa71dd4be95470248ea6eb35468b">
+
+#### Example Output
+
+~~~~
+Premultiplied:
+(0, 0) 0x00000000 0x2a0e002a 0x55380055 0x7f7f007f
+(0, 1) 0x2a000e2a 0x551c1c55 0x7f542a7f 0xaaaa38aa
+(0, 2) 0x55003855 0x7f2a547f 0xaa7171aa 0xd4d48dd4
+(0, 3) 0x7f007f7f 0xaa38aaaa 0xd48dd4d4 0xffffffff
+Unpremultiplied:
+(0, 0) 0x00000000 0x2a5500ff 0x55a800ff 0x7fff00ff
+(0, 1) 0x2a0055ff 0x555454ff 0x7fa954ff 0xaaff54ff
+(0, 2) 0x5500a8ff 0x7f54a9ff 0xaaaaaaff 0xd4ffaaff
+(0, 3) 0x7f00ffff 0xaa54ffff 0xd4aaffff 0xffffffff
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_getAddr">getAddr</a> <a href="#SkBitmap_readPixels">readPixels</a>
+
+---
+
+<a name="SkBitmap_getAddr"></a>
+## getAddr
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void* getAddr(int x, int y) const
+</pre>
+
+Returns pixel address at (<a href="#SkBitmap_getAddr_x">x</a>, <a href="#SkBitmap_getAddr_y">y</a>).
+
+Input is not validated: out of <a href="#SkBitmap_bounds">bounds</a> values of <a href="#SkBitmap_getAddr_x">x</a> or <a href="#SkBitmap_getAddr_y">y</a>, or <a href="undocumented#SkColorType">kUnknown SkColorType</a>,
+trigger an assert() if built with <a href="undocumented#SK_DEBUG">SK DEBUG</a> defined. Returns nullptr if
+<a href="undocumented#Color_Type">Color Type</a> is <a href="undocumented#SkColorType">kUnknown SkColorType</a>, or <a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr.
+
+Performs a lookup of pixel size; for better performance, call
+one of: <a href="#SkBitmap_getAddr8">getAddr8</a>, <a href="#SkBitmap_getAddr16">getAddr16</a>, or <a href="#SkBitmap_getAddr32">getAddr32</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_getAddr_x"> <code><strong>x </strong></code> </a></td> <td>
+column index, zero or greater, and less than <a href="#SkBitmap_width">width</a></td>
+ </tr> <tr> <td><a name="SkBitmap_getAddr_y"> <code><strong>y </strong></code> </a></td> <td>
+row index, zero or greater, and less than <a href="#SkBitmap_height">height</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+generic pointer to pixel
+
+### Example
+
+<div><fiddle-embed name="bd0e0adb48b16d75129092649eab1617">
+
+#### Example Output
+
+~~~~
+addr interval == rowBytes
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_getAddr8">getAddr8</a> <a href="#SkBitmap_getAddr16">getAddr16</a> <a href="#SkBitmap_getAddr32">getAddr32</a> <a href="#SkBitmap_readPixels">readPixels</a> <a href="#SkPixmap_addr">SkPixmap::addr</a>
+
+---
+
+<a name="SkBitmap_getAddr32"></a>
+## getAddr32
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+inline uint32_t* getAddr32(int x, int y) const
+</pre>
+
+Returns address at (<a href="#SkBitmap_getAddr32_x">x</a>, <a href="#SkBitmap_getAddr32_y">y</a>).
+
+Input is not validated. Triggers an assert() if built with <a href="undocumented#SK_DEBUG">SK DEBUG</a> defined and:
+
+<table> <tr>
+ <td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr> <tr>
+ <td><a href="#SkBitmap_bytesPerPixel">bytesPerPixel</a> is not four</td> </tr> <tr>
+ <td><a href="#SkBitmap_getAddr32_x">x</a> is negative, or not less than <a href="#SkBitmap_width">width</a></td> </tr> <tr>
+ <td><a href="#SkBitmap_getAddr32_y">y</a> is negative, or not less than <a href="#SkBitmap_height">height</a></td> </tr>
+</table>
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_getAddr32_x"> <code><strong>x </strong></code> </a></td> <td>
+column index, zero or greater, and less than <a href="#SkBitmap_width">width</a></td>
+ </tr> <tr> <td><a name="SkBitmap_getAddr32_y"> <code><strong>y </strong></code> </a></td> <td>
+row index, zero or greater, and less than <a href="#SkBitmap_height">height</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+unsigned 32-bit pointer to pixel at (<a href="#SkBitmap_getAddr32_x">x</a>, <a href="#SkBitmap_getAddr32_y">y</a>)
+
+### Example
+
+<div><fiddle-embed name="837a2bcc9fb9ce617a3420956cefc64a">
+
+#### Example Output
+
+~~~~
+addr interval == rowBytes
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_getAddr8">getAddr8</a> <a href="#SkBitmap_getAddr16">getAddr16</a> <a href="#SkBitmap_getAddr">getAddr</a> <a href="#SkBitmap_readPixels">readPixels</a> <a href="#SkPixmap_addr32">SkPixmap::addr32</a>
+
+---
+
+<a name="SkBitmap_getAddr16"></a>
+## getAddr16
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+inline uint16_t* getAddr16(int x, int y) const
+</pre>
+
+Returns address at (<a href="#SkBitmap_getAddr16_x">x</a>, <a href="#SkBitmap_getAddr16_y">y</a>).
+
+Input is not validated. Triggers an assert() if built with <a href="undocumented#SK_DEBUG">SK DEBUG</a> defined and:
+
+<table> <tr>
+ <td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr> <tr>
+ <td><a href="#SkBitmap_bytesPerPixel">bytesPerPixel</a> is not two</td> </tr> <tr>
+ <td><a href="#SkBitmap_getAddr16_x">x</a> is negative, or not less than <a href="#SkBitmap_width">width</a></td> </tr> <tr>
+ <td><a href="#SkBitmap_getAddr16_y">y</a> is negative, or not less than <a href="#SkBitmap_height">height</a></td> </tr>
+</table>
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_getAddr16_x"> <code><strong>x </strong></code> </a></td> <td>
+column index, zero or greater, and less than <a href="#SkBitmap_width">width</a></td>
+ </tr> <tr> <td><a name="SkBitmap_getAddr16_y"> <code><strong>y </strong></code> </a></td> <td>
+row index, zero or greater, and less than <a href="#SkBitmap_height">height</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+unsigned 16-bit pointer to pixel at (<a href="#SkBitmap_getAddr16_x">x</a>, <a href="#SkBitmap_getAddr16_y">y</a>)
+
+### Example
+
+<div><fiddle-embed name="3d7e49d428c9a4812558b39cf505baa6">
+
+#### Example Output
+
+~~~~
+addr interval == rowBytes
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_getAddr8">getAddr8</a> <a href="#SkBitmap_getAddr">getAddr</a> <a href="#SkBitmap_getAddr32">getAddr32</a> <a href="#SkBitmap_readPixels">readPixels</a> <a href="#SkPixmap_addr16">SkPixmap::addr16</a>
+
+---
+
+<a name="SkBitmap_getAddr8"></a>
+## getAddr8
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+inline uint8_t* getAddr8(int x, int y) const
+</pre>
+
+Returns address at (<a href="#SkBitmap_getAddr8_x">x</a>, <a href="#SkBitmap_getAddr8_y">y</a>).
+
+Input is not validated. Triggers an assert() if built with <a href="undocumented#SK_DEBUG">SK DEBUG</a> defined and:
+
+<table> <tr>
+ <td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr> <tr>
+ <td><a href="#SkBitmap_bytesPerPixel">bytesPerPixel</a> is not one</td> </tr> <tr>
+ <td><a href="#SkBitmap_getAddr8_x">x</a> is negative, or not less than <a href="#SkBitmap_width">width</a></td> </tr> <tr>
+ <td><a href="#SkBitmap_getAddr8_y">y</a> is negative, or not less than <a href="#SkBitmap_height">height</a></td> </tr>
+</table>
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_getAddr8_x"> <code><strong>x </strong></code> </a></td> <td>
+column index, zero or greater, and less than <a href="#SkBitmap_width">width</a></td>
+ </tr> <tr> <td><a name="SkBitmap_getAddr8_y"> <code><strong>y </strong></code> </a></td> <td>
+row index, zero or greater, and less than <a href="#SkBitmap_height">height</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+unsigned 8-bit pointer to pixel at (<a href="#SkBitmap_getAddr8_x">x</a>, <a href="#SkBitmap_getAddr8_y">y</a>)
+
+### Example
+
+<div><fiddle-embed name="cb9a08e8ff779b6a1cf8bb54f3883aaf">
+
+#### Example Output
+
+~~~~
+&pixels[4][2] == bitmap.getAddr8(2, 4)
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_getAddr">getAddr</a> <a href="#SkBitmap_getAddr16">getAddr16</a> <a href="#SkBitmap_getAddr32">getAddr32</a> <a href="#SkBitmap_readPixels">readPixels</a> <a href="#SkPixmap_addr8">SkPixmap::addr8</a>
+
+---
+
+<a name="SkBitmap_extractSubset"></a>
+## extractSubset
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool extractSubset(SkBitmap* dst, const SkIRect& subset) const
+</pre>
+
+Shares <a href="undocumented#Pixel_Ref">Pixel Ref</a> with <a href="#SkBitmap_extractSubset_dst">dst</a>. Pixels are not copied; <a href="#Bitmap">Bitmap</a> and <a href="#SkBitmap_extractSubset_dst">dst</a> point
+to the same pixels; <a href="#SkBitmap_extractSubset_dst">dst</a> <a href="#SkBitmap_bounds">bounds</a> are set to the intersection of <a href="#SkBitmap_extractSubset_subset">subset</a>
+and the original <a href="#SkBitmap_bounds">bounds</a>.
+
+<a href="#SkBitmap_extractSubset_subset">subset</a> may be larger than <a href="#SkBitmap_bounds">bounds</a>. Any area outside of <a href="#SkBitmap_bounds">bounds</a> is ignored.
+
+Any contents of <a href="#SkBitmap_extractSubset_dst">dst</a> are discarded. <a href="#SkBitmap_isVolatile">isVolatile</a> setting is copied to <a href="#SkBitmap_extractSubset_dst">dst</a>.
+<a href="#SkBitmap_extractSubset_dst">dst</a> is set to <a href="#SkBitmap_colorType">colorType</a>, <a href="#SkBitmap_alphaType">alphaType</a>, and <a href="#SkBitmap_colorSpace">colorSpace</a>.
+
+Return false if:
+
+<table> <tr>
+ <td><a href="#SkBitmap_extractSubset_dst">dst</a> is nullptr</td> </tr> <tr>
+ <td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr> <tr>
+ <td><a href="#SkBitmap_extractSubset_subset">subset</a> does not intersect <a href="#SkBitmap_bounds">bounds</a></td> </tr>
+</table>
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_extractSubset_dst"> <code><strong>dst </strong></code> </a></td> <td>
+<a href="#Bitmap">Bitmap</a> set to <a href="#SkBitmap_extractSubset_subset">subset</a></td>
+ </tr> <tr> <td><a name="SkBitmap_extractSubset_subset"> <code><strong>subset </strong></code> </a></td> <td>
+rectangle of pixels to reference</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href="#SkBitmap_extractSubset_dst">dst</a> is replaced by <a href="#SkBitmap_extractSubset_subset">subset</a>
+
+### Example
+
+<div><fiddle-embed name="3ad80d8fcb13344612f361812658b696">
+
+#### Example Output
+
+~~~~
+bounds: 0, 0, 512, 512
+subset: -100, 100, 0, 200 success; false
+subset: -100, 100, 100, 200 success; true subset: 0, 0, 100, 100
+subset: -100, 100, 1000, 200 success; true subset: 0, 0, 512, 100
+subset: 0, 100, 0, 200 success; false
+subset: 0, 100, 100, 200 success; true subset: 0, 0, 100, 100
+subset: 0, 100, 1000, 200 success; true subset: 0, 0, 512, 100
+subset: 100, 100, 0, 200 success; false
+subset: 100, 100, 100, 200 success; false
+subset: 100, 100, 1000, 200 success; true subset: 0, 0, 412, 100
+subset: 1000, 100, 0, 200 success; false
+subset: 1000, 100, 100, 200 success; false
+subset: 1000, 100, 1000, 200 success; false
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_readPixels">readPixels</a> <a href="#SkBitmap_writePixels">writePixels</a> <a href="#SkCanvas_drawBitmap">SkCanvas::drawBitmap</a>
+
+---
+
+<a name="SkBitmap_readPixels"></a>
+## readPixels
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
+ int srcX, int srcY, SkTransferFunctionBehavior behavior) const
+</pre>
+
+Copies a <a href="SkRect_Reference#Rect">Rect</a> of pixels to <a href="#SkBitmap_readPixels_dstPixels">dstPixels</a>. Copy starts at (<a href="#SkBitmap_readPixels_srcX">srcX</a>, <a href="#SkBitmap_readPixels_srcY">srcY</a>), and does not exceed
+(this-><a href="#SkBitmap_width">width</a>, this-><a href="#SkBitmap_height">height</a>).
+
+<a href="#SkBitmap_readPixels_dstInfo">dstInfo</a> specifies <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, and
+<a href="undocumented#Color_Space">Color Space</a> of destination. <a href="#SkBitmap_readPixels_dstRowBytes">dstRowBytes</a> specifics the gap from one destination
+row to the next. Returns true if pixels are copied. Returns false if:
+
+<table> <tr>
+ <td><a href="#SkBitmap_readPixels_dstInfo">dstInfo</a>.addr() equals nullptr</td> </tr> <tr>
+ <td><a href="#SkBitmap_readPixels_dstRowBytes">dstRowBytes</a> is less than <a href="#SkBitmap_readPixels_dstInfo">dstInfo</a>.<a href="undocumented#SkImageInfo">minRowBytes</a></td> </tr> <tr>
+ <td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
+</table>
+
+Pixels are copied only if pixel conversion is possible. If this-><a href="#SkBitmap_colorType">colorType</a> is
+<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, or <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkBitmap_readPixels_dstInfo">dstInfo</a>.<a href="#SkBitmap_colorType">colorType</a> must match.
+If this-><a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="#SkBitmap_readPixels_dstInfo">dstInfo</a>.<a href="#SkBitmap_colorSpace">colorSpace</a> must match.
+If this-><a href="#SkBitmap_alphaType">alphaType</a> is <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkBitmap_readPixels_dstInfo">dstInfo</a>.<a href="#SkBitmap_alphaType">alphaType</a> must
+match. If this-><a href="#SkBitmap_colorSpace">colorSpace</a> is nullptr, <a href="#SkBitmap_readPixels_dstInfo">dstInfo</a>.<a href="#SkBitmap_colorSpace">colorSpace</a> must match. Returns
+false if pixel conversion is not possible.
+<a href="#SkBitmap_readPixels_srcX">srcX</a> and <a href="#SkBitmap_readPixels_srcY">srcY</a> may be negative to copy only top or left of source. Returns
+false if <a href="#SkBitmap_width">width</a> or <a href="#SkBitmap_height">height</a> is zero or negative. Returns false ifabs(srcX) >= this-><a href="#SkBitmap_width">width</a>,
+or ifabs(srcY) >= this-><a href="#SkBitmap_height">height</a>.
+
+If <a href="#SkBitmap_readPixels_behavior">behavior</a> is <a href="#SkTransferFunctionBehavior_kRespect">SkTransferFunctionBehavior::kRespect</a>: converts source
+pixels to a linear space before converting to <a href="#SkBitmap_readPixels_dstInfo">dstInfo</a>.
+If <a href="#SkBitmap_readPixels_behavior">behavior</a> is <a href="#SkTransferFunctionBehavior_kIgnore">SkTransferFunctionBehavior::kIgnore</a>: source
+pixels are treated as if they are linear, regardless of how they are encoded.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_readPixels_dstInfo"> <code><strong>dstInfo </strong></code> </a></td> <td>
+destination <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a></td>
+ </tr> <tr> <td><a name="SkBitmap_readPixels_dstPixels"> <code><strong>dstPixels </strong></code> </a></td> <td>
+destination pixel storage</td>
+ </tr> <tr> <td><a name="SkBitmap_readPixels_dstRowBytes"> <code><strong>dstRowBytes </strong></code> </a></td> <td>
+destination row length</td>
+ </tr> <tr> <td><a name="SkBitmap_readPixels_srcX"> <code><strong>srcX </strong></code> </a></td> <td>
+column index whose absolute value is less than <a href="#SkBitmap_width">width</a></td>
+ </tr> <tr> <td><a name="SkBitmap_readPixels_srcY"> <code><strong>srcY </strong></code> </a></td> <td>
+row index whose absolute value is less than <a href="#SkBitmap_height">height</a></td>
+ </tr> <tr> <td><a name="SkBitmap_readPixels_behavior"> <code><strong>behavior </strong></code> </a></td> <td>
+one of: <a href="#SkTransferFunctionBehavior_kRespect">SkTransferFunctionBehavior::kRespect</a>,
+<a href="#SkTransferFunctionBehavior_kIgnore">SkTransferFunctionBehavior::kIgnore</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+true if pixels are copied to <a href="#SkBitmap_readPixels_dstPixels">dstPixels</a>
+
+### Example
+
+<div><fiddle-embed name="86fb9979516d256d71aa3f3f2182fe0c"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_writePixels">writePixels</a> <a href="#SkPixmap_readPixels">SkPixmap::readPixels</a> <a href="#SkCanvas_readPixels">SkCanvas::readPixels</a> <a href="#SkImage_readPixels">SkImage::readPixels</a> <a href="#SkSurface_readPixels">SkSurface::readPixels</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
+ int srcX, int srcY) const
+</pre>
+
+Copies a <a href="SkRect_Reference#Rect">Rect</a> of pixels to <a href="#SkBitmap_readPixels_2_dstPixels">dstPixels</a>. Copy starts at (<a href="#SkBitmap_readPixels_2_srcX">srcX</a>, <a href="#SkBitmap_readPixels_2_srcY">srcY</a>), and does not exceed
+(this-><a href="#SkBitmap_width">width</a>, this-><a href="#SkBitmap_height">height</a>).
+
+<a href="#SkBitmap_readPixels_2_dstInfo">dstInfo</a> specifies <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, and
+<a href="undocumented#Color_Space">Color Space</a> of destination. <a href="#SkBitmap_readPixels_2_dstRowBytes">dstRowBytes</a> specifics the gap from one destination
+row to the next. Returns true if pixels are copied. Returns false if:
+
+<table> <tr>
+ <td><a href="#SkBitmap_readPixels_2_dstInfo">dstInfo</a>.addr() equals nullptr</td> </tr> <tr>
+ <td><a href="#SkBitmap_readPixels_2_dstRowBytes">dstRowBytes</a> is less than <a href="#SkBitmap_readPixels_2_dstInfo">dstInfo</a>.<a href="undocumented#SkImageInfo">minRowBytes</a></td> </tr> <tr>
+ <td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
+</table>
+
+Pixels are copied only if pixel conversion is possible. If this-><a href="#SkBitmap_colorType">colorType</a> is
+<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, or <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkBitmap_readPixels_2_dstInfo">dstInfo</a>.<a href="#SkBitmap_colorType">colorType</a> must match.
+If this-><a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="#SkBitmap_readPixels_2_dstInfo">dstInfo</a>.<a href="#SkBitmap_colorSpace">colorSpace</a> must match.
+If this-><a href="#SkBitmap_alphaType">alphaType</a> is <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkBitmap_readPixels_2_dstInfo">dstInfo</a>.<a href="#SkBitmap_alphaType">alphaType</a> must
+match. If this-><a href="#SkBitmap_colorSpace">colorSpace</a> is nullptr, <a href="#SkBitmap_readPixels_2_dstInfo">dstInfo</a>.<a href="#SkBitmap_colorSpace">colorSpace</a> must match. Returns
+false if pixel conversion is not possible.
+<a href="#SkBitmap_readPixels_2_srcX">srcX</a> and <a href="#SkBitmap_readPixels_2_srcY">srcY</a> may be negative to copy only top or left of source. Returns
+false if <a href="#SkBitmap_width">width</a> or <a href="#SkBitmap_height">height</a> is zero or negative. Returns false ifabs(srcX) >= this-><a href="#SkBitmap_width">width</a>,
+or ifabs(srcY) >= this-><a href="#SkBitmap_height">height</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_readPixels_2_dstInfo"> <code><strong>dstInfo </strong></code> </a></td> <td>
+destination <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a></td>
+ </tr> <tr> <td><a name="SkBitmap_readPixels_2_dstPixels"> <code><strong>dstPixels </strong></code> </a></td> <td>
+destination pixel storage</td>
+ </tr> <tr> <td><a name="SkBitmap_readPixels_2_dstRowBytes"> <code><strong>dstRowBytes </strong></code> </a></td> <td>
+destination row length</td>
+ </tr> <tr> <td><a name="SkBitmap_readPixels_2_srcX"> <code><strong>srcX </strong></code> </a></td> <td>
+column index whose absolute value is less than <a href="#SkBitmap_width">width</a></td>
+ </tr> <tr> <td><a name="SkBitmap_readPixels_2_srcY"> <code><strong>srcY </strong></code> </a></td> <td>
+row index whose absolute value is less than <a href="#SkBitmap_height">height</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+true if pixels are copied to <a href="#SkBitmap_readPixels_2_dstPixels">dstPixels</a>
+
+### Example
+
+<div><fiddle-embed name="b2cbbbbcffb618865d8aae3bc04b2a62"><div>Transferring the gradient from 8 bits per component to 4 bits per component
+creates visible banding.</div></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_writePixels">writePixels</a> <a href="#SkPixmap_readPixels">SkPixmap::readPixels</a> <a href="#SkCanvas_readPixels">SkCanvas::readPixels</a> <a href="#SkImage_readPixels">SkImage::readPixels</a> <a href="#SkSurface_readPixels">SkSurface::readPixels</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool readPixels(const SkPixmap& dst, int srcX, int srcY) const
+</pre>
+
+Copies a <a href="SkRect_Reference#Rect">Rect</a> of pixels to <a href="#SkBitmap_readPixels_3_dst">dst</a>. Copy starts at (<a href="#SkBitmap_readPixels_3_srcX">srcX</a>, <a href="#SkBitmap_readPixels_3_srcY">srcY</a>), and does not exceed
+(this-><a href="#SkBitmap_width">width</a>, this-><a href="#SkBitmap_height">height</a>).
+
+<a href="#SkBitmap_readPixels_3_dst">dst</a> specifies <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>, pixel storage,
+and row bytes of destination. <a href="#SkBitmap_readPixels_3_dst">dst</a>.<a href="#SkBitmap_rowBytes">rowBytes</a> specifics the gap from one destination
+row to the next. Returns true if pixels are copied. Returns false if:
+
+<table> <tr>
+ <td><a href="#SkBitmap_readPixels_3_dst">dst</a> pixel storage equals nullptr</td> </tr> <tr>
+ <td><a href="#SkBitmap_readPixels_3_dst">dst</a>.<a href="#SkBitmap_rowBytes">rowBytes</a> is less than <a href="#SkImageInfo_minRowBytes">SkImageInfo::minRowBytes</a></td> </tr> <tr>
+ <td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
+</table>
+
+Pixels are copied only if pixel conversion is possible. If this-><a href="#SkBitmap_colorType">colorType</a> is
+<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, or <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkBitmap_readPixels_3_dst">dst</a> <a href="undocumented#Color_Type">Color Type</a> must match.
+If this-><a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="#SkBitmap_readPixels_3_dst">dst</a> <a href="undocumented#Color_Space">Color Space</a> must match.
+If this-><a href="#SkBitmap_alphaType">alphaType</a> is <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkBitmap_readPixels_3_dst">dst</a> <a href="undocumented#Alpha_Type">Alpha Type</a> must
+match. If this-><a href="#SkBitmap_colorSpace">colorSpace</a> is nullptr, <a href="#SkBitmap_readPixels_3_dst">dst</a> <a href="undocumented#Color_Space">Color Space</a> must match. Returns
+false if pixel conversion is not possible.
+<a href="#SkBitmap_readPixels_3_srcX">srcX</a> and <a href="#SkBitmap_readPixels_3_srcY">srcY</a> may be negative to copy only top or left of source. Returns
+false if <a href="#SkBitmap_width">width</a> or <a href="#SkBitmap_height">height</a> is zero or negative. Returns false ifabs(srcX) >= this-><a href="#SkBitmap_width">width</a>,
+or ifabs(srcY) >= this-><a href="#SkBitmap_height">height</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_readPixels_3_dst"> <code><strong>dst </strong></code> </a></td> <td>
+destination <a href="SkPixmap_Reference#Pixmap">Pixmap</a>: <a href="#Info">Image Info</a>, pixels, row bytes</td>
+ </tr> <tr> <td><a name="SkBitmap_readPixels_3_srcX"> <code><strong>srcX </strong></code> </a></td> <td>
+column index whose absolute value is less than <a href="#SkBitmap_width">width</a></td>
+ </tr> <tr> <td><a name="SkBitmap_readPixels_3_srcY"> <code><strong>srcY </strong></code> </a></td> <td>
+row index whose absolute value is less than <a href="#SkBitmap_height">height</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+true if pixels are copied to <a href="#SkBitmap_readPixels_3_dst">dst</a>
+
+### Example
+
+<div><fiddle-embed name="e9f70cbc9827097449a386ec7a8a8188"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_writePixels">writePixels</a> <a href="#SkPixmap_readPixels">SkPixmap::readPixels</a> <a href="#SkCanvas_readPixels">SkCanvas::readPixels</a> <a href="#SkImage_readPixels">SkImage::readPixels</a> <a href="#SkSurface_readPixels">SkSurface::readPixels</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool readPixels(const SkPixmap& dst) const
+</pre>
+
+Copies a <a href="SkRect_Reference#Rect">Rect</a> of pixels to <a href="#SkBitmap_readPixels_4_dst">dst</a>. Copy starts at (0, 0), and does not exceed
+(this-><a href="#SkBitmap_width">width</a>, this-><a href="#SkBitmap_height">height</a>).
+
+<a href="#SkBitmap_readPixels_4_dst">dst</a> specifies <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>, pixel storage,
+and row bytes of destination. <a href="#SkBitmap_readPixels_4_dst">dst</a>.<a href="#SkBitmap_rowBytes">rowBytes</a> specifics the gap from one destination
+row to the next. Returns true if pixels are copied. Returns false if:
+
+<table> <tr>
+ <td><a href="#SkBitmap_readPixels_4_dst">dst</a> pixel storage equals nullptr</td> </tr> <tr>
+ <td><a href="#SkBitmap_readPixels_4_dst">dst</a>.<a href="#SkBitmap_rowBytes">rowBytes</a> is less than <a href="#SkImageInfo_minRowBytes">SkImageInfo::minRowBytes</a></td> </tr> <tr>
+ <td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
+</table>
+
+Pixels are copied only if pixel conversion is possible. If this-><a href="#SkBitmap_colorType">colorType</a> is
+<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, or <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkBitmap_readPixels_4_dst">dst</a> <a href="undocumented#Color_Type">Color Type</a> must match.
+If this-><a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="#SkBitmap_readPixels_4_dst">dst</a> <a href="undocumented#Color_Space">Color Space</a> must match.
+If this-><a href="#SkBitmap_alphaType">alphaType</a> is <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkBitmap_readPixels_4_dst">dst</a> <a href="undocumented#Alpha_Type">Alpha Type</a> must
+match. If this-><a href="#SkBitmap_colorSpace">colorSpace</a> is nullptr, <a href="#SkBitmap_readPixels_4_dst">dst</a> <a href="undocumented#Color_Space">Color Space</a> must match. Returns
+false if pixel conversion is not possible.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_readPixels_4_dst"> <code><strong>dst </strong></code> </a></td> <td>
+destination <a href="SkPixmap_Reference#Pixmap">Pixmap</a>: <a href="#Info">Image Info</a>, pixels, row bytes</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if pixels are copied to <a href="#SkBitmap_readPixels_4_dst">dst</a>
+
+### Example
+
+<div><fiddle-embed name="2260ff6d04708699b6223b4f73fd268e"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_writePixels">writePixels</a> <a href="#SkPixmap_readPixels">SkPixmap::readPixels</a> <a href="#SkCanvas_readPixels">SkCanvas::readPixels</a> <a href="#SkImage_readPixels">SkImage::readPixels</a> <a href="#SkSurface_readPixels">SkSurface::readPixels</a>
+
+---
+
+<a name="SkBitmap_writePixels"></a>
+## writePixels
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool writePixels(const SkPixmap& src, int dstX, int dstY)
+</pre>
+
+Copies a <a href="SkRect_Reference#Rect">Rect</a> of pixels from <a href="#SkBitmap_writePixels_src">src</a>. Copy starts at (<a href="#SkBitmap_writePixels_dstX">dstX</a>, <a href="#SkBitmap_writePixels_dstY">dstY</a>), and does not exceed
+(<a href="#SkBitmap_writePixels_src">src</a>.<a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_writePixels_src">src</a>.<a href="#SkBitmap_height">height</a>).
+
+<a href="#SkBitmap_writePixels_src">src</a> specifies <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>, pixel storage,
+and row bytes of source. <a href="#SkBitmap_writePixels_src">src</a>.<a href="#SkBitmap_rowBytes">rowBytes</a> specifics the gap from one source
+row to the next. Returns true if pixels are copied. Returns false if:
+
+<table> <tr>
+ <td><a href="#SkBitmap_writePixels_src">src</a> pixel storage equals nullptr</td> </tr> <tr>
+ <td><a href="#SkBitmap_writePixels_src">src</a>.<a href="#SkBitmap_rowBytes">rowBytes</a> is less than <a href="#SkImageInfo_minRowBytes">SkImageInfo::minRowBytes</a></td> </tr> <tr>
+ <td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
+</table>
+
+Pixels are copied only if pixel conversion is possible. If this-><a href="#SkBitmap_colorType">colorType</a> is
+<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, or <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkBitmap_writePixels_src">src</a> <a href="undocumented#Color_Type">Color Type</a> must match.
+If this-><a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="#SkBitmap_writePixels_src">src</a> <a href="undocumented#Color_Space">Color Space</a> must match.
+If this-><a href="#SkBitmap_alphaType">alphaType</a> is <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkBitmap_writePixels_src">src</a> <a href="undocumented#Alpha_Type">Alpha Type</a> must
+match. If this-><a href="#SkBitmap_colorSpace">colorSpace</a> is nullptr, <a href="#SkBitmap_writePixels_src">src</a> <a href="undocumented#Color_Space">Color Space</a> must match. Returns
+false if pixel conversion is not possible.
+<a href="#SkBitmap_writePixels_dstX">dstX</a> and <a href="#SkBitmap_writePixels_dstY">dstY</a> may be negative to copy only top or left of source. Returns
+false if <a href="#SkBitmap_width">width</a> or <a href="#SkBitmap_height">height</a> is zero or negative. Returns false ifabs(dstX) >= this-><a href="#SkBitmap_width">width</a>,
+or ifabs(dstY) >= this-><a href="#SkBitmap_height">height</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_writePixels_src"> <code><strong>src </strong></code> </a></td> <td>
+source <a href="SkPixmap_Reference#Pixmap">Pixmap</a>: <a href="#Info">Image Info</a>, pixels, row bytes</td>
+ </tr> <tr> <td><a name="SkBitmap_writePixels_dstX"> <code><strong>dstX </strong></code> </a></td> <td>
+column index whose absolute value is less than <a href="#SkBitmap_width">width</a></td>
+ </tr> <tr> <td><a name="SkBitmap_writePixels_dstY"> <code><strong>dstY </strong></code> </a></td> <td>
+row index whose absolute value is less than <a href="#SkBitmap_height">height</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href="#SkBitmap_writePixels_src">src</a> pixels are copied to <a href="#Bitmap">Bitmap</a>
+
+### Example
+
+<div><fiddle-embed name="9b3133a6673d2514d166398adbe1f9f4"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_readPixels">readPixels</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool writePixels(const SkPixmap& src)
+</pre>
+
+Copies a <a href="SkRect_Reference#Rect">Rect</a> of pixels from <a href="#SkBitmap_writePixels_2_src">src</a>. Copy starts at (0, 0), and does not exceed
+(<a href="#SkBitmap_writePixels_2_src">src</a>.<a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_writePixels_2_src">src</a>.<a href="#SkBitmap_height">height</a>).
+
+<a href="#SkBitmap_writePixels_2_src">src</a> specifies <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>, pixel storage,
+and row bytes of source. <a href="#SkBitmap_writePixels_2_src">src</a>.<a href="#SkBitmap_rowBytes">rowBytes</a> specifics the gap from one source
+row to the next. Returns true if pixels are copied. Returns false if:
+
+<table> <tr>
+ <td><a href="#SkBitmap_writePixels_2_src">src</a> pixel storage equals nullptr</td> </tr> <tr>
+ <td><a href="#SkBitmap_writePixels_2_src">src</a>.<a href="#SkBitmap_rowBytes">rowBytes</a> is less than <a href="#SkImageInfo_minRowBytes">SkImageInfo::minRowBytes</a></td> </tr> <tr>
+ <td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
+</table>
+
+Pixels are copied only if pixel conversion is possible. If this-><a href="#SkBitmap_colorType">colorType</a> is
+<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, or <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkBitmap_writePixels_2_src">src</a> <a href="undocumented#Color_Type">Color Type</a> must match.
+If this-><a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="#SkBitmap_writePixels_2_src">src</a> <a href="undocumented#Color_Space">Color Space</a> must match.
+If this-><a href="#SkBitmap_alphaType">alphaType</a> is <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkBitmap_writePixels_2_src">src</a> <a href="undocumented#Alpha_Type">Alpha Type</a> must
+match. If this-><a href="#SkBitmap_colorSpace">colorSpace</a> is nullptr, <a href="#SkBitmap_writePixels_2_src">src</a> <a href="undocumented#Color_Space">Color Space</a> must match. Returns
+false if pixel conversion is not possible.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_writePixels_2_src"> <code><strong>src </strong></code> </a></td> <td>
+source <a href="SkPixmap_Reference#Pixmap">Pixmap</a>: <a href="#Info">Image Info</a>, pixels, row bytes</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href="#SkBitmap_writePixels_2_src">src</a> pixels are copied to <a href="#Bitmap">Bitmap</a>
+
+### Example
+
+<div><fiddle-embed name="faa5dfa466f6e16c07c124d971f32679"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_readPixels">readPixels</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool writePixels(const SkPixmap& src, int x, int y,
+ SkTransferFunctionBehavior behavior)
+</pre>
+
+Copies a <a href="SkRect_Reference#Rect">Rect</a> of pixels from <a href="#SkBitmap_writePixels_3_src">src</a>. Copy starts at (0, 0), and does not exceed
+(<a href="#SkBitmap_writePixels_3_src">src</a>.<a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_writePixels_3_src">src</a>.<a href="#SkBitmap_height">height</a>).
+
+<a href="#SkBitmap_writePixels_3_src">src</a> specifies <a href="#SkBitmap_width">width</a>, <a href="#SkBitmap_height">height</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>, pixel storage,
+and row bytes of source. <a href="#SkBitmap_writePixels_3_src">src</a>.<a href="#SkBitmap_rowBytes">rowBytes</a> specifics the gap from one source
+row to the next. Returns true if pixels are copied. Returns false if:
+
+<table> <tr>
+ <td><a href="#SkBitmap_writePixels_3_src">src</a> pixel storage equals nullptr</td> </tr> <tr>
+ <td><a href="#SkBitmap_writePixels_3_src">src</a>.<a href="#SkBitmap_rowBytes">rowBytes</a> is less than <a href="#SkImageInfo_minRowBytes">SkImageInfo::minRowBytes</a></td> </tr> <tr>
+ <td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
+</table>
+
+Pixels are copied only if pixel conversion is possible. If this-><a href="#SkBitmap_colorType">colorType</a> is
+<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, or <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkBitmap_writePixels_3_src">src</a> <a href="undocumented#Color_Type">Color Type</a> must match.
+If this-><a href="#SkBitmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="#SkBitmap_writePixels_3_src">src</a> <a href="undocumented#Color_Space">Color Space</a> must match.
+If this-><a href="#SkBitmap_alphaType">alphaType</a> is <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkBitmap_writePixels_3_src">src</a> <a href="undocumented#Alpha_Type">Alpha Type</a> must
+match. If this-><a href="#SkBitmap_colorSpace">colorSpace</a> is nullptr, <a href="#SkBitmap_writePixels_3_src">src</a> <a href="undocumented#Color_Space">Color Space</a> must match. Returns
+false if pixel conversion is not possible. Returns false if <a href="#SkBitmap_width">width</a> or <a href="#SkBitmap_height">height</a>
+is zero or negative.
+
+If <a href="#SkBitmap_writePixels_3_behavior">behavior</a> is <a href="#SkTransferFunctionBehavior_kRespect">SkTransferFunctionBehavior::kRespect</a>: converts <a href="#SkBitmap_writePixels_3_src">src</a>
+pixels to a linear space before converting to <a href="#Info">Image Info</a>.
+If <a href="#SkBitmap_writePixels_3_behavior">behavior</a> is <a href="#SkTransferFunctionBehavior_kIgnore">SkTransferFunctionBehavior::kIgnore</a>: <a href="#SkBitmap_writePixels_3_src">src</a>
+pixels are treated as if they are linear, regardless of how they are encoded.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_writePixels_3_src"> <code><strong>src </strong></code> </a></td> <td>
+source <a href="SkPixmap_Reference#Pixmap">Pixmap</a>: <a href="#Info">Image Info</a>, pixels, row bytes</td>
+ </tr> <tr> <td><a name="SkBitmap_writePixels_3_x"> <code><strong>x </strong></code> </a></td> <td>
+column index whose absolute value is less than <a href="#SkBitmap_width">width</a></td>
+ </tr> <tr> <td><a name="SkBitmap_writePixels_3_y"> <code><strong>y </strong></code> </a></td> <td>
+row index whose absolute value is less than <a href="#SkBitmap_height">height</a></td>
+ </tr> <tr> <td><a name="SkBitmap_writePixels_3_behavior"> <code><strong>behavior </strong></code> </a></td> <td>
+one of: <a href="#SkTransferFunctionBehavior_kRespect">SkTransferFunctionBehavior::kRespect</a>,
+<a href="#SkTransferFunctionBehavior_kIgnore">SkTransferFunctionBehavior::kIgnore</a></td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href="#SkBitmap_writePixels_3_src">src</a> pixels are copied to <a href="#Bitmap">Bitmap</a>
+
+### Example
+
+<div><fiddle-embed name="9f046f407b01b759cb737d702a994620"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_readPixels">readPixels</a>
+
+---
+
+<a name="SkBitmap_hasHardwareMipMap"></a>
+## hasHardwareMipMap
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool hasHardwareMipMap() const
+</pre>
+
+### Return Value
+
+true if <a href="#SkBitmap_setHasHardwareMipMap">setHasHardwareMipMap</a> has been called with true
+
+### See Also
+
+<a href="#SkBitmap_setHasHardwareMipMap">setHasHardwareMipMap</a>
+
+---
+
+<a name="SkBitmap_setHasHardwareMipMap"></a>
+## setHasHardwareMipMap
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void setHasHardwareMipMap(bool hasHardwareMipMap)
+</pre>
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_setHasHardwareMipMap_hasHardwareMipMap"> <code><strong>hasHardwareMipMap </strong></code> </a></td> <td>
+sets state</td>
+ </tr>
+</table>
+
+### See Also
+
+<a href="#SkBitmap_hasHardwareMipMap">hasHardwareMipMap</a>
+
+---
+
+<a name="SkBitmap_extractAlpha"></a>
+## extractAlpha
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool extractAlpha(SkBitmap* dst) const
+</pre>
+
+Sets <a href="#SkBitmap_extractAlpha_dst">dst</a> to <a href="#Alpha">Alpha</a> described by pixels. Returns false if <a href="#SkBitmap_extractAlpha_dst">dst</a> cannot be written to
+or <a href="#SkBitmap_extractAlpha_dst">dst</a> pixels cannot be allocated.
+
+Uses <a href="#SkBitmap_HeapAllocator">HeapAllocator</a> to reserve memory for <a href="#SkBitmap_extractAlpha_dst">dst</a> <a href="undocumented#Pixel_Ref">Pixel Ref</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_extractAlpha_dst"> <code><strong>dst </strong></code> </a></td> <td>
+holds <a href="undocumented#Pixel_Ref">Pixel Ref</a> to fill with alpha layer</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href="#Alpha">Alpha</a> layer was constructed in <a href="#SkBitmap_extractAlpha_dst">dst</a> <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+
+### Example
+
+<div><fiddle-embed name="ab6577df079e6c70511cf2bfc6447b44"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_extractSubset">extractSubset</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool extractAlpha(SkBitmap* dst, const SkPaint* paint, SkIPoint* offset) const
+</pre>
+
+Sets <a href="#SkBitmap_extractAlpha_2_dst">dst</a> to <a href="#Alpha">Alpha</a> described by pixels. Returns false if <a href="#SkBitmap_extractAlpha_2_dst">dst</a> cannot be written to
+or <a href="#SkBitmap_extractAlpha_2_dst">dst</a> pixels cannot be allocated.
+
+If <a href="#SkBitmap_extractAlpha_2_paint">paint</a> is not nullptr and contains <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="#SkMaskFilter_filterMask">SkMaskFilter::filterMask</a>
+generates <a href="undocumented#Mask_Alpha">Mask Alpha</a> from <a href="#Bitmap">Bitmap</a>. Uses <a href="#SkBitmap_HeapAllocator">HeapAllocator</a> to reserve memory for <a href="#SkBitmap_extractAlpha_2_dst">dst</a>
+<a href="undocumented#Pixel_Ref">Pixel Ref</a>. Sets <a href="#SkBitmap_extractAlpha_2_offset">offset</a> to top-left position for <a href="#SkBitmap_extractAlpha_2_dst">dst</a> for alignment with <a href="#Bitmap">Bitmap</a>;
+(0, 0) unless <a href="undocumented#SkMaskFilter">SkMaskFilter</a> generates mask.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_extractAlpha_2_dst"> <code><strong>dst </strong></code> </a></td> <td>
+holds <a href="undocumented#Pixel_Ref">Pixel Ref</a> to fill with alpha layer</td>
+ </tr> <tr> <td><a name="SkBitmap_extractAlpha_2_paint"> <code><strong>paint </strong></code> </a></td> <td>
+holds optional <a href="undocumented#Mask_Filter">Mask Filter</a>; may be nullptr</td>
+ </tr> <tr> <td><a name="SkBitmap_extractAlpha_2_offset"> <code><strong>offset </strong></code> </a></td> <td>
+top-left position for <a href="#SkBitmap_extractAlpha_2_dst">dst</a>; may be nullptr</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href="#Alpha">Alpha</a> layer was constructed in <a href="#SkBitmap_extractAlpha_2_dst">dst</a> <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+
+### Example
+
+<div><fiddle-embed name="e122936b119f20098aace454c2105a12"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_extractSubset">extractSubset</a>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool extractAlpha(SkBitmap* dst, const SkPaint* paint, Allocator* allocator,
+ SkIPoint* offset) const
+</pre>
+
+Sets <a href="#SkBitmap_extractAlpha_3_dst">dst</a> to <a href="#Alpha">Alpha</a> described by pixels. Returns false if <a href="#SkBitmap_extractAlpha_3_dst">dst</a> cannot be written to
+or <a href="#SkBitmap_extractAlpha_3_dst">dst</a> pixels cannot be allocated.
+
+If <a href="#SkBitmap_extractAlpha_3_paint">paint</a> is not nullptr and contains <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="#SkMaskFilter_filterMask">SkMaskFilter::filterMask</a>
+generates <a href="undocumented#Mask_Alpha">Mask Alpha</a> from <a href="#Bitmap">Bitmap</a>. <a href="#SkBitmap_extractAlpha_3_allocator">allocator</a> may reference a custom allocation
+class or be set to nullptr to use <a href="#SkBitmap_HeapAllocator">HeapAllocator</a>. Sets <a href="#SkBitmap_extractAlpha_3_offset">offset</a> to top-left
+position for <a href="#SkBitmap_extractAlpha_3_dst">dst</a> for alignment with <a href="#Bitmap">Bitmap</a>; (0, 0) unless <a href="undocumented#SkMaskFilter">SkMaskFilter</a> generates
+mask.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_extractAlpha_3_dst"> <code><strong>dst </strong></code> </a></td> <td>
+holds <a href="undocumented#Pixel_Ref">Pixel Ref</a> to fill with alpha layer</td>
+ </tr> <tr> <td><a name="SkBitmap_extractAlpha_3_paint"> <code><strong>paint </strong></code> </a></td> <td>
+holds optional <a href="undocumented#Mask_Filter">Mask Filter</a>; may be nullptr</td>
+ </tr> <tr> <td><a name="SkBitmap_extractAlpha_3_allocator"> <code><strong>allocator </strong></code> </a></td> <td>
+method to reserve memory for <a href="undocumented#Pixel_Ref">Pixel Ref</a>; may be nullptr</td>
+ </tr> <tr> <td><a name="SkBitmap_extractAlpha_3_offset"> <code><strong>offset </strong></code> </a></td> <td>
+top-left position for <a href="#SkBitmap_extractAlpha_3_dst">dst</a>; may be nullptr</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href="#Alpha">Alpha</a> layer was constructed in <a href="#SkBitmap_extractAlpha_3_dst">dst</a> <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+
+### Example
+
+<div><fiddle-embed name="3563cb608791d55bb584f38e842f3003"></fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_extractSubset">extractSubset</a>
+
+---
+
+<a name="SkBitmap_peekPixels"></a>
+## peekPixels
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool peekPixels(SkPixmap* pixmap) const
+</pre>
+
+If the pixels are available from this bitmap return true, and fill out the
+specified <a href="#SkBitmap_peekPixels_pixmap">pixmap</a> (if not null). If there are no pixels, return false and
+ignore the <a href="#SkBitmap_peekPixels_pixmap">pixmap</a> parameter.
+Note: if this returns true, the results (in the <a href="#SkBitmap_peekPixels_pixmap">pixmap</a>) are only valid until the bitmap
+is changed in any way, in which case the results are invalid.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_peekPixels_pixmap"> <code><strong>pixmap </strong></code> </a></td> <td>
+storage for pixel state if pixels are readable; otherwise, ignored</td>
+ </tr>
+</table>
+
+### Return Value
+
+true if <a href="#Bitmap">Bitmap</a> has direct access to pixels
+
+### Example
+
+<div><fiddle-embed name="0cc2c6a0dffa61a88711534bd3d43b40">
+
+#### Example Output
+
+~~~~
+------
+--xxx-
+-x--x-
+----x-
+---xx-
+--xx--
+--x---
+------
+--x---
+--x---
+------
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkBitmap_installPixels">installPixels</a> <a href="#SkBitmap_readPixels">readPixels</a> <a href="#SkBitmap_writePixels">writePixels</a>
+
+---
+
+<a name="SkBitmap_toString"></a>
+## toString
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void toString(SkString* str) const;
+</pre>
+
+Creates string representation. The representation is read by
+internal debugging tools. The interface and implementation may be
+suppressed by defining <a href="undocumented#SK_IGNORE_TO_STRING">SK IGNORE TO STRING</a>.
+
+### Parameters
+
+<table> <tr> <td><a name="SkBitmap_toString_str"> <code><strong>str </strong></code> </a></td> <td>
+storage for string representation</td>
+ </tr>
+</table>
+
+### Example
+
+<div><fiddle-embed name="6018d98695245510839a318caabba9c9">
+
+#### Example Output
+
+~~~~
+bitmap dimensions (6, 11)
+~~~~
+
+</fiddle-embed></div>
+
+### See Also
+
+<a href="#SkPaint_toString">SkPaint::toString</a>
+
+---
+
diff --git a/site/user/api/SkCanvas_Reference.md b/site/user/api/SkCanvas_Reference.md
index f07ed00130..1c5d804692 100644
--- a/site/user/api/SkCanvas_Reference.md
+++ b/site/user/api/SkCanvas_Reference.md
@@ -22,7 +22,7 @@ To draw to a document, obtain <a href="#Canvas">Canvas</a> from <a href="#Canvas
<a href="undocumented#Document">Document</a> based <a href="#Canvas">Canvas</a> and other <a href="#Canvas">Canvas</a> <a href="undocumented#Subclasses">Subclasses</a> reference <a href="undocumented#Device">Device</a> describing the
destination.
-<a href="#Canvas">Canvas</a> can be constructed to draw to <a href="undocumented#Bitmap">Bitmap</a> without first creating <a href="undocumented#Raster_Surface">Raster Surface</a>.
+<a href="#Canvas">Canvas</a> can be constructed to draw to <a href="SkBitmap_Reference#Bitmap">Bitmap</a> without first creating <a href="undocumented#Raster_Surface">Raster Surface</a>.
This approach may be deprecated in the future.
# <a name="Overview"></a> Overview
@@ -45,7 +45,7 @@ This approach may be deprecated in the future.
| struct | description |
| --- | --- |
-| <a href="#SkCanvas_Lattice">Lattice</a> | Divides <a href="undocumented#Bitmap">Bitmap</a>, <a href="undocumented#Image">Image</a> into a rectangular grid. |
+| <a href="#SkCanvas_Lattice">Lattice</a> | Divides <a href="SkBitmap_Reference#Bitmap">Bitmap</a>, <a href="undocumented#Image">Image</a> into a rectangular grid. |
| <a href="#SkCanvas_SaveLayerRec">SaveLayerRec</a> | Contains state to create <a href="#Layer">Layer</a>. |
## <a name="Constructors"></a> Constructors
@@ -58,8 +58,8 @@ when no <a href="undocumented#Surface">Surface</a> is required, and some helpers
| <a href="#SkCanvas_empty_constructor">SkCanvas()</a> | No <a href="undocumented#Surface">Surface</a>, no dimensions. |
| <a href="#SkCanvas_int_int_const_SkSurfaceProps_star">SkCanvas(int width, int height, const SkSurfaceProps* props = nullptr)</a> | No <a href="undocumented#Surface">Surface</a>, set dimensions, <a href="#Properties">Surface Properties</a>. |
| <a href="#SkCanvas_copy_SkBaseDevice_star">SkCanvas(SkBaseDevice* device)</a> | Existing <a href="undocumented#Device">Device</a>. (<a href="undocumented#SkBaseDevice">SkBaseDevice</a> is private.) |
-| <a href="#SkCanvas_copy_const_SkBitmap">SkCanvas(const SkBitmap& bitmap)</a> | Uses existing <a href="undocumented#Bitmap">Bitmap</a>. |
-| <a href="#SkCanvas_const_SkBitmap_const_SkSurfaceProps">SkCanvas(const SkBitmap& bitmap, const SkSurfaceProps& props)</a> | Uses existing <a href="undocumented#Bitmap">Bitmap</a> and <a href="#Properties">Surface Properties</a>. |
+| <a href="#SkCanvas_copy_const_SkBitmap">SkCanvas(const SkBitmap& bitmap)</a> | Uses existing <a href="SkBitmap_Reference#Bitmap">Bitmap</a>. |
+| <a href="#SkCanvas_const_SkBitmap_const_SkSurfaceProps">SkCanvas(const SkBitmap& bitmap, const SkSurfaceProps& props)</a> | Uses existing <a href="SkBitmap_Reference#Bitmap">Bitmap</a> and <a href="#Properties">Surface Properties</a>. |
| <a href="#SkCanvas_MakeRasterDirect">MakeRasterDirect</a> | Creates from <a href="undocumented#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a>. |
| <a href="#SkCanvas_MakeRasterDirectN32">MakeRasterDirectN32</a> | Creates from image data and <a href="#Storage">Pixel Storage</a>. |
@@ -72,26 +72,26 @@ when no <a href="undocumented#Surface">Surface</a> is required, and some helpers
| <a href="#SkCanvas_clear">clear</a> | Fills <a href="#Clip">Clip</a> with <a href="undocumented#Color">Color</a>. |
| <a href="#SkCanvas_clipPath">clipPath</a> | Combines <a href="#Clip">Clip</a> with <a href="SkPath_Reference#Path">Path</a>. |
| <a href="#SkCanvas_clipRRect">clipRRect</a> | Combines <a href="#Clip">Clip</a> with <a href="undocumented#Round_Rect">Round Rect</a>. |
-| <a href="#SkCanvas_clipRect">clipRect</a> | Combines <a href="#Clip">Clip</a> with <a href="undocumented#Rect">Rect</a>. |
+| <a href="#SkCanvas_clipRect">clipRect</a> | Combines <a href="#Clip">Clip</a> with <a href="SkRect_Reference#Rect">Rect</a>. |
| <a href="#SkCanvas_clipRegion">clipRegion</a> | Combines <a href="#Clip">Clip</a> with <a href="undocumented#Region">Region</a>. |
| <a href="#SkCanvas_concat">concat</a> | Multiplies <a href="#Matrix">Matrix</a> by <a href="#Matrix">Matrix</a>. |
| <a href="#SkCanvas_discard">discard</a> | Makes <a href="#Canvas">Canvas</a> contents undefined. |
-| <a href="#SkCanvas_drawAnnotation">drawAnnotation</a> | Associates a <a href="undocumented#Rect">Rect</a> with a key-value pair. |
+| <a href="#SkCanvas_drawAnnotation">drawAnnotation</a> | Associates a <a href="SkRect_Reference#Rect">Rect</a> with a key-value pair. |
| <a href="#SkCanvas_drawArc">drawArc</a> | Draws <a href="undocumented#Arc">Arc</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a>. |
| <a href="#SkCanvas_drawAtlas">drawAtlas</a> | Draws sprites using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a>. |
-| <a href="#SkCanvas_drawBitmap">drawBitmap</a> | Draws <a href="undocumented#Bitmap">Bitmap</a> at (x, y) position. |
-| <a href="#SkCanvas_drawBitmapLattice">drawBitmapLattice</a> | Draws proportionally stretched <a href="undocumented#Bitmap">Bitmap</a>. |
-| <a href="#SkCanvas_drawBitmapNine">drawBitmapNine</a> | Draws <a href="undocumented#Nine_Patch">Nine Patch</a> <a href="undocumented#Bitmap">Bitmap</a>. |
-| <a href="#SkCanvas_drawBitmapRect">drawBitmapRect</a> | Draws <a href="undocumented#Bitmap">Bitmap</a>, source <a href="undocumented#Rect">Rect</a> to destination <a href="undocumented#Rect">Rect</a>. |
+| <a href="#SkCanvas_drawBitmap">drawBitmap</a> | Draws <a href="SkBitmap_Reference#Bitmap">Bitmap</a> at (x, y) position. |
+| <a href="#SkCanvas_drawBitmapLattice">drawBitmapLattice</a> | Draws proportionally stretched <a href="SkBitmap_Reference#Bitmap">Bitmap</a>. |
+| <a href="#SkCanvas_drawBitmapNine">drawBitmapNine</a> | Draws <a href="undocumented#Nine_Patch">Nine Patch</a> <a href="SkBitmap_Reference#Bitmap">Bitmap</a>. |
+| <a href="#SkCanvas_drawBitmapRect">drawBitmapRect</a> | Draws <a href="SkBitmap_Reference#Bitmap">Bitmap</a>, source <a href="SkRect_Reference#Rect">Rect</a> to destination <a href="SkRect_Reference#Rect">Rect</a>. |
| <a href="#SkCanvas_drawCircle">drawCircle</a> | Draws <a href="undocumented#Circle">Circle</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a>. |
| <a href="#SkCanvas_drawColor">drawColor</a> | Fills <a href="#Clip">Clip</a> with <a href="undocumented#Color">Color</a> and <a href="undocumented#Blend_Mode">Blend Mode</a>. |
| <a href="#SkCanvas_drawDRRect">drawDRRect</a> | Draws double <a href="undocumented#Round_Rect">Round Rect</a> stroked or filled. |
| <a href="#SkCanvas_drawDrawable">drawDrawable</a> | Draws <a href="undocumented#Drawable">Drawable</a>, encapsulated drawing commands. |
-| <a href="#SkCanvas_drawIRect">drawIRect</a> | Draws <a href="undocumented#IRect">IRect</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a>. |
+| <a href="#SkCanvas_drawIRect">drawIRect</a> | Draws <a href="SkIRect_Reference#IRect">IRect</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a>. |
| <a href="#SkCanvas_drawImage">drawImage</a> | Draws <a href="undocumented#Image">Image</a> at (x, y) position. |
| <a href="#SkCanvas_drawImageLattice">drawImageLattice</a> | Draws proportionally stretched <a href="undocumented#Image">Image</a>. |
| <a href="#SkCanvas_drawImageNine">drawImageNine</a> | Draws <a href="undocumented#Nine_Patch">Nine Patch</a> <a href="undocumented#Image">Image</a>. |
-| <a href="#SkCanvas_drawImageRect">drawImageRect</a> | Draws <a href="undocumented#Image">Image</a>, source <a href="undocumented#Rect">Rect</a> to destination <a href="undocumented#Rect">Rect</a>. |
+| <a href="#SkCanvas_drawImageRect">drawImageRect</a> | Draws <a href="undocumented#Image">Image</a>, source <a href="SkRect_Reference#Rect">Rect</a> to destination <a href="SkRect_Reference#Rect">Rect</a>. |
| <a href="#SkCanvas_drawLine">drawLine</a> | Draws line segment between two points. |
| <a href="#SkCanvas_drawOval">drawOval</a> | Draws <a href="undocumented#Oval">Oval</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a>. |
| <a href="#SkCanvas_drawPaint">drawPaint</a> | Fills <a href="#Clip">Clip</a> with <a href="SkPaint_Reference#Paint">Paint</a>. |
@@ -103,7 +103,7 @@ when no <a href="undocumented#Surface">Surface</a> is required, and some helpers
| <a href="#SkCanvas_drawPosText">drawPosText</a> | Draws text at array of (x, y) positions. |
| <a href="#SkCanvas_drawPosTextH">drawPosTextH</a> | Draws text at x positions with common baseline. |
| <a href="#SkCanvas_drawRRect">drawRRect</a> | Draws <a href="undocumented#Round_Rect">Round Rect</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a>. |
-| <a href="#SkCanvas_drawRect">drawRect</a> | Draws <a href="undocumented#Rect">Rect</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a>. |
+| <a href="#SkCanvas_drawRect">drawRect</a> | Draws <a href="SkRect_Reference#Rect">Rect</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a>. |
| <a href="#SkCanvas_drawRegion">drawRegion</a> | 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>. |
| <a href="#SkCanvas_drawRoundRect">drawRoundRect</a> | Draws <a href="undocumented#Round_Rect">Round Rect</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a>. |
| <a href="#SkCanvas_drawText">drawText</a> | Draws text at (x, y), using font advance. |
@@ -115,7 +115,7 @@ when no <a href="undocumented#Surface">Surface</a> is required, and some helpers
| <a href="#SkCanvas_drawVertices">drawVertices</a> | Draws <a href="undocumented#Vertices">Vertices</a>, a triangle mesh. |
| <a href="#SkCanvas_flush">flush</a> | Triggers execution of all pending draw operations. |
| <a href="#SkCanvas_getBaseLayerSize">getBaseLayerSize</a> | Gets size of base <a href="#Layer">Layer</a> in global coordinates. |
-| <a href="#SkCanvas_getDeviceClipBounds">getDeviceClipBounds</a> | Returns <a href="undocumented#IRect">IRect</a> bounds of <a href="#Clip">Clip</a>. |
+| <a href="#SkCanvas_getDeviceClipBounds">getDeviceClipBounds</a> | Returns <a href="SkIRect_Reference#IRect">IRect</a> bounds of <a href="#Clip">Clip</a>. |
| <a href="#SkCanvas_getDrawFilter">getDrawFilter</a> | Legacy; to be deprecated. |
| <a href="#SkCanvas_getGrContext">getGrContext</a> | Returns <a href="undocumented#GPU_Context">GPU Context</a> of the <a href="undocumented#GPU_Surface">GPU Surface</a>. |
| <a href="#SkCanvas_getLocalClipBounds">getLocalClipBounds</a> | Returns <a href="#Clip">Clip</a> bounds in source coordinates. |
@@ -125,12 +125,12 @@ when no <a href="undocumented#Surface">Surface</a> is required, and some helpers
| <a href="#SkCanvas_getTotalMatrix">getTotalMatrix</a> | Returns <a href="#Matrix">Matrix</a>. |
| <a href="#SkCanvas_imageInfo">imageInfo</a> | Returns <a href="#Info">Image Info</a> for <a href="#Canvas">Canvas</a>. |
| <a href="#SkCanvas_isClipEmpty">isClipEmpty</a> | Returns if <a href="#Clip">Clip</a> is empty. |
-| <a href="#SkCanvas_isClipRect">isClipRect</a> | Returns if <a href="#Clip">Clip</a> is <a href="undocumented#Rect">Rect</a> and not empty. |
+| <a href="#SkCanvas_isClipRect">isClipRect</a> | Returns if <a href="#Clip">Clip</a> is <a href="SkRect_Reference#Rect">Rect</a> and not empty. |
| <a href="#SkCanvas_MakeRasterDirect">MakeRasterDirect</a> | Creates <a href="#Canvas">Canvas</a> from <a href="undocumented#SkImageInfo">SkImageInfo</a> and pixel data. |
| <a href="#SkCanvas_MakeRasterDirectN32">MakeRasterDirectN32</a> | Creates <a href="#Canvas">Canvas</a> from image specifications and pixel data. |
| <a href="#SkCanvas_makeSurface">makeSurface</a> | Creates <a href="undocumented#Surface">Surface</a> matching <a href="undocumented#SkImageInfo">SkImageInfo</a> and <a href="undocumented#SkSurfaceProps">SkSurfaceProps</a>. |
| <a href="#SkCanvas_peekPixels">peekPixels</a> | Returns if <a href="#Canvas">Canvas</a> has direct access to its pixels. |
-| <a href="#SkCanvas_quickReject">quickReject</a> | Returns if <a href="undocumented#Rect">Rect</a> is outside <a href="#Clip">Clip</a>. |
+| <a href="#SkCanvas_quickReject">quickReject</a> | Returns if <a href="SkRect_Reference#Rect">Rect</a> is outside <a href="#Clip">Clip</a>. |
| <a href="#SkCanvas_readPixels">readPixels</a> | Copies and converts rectangle of pixels from <a href="#Canvas">Canvas</a>. |
| <a href="#SkCanvas_resetMatrix">resetMatrix</a> | Resets <a href="#Matrix">Matrix</a> to identity. |
| <a href="#SkCanvas_restore">restore</a> | Restores changes to <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a>, pops <a href="#SkCanvas_save">save</a> stack. |
@@ -151,7 +151,7 @@ when no <a href="undocumented#Surface">Surface</a> is required, and some helpers
## MakeRasterDirect
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-static std::unique_ptr<SkCanvas> MakeRasterDirect(const SkImageInfo& info,
+static std::unique_ptr&lt;SkCanvas&gt; MakeRasterDirect(const SkImageInfo& info,
void* pixels, size_t rowBytes)
</pre>
@@ -212,7 +212,7 @@ in the center.</div>
## MakeRasterDirectN32
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-static std::unique_ptr<SkCanvas> MakeRasterDirectN32(int width, int height,
+static std::unique_ptr&lt;SkCanvas&gt; MakeRasterDirectN32(int width, int height,
SkPMColor* pixels,
size_t rowBytes)
</pre>
@@ -240,7 +240,7 @@ If <a href="#SkCanvas_MakeRasterDirectN32_rowBytes">rowBytes</a> is greater than
<table> <tr> <td><a name="SkCanvas_MakeRasterDirectN32_width"> <code><strong>width </strong></code> </a></td> <td>
pixel column count on <a href="undocumented#Raster_Surface">Raster Surface</a> created; must be zero or greater</td>
</tr> <tr> <td><a name="SkCanvas_MakeRasterDirectN32_height"> <code><strong>height </strong></code> </a></td> <td>
-pixel row count on <a href="undocumented#Raster_Surface">Raster Surface</a> created.; must be zero or greater</td>
+pixel row count on <a href="undocumented#Raster_Surface">Raster Surface</a> created; must be zero or greater</td>
</tr> <tr> <td><a name="SkCanvas_MakeRasterDirectN32_pixels"> <code><strong>pixels </strong></code> </a></td> <td>
pointer to destination <a href="#SkCanvas_MakeRasterDirectN32_pixels">pixels</a> buffer; buffer size should be <a href="#SkCanvas_MakeRasterDirectN32_height">height</a>
times <a href="#SkCanvas_MakeRasterDirectN32_rowBytes">rowBytes</a></td>
@@ -255,7 +255,7 @@ interval from one <a href="undocumented#Surface">Surface</a> row to the next, or
### Example
-<div><fiddle-embed name="93010950fe3540f7427d8ff82dc5562a"><div>Allocates a three by three bitmap, clears it to white, and draws a black pixel
+<div><fiddle-embed name="a9b116a7ebd1708237ce81ef532e9cb4"><div>Allocates a three by three bitmap, clears it to white, and draws a black pixel
in the center.</div>
#### Example Output
@@ -387,7 +387,7 @@ explicit SkCanvas(const SkBitmap& bitmap)
Construct a canvas that draws into <a href="#SkCanvas_copy_const_SkBitmap_bitmap">bitmap</a>.
Sets <a href="#SkSurfaceProps_kLegacyFontHost_InitType">SkSurfaceProps::kLegacyFontHost InitType</a> in constructed <a href="undocumented#Surface">Surface</a>.
-<a href="undocumented#Bitmap">Bitmap</a> is copied so that subsequently editing <a href="#SkCanvas_copy_const_SkBitmap_bitmap">bitmap</a> will not affect
+<a href="SkBitmap_Reference#Bitmap">Bitmap</a> is copied so that subsequently editing <a href="#SkCanvas_copy_const_SkBitmap_bitmap">bitmap</a> will not affect
constructed <a href="#Canvas">Canvas</a>.
May be deprecated in the future.
@@ -406,7 +406,7 @@ storage of <a href="undocumented#Raster_Surface">Raster Surface</a></td>
### Example
-<div><fiddle-embed name="93082df2fb33ca62202dc047532b3861"><div>The actual output depends on the installed fonts.</div>
+<div><fiddle-embed name="dd92db963af190e849894038f39b598a"><div>The actual output depends on the installed fonts.</div>
#### Example Output
@@ -496,7 +496,7 @@ device independent fonts</td>
### Example
-<div><fiddle-embed name="216c9cd6ec6a8fa48135d792a7003572"><div>The actual output depends on the installed fonts.</div>
+<div><fiddle-embed name="c26cfae4c42cb445240335cc12a50235"><div>The actual output depends on the installed fonts.</div>
#### Example Output
@@ -686,7 +686,7 @@ size=20,30
## makeSurface
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-sk_sp<SkSurface> makeSurface(const SkImageInfo& info,
+sk_sp&lt;SkSurface&gt; makeSurface(const SkImageInfo& info,
const SkSurfaceProps* props = nullptr)
</pre>
@@ -765,7 +765,7 @@ storage for writable pixels' <a href="#Info">Image Info</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_accessTopLayerPixels_rowBytes"> <code><strong>rowBytes </strong></code> </a></td> <td>
storage for writable pixels' row bytes; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_accessTopLayerPixels_origin"> <code><strong>origin </strong></code> </a></td> <td>
-storage for <a href="#Canvas">Canvas</a> top <a href="#Layer">Layer</a> <a href="#SkCanvas_accessTopLayerPixels_origin">origin</a>, its top left corner;
+storage for <a href="#Canvas">Canvas</a> top <a href="#Layer">Layer</a> <a href="#SkCanvas_accessTopLayerPixels_origin">origin</a>, its top-left corner;
may be nullptr</td>
</tr>
</table>
@@ -799,7 +799,7 @@ SkRasterHandleAllocator::Handle accessTopRasterHandle() const
Returns custom context that tracks the <a href="#Matrix">Matrix</a> and <a href="#Clip">Clip</a>.
Use <a href="undocumented#Raster_Handle_Allocator">Raster Handle Allocator</a> to blend <a href="undocumented#Skia">Skia</a> drawing with custom drawing, typically performed
-by the host platform's user interface. The custom context returned is generated by
+by the host platform user interface. The custom context returned is generated by
<a href="#SkRasterHandleAllocator_MakeCanvas">SkRasterHandleAllocator::MakeCanvas</a>, which creates a custom canvas with raster storage for
the drawing destination.
@@ -845,8 +845,7 @@ like <a href="undocumented#SkDumpCanvas">SkDumpCanvas</a>.
### Parameters
<table> <tr> <td><a name="SkCanvas_peekPixels_pixmap"> <code><strong>pixmap </strong></code> </a></td> <td>
-storage for <a href="#Canvas">Canvas</a> pixel state if <a href="#Canvas">Canvas</a> pixels are readable;
-otherwise, ignored</td>
+storage for pixel state if pixels are readable; otherwise, ignored</td>
</tr>
</table>
@@ -1040,9 +1039,9 @@ class like <a href="undocumented#SkDumpCanvas">SkDumpCanvas</a>.
Caller must allocate pixel storage in <a href="#SkCanvas_readPixels_3_bitmap">bitmap</a> if needed.
-<a href="undocumented#Bitmap">Bitmap</a> values are converted only if <a href="#Color_Type">Image Color Type</a> and <a href="#Alpha_Type">Image Alpha Type</a>
+<a href="SkBitmap_Reference#Bitmap">Bitmap</a> values are converted only if <a href="#Color_Type">Image Color Type</a> and <a href="#Alpha_Type">Image Alpha Type</a>
do not match. Only pixels within both source and destination rectangles
-are copied. <a href="undocumented#Bitmap">Bitmap</a> pixels outside the rectangle intersection are unchanged.
+are copied. <a href="SkBitmap_Reference#Bitmap">Bitmap</a> pixels outside the rectangle intersection are unchanged.
Pass negative values for <a href="#SkCanvas_readPixels_3_srcX">srcX</a> or <a href="#SkCanvas_readPixels_3_srcY">srcY</a> to offset pixels across or down <a href="#SkCanvas_readPixels_3_bitmap">bitmap</a>.
@@ -1366,14 +1365,14 @@ depth = 1
---
# <a name="Layer"></a> Layer
-<a href="#Layer">Layer</a> allocates a temporary <a href="undocumented#Bitmap">Bitmap</a> to draw into. When the drawing is
-complete, the <a href="undocumented#Bitmap">Bitmap</a> is drawn into the <a href="#Canvas">Canvas</a>.
+<a href="#Layer">Layer</a> allocates a temporary <a href="SkBitmap_Reference#Bitmap">Bitmap</a> to draw into. When the drawing is
+complete, the <a href="SkBitmap_Reference#Bitmap">Bitmap</a> is drawn into the <a href="#Canvas">Canvas</a>.
<a href="#Layer">Layer</a> is saved in a stack along with other saved state. When state with a <a href="#Layer">Layer</a>
-is restored, the <a href="undocumented#Bitmap">Bitmap</a> is drawn into the previous <a href="#Layer">Layer</a>.
+is restored, the <a href="SkBitmap_Reference#Bitmap">Bitmap</a> is drawn into the previous <a href="#Layer">Layer</a>.
<a href="#Layer">Layer</a> may be initialized with the contents of the previous <a href="#Layer">Layer</a>. When <a href="#Layer">Layer</a> is
-restored, its <a href="undocumented#Bitmap">Bitmap</a> can be modified by <a href="SkPaint_Reference#Paint">Paint</a> passed to <a href="#Layer">Layer</a> to apply
+restored, its <a href="SkBitmap_Reference#Bitmap">Bitmap</a> can be modified by <a href="SkPaint_Reference#Paint">Paint</a> passed to <a href="#Layer">Layer</a> to apply
<a href="#Alpha">Color Alpha</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Blend_Mode">Blend Mode</a>.
<a name="SkCanvas_saveLayer"></a>
@@ -1384,15 +1383,15 @@ int saveLayer(const SkRect* bounds, const SkPaint* paint)
</pre>
Saves <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a> (<a href="undocumented#Draw_Filter">Draw Filter</a> deprecated on most platforms),
-and allocates a <a href="undocumented#Bitmap">Bitmap</a> for subsequent drawing.
+and allocates a <a href="SkBitmap_Reference#Bitmap">Bitmap</a> for subsequent drawing.
Calling <a href="#SkCanvas_restore">restore</a> discards changes to <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a>,
-and draws the <a href="undocumented#Bitmap">Bitmap</a>.
+and draws the <a href="SkBitmap_Reference#Bitmap">Bitmap</a>.
<a href="#Matrix">Matrix</a> may be changed by <a href="#SkCanvas_translate">translate</a>, <a href="#SkCanvas_scale">scale</a>, <a href="#SkCanvas_rotate">rotate</a>, <a href="#SkCanvas_skew">skew</a>, <a href="#SkCanvas_concat">concat</a>,
<a href="#SkCanvas_setMatrix">setMatrix</a>, and <a href="#SkCanvas_resetMatrix">resetMatrix</a>. <a href="#Clip">Clip</a> may be changed by <a href="#SkCanvas_clipRect">clipRect</a>, <a href="#SkCanvas_clipRRect">clipRRect</a>,
<a href="#SkCanvas_clipPath">clipPath</a>, <a href="#SkCanvas_clipRegion">clipRegion</a>.
-<a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_saveLayer_bounds">bounds</a> suggests but does not define the <a href="undocumented#Bitmap">Bitmap</a> size. To clip drawing to
+<a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_saveLayer_bounds">bounds</a> suggests but does not define the <a href="SkBitmap_Reference#Bitmap">Bitmap</a> size. To clip drawing to
a specific rectangle, use <a href="#SkCanvas_clipRect">clipRect</a>.
Optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_saveLayer_paint">paint</a> applies <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and
@@ -1425,15 +1424,15 @@ int saveLayer(const SkRect& bounds, const SkPaint* paint)
</pre>
Saves <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a> (<a href="undocumented#Draw_Filter">Draw Filter</a> deprecated on most platforms),
-and allocates a <a href="undocumented#Bitmap">Bitmap</a> for subsequent drawing.
+and allocates a <a href="SkBitmap_Reference#Bitmap">Bitmap</a> for subsequent drawing.
Calling <a href="#SkCanvas_restore">restore</a> discards changes to <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a>,
-and draws the <a href="undocumented#Bitmap">Bitmap</a>.
+and draws the <a href="SkBitmap_Reference#Bitmap">Bitmap</a>.
<a href="#Matrix">Matrix</a> may be changed by <a href="#SkCanvas_translate">translate</a>, <a href="#SkCanvas_scale">scale</a>, <a href="#SkCanvas_rotate">rotate</a>, <a href="#SkCanvas_skew">skew</a>, <a href="#SkCanvas_concat">concat</a>,
<a href="#SkCanvas_setMatrix">setMatrix</a>, and <a href="#SkCanvas_resetMatrix">resetMatrix</a>. <a href="#Clip">Clip</a> may be changed by <a href="#SkCanvas_clipRect">clipRect</a>, <a href="#SkCanvas_clipRRect">clipRRect</a>,
<a href="#SkCanvas_clipPath">clipPath</a>, <a href="#SkCanvas_clipRegion">clipRegion</a>.
-<a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_saveLayer_2_bounds">bounds</a> suggests but does not define the <a href="#Layer">Layer</a> size. To clip drawing to
+<a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_saveLayer_2_bounds">bounds</a> suggests but does not define the <a href="#Layer">Layer</a> size. To clip drawing to
a specific rectangle, use <a href="#SkCanvas_clipRect">clipRect</a>.
Optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_saveLayer_2_paint">paint</a> applies <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and
@@ -1470,7 +1469,7 @@ int saveLayerPreserveLCDTextRequests(const SkRect* bounds, const SkPaint* paint)
</pre>
Saves <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a> (<a href="undocumented#Draw_Filter">Draw Filter</a> deprecated on most platforms),
-and allocates a <a href="undocumented#Bitmap">Bitmap</a> for subsequent drawing.
+and allocates a <a href="SkBitmap_Reference#Bitmap">Bitmap</a> for subsequent drawing.
<a href="SkPaint_Reference#LCD_Text">LCD Text</a> is preserved when the <a href="#Layer">Layer</a> is drawn to the prior <a href="#Layer">Layer</a>.
Calling <a href="#SkCanvas_restore">restore</a> discards changes to <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a>,
@@ -1479,7 +1478,7 @@ and draws <a href="#Layer">Layer</a>.
<a href="#Matrix">Matrix</a> may be changed by <a href="#SkCanvas_translate">translate</a>, <a href="#SkCanvas_scale">scale</a>, <a href="#SkCanvas_rotate">rotate</a>, <a href="#SkCanvas_skew">skew</a>, <a href="#SkCanvas_concat">concat</a>,
<a href="#SkCanvas_setMatrix">setMatrix</a>, and <a href="#SkCanvas_resetMatrix">resetMatrix</a>. <a href="#Clip">Clip</a> may be changed by <a href="#SkCanvas_clipRect">clipRect</a>, <a href="#SkCanvas_clipRRect">clipRRect</a>,
<a href="#SkCanvas_clipPath">clipPath</a>, <a href="#SkCanvas_clipRegion">clipRegion</a>.
-<a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_saveLayerPreserveLCDTextRequests_bounds">bounds</a> suggests but does not define the <a href="#Layer">Layer</a> size. To clip drawing to
+<a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_saveLayerPreserveLCDTextRequests_bounds">bounds</a> suggests but does not define the <a href="#Layer">Layer</a> size. To clip drawing to
a specific rectangle, use <a href="#SkCanvas_clipRect">clipRect</a>.
Optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_saveLayerPreserveLCDTextRequests_paint">paint</a> applies <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and
@@ -1518,7 +1517,7 @@ int saveLayerAlpha(const SkRect* bounds, U8CPU alpha)
</pre>
Saves <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a> (<a href="undocumented#Draw_Filter">Draw Filter</a> deprecated on most platforms),
-and allocates <a href="undocumented#Bitmap">Bitmap</a> for subsequent drawing.
+and allocates <a href="SkBitmap_Reference#Bitmap">Bitmap</a> for subsequent drawing.
Calling <a href="#SkCanvas_restore">restore</a> discards changes to <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a>,
and blends <a href="#Layer">Layer</a> with <a href="#SkCanvas_saveLayerAlpha_alpha">alpha</a> opacity onto prior <a href="#Layer">Layer</a>.
@@ -1527,7 +1526,7 @@ and blends <a href="#Layer">Layer</a> with <a href="#SkCanvas_saveLayerAlpha_alp
<a href="#SkCanvas_setMatrix">setMatrix</a>, and <a href="#SkCanvas_resetMatrix">resetMatrix</a>. <a href="#Clip">Clip</a> may be changed by <a href="#SkCanvas_clipRect">clipRect</a>, <a href="#SkCanvas_clipRRect">clipRRect</a>,
<a href="#SkCanvas_clipPath">clipPath</a>, <a href="#SkCanvas_clipRegion">clipRegion</a>.
-<a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_saveLayerAlpha_bounds">bounds</a> suggests but does not define <a href="#Layer">Layer</a> size. To clip drawing to
+<a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_saveLayerAlpha_bounds">bounds</a> suggests but does not define <a href="#Layer">Layer</a> size. To clip drawing to
a specific rectangle, use <a href="#SkCanvas_clipRect">clipRect</a>.
<a href="#SkCanvas_saveLayerAlpha_alpha">alpha</a> of zero is fully transparent, 255 is fully opaque.
@@ -1601,7 +1600,7 @@ scalePaint blends <a href="#Layer">Layer</a> back with transparency.</div></fidd
struct <a href="#SkCanvas_SaveLayerRec_SaveLayerRec">SaveLayerRec</a> {
<a href="#SkCanvas_SaveLayerRec_SaveLayerRec">SaveLayerRec</a>*(...
-const <a href="undocumented#SkRect">SkRect</a>* <a href="#SkCanvas_SaveLayerRec_fBounds">fBounds</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>;
const <a href="undocumented#SkImageFilter">SkImageFilter</a>* <a href="#SkCanvas_SaveLayerRec_fBackdrop">fBackdrop</a>;
<a href="undocumented#SaveLayerFlags">SaveLayerFlags</a> <a href="#SkCanvas_SaveLayerRec_fSaveLayerFlags">fSaveLayerFlags</a>;
@@ -1795,10 +1794,10 @@ int saveLayer(const SaveLayerRec& layerRec)
</pre>
Saves <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a> (<a href="undocumented#Draw_Filter">Draw Filter</a> deprecated on most platforms),
-and allocates <a href="undocumented#Bitmap">Bitmap</a> for subsequent drawing.
+and allocates <a href="SkBitmap_Reference#Bitmap">Bitmap</a> for subsequent drawing.
Calling <a href="#SkCanvas_restore">restore</a> discards changes to <a href="#Matrix">Matrix</a>, <a href="#Clip">Clip</a>, and <a href="undocumented#Draw_Filter">Draw Filter</a>,
-and blends <a href="undocumented#Bitmap">Bitmap</a> with <a href="#Alpha">Color Alpha</a> opacity onto the prior <a href="#Layer">Layer</a>.
+and blends <a href="SkBitmap_Reference#Bitmap">Bitmap</a> with <a href="#Alpha">Color Alpha</a> opacity onto the prior <a href="#Layer">Layer</a>.
<a href="#Matrix">Matrix</a> may be changed by <a href="#SkCanvas_translate">translate</a>, <a href="#SkCanvas_scale">scale</a>, <a href="#SkCanvas_rotate">rotate</a>, <a href="#SkCanvas_skew">skew</a>, <a href="#SkCanvas_concat">concat</a>,
<a href="#SkCanvas_setMatrix">setMatrix</a>, and <a href="#SkCanvas_resetMatrix">resetMatrix</a>. <a href="#Clip">Clip</a> may be changed by <a href="#SkCanvas_clipRect">clipRect</a>, <a href="#SkCanvas_clipRRect">clipRRect</a>,
@@ -2105,7 +2104,7 @@ If clipping <a href="SkPath_Reference#Path">Path</a> has <a href="SkPaint_Refere
that drawing blend partially with the destination along the edge. A rotated
rectangular <a href="undocumented#Anti_alias">Anti-aliased</a> clip looks smoother but draws slower.
-<a href="#Clip">Clip</a> can combine with <a href="undocumented#Rect">Rect</a> and <a href="undocumented#Round_Rect">Round Rect</a> primitives; like
+<a href="#Clip">Clip</a> can combine with <a href="SkRect_Reference#Rect">Rect</a> and <a href="undocumented#Round_Rect">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
@@ -2132,7 +2131,7 @@ before it is combined with <a href="#Clip">Clip</a>.
### Parameters
<table> <tr> <td><a name="SkCanvas_clipRect_rect"> <code><strong>rect </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> to combine with <a href="#Clip">Clip</a></td>
+<a href="SkRect_Reference#Rect">Rect</a> to combine with <a href="#Clip">Clip</a></td>
</tr> <tr> <td><a name="SkCanvas_clipRect_op"> <code><strong>op </strong></code> </a></td> <td>
<a href="#Op">Clip Op</a> to apply to <a href="#Clip">Clip</a></td>
</tr> <tr> <td><a name="SkCanvas_clipRect_doAntiAlias"> <code><strong>doAntiAlias </strong></code> </a></td> <td>
@@ -2157,7 +2156,7 @@ Resulting <a href="#Clip">Clip</a> is <a href="#Alias">Aliased</a>; pixels are f
### Parameters
<table> <tr> <td><a name="SkCanvas_clipRect_2_rect"> <code><strong>rect </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> to combine with <a href="#Clip">Clip</a></td>
+<a href="SkRect_Reference#Rect">Rect</a> to combine with <a href="#Clip">Clip</a></td>
</tr> <tr> <td><a name="SkCanvas_clipRect_2_op"> <code><strong>op </strong></code> </a></td> <td>
<a href="#Op">Clip Op</a> to apply to <a href="#Clip">Clip</a></td>
</tr>
@@ -2181,7 +2180,7 @@ before it is combined with <a href="#Clip">Clip</a>.
### Parameters
<table> <tr> <td><a name="SkCanvas_clipRect_3_rect"> <code><strong>rect </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> to combine with <a href="#Clip">Clip</a></td>
+<a href="SkRect_Reference#Rect">Rect</a> to combine with <a href="#Clip">Clip</a></td>
</tr> <tr> <td><a name="SkCanvas_clipRect_3_doAntiAlias"> <code><strong>doAntiAlias </strong></code> </a></td> <td>
true if <a href="#Clip">Clip</a> is to be <a href="undocumented#Anti_alias">Anti-aliased</a></td>
</tr>
@@ -2352,7 +2351,7 @@ before it is combined with <a href="#Clip">Clip</a>.
### Example
-<div><fiddle-embed name="7856755c1bf8431c286c734b353345ad"><div>Overlapping <a href="#Rect">Rects</a> form a clip. When clip's <a href="#Fill_Type">Path Fill Type</a> is set to
+<div><fiddle-embed name="7856755c1bf8431c286c734b353345ad"><div>Overlapping <a href="#Rect">Rects</a> form a clip. When clip <a href="#Fill_Type">Path Fill Type</a> is set to
<a href="#SkPath_kWinding_FillType">SkPath::kWinding FillType</a>, the overlap is included. Set to
<a href="#SkPath_kEvenOdd_FillType">SkPath::kEvenOdd FillType</a>, the overlap is excluded and forms a hole.</div></fiddle-embed></div>
@@ -2380,7 +2379,7 @@ true if <a href="#Clip">Clip</a> is to be <a href="undocumented#Anti_alias">Anti
### Example
-<div><fiddle-embed name="187a7ae77a8176e417181411988534b6"><div><a href="#Clip">Clip</a> loops over itself covering its center twice. When clip's <a href="#Fill_Type">Path Fill Type</a>
+<div><fiddle-embed name="187a7ae77a8176e417181411988534b6"><div><a href="#Clip">Clip</a> loops over itself covering its center twice. When clip <a href="#Fill_Type">Path Fill Type</a>
is set to <a href="#SkPath_kWinding_FillType">SkPath::kWinding FillType</a>, the overlap is included. Set to
<a href="#SkPath_kEvenOdd_FillType">SkPath::kEvenOdd FillType</a>, the overlap is excluded and forms a hole.</div></fiddle-embed></div>
@@ -2432,7 +2431,7 @@ aligns to pixel boundaries.</div></fiddle-embed></div>
bool quickReject(const SkRect& rect) const
</pre>
-Return true if <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_quickReject_rect">rect</a>, transformed by <a href="#Matrix">Matrix</a>, can be quickly determined to be
+Return true if <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_quickReject_rect">rect</a>, transformed by <a href="#Matrix">Matrix</a>, can be quickly determined to be
outside of <a href="#Clip">Clip</a>. May return false even though <a href="#SkCanvas_quickReject_rect">rect</a> is outside of <a href="#Clip">Clip</a>.
Use to check if an area to be drawn is clipped out, to skip subsequent draw calls.
@@ -2440,7 +2439,7 @@ Use to check if an area to be drawn is clipped out, to skip subsequent draw call
### Parameters
<table> <tr> <td><a name="SkCanvas_quickReject_rect"> <code><strong>rect </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> to compare with <a href="#Clip">Clip</a></td>
+<a href="SkRect_Reference#Rect">Rect</a> to compare with <a href="#Clip">Clip</a></td>
</tr>
</table>
@@ -2506,9 +2505,9 @@ SkRect getLocalClipBounds() const
</pre>
Return bounds of <a href="#Clip">Clip</a>, transformed by inverse of <a href="#Matrix">Matrix</a>. If <a href="#Clip">Clip</a> is empty,
-return <a href="#SkRect_MakeEmpty">SkRect::MakeEmpty</a>, where all <a href="undocumented#Rect">Rect</a> sides equal zero.
+return <a href="#SkRect_MakeEmpty">SkRect::MakeEmpty</a>, where all <a href="SkRect_Reference#Rect">Rect</a> sides equal zero.
-<a href="undocumented#Rect">Rect</a> returned is outset by one to account for partial pixel coverage if <a href="#Clip">Clip</a>
+<a href="SkRect_Reference#Rect">Rect</a> returned is outset by one to account for partial pixel coverage if <a href="#Clip">Clip</a>
is <a href="undocumented#Anti_alias">Anti-aliased</a>.
### Return Value
@@ -2538,7 +2537,7 @@ bool getLocalClipBounds(SkRect* bounds) const
</pre>
Return <a href="#SkCanvas_getLocalClipBounds_2_bounds">bounds</a> of <a href="#Clip">Clip</a>, transformed by inverse of <a href="#Matrix">Matrix</a>. If <a href="#Clip">Clip</a> is empty,
-return false, and set <a href="#SkCanvas_getLocalClipBounds_2_bounds">bounds</a> to <a href="#SkRect_MakeEmpty">SkRect::MakeEmpty</a>, where all <a href="undocumented#Rect">Rect</a> sides equal zero.
+return false, and set <a href="#SkCanvas_getLocalClipBounds_2_bounds">bounds</a> to <a href="#SkRect_MakeEmpty">SkRect::MakeEmpty</a>, where all <a href="SkRect_Reference#Rect">Rect</a> sides equal zero.
<a href="#SkCanvas_getLocalClipBounds_2_bounds">bounds</a> is outset by one to account for partial pixel coverage if <a href="#Clip">Clip</a>
is <a href="undocumented#Anti_alias">Anti-aliased</a>.
@@ -2546,7 +2545,7 @@ is <a href="undocumented#Anti_alias">Anti-aliased</a>.
### Parameters
<table> <tr> <td><a name="SkCanvas_getLocalClipBounds_2_bounds"> <code><strong>bounds </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> of <a href="#Clip">Clip</a> in local coordinates</td>
+<a href="SkRect_Reference#Rect">Rect</a> of <a href="#Clip">Clip</a> in local coordinates</td>
</tr>
</table>
@@ -2576,10 +2575,10 @@ local bounds empty = true
SkIRect getDeviceClipBounds() const
</pre>
-Return <a href="undocumented#IRect">IRect</a> bounds of <a href="#Clip">Clip</a>, unaffected by <a href="#Matrix">Matrix</a>. If <a href="#Clip">Clip</a> is empty,
-return <a href="#SkRect_MakeEmpty">SkRect::MakeEmpty</a>, where all <a href="undocumented#Rect">Rect</a> sides equal zero.
+Return <a href="SkIRect_Reference#IRect">IRect</a> bounds of <a href="#Clip">Clip</a>, unaffected by <a href="#Matrix">Matrix</a>. If <a href="#Clip">Clip</a> is empty,
+return <a href="#SkRect_MakeEmpty">SkRect::MakeEmpty</a>, where all <a href="SkRect_Reference#Rect">Rect</a> sides equal zero.
-Unlike <a href="#SkCanvas_getLocalClipBounds">getLocalClipBounds</a>, returned <a href="undocumented#IRect">IRect</a> is not outset.
+Unlike <a href="#SkCanvas_getLocalClipBounds">getLocalClipBounds</a>, returned <a href="SkIRect_Reference#IRect">IRect</a> is not outset.
### Return Value
@@ -2607,15 +2606,15 @@ left:15 top:65 right:60 bottom:115
bool getDeviceClipBounds(SkIRect* bounds) const
</pre>
-Return <a href="undocumented#IRect">IRect</a> <a href="#SkCanvas_getDeviceClipBounds_2_bounds">bounds</a> of <a href="#Clip">Clip</a>, unaffected by <a href="#Matrix">Matrix</a>. If <a href="#Clip">Clip</a> is empty,
-return false, and set <a href="#SkCanvas_getDeviceClipBounds_2_bounds">bounds</a> to <a href="#SkRect_MakeEmpty">SkRect::MakeEmpty</a>, where all <a href="undocumented#Rect">Rect</a> sides equal zero.
+Return <a href="SkIRect_Reference#IRect">IRect</a> <a href="#SkCanvas_getDeviceClipBounds_2_bounds">bounds</a> of <a href="#Clip">Clip</a>, unaffected by <a href="#Matrix">Matrix</a>. If <a href="#Clip">Clip</a> is empty,
+return false, and set <a href="#SkCanvas_getDeviceClipBounds_2_bounds">bounds</a> to <a href="#SkRect_MakeEmpty">SkRect::MakeEmpty</a>, where all <a href="SkRect_Reference#Rect">Rect</a> sides equal zero.
Unlike <a href="#SkCanvas_getLocalClipBounds">getLocalClipBounds</a>, <a href="#SkCanvas_getDeviceClipBounds_2_bounds">bounds</a> is not outset.
### Parameters
<table> <tr> <td><a name="SkCanvas_getDeviceClipBounds_2_bounds"> <code><strong>bounds </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> of <a href="#Clip">Clip</a> in device coordinates</td>
+<a href="SkRect_Reference#Rect">Rect</a> of <a href="#Clip">Clip</a> in device coordinates</td>
</tr>
</table>
@@ -2960,7 +2959,7 @@ stroke, blend, color, and so on, used to draw</td>
void drawRect(const SkRect& rect, const SkPaint& paint)
</pre>
-Draw <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawRect_rect">rect</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawRect_paint">paint</a>.
+Draw <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawRect_rect">rect</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawRect_paint">paint</a>.
In <a href="#SkCanvas_drawRect_paint">paint</a>: <a href="#Style">Paint Style</a> determines if rectangle is stroked or filled;
if stroked, <a href="#Stroke_Width">Paint Stroke Width</a> describes the line thickness, and
<a href="#Stroke_Join">Paint Stroke Join</a> draws the corners rounded or square.
@@ -2968,7 +2967,7 @@ if stroked, <a href="#Stroke_Width">Paint Stroke Width</a> describes the line th
### Parameters
<table> <tr> <td><a name="SkCanvas_drawRect_rect"> <code><strong>rect </strong></code> </a></td> <td>
-rectangle to be drawn</td>
+rectangle to draw</td>
</tr> <tr> <td><a name="SkCanvas_drawRect_paint"> <code><strong>paint </strong></code> </a></td> <td>
stroke or fill, blend, color, and so on, used to draw</td>
</tr>
@@ -2987,7 +2986,7 @@ stroke or fill, blend, color, and so on, used to draw</td>
void drawIRect(const SkIRect& rect, const SkPaint& paint)
</pre>
-Draw <a href="undocumented#IRect">IRect</a> <a href="#SkCanvas_drawIRect_rect">rect</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawIRect_paint">paint</a>.
+Draw <a href="SkIRect_Reference#IRect">IRect</a> <a href="#SkCanvas_drawIRect_rect">rect</a> using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawIRect_paint">paint</a>.
In <a href="#SkCanvas_drawIRect_paint">paint</a>: <a href="#Style">Paint Style</a> determines if rectangle is stroked or filled;
if stroked, <a href="#Stroke_Width">Paint Stroke Width</a> describes the line thickness, and
<a href="#Stroke_Join">Paint Stroke Join</a> draws the corners rounded or square.
@@ -2995,7 +2994,7 @@ if stroked, <a href="#Stroke_Width">Paint Stroke Width</a> describes the line th
### Parameters
<table> <tr> <td><a name="SkCanvas_drawIRect_rect"> <code><strong>rect </strong></code> </a></td> <td>
-rectangle to be drawn</td>
+rectangle to draw</td>
</tr> <tr> <td><a name="SkCanvas_drawIRect_paint"> <code><strong>paint </strong></code> </a></td> <td>
stroke or fill, blend, color, and so on, used to draw</td>
</tr>
@@ -3022,7 +3021,7 @@ if stroked, <a href="#Stroke_Width">Paint Stroke Width</a> describes the line th
### Parameters
<table> <tr> <td><a name="SkCanvas_drawRegion_region"> <code><strong>region </strong></code> </a></td> <td>
-<a href="#SkCanvas_drawRegion_region">region</a> to be drawn</td>
+<a href="#SkCanvas_drawRegion_region">region</a> to draw</td>
</tr> <tr> <td><a name="SkCanvas_drawRegion_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> stroke or fill, blend, color, and so on, used to draw</td>
</tr>
@@ -3048,7 +3047,7 @@ if stroked, <a href="#Stroke_Width">Paint Stroke Width</a> describes the line th
### Parameters
<table> <tr> <td><a name="SkCanvas_drawOval_oval"> <code><strong>oval </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> bounds of <a href="undocumented#Oval">Oval</a></td>
+<a href="SkRect_Reference#Rect">Rect</a> bounds of <a href="undocumented#Oval">Oval</a></td>
</tr> <tr> <td><a name="SkCanvas_drawOval_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> stroke or fill, blend, color, and so on, used to draw</td>
</tr>
@@ -3125,7 +3124,7 @@ concave and <a href="#SkCanvas_drawDRRect_outer">outer</a> contains <a href="#Sk
### Example
-<div><fiddle-embed name="30823cb4edf884d330285ea161664931"><div>Outer <a href="undocumented#Rect">Rect</a> has no corner radii, but stroke join is rounded.
+<div><fiddle-embed name="30823cb4edf884d330285ea161664931"><div>Outer <a href="SkRect_Reference#Rect">Rect</a> has no corner radii, but stroke join is rounded.
Inner <a href="undocumented#Round_Rect">Round Rect</a> has corner radii; outset stroke increases radii of corners.
Stroke join does not affect <a href="#SkCanvas_drawDRRect_inner">inner</a> <a href="undocumented#Round_Rect">Round Rect</a> since it has no sharp corners.</div></fiddle-embed></div>
@@ -3208,12 +3207,12 @@ a negative <a href="#SkCanvas_drawArc_sweepAngle">sweepAngle</a> places <a href=
If <a href="#SkCanvas_drawArc_useCenter">useCenter</a> is true, draw a wedge that includes lines from <a href="#SkCanvas_drawArc_oval">oval</a>
center to <a href="undocumented#Arc">Arc</a> end points. If <a href="#SkCanvas_drawArc_useCenter">useCenter</a> is false, draw <a href="undocumented#Arc">Arc</a> between end points.
-If <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawArc_oval">oval</a> is empty or <a href="#SkCanvas_drawArc_sweepAngle">sweepAngle</a> is zero, nothing is drawn.
+If <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawArc_oval">oval</a> is empty or <a href="#SkCanvas_drawArc_sweepAngle">sweepAngle</a> is zero, nothing is drawn.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawArc_oval"> <code><strong>oval </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> bounds of <a href="undocumented#Oval">Oval</a> containing <a href="undocumented#Arc">Arc</a> to draw</td>
+<a href="SkRect_Reference#Rect">Rect</a> bounds of <a href="undocumented#Oval">Oval</a> containing <a href="undocumented#Arc">Arc</a> to draw</td>
</tr> <tr> <td><a name="SkCanvas_drawArc_startAngle"> <code><strong>startAngle </strong></code> </a></td> <td>
angle in degrees where <a href="undocumented#Arc">Arc</a> begins</td>
</tr> <tr> <td><a name="SkCanvas_drawArc_sweepAngle"> <code><strong>sweepAngle </strong></code> </a></td> <td>
@@ -3243,20 +3242,20 @@ void drawRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry,
const SkPaint& paint)
</pre>
-Draw <a href="undocumented#Round_Rect">Round Rect</a> bounded by <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawRoundRect_rect">rect</a>, with corner radii (<a href="#SkCanvas_drawRoundRect_rx">rx</a>, <a href="#SkCanvas_drawRoundRect_ry">ry</a>) using <a href="#Clip">Clip</a>,
+Draw <a href="undocumented#Round_Rect">Round Rect</a> bounded by <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawRoundRect_rect">rect</a>, with corner radii (<a href="#SkCanvas_drawRoundRect_rx">rx</a>, <a href="#SkCanvas_drawRoundRect_ry">ry</a>) using <a href="#Clip">Clip</a>,
<a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawRoundRect_paint">paint</a>.
In <a href="#SkCanvas_drawRoundRect_paint">paint</a>: <a href="#Style">Paint Style</a> determines if <a href="undocumented#Round_Rect">Round Rect</a> is stroked or filled;
if stroked, <a href="#Stroke_Width">Paint Stroke Width</a> describes the line thickness.
If <a href="#SkCanvas_drawRoundRect_rx">rx</a> or <a href="#SkCanvas_drawRoundRect_ry">ry</a> are less than zero, they are treated as if they are zero.
If <a href="#SkCanvas_drawRoundRect_rx">rx</a> plus <a href="#SkCanvas_drawRoundRect_ry">ry</a> exceeds <a href="#SkCanvas_drawRoundRect_rect">rect</a> width or <a href="#SkCanvas_drawRoundRect_rect">rect</a> height, radii are scaled down to fit.
-If <a href="#SkCanvas_drawRoundRect_rx">rx</a> and <a href="#SkCanvas_drawRoundRect_ry">ry</a> are zero, <a href="undocumented#Round_Rect">Round Rect</a> is drawn as <a href="undocumented#Rect">Rect</a> and if stroked is affected by
+If <a href="#SkCanvas_drawRoundRect_rx">rx</a> and <a href="#SkCanvas_drawRoundRect_ry">ry</a> are zero, <a href="undocumented#Round_Rect">Round Rect</a> is drawn as <a href="SkRect_Reference#Rect">Rect</a> and if stroked is affected by
<a href="#Stroke_Join">Paint Stroke Join</a>.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawRoundRect_rect"> <code><strong>rect </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> bounds of <a href="undocumented#Round_Rect">Round Rect</a> to draw</td>
+<a href="SkRect_Reference#Rect">Rect</a> bounds of <a href="undocumented#Round_Rect">Round Rect</a> to draw</td>
</tr> <tr> <td><a name="SkCanvas_drawRoundRect_rx"> <code><strong>rx </strong></code> </a></td> <td>
axis length in x of oval describing rounded corners</td>
</tr> <tr> <td><a name="SkCanvas_drawRoundRect_ry"> <code><strong>ry </strong></code> </a></td> <td>
@@ -3331,7 +3330,7 @@ and <a href="undocumented#Draw_Looper">Draw Looper</a>. If <a href="#SkCanvas_dr
If <a href="#SkCanvas_drawImage_paint">paint</a> contains <a href="undocumented#Mask_Filter">Mask Filter</a>, generate mask from <a href="#SkCanvas_drawImage_image">image</a> bounds. If generated
mask extends beyond <a href="#SkCanvas_drawImage_image">image</a> bounds, replicate <a href="#SkCanvas_drawImage_image">image</a> edge colors, just as <a href="undocumented#Shader">Shader</a>
made from <a href="#SkImage_makeShader">SkImage::makeShader</a> with <a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the
-<a href="#SkCanvas_drawImage_image">image</a>'s edge color when it samples outside of its bounds.
+<a href="#SkCanvas_drawImage_image">image</a> edge color when it samples outside of its bounds.
### Parameters
@@ -3354,7 +3353,7 @@ and so on; or nullptr</td>
---
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void drawImage(const sk_sp<SkImage>& image, SkScalar left, SkScalar top,
+void drawImage(const sk_sp&lt;SkImage&gt;& image, SkScalar left, SkScalar top,
const SkPaint* paint = nullptr)
</pre>
@@ -3366,7 +3365,7 @@ If <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawImage_2_pa
If <a href="#SkCanvas_drawImage_2_paint">paint</a> contains <a href="undocumented#Mask_Filter">Mask Filter</a>, generate mask from <a href="#SkCanvas_drawImage_2_image">image</a> bounds. If generated
mask extends beyond <a href="#SkCanvas_drawImage_2_image">image</a> bounds, replicate <a href="#SkCanvas_drawImage_2_image">image</a> edge colors, just as <a href="undocumented#Shader">Shader</a>
made from <a href="#SkImage_makeShader">SkImage::makeShader</a> with <a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the
-<a href="#SkCanvas_drawImage_2_image">image</a>'s edge color when it samples outside of its bounds.
+<a href="#SkCanvas_drawImage_2_image">image</a> edge color when it samples outside of its bounds.
### Parameters
@@ -3396,14 +3395,14 @@ enum <a href="#SkCanvas_SrcRectConstraint">SrcRectConstraint</a> {
<a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a>,
};</pre>
-<a href="#SkCanvas_SrcRectConstraint">SrcRectConstraint</a> controls the behavior at the edge of source <a href="undocumented#Rect">Rect</a>,
+<a href="#SkCanvas_SrcRectConstraint">SrcRectConstraint</a> controls the behavior at the edge of source <a href="SkRect_Reference#Rect">Rect</a>,
provided to <a href="#SkCanvas_drawImageRect">drawImageRect</a>, trading off speed for precision.
-<a href="undocumented#Image_Filter">Image Filter</a> in <a href="SkPaint_Reference#Paint">Paint</a> may sample multiple pixels in the image. Source <a href="undocumented#Rect">Rect</a>
+<a href="undocumented#Image_Filter">Image Filter</a> in <a href="SkPaint_Reference#Paint">Paint</a> may sample multiple pixels in the image. Source <a href="SkRect_Reference#Rect">Rect</a>
restricts the bounds of pixels that may be read. <a href="undocumented#Image_Filter">Image Filter</a> may slow down if
-it cannot read outside the bounds, when sampling near the edge of source <a href="undocumented#Rect">Rect</a>.
+it cannot read outside the bounds, when sampling near the edge of source <a href="SkRect_Reference#Rect">Rect</a>.
<a href="#SkCanvas_SrcRectConstraint">SrcRectConstraint</a> specifies whether an <a href="undocumented#Image_Filter">Image Filter</a> is allowed to read pixels
-outside source <a href="undocumented#Rect">Rect</a>.
+outside source <a href="SkRect_Reference#Rect">Rect</a>.
### Constants
@@ -3436,7 +3435,7 @@ void drawImageRect(const SkImage* image, const SkRect& src, const SkRect& dst,
SrcRectConstraint constraint = kStrict_SrcRectConstraint)
</pre>
-Draw <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_src">src</a> of <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageRect_image">image</a>, scaled and translated to fill <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_dst">dst</a>.
+Draw <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_src">src</a> of <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageRect_image">image</a>, scaled and translated to fill <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_dst">dst</a>.
Additionally transform draw using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawImageRect_paint">paint</a>.
If <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawImageRect_paint">paint</a> is supplied, apply <a href="undocumented#Color_Filter">Color Filter</a>, <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
@@ -3445,7 +3444,7 @@ If <a href="#SkCanvas_drawImageRect_paint">paint</a> contains <a href="undocumen
If generated mask extends beyond <a href="#SkCanvas_drawImageRect_image">image</a> bounds, replicate <a href="#SkCanvas_drawImageRect_image">image</a> edge colors, just
as <a href="undocumented#Shader">Shader</a> made from <a href="#SkImage_makeShader">SkImage::makeShader</a> with <a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set
-replicates the <a href="#SkCanvas_drawImageRect_image">image</a>'s edge color when it samples outside of its bounds.
+replicates the <a href="#SkCanvas_drawImageRect_image">image</a> edge color when it samples outside of its bounds.
<a href="#SkCanvas_drawImageRect_constraint">constraint</a> set to <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="SkPaint_Reference#Paint">Paint</a> <a href="undocumented#Filter_Quality">Filter Quality</a> to
sample within <a href="#SkCanvas_drawImageRect_src">src</a>; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
@@ -3456,9 +3455,9 @@ improve performance.
<table> <tr> <td><a name="SkCanvas_drawImageRect_image"> <code><strong>image </strong></code> </a></td> <td>
<a href="undocumented#Image">Image</a> containing pixels, dimensions, and format</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_src"> <code><strong>src </strong></code> </a></td> <td>
-source <a href="undocumented#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_image">image</a> to draw from</td>
+source <a href="SkRect_Reference#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_image">image</a> to draw from</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_dst"> <code><strong>dst </strong></code> </a></td> <td>
-destination <a href="undocumented#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_image">image</a> to draw to</td>
+destination <a href="SkRect_Reference#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_image">image</a> to draw to</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
@@ -3470,7 +3469,7 @@ filter strictly within <a href="#SkCanvas_drawImageRect_src">src</a> or draw fas
### Example
<div><fiddle-embed name="2b01c707ef8b5ce3023b7a1d55fce059"><div>The left bitmap draws with <a href="SkPaint_Reference#Paint">Paint</a> default <a href="undocumented#SkFilterQuality">kNone SkFilterQuality</a>, and stays within
-its bounds; there's no bleeding with <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a>.
+its bounds; there is no bleeding with <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a>.
the middle and right bitmaps draw with <a href="undocumented#SkFilterQuality">kLow SkFilterQuality</a>; with
<a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a>, the filter remains within the checkerboard, and
with <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> red bleeds on the edges.</div></fiddle-embed></div>
@@ -3483,7 +3482,7 @@ void drawImageRect(const SkImage* image, const SkIRect& isrc, const SkRect& dst,
SrcRectConstraint constraint = kStrict_SrcRectConstraint)
</pre>
-Draw <a href="undocumented#IRect">IRect</a> <a href="#SkCanvas_drawImageRect_2_isrc">isrc</a> of <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageRect_2_image">image</a>, scaled and translated to fill <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_2_dst">dst</a>.
+Draw <a href="SkIRect_Reference#IRect">IRect</a> <a href="#SkCanvas_drawImageRect_2_isrc">isrc</a> of <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageRect_2_image">image</a>, scaled and translated to fill <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_2_dst">dst</a>.
Note that <a href="#SkCanvas_drawImageRect_2_isrc">isrc</a> is on integer pixel boundaries; <a href="#SkCanvas_drawImageRect_2_dst">dst</a> may include fractional
boundaries. Additionally transform draw using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a>
<a href="#SkCanvas_drawImageRect_2_paint">paint</a>.
@@ -3494,7 +3493,7 @@ If <a href="#SkCanvas_drawImageRect_2_paint">paint</a> contains <a href="undocum
If generated mask extends beyond <a href="#SkCanvas_drawImageRect_2_image">image</a> bounds, replicate <a href="#SkCanvas_drawImageRect_2_image">image</a> edge colors, just
as <a href="undocumented#Shader">Shader</a> made from <a href="#SkImage_makeShader">SkImage::makeShader</a> with <a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set
-replicates the <a href="#SkCanvas_drawImageRect_2_image">image</a>'s edge color when it samples outside of its bounds.
+replicates the <a href="#SkCanvas_drawImageRect_2_image">image</a> edge color when it samples outside of its bounds.
<a href="#SkCanvas_drawImageRect_2_constraint">constraint</a> set to <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="SkPaint_Reference#Paint">Paint</a> <a href="undocumented#Filter_Quality">Filter Quality</a> to
sample within <a href="#SkCanvas_drawImageRect_2_isrc">isrc</a>; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
@@ -3505,9 +3504,9 @@ improve performance.
<table> <tr> <td><a name="SkCanvas_drawImageRect_2_image"> <code><strong>image </strong></code> </a></td> <td>
<a href="undocumented#Image">Image</a> containing pixels, dimensions, and format</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_2_isrc"> <code><strong>isrc </strong></code> </a></td> <td>
-source <a href="undocumented#IRect">IRect</a> of <a href="#SkCanvas_drawImageRect_2_image">image</a> to draw from</td>
+source <a href="SkIRect_Reference#IRect">IRect</a> of <a href="#SkCanvas_drawImageRect_2_image">image</a> to draw from</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_2_dst"> <code><strong>dst </strong></code> </a></td> <td>
-destination <a href="undocumented#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_2_image">image</a> to draw to</td>
+destination <a href="SkRect_Reference#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_2_image">image</a> to draw to</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_2_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
@@ -3527,7 +3526,7 @@ void drawImageRect(const SkImage* image, const SkRect& dst, const SkPaint* paint
SrcRectConstraint constraint = kStrict_SrcRectConstraint)
</pre>
-Draw <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageRect_3_image">image</a>, scaled and translated to fill <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_3_dst">dst</a>, using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>,
+Draw <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageRect_3_image">image</a>, scaled and translated to fill <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_3_dst">dst</a>, using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>,
and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawImageRect_3_paint">paint</a>.
If <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawImageRect_3_paint">paint</a> is supplied, apply <a href="undocumented#Color_Filter">Color Filter</a>, <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
@@ -3536,7 +3535,7 @@ If <a href="#SkCanvas_drawImageRect_3_paint">paint</a> contains <a href="undocum
If generated mask extends beyond <a href="#SkCanvas_drawImageRect_3_image">image</a> bounds, replicate <a href="#SkCanvas_drawImageRect_3_image">image</a> edge colors, just
as <a href="undocumented#Shader">Shader</a> made from <a href="#SkImage_makeShader">SkImage::makeShader</a> with <a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set
-replicates the <a href="#SkCanvas_drawImageRect_3_image">image</a>'s edge color when it samples outside of its bounds.
+replicates the <a href="#SkCanvas_drawImageRect_3_image">image</a> edge color when it samples outside of its bounds.
<a href="#SkCanvas_drawImageRect_3_constraint">constraint</a> set to <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="SkPaint_Reference#Paint">Paint</a> <a href="undocumented#Filter_Quality">Filter Quality</a> to
sample within <a href="#SkCanvas_drawImageRect_3_image">image</a>; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
@@ -3547,7 +3546,7 @@ improve performance.
<table> <tr> <td><a name="SkCanvas_drawImageRect_3_image"> <code><strong>image </strong></code> </a></td> <td>
<a href="undocumented#Image">Image</a> containing pixels, dimensions, and format</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_3_dst"> <code><strong>dst </strong></code> </a></td> <td>
-destination <a href="undocumented#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_3_image">image</a> to draw to</td>
+destination <a href="SkRect_Reference#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_3_image">image</a> to draw to</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_3_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
@@ -3563,12 +3562,12 @@ filter strictly within <a href="#SkCanvas_drawImageRect_3_image">image</a> or dr
---
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void drawImageRect(const sk_sp<SkImage>& image, const SkRect& src,
+void drawImageRect(const sk_sp&lt;SkImage&gt;& image, const SkRect& src,
const SkRect& dst, const SkPaint* paint,
SrcRectConstraint constraint = kStrict_SrcRectConstraint)
</pre>
-Draw <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_4_src">src</a> of <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageRect_4_image">image</a>, scaled and translated to fill <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_4_dst">dst</a>.
+Draw <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_4_src">src</a> of <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageRect_4_image">image</a>, scaled and translated to fill <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_4_dst">dst</a>.
Additionally transform draw using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawImageRect_4_paint">paint</a>.
If <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawImageRect_4_paint">paint</a> is supplied, apply <a href="undocumented#Color_Filter">Color Filter</a>, <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
@@ -3577,7 +3576,7 @@ If <a href="#SkCanvas_drawImageRect_4_paint">paint</a> contains <a href="undocum
If generated mask extends beyond <a href="#SkCanvas_drawImageRect_4_image">image</a> bounds, replicate <a href="#SkCanvas_drawImageRect_4_image">image</a> edge colors, just
as <a href="undocumented#Shader">Shader</a> made from <a href="#SkImage_makeShader">SkImage::makeShader</a> with <a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set
-replicates the <a href="#SkCanvas_drawImageRect_4_image">image</a>'s edge color when it samples outside of its bounds.
+replicates the <a href="#SkCanvas_drawImageRect_4_image">image</a> edge color when it samples outside of its bounds.
<a href="#SkCanvas_drawImageRect_4_constraint">constraint</a> set to <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="SkPaint_Reference#Paint">Paint</a> <a href="undocumented#Filter_Quality">Filter Quality</a> to
sample within <a href="#SkCanvas_drawImageRect_4_src">src</a>; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
@@ -3588,9 +3587,9 @@ improve performance.
<table> <tr> <td><a name="SkCanvas_drawImageRect_4_image"> <code><strong>image </strong></code> </a></td> <td>
<a href="undocumented#Image">Image</a> containing pixels, dimensions, and format</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_4_src"> <code><strong>src </strong></code> </a></td> <td>
-source <a href="undocumented#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_4_image">image</a> to draw from</td>
+source <a href="SkRect_Reference#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_4_image">image</a> to draw from</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_4_dst"> <code><strong>dst </strong></code> </a></td> <td>
-destination <a href="undocumented#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_4_image">image</a> to draw to</td>
+destination <a href="SkRect_Reference#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_4_image">image</a> to draw to</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_4_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
@@ -3607,12 +3606,12 @@ The two matrices are concatenated to create the final transformation.</div></fid
---
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void drawImageRect(const sk_sp<SkImage>& image, const SkIRect& isrc,
+void drawImageRect(const sk_sp&lt;SkImage&gt;& image, const SkIRect& isrc,
const SkRect& dst, const SkPaint* paint,
SrcRectConstraint constraint = kStrict_SrcRectConstraint)
</pre>
-Draw <a href="undocumented#IRect">IRect</a> <a href="#SkCanvas_drawImageRect_5_isrc">isrc</a> of <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageRect_5_image">image</a>, scaled and translated to fill <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_5_dst">dst</a>.
+Draw <a href="SkIRect_Reference#IRect">IRect</a> <a href="#SkCanvas_drawImageRect_5_isrc">isrc</a> of <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageRect_5_image">image</a>, scaled and translated to fill <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_5_dst">dst</a>.
<a href="#SkCanvas_drawImageRect_5_isrc">isrc</a> is on integer pixel boundaries; <a href="#SkCanvas_drawImageRect_5_dst">dst</a> may include fractional boundaries.
Additionally transform draw using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawImageRect_5_paint">paint</a>.
@@ -3622,7 +3621,7 @@ If <a href="#SkCanvas_drawImageRect_5_paint">paint</a> contains <a href="undocum
If generated mask extends beyond <a href="#SkCanvas_drawImageRect_5_image">image</a> bounds, replicate <a href="#SkCanvas_drawImageRect_5_image">image</a> edge colors, just
as <a href="undocumented#Shader">Shader</a> made from <a href="#SkImage_makeShader">SkImage::makeShader</a> with <a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set
-replicates the <a href="#SkCanvas_drawImageRect_5_image">image</a>'s edge color when it samples outside of its bounds.
+replicates the <a href="#SkCanvas_drawImageRect_5_image">image</a> edge color when it samples outside of its bounds.
<a href="#SkCanvas_drawImageRect_5_constraint">constraint</a> set to <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="SkPaint_Reference#Paint">Paint</a> <a href="undocumented#Filter_Quality">Filter Quality</a> to
sample within <a href="#SkCanvas_drawImageRect_5_image">image</a>; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
@@ -3633,9 +3632,9 @@ improve performance.
<table> <tr> <td><a name="SkCanvas_drawImageRect_5_image"> <code><strong>image </strong></code> </a></td> <td>
<a href="undocumented#Image">Image</a> containing pixels, dimensions, and format</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_5_isrc"> <code><strong>isrc </strong></code> </a></td> <td>
-source <a href="undocumented#IRect">IRect</a> of <a href="#SkCanvas_drawImageRect_5_image">image</a> to draw from</td>
+source <a href="SkIRect_Reference#IRect">IRect</a> of <a href="#SkCanvas_drawImageRect_5_image">image</a> to draw from</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_5_dst"> <code><strong>dst </strong></code> </a></td> <td>
-destination <a href="undocumented#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_5_image">image</a> to draw to</td>
+destination <a href="SkRect_Reference#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_5_image">image</a> to draw to</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_5_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
@@ -3651,12 +3650,12 @@ filter strictly within <a href="#SkCanvas_drawImageRect_5_image">image</a> or dr
---
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void drawImageRect(const sk_sp<SkImage>& image, const SkRect& dst,
+void drawImageRect(const sk_sp&lt;SkImage&gt;& image, const SkRect& dst,
const SkPaint* paint,
SrcRectConstraint constraint = kStrict_SrcRectConstraint)
</pre>
-Draw <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageRect_6_image">image</a>, scaled and translated to fill <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_6_dst">dst</a>,
+Draw <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageRect_6_image">image</a>, scaled and translated to fill <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawImageRect_6_dst">dst</a>,
using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawImageRect_6_paint">paint</a>.
If <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawImageRect_6_paint">paint</a> is supplied, apply <a href="undocumented#Color_Filter">Color Filter</a>, <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
@@ -3665,7 +3664,7 @@ If <a href="#SkCanvas_drawImageRect_6_paint">paint</a> contains <a href="undocum
If generated mask extends beyond <a href="#SkCanvas_drawImageRect_6_image">image</a> bounds, replicate <a href="#SkCanvas_drawImageRect_6_image">image</a> edge colors, just
as <a href="undocumented#Shader">Shader</a> made from <a href="#SkImage_makeShader">SkImage::makeShader</a> with <a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set
-replicates the <a href="#SkCanvas_drawImageRect_6_image">image</a>'s edge color when it samples outside of its bounds.
+replicates the <a href="#SkCanvas_drawImageRect_6_image">image</a> edge color when it samples outside of its bounds.
<a href="#SkCanvas_drawImageRect_6_constraint">constraint</a> set to <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="SkPaint_Reference#Paint">Paint</a> <a href="undocumented#Filter_Quality">Filter Quality</a> to
sample within <a href="#SkCanvas_drawImageRect_6_image">image</a>; set to <a href="#SkCanvas_kFast_SrcRectConstraint">kFast SrcRectConstraint</a> allows sampling outside to
@@ -3676,7 +3675,7 @@ improve performance.
<table> <tr> <td><a name="SkCanvas_drawImageRect_6_image"> <code><strong>image </strong></code> </a></td> <td>
<a href="undocumented#Image">Image</a> containing pixels, dimensions, and format</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_6_dst"> <code><strong>dst </strong></code> </a></td> <td>
-destination <a href="undocumented#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_6_image">image</a> to draw to</td>
+destination <a href="SkRect_Reference#Rect">Rect</a> of <a href="#SkCanvas_drawImageRect_6_image">image</a> to draw to</td>
</tr> <tr> <td><a name="SkCanvas_drawImageRect_6_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
@@ -3699,8 +3698,8 @@ void drawImageNine(const SkImage* image, const SkIRect& center,
const SkRect& dst, const SkPaint* paint = nullptr)
</pre>
-Draw <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageNine_image">image</a> stretched proportionally to fit into <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawImageNine_dst">dst</a>.
-<a href="undocumented#IRect">IRect</a> <a href="#SkCanvas_drawImageNine_center">center</a> divides the <a href="#SkCanvas_drawImageNine_image">image</a> into nine sections: four sides, four corners, and
+Draw <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageNine_image">image</a> stretched proportionally to fit into <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawImageNine_dst">dst</a>.
+<a href="SkIRect_Reference#IRect">IRect</a> <a href="#SkCanvas_drawImageNine_center">center</a> divides the <a href="#SkCanvas_drawImageNine_image">image</a> into nine sections: four sides, four corners, and
the <a href="#SkCanvas_drawImageNine_center">center</a>. Corners are unmodified or scaled down proportionately if their sides
are larger than <a href="#SkCanvas_drawImageNine_dst">dst</a>; <a href="#SkCanvas_drawImageNine_center">center</a> and four sides are scaled to fit remaining space, if any.
@@ -3712,16 +3711,16 @@ If <a href="#SkCanvas_drawImageNine_paint">paint</a> contains <a href="undocumen
If generated mask extends beyond <a href="#SkCanvas_drawImageNine_image">image</a> bounds, replicate <a href="#SkCanvas_drawImageNine_image">image</a> edge colors, just
as <a href="undocumented#Shader">Shader</a> made from <a href="#SkImage_makeShader">SkImage::makeShader</a> with <a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set
-replicates the <a href="#SkCanvas_drawImageNine_image">image</a>'s edge color when it samples outside of its bounds.
+replicates the <a href="#SkCanvas_drawImageNine_image">image</a> edge color when it samples outside of its bounds.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawImageNine_image"> <code><strong>image </strong></code> </a></td> <td>
<a href="undocumented#Image">Image</a> containing pixels, dimensions, and format</td>
</tr> <tr> <td><a name="SkCanvas_drawImageNine_center"> <code><strong>center </strong></code> </a></td> <td>
-<a href="undocumented#IRect">IRect</a> edge of <a href="#SkCanvas_drawImageNine_image">image</a> corners and sides</td>
+<a href="SkIRect_Reference#IRect">IRect</a> edge of <a href="#SkCanvas_drawImageNine_image">image</a> corners and sides</td>
</tr> <tr> <td><a name="SkCanvas_drawImageNine_dst"> <code><strong>dst </strong></code> </a></td> <td>
-destination <a href="undocumented#Rect">Rect</a> of <a href="#SkCanvas_drawImageNine_image">image</a> to draw to</td>
+destination <a href="SkRect_Reference#Rect">Rect</a> of <a href="#SkCanvas_drawImageNine_image">image</a> to draw to</td>
</tr> <tr> <td><a name="SkCanvas_drawImageNine_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
@@ -3738,12 +3737,12 @@ The sides and <a href="#SkCanvas_drawImageNine_center">center</a> are scaled if
---
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void drawImageNine(const sk_sp<SkImage>& image, const SkIRect& center,
+void drawImageNine(const sk_sp&lt;SkImage&gt;& image, const SkIRect& center,
const SkRect& dst, const SkPaint* paint = nullptr)
</pre>
-Draw <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageNine_2_image">image</a> stretched proportionally to fit into <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawImageNine_2_dst">dst</a>.
-<a href="undocumented#IRect">IRect</a> <a href="#SkCanvas_drawImageNine_2_center">center</a> divides the <a href="#SkCanvas_drawImageNine_2_image">image</a> into nine sections: four sides, four corners, and
+Draw <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageNine_2_image">image</a> stretched proportionally to fit into <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawImageNine_2_dst">dst</a>.
+<a href="SkIRect_Reference#IRect">IRect</a> <a href="#SkCanvas_drawImageNine_2_center">center</a> divides the <a href="#SkCanvas_drawImageNine_2_image">image</a> into nine sections: four sides, four corners, and
the <a href="#SkCanvas_drawImageNine_2_center">center</a>. Corners are not scaled, or scaled down proportionately if their sides
are larger than <a href="#SkCanvas_drawImageNine_2_dst">dst</a>; <a href="#SkCanvas_drawImageNine_2_center">center</a> and four sides are scaled to fit remaining space, if any.
@@ -3755,16 +3754,16 @@ If <a href="#SkCanvas_drawImageNine_2_paint">paint</a> contains <a href="undocum
If generated mask extends beyond <a href="#SkCanvas_drawImageNine_2_image">image</a> bounds, replicate <a href="#SkCanvas_drawImageNine_2_image">image</a> edge colors, just
as <a href="undocumented#Shader">Shader</a> made from <a href="#SkImage_makeShader">SkImage::makeShader</a> with <a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set
-replicates the <a href="#SkCanvas_drawImageNine_2_image">image</a>'s edge color when it samples outside of its bounds.
+replicates the <a href="#SkCanvas_drawImageNine_2_image">image</a> edge color when it samples outside of its bounds.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawImageNine_2_image"> <code><strong>image </strong></code> </a></td> <td>
<a href="undocumented#Image">Image</a> containing pixels, dimensions, and format</td>
</tr> <tr> <td><a name="SkCanvas_drawImageNine_2_center"> <code><strong>center </strong></code> </a></td> <td>
-<a href="undocumented#IRect">IRect</a> edge of <a href="#SkCanvas_drawImageNine_2_image">image</a> corners and sides</td>
+<a href="SkIRect_Reference#IRect">IRect</a> edge of <a href="#SkCanvas_drawImageNine_2_image">image</a> corners and sides</td>
</tr> <tr> <td><a name="SkCanvas_drawImageNine_2_dst"> <code><strong>dst </strong></code> </a></td> <td>
-destination <a href="undocumented#Rect">Rect</a> of <a href="#SkCanvas_drawImageNine_2_image">image</a> to draw to</td>
+destination <a href="SkRect_Reference#Rect">Rect</a> of <a href="#SkCanvas_drawImageNine_2_image">image</a> to draw to</td>
</tr> <tr> <td><a name="SkCanvas_drawImageNine_2_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
@@ -3790,7 +3789,7 @@ void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
const SkPaint* paint = nullptr)
</pre>
-Draw <a href="undocumented#Bitmap">Bitmap</a> <a href="#SkCanvas_drawBitmap_bitmap">bitmap</a>, with its top-left corner at (<a href="#SkCanvas_drawBitmap_left">left</a>, <a href="#SkCanvas_drawBitmap_top">top</a>),
+Draw <a href="SkBitmap_Reference#Bitmap">Bitmap</a> <a href="#SkCanvas_drawBitmap_bitmap">bitmap</a>, with its top-left corner at (<a href="#SkCanvas_drawBitmap_left">left</a>, <a href="#SkCanvas_drawBitmap_top">top</a>),
using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawBitmap_paint">paint</a>.
If <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawBitmap_paint">paint</a> is supplied, apply <a href="undocumented#Color_Filter">Color Filter</a>, <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
@@ -3799,13 +3798,13 @@ If <a href="#SkCanvas_drawBitmap_paint">paint</a> contains <a href="undocumented
If generated mask extends beyond <a href="#SkCanvas_drawBitmap_bitmap">bitmap</a> bounds, replicate <a href="#SkCanvas_drawBitmap_bitmap">bitmap</a> edge colors,
just as <a href="undocumented#Shader">Shader</a> made from <a href="#SkShader_MakeBitmapShader">SkShader::MakeBitmapShader</a> with
-<a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="#SkCanvas_drawBitmap_bitmap">bitmap</a>'s edge color when it samples
+<a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="#SkCanvas_drawBitmap_bitmap">bitmap</a> edge color when it samples
outside of its bounds.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawBitmap_bitmap"> <code><strong>bitmap </strong></code> </a></td> <td>
-<a href="undocumented#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td>
+<a href="SkBitmap_Reference#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmap_left"> <code><strong>left </strong></code> </a></td> <td>
<a href="#SkCanvas_drawBitmap_left">left</a> side of <a href="#SkCanvas_drawBitmap_bitmap">bitmap</a></td>
</tr> <tr> <td><a name="SkCanvas_drawBitmap_top"> <code><strong>top </strong></code> </a></td> <td>
@@ -3831,7 +3830,7 @@ void drawBitmapRect(const SkBitmap& bitmap, const SkRect& src, const SkRect& dst
SrcRectConstraint constraint = kStrict_SrcRectConstraint)
</pre>
-Draw <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawBitmapRect_src">src</a> of <a href="undocumented#Bitmap">Bitmap</a> <a href="#SkCanvas_drawBitmapRect_bitmap">bitmap</a>, scaled and translated to fill <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawBitmapRect_dst">dst</a>.
+Draw <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawBitmapRect_src">src</a> of <a href="SkBitmap_Reference#Bitmap">Bitmap</a> <a href="#SkCanvas_drawBitmapRect_bitmap">bitmap</a>, scaled and translated to fill <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawBitmapRect_dst">dst</a>.
Additionally transform draw using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawBitmapRect_paint">paint</a>.
If <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawBitmapRect_paint">paint</a> is supplied, apply <a href="undocumented#Color_Filter">Color Filter</a>, <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
@@ -3840,7 +3839,7 @@ If <a href="#SkCanvas_drawBitmapRect_paint">paint</a> contains <a href="undocume
If generated mask extends beyond <a href="#SkCanvas_drawBitmapRect_bitmap">bitmap</a> bounds, replicate <a href="#SkCanvas_drawBitmapRect_bitmap">bitmap</a> edge colors,
just as <a href="undocumented#Shader">Shader</a> made from <a href="#SkShader_MakeBitmapShader">SkShader::MakeBitmapShader</a> with
-<a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="#SkCanvas_drawBitmapRect_bitmap">bitmap</a>'s edge color when it samples
+<a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="#SkCanvas_drawBitmapRect_bitmap">bitmap</a> edge color when it samples
outside of its bounds.
<a href="#SkCanvas_drawBitmapRect_constraint">constraint</a> set to <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="SkPaint_Reference#Paint">Paint</a> <a href="undocumented#Filter_Quality">Filter Quality</a> to
@@ -3850,11 +3849,11 @@ improve performance.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawBitmapRect_bitmap"> <code><strong>bitmap </strong></code> </a></td> <td>
-<a href="undocumented#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td>
+<a href="SkBitmap_Reference#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapRect_src"> <code><strong>src </strong></code> </a></td> <td>
-source <a href="undocumented#Rect">Rect</a> of image to draw from</td>
+source <a href="SkRect_Reference#Rect">Rect</a> of image to draw from</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapRect_dst"> <code><strong>dst </strong></code> </a></td> <td>
-destination <a href="undocumented#Rect">Rect</a> of image to draw to</td>
+destination <a href="SkRect_Reference#Rect">Rect</a> of image to draw to</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapRect_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
@@ -3875,7 +3874,7 @@ void drawBitmapRect(const SkBitmap& bitmap, const SkIRect& isrc,
SrcRectConstraint constraint = kStrict_SrcRectConstraint)
</pre>
-Draw <a href="undocumented#IRect">IRect</a> <a href="#SkCanvas_drawBitmapRect_2_isrc">isrc</a> of <a href="undocumented#Bitmap">Bitmap</a> <a href="#SkCanvas_drawBitmapRect_2_bitmap">bitmap</a>, scaled and translated to fill <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawBitmapRect_2_dst">dst</a>.
+Draw <a href="SkIRect_Reference#IRect">IRect</a> <a href="#SkCanvas_drawBitmapRect_2_isrc">isrc</a> of <a href="SkBitmap_Reference#Bitmap">Bitmap</a> <a href="#SkCanvas_drawBitmapRect_2_bitmap">bitmap</a>, scaled and translated to fill <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawBitmapRect_2_dst">dst</a>.
<a href="#SkCanvas_drawBitmapRect_2_isrc">isrc</a> is on integer pixel boundaries; <a href="#SkCanvas_drawBitmapRect_2_dst">dst</a> may include fractional boundaries.
Additionally transform draw using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawBitmapRect_2_paint">paint</a>.
@@ -3885,7 +3884,7 @@ If <a href="#SkCanvas_drawBitmapRect_2_paint">paint</a> contains <a href="undocu
If generated mask extends beyond <a href="#SkCanvas_drawBitmapRect_2_bitmap">bitmap</a> bounds, replicate <a href="#SkCanvas_drawBitmapRect_2_bitmap">bitmap</a> edge colors,
just as <a href="undocumented#Shader">Shader</a> made from <a href="#SkShader_MakeBitmapShader">SkShader::MakeBitmapShader</a> with
-<a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="#SkCanvas_drawBitmapRect_2_bitmap">bitmap</a>'s edge color when it samples
+<a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="#SkCanvas_drawBitmapRect_2_bitmap">bitmap</a> edge color when it samples
outside of its bounds.
<a href="#SkCanvas_drawBitmapRect_2_constraint">constraint</a> set to <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="SkPaint_Reference#Paint">Paint</a> <a href="undocumented#Filter_Quality">Filter Quality</a> to
@@ -3895,11 +3894,11 @@ improve performance.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawBitmapRect_2_bitmap"> <code><strong>bitmap </strong></code> </a></td> <td>
-<a href="undocumented#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td>
+<a href="SkBitmap_Reference#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapRect_2_isrc"> <code><strong>isrc </strong></code> </a></td> <td>
-source <a href="undocumented#IRect">IRect</a> of image to draw from</td>
+source <a href="SkIRect_Reference#IRect">IRect</a> of image to draw from</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapRect_2_dst"> <code><strong>dst </strong></code> </a></td> <td>
-destination <a href="undocumented#Rect">Rect</a> of image to draw to</td>
+destination <a href="SkRect_Reference#Rect">Rect</a> of image to draw to</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapRect_2_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
@@ -3920,7 +3919,7 @@ void drawBitmapRect(const SkBitmap& bitmap, const SkRect& dst,
SrcRectConstraint constraint = kStrict_SrcRectConstraint)
</pre>
-Draw <a href="undocumented#Bitmap">Bitmap</a> <a href="#SkCanvas_drawBitmapRect_3_bitmap">bitmap</a>, scaled and translated to fill <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawBitmapRect_3_dst">dst</a>.
+Draw <a href="SkBitmap_Reference#Bitmap">Bitmap</a> <a href="#SkCanvas_drawBitmapRect_3_bitmap">bitmap</a>, scaled and translated to fill <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawBitmapRect_3_dst">dst</a>.
<a href="#SkCanvas_drawBitmapRect_3_bitmap">bitmap</a> bounds is on integer pixel boundaries; <a href="#SkCanvas_drawBitmapRect_3_dst">dst</a> may include fractional boundaries.
Additionally transform draw using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawBitmapRect_3_paint">paint</a>.
@@ -3930,7 +3929,7 @@ If <a href="#SkCanvas_drawBitmapRect_3_paint">paint</a> contains <a href="undocu
If generated mask extends beyond <a href="#SkCanvas_drawBitmapRect_3_bitmap">bitmap</a> bounds, replicate <a href="#SkCanvas_drawBitmapRect_3_bitmap">bitmap</a> edge colors,
just as <a href="undocumented#Shader">Shader</a> made from <a href="#SkShader_MakeBitmapShader">SkShader::MakeBitmapShader</a> with
-<a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="#SkCanvas_drawBitmapRect_3_bitmap">bitmap</a>'s edge color when it samples
+<a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="#SkCanvas_drawBitmapRect_3_bitmap">bitmap</a> edge color when it samples
outside of its bounds.
<a href="#SkCanvas_drawBitmapRect_3_constraint">constraint</a> set to <a href="#SkCanvas_kStrict_SrcRectConstraint">kStrict SrcRectConstraint</a> limits <a href="SkPaint_Reference#Paint">Paint</a> <a href="undocumented#Filter_Quality">Filter Quality</a> to
@@ -3940,9 +3939,9 @@ improve performance.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawBitmapRect_3_bitmap"> <code><strong>bitmap </strong></code> </a></td> <td>
-<a href="undocumented#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td>
+<a href="SkBitmap_Reference#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapRect_3_dst"> <code><strong>dst </strong></code> </a></td> <td>
-destination <a href="undocumented#Rect">Rect</a> of image to draw to</td>
+destination <a href="SkRect_Reference#Rect">Rect</a> of image to draw to</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapRect_3_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
@@ -3965,8 +3964,8 @@ void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
const SkRect& dst, const SkPaint* paint = nullptr)
</pre>
-Draw <a href="undocumented#Bitmap">Bitmap</a> <a href="#SkCanvas_drawBitmapNine_bitmap">bitmap</a> stretched proportionally to fit into <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawBitmapNine_dst">dst</a>.
-<a href="undocumented#IRect">IRect</a> <a href="#SkCanvas_drawBitmapNine_center">center</a> divides the <a href="#SkCanvas_drawBitmapNine_bitmap">bitmap</a> into nine sections: four sides, four corners,
+Draw <a href="SkBitmap_Reference#Bitmap">Bitmap</a> <a href="#SkCanvas_drawBitmapNine_bitmap">bitmap</a> stretched proportionally to fit into <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawBitmapNine_dst">dst</a>.
+<a href="SkIRect_Reference#IRect">IRect</a> <a href="#SkCanvas_drawBitmapNine_center">center</a> divides the <a href="#SkCanvas_drawBitmapNine_bitmap">bitmap</a> into nine sections: four sides, four corners,
and the <a href="#SkCanvas_drawBitmapNine_center">center</a>. Corners are not scaled, or scaled down proportionately if their
sides are larger than <a href="#SkCanvas_drawBitmapNine_dst">dst</a>; <a href="#SkCanvas_drawBitmapNine_center">center</a> and four sides are scaled to fit remaining
space, if any.
@@ -3979,17 +3978,17 @@ If <a href="#SkCanvas_drawBitmapNine_paint">paint</a> contains <a href="undocume
If generated mask extends beyond <a href="#SkCanvas_drawBitmapNine_bitmap">bitmap</a> bounds, replicate <a href="#SkCanvas_drawBitmapNine_bitmap">bitmap</a> edge colors,
just as <a href="undocumented#Shader">Shader</a> made from <a href="#SkShader_MakeBitmapShader">SkShader::MakeBitmapShader</a> with
-<a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="#SkCanvas_drawBitmapNine_bitmap">bitmap</a>'s edge color when it samples
+<a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="#SkCanvas_drawBitmapNine_bitmap">bitmap</a> edge color when it samples
outside of its bounds.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawBitmapNine_bitmap"> <code><strong>bitmap </strong></code> </a></td> <td>
-<a href="undocumented#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td>
+<a href="SkBitmap_Reference#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapNine_center"> <code><strong>center </strong></code> </a></td> <td>
-<a href="undocumented#IRect">IRect</a> edge of image corners and sides</td>
+<a href="SkIRect_Reference#IRect">IRect</a> edge of image corners and sides</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapNine_dst"> <code><strong>dst </strong></code> </a></td> <td>
-destination <a href="undocumented#Rect">Rect</a> of image to draw to</td>
+destination <a href="SkRect_Reference#Rect">Rect</a> of image to draw to</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapNine_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
@@ -4008,7 +4007,7 @@ and below <a href="#SkCanvas_drawBitmapNine_center">center</a> to fill the remai
---
# <a name="SkCanvas_Lattice"></a> Struct SkCanvas::Lattice
-<a href="#SkCanvas_Lattice">Lattice</a> divides <a href="undocumented#Bitmap">Bitmap</a> or <a href="undocumented#Image">Image</a> into a rectangular grid.
+<a href="#SkCanvas_Lattice">Lattice</a> divides <a href="SkBitmap_Reference#Bitmap">Bitmap</a> or <a href="undocumented#Image">Image</a> into a rectangular grid.
Grid entries on even columns and even rows are fixed; these entries are
always drawn at their original size if the destination is large enough.
If the destination side is too small to hold the fixed entries, all fixed
@@ -4025,7 +4024,7 @@ const int* <a href="#SkCanvas_Lattice_fYDivs">fYDivs</a>;
const <a href="#SkCanvas_Lattice_Flags">Flags</a>* <a href="#SkCanvas_Lattice_fFlags">fFlags</a>;
int <a href="#SkCanvas_Lattice_fXCount">fXCount</a>;
int <a href="#SkCanvas_Lattice_fYCount">fYCount</a>;
-const <a href="undocumented#SkIRect">SkIRect</a>* <a href="#SkCanvas_Lattice_fBounds">fBounds</a>;
+const <a href="SkIRect_Reference#SkIRect">SkIRect</a>* <a href="#SkCanvas_Lattice_fBounds">fBounds</a>;
};</pre>
## <a name="SkCanvas_Lattice_Flags"></a> Enum SkCanvas::Lattice::Flags
@@ -4082,8 +4081,8 @@ divisions.
<a name="SkCanvas_Lattice_fBounds"> <code><strong>const SkIRect* fBounds</strong></code> </a>
-Optional subset <a href="undocumented#IRect">IRect</a> source to draw from.
-If nullptr, source bounds is dimensions of <a href="undocumented#Bitmap">Bitmap</a> or <a href="undocumented#Image">Image</a>.
+Optional subset <a href="SkIRect_Reference#IRect">IRect</a> source to draw from.
+If nullptr, source bounds is dimensions of <a href="SkBitmap_Reference#Bitmap">Bitmap</a> or <a href="undocumented#Image">Image</a>.
<a name="SkCanvas_drawBitmapLattice"></a>
## drawBitmapLattice
@@ -4093,12 +4092,12 @@ void drawBitmapLattice(const SkBitmap& bitmap, const Lattice& lattice,
const SkRect& dst, const SkPaint* paint = nullptr)
</pre>
-Draw <a href="undocumented#Bitmap">Bitmap</a> <a href="#SkCanvas_drawBitmapLattice_bitmap">bitmap</a> stretched proportionally to fit into <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawBitmapLattice_dst">dst</a>.
+Draw <a href="SkBitmap_Reference#Bitmap">Bitmap</a> <a href="#SkCanvas_drawBitmapLattice_bitmap">bitmap</a> stretched proportionally to fit into <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawBitmapLattice_dst">dst</a>.
<a href="#SkCanvas_Lattice">Lattice</a> <a href="#SkCanvas_drawBitmapLattice_lattice">lattice</a> divides <a href="#SkCanvas_drawBitmapLattice_bitmap">bitmap</a> into a rectangular grid.
Each intersection of an even-numbered row and column is fixed; like the corners
of <a href="#SkCanvas_drawBitmapNine">drawBitmapNine</a>, fixed <a href="#SkCanvas_drawBitmapLattice_lattice">lattice</a> elements never <a href="#SkCanvas_scale">scale</a> larger than their initial
-size and shrink proportionately when all fixed elements exceed the <a href="#SkCanvas_drawBitmapLattice_bitmap">bitmap</a>'s
+size and shrink proportionately when all fixed elements exceed the <a href="#SkCanvas_drawBitmapLattice_bitmap">bitmap</a>
dimension. All other grid elements <a href="#SkCanvas_scale">scale</a> to fill the available space, if any.
Additionally transform draw using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawBitmapLattice_paint">paint</a>.
@@ -4109,17 +4108,17 @@ If <a href="#SkCanvas_drawBitmapLattice_paint">paint</a> contains <a href="undoc
If generated mask extends beyond <a href="#SkCanvas_drawBitmapLattice_bitmap">bitmap</a> bounds, replicate <a href="#SkCanvas_drawBitmapLattice_bitmap">bitmap</a> edge colors,
just as <a href="undocumented#Shader">Shader</a> made from <a href="#SkShader_MakeBitmapShader">SkShader::MakeBitmapShader</a> with
-<a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="#SkCanvas_drawBitmapLattice_bitmap">bitmap</a>'s edge color when it samples
+<a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the <a href="#SkCanvas_drawBitmapLattice_bitmap">bitmap</a> edge color when it samples
outside of its bounds.
### Parameters
<table> <tr> <td><a name="SkCanvas_drawBitmapLattice_bitmap"> <code><strong>bitmap </strong></code> </a></td> <td>
-<a href="undocumented#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td>
+<a href="SkBitmap_Reference#Bitmap">Bitmap</a> containing pixels, dimensions, and format</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapLattice_lattice"> <code><strong>lattice </strong></code> </a></td> <td>
division of <a href="#SkCanvas_drawBitmapLattice_bitmap">bitmap</a> into fixed and variable rectangles</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapLattice_dst"> <code><strong>dst </strong></code> </a></td> <td>
-destination <a href="undocumented#Rect">Rect</a> of image to draw to</td>
+destination <a href="SkRect_Reference#Rect">Rect</a> of image to draw to</td>
</tr> <tr> <td><a name="SkCanvas_drawBitmapLattice_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
@@ -4145,12 +4144,12 @@ void drawImageLattice(const SkImage* image, const Lattice& lattice,
const SkRect& dst, const SkPaint* paint = nullptr)
</pre>
-Draw <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageLattice_image">image</a> stretched proportionally to fit into <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawImageLattice_dst">dst</a>.
+Draw <a href="undocumented#Image">Image</a> <a href="#SkCanvas_drawImageLattice_image">image</a> stretched proportionally to fit into <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawImageLattice_dst">dst</a>.
<a href="#SkCanvas_Lattice">Lattice</a> <a href="#SkCanvas_drawImageLattice_lattice">lattice</a> divides <a href="#SkCanvas_drawImageLattice_image">image</a> into a rectangular grid.
Each intersection of an even-numbered row and column is fixed; like the corners
of <a href="#SkCanvas_drawBitmapNine">drawBitmapNine</a>, fixed <a href="#SkCanvas_drawImageLattice_lattice">lattice</a> elements never <a href="#SkCanvas_scale">scale</a> larger than their initial
-size and shrink proportionately when all fixed elements exceed the bitmap's
+size and shrink proportionately when all fixed elements exceed the bitmap
dimension. All other grid elements <a href="#SkCanvas_scale">scale</a> to fill the available space, if any.
Additionally transform draw using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawImageLattice_paint">paint</a>.
@@ -4161,7 +4160,7 @@ If <a href="#SkCanvas_drawImageLattice_paint">paint</a> contains <a href="undocu
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
just as <a href="undocumented#Shader">Shader</a> made from <a href="#SkShader_MakeBitmapShader">SkShader::MakeBitmapShader</a> with
-<a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the bitmap's edge color when it samples
+<a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> set replicates the bitmap edge color when it samples
outside of its bounds.
### Parameters
@@ -4171,7 +4170,7 @@ outside of its bounds.
</tr> <tr> <td><a name="SkCanvas_drawImageLattice_lattice"> <code><strong>lattice </strong></code> </a></td> <td>
division of bitmap into fixed and variable rectangles</td>
</tr> <tr> <td><a name="SkCanvas_drawImageLattice_dst"> <code><strong>dst </strong></code> </a></td> <td>
-destination <a href="undocumented#Rect">Rect</a> of <a href="#SkCanvas_drawImageLattice_image">image</a> to draw to</td>
+destination <a href="SkRect_Reference#Rect">Rect</a> of <a href="#SkCanvas_drawImageLattice_image">image</a> to draw to</td>
</tr> <tr> <td><a name="SkCanvas_drawImageLattice_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="SkPaint_Reference#Paint">Paint</a> containing <a href="undocumented#Blend_Mode">Blend Mode</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>,
and so on; or nullptr</td>
@@ -4197,11 +4196,11 @@ void drawText(const void* text, size_t byteLength, SkScalar x, SkScalar y,
Draw <a href="#SkCanvas_drawText_text">text</a>, with origin at (<a href="#SkCanvas_drawText_x">x</a>, <a href="#SkCanvas_drawText_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_drawText_paint">paint</a>.
-<a href="#SkCanvas_drawText_text">text</a>'s meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, <a href="#SkCanvas_drawText_text">text</a> encoding is
+<a href="#SkCanvas_drawText_text">text</a> meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, <a href="#SkCanvas_drawText_text">text</a> is encoded as
<a href="undocumented#UTF_8">UTF-8</a>.
<a href="#SkCanvas_drawText_x">x</a> and <a href="#SkCanvas_drawText_y">y</a> meaning depends on <a href="#Text_Align">Paint Text Align</a> and <a href="#Vertical_Text">Paint Vertical Text</a>; by default
-<a href="#SkCanvas_drawText_text">text</a> draws left to right, positioning the first glyph's left side bearing at <a href="#SkCanvas_drawText_x">x</a>
+<a href="#SkCanvas_drawText_text">text</a> draws left to right, positioning the first glyph left side bearing at <a href="#SkCanvas_drawText_x">x</a>
and its baseline at <a href="#SkCanvas_drawText_y">y</a>. <a href="undocumented#Text">Text</a> size is affected by <a href="#Matrix">Matrix</a> and <a href="#Text_Size">Paint Text Size</a>.
All elements of <a href="#SkCanvas_drawText_paint">paint</a>: <a href="undocumented#Path_Effect">Path Effect</a>, <a href="undocumented#Rasterizer">Rasterizer</a>, <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="undocumented#Shader">Shader</a>,
@@ -4240,12 +4239,12 @@ void drawString(const char* string, SkScalar x, SkScalar y, const SkPaint& paint
Draw null terminated <a href="#SkCanvas_drawString_string">string</a>, with origin at (<a href="#SkCanvas_drawString_x">x</a>, <a href="#SkCanvas_drawString_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_drawString_paint">paint</a>.
-<a href="#SkCanvas_drawString_string">string</a>'s meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, <a href="#SkCanvas_drawString_string">string</a> encoding is
-<a href="undocumented#UTF_8">UTF-8</a>. Other values of <a href="#Text_Encoding">Paint Text Encoding</a> are unlikely to produce the desired
+<a href="#SkCanvas_drawString_string">string</a> meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, strings are encoded
+as <a href="undocumented#UTF_8">UTF-8</a>. Other values of <a href="#Text_Encoding">Paint Text Encoding</a> are unlikely to produce the desired
results, since zero bytes may be embedded in the <a href="#SkCanvas_drawString_string">string</a>.
<a href="#SkCanvas_drawString_x">x</a> and <a href="#SkCanvas_drawString_y">y</a> meaning depends on <a href="#Text_Align">Paint Text Align</a> and <a href="#Vertical_Text">Paint Vertical Text</a>; by default
-<a href="#SkCanvas_drawString_string">string</a> draws left to right, positioning the first glyph's left side bearing at <a href="#SkCanvas_drawString_x">x</a>
+<a href="#SkCanvas_drawString_string">string</a> draws left to right, positioning the first glyph left side bearing at <a href="#SkCanvas_drawString_x">x</a>
and its baseline at <a href="#SkCanvas_drawString_y">y</a>. <a href="undocumented#Text">Text</a> size is affected by <a href="#Matrix">Matrix</a> and <a href="#Text_Size">Paint Text Size</a>.
All elements of <a href="#SkCanvas_drawString_paint">paint</a>: <a href="undocumented#Path_Effect">Path Effect</a>, <a href="undocumented#Rasterizer">Rasterizer</a>, <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="undocumented#Shader">Shader</a>,
@@ -4284,12 +4283,12 @@ void drawString(const SkString& string, SkScalar x, SkScalar y,
Draw null terminated <a href="#SkCanvas_drawString_2_string">string</a>, with origin at (<a href="#SkCanvas_drawString_2_x">x</a>, <a href="#SkCanvas_drawString_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_drawString_2_paint">paint</a>.
-<a href="#SkCanvas_drawString_2_string">string</a>'s meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, <a href="#SkCanvas_drawString_2_string">string</a> encoding is
-<a href="undocumented#UTF_8">UTF-8</a>. Other values of <a href="#Text_Encoding">Paint Text Encoding</a> are unlikely to produce the desired
+<a href="#SkCanvas_drawString_2_string">string</a> meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, strings are encoded
+as <a href="undocumented#UTF_8">UTF-8</a>. Other values of <a href="#Text_Encoding">Paint Text Encoding</a> are unlikely to produce the desired
results, since zero bytes may be embedded in the <a href="#SkCanvas_drawString_2_string">string</a>.
<a href="#SkCanvas_drawString_2_x">x</a> and <a href="#SkCanvas_drawString_2_y">y</a> meaning depends on <a href="#Text_Align">Paint Text Align</a> and <a href="#Vertical_Text">Paint Vertical Text</a>; by default
-<a href="#SkCanvas_drawString_2_string">string</a> draws left to right, positioning the first glyph's left side bearing at <a href="#SkCanvas_drawString_2_x">x</a>
+<a href="#SkCanvas_drawString_2_string">string</a> draws left to right, positioning the first glyph left side bearing at <a href="#SkCanvas_drawString_2_x">x</a>
and its baseline at <a href="#SkCanvas_drawString_2_y">y</a>. <a href="undocumented#Text">Text</a> size is affected by <a href="#Matrix">Matrix</a> and <a href="#Text_Size">Paint Text Size</a>.
All elements of <a href="#SkCanvas_drawString_2_paint">paint</a>: <a href="undocumented#Path_Effect">Path Effect</a>, <a href="undocumented#Rasterizer">Rasterizer</a>, <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="undocumented#Shader">Shader</a>,
@@ -4332,9 +4331,9 @@ Draw each glyph in <a href="#SkCanvas_drawPosText_text">text</a> with the origin
<a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawPosText_paint">paint</a>. The number of entries in <a href="#SkCanvas_drawPosText_pos">pos</a> array must match the number of <a href="#Glyph">Glyphs</a>
described by <a href="#SkCanvas_drawPosText_byteLength">byteLength</a> of <a href="#SkCanvas_drawPosText_text">text</a>.
-<a href="#SkCanvas_drawPosText_text">text</a>'s meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, <a href="#SkCanvas_drawPosText_text">text</a> encoding is
+<a href="#SkCanvas_drawPosText_text">text</a> meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, <a href="#SkCanvas_drawPosText_text">text</a> is encoded as
<a href="undocumented#UTF_8">UTF-8</a>. <a href="#SkCanvas_drawPosText_pos">pos</a> elements' meaning depends on <a href="#Text_Align">Paint Text Align</a> and <a href="#Vertical_Text">Paint Vertical Text</a>;
-by default each glyph's left side bearing is positioned at x and its
+by default each glyph left side bearing is positioned at x and its
baseline is positioned at y. <a href="undocumented#Text">Text</a> size is affected by <a href="#Matrix">Matrix</a> and
<a href="#Text_Size">Paint Text Size</a>.
@@ -4343,7 +4342,7 @@ All elements of <a href="#SkCanvas_drawPosText_paint">paint</a>: <a href="undocu
filled 12 point black <a href="#Glyph">Glyphs</a>.
Layout engines such as <a href="undocumented#Harfbuzz">Harfbuzz</a> typically position each glyph
-rather than using the font's advance widths.
+rather than using the font advance widths.
### Parameters
@@ -4376,9 +4375,9 @@ Draw each glyph in <a href="#SkCanvas_drawPosTextH_text">text</a> with its (x, y
<a href="#SkCanvas_drawPosTextH_constY">constY</a>, using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawPosTextH_paint">paint</a>. The number of entries in <a href="#SkCanvas_drawPosTextH_xpos">xpos</a> array
must match the number of <a href="#Glyph">Glyphs</a> described by <a href="#SkCanvas_drawPosTextH_byteLength">byteLength</a> of <a href="#SkCanvas_drawPosTextH_text">text</a>.
-<a href="#SkCanvas_drawPosTextH_text">text</a>'s meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, <a href="#SkCanvas_drawPosTextH_text">text</a> encoding is
+<a href="#SkCanvas_drawPosTextH_text">text</a> meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, <a href="#SkCanvas_drawPosTextH_text">text</a> is encoded as
<a href="undocumented#UTF_8">UTF-8</a>. <a href="#SkCanvas_drawPosTextH_xpos">xpos</a> elements' meaning depends on <a href="#Text_Align">Paint Text Align</a> and <a href="#Vertical_Text">Paint Vertical Text</a>;
-by default each glyph's left side bearing is positioned at an <a href="#SkCanvas_drawPosTextH_xpos">xpos</a> element and
+by default each glyph left side bearing is positioned at an <a href="#SkCanvas_drawPosTextH_xpos">xpos</a> element and
its baseline is positioned at <a href="#SkCanvas_drawPosTextH_constY">constY</a>. <a href="undocumented#Text">Text</a> size is affected by <a href="#Matrix">Matrix</a> and
<a href="#Text_Size">Paint Text Size</a>.
@@ -4387,7 +4386,7 @@ All elements of <a href="#SkCanvas_drawPosTextH_paint">paint</a>: <a href="undoc
filled 12 point black <a href="#Glyph">Glyphs</a>.
Layout engines such as <a href="undocumented#Harfbuzz">Harfbuzz</a> typically position each glyph
-rather than using the font's advance widths if all <a href="#Glyph">Glyphs</a> share the same
+rather than using the font advance widths if all <a href="#Glyph">Glyphs</a> share the same
baseline.
### Parameters
@@ -4424,12 +4423,12 @@ Draw <a href="#SkCanvas_drawTextOnPathHV_text">text</a> on <a href="SkPath_Refer
Origin of <a href="#SkCanvas_drawTextOnPathHV_text">text</a> is at distance <a href="#SkCanvas_drawTextOnPathHV_hOffset">hOffset</a> along the <a href="#SkCanvas_drawTextOnPathHV_path">path</a>, offset by a perpendicular
vector of length <a href="#SkCanvas_drawTextOnPathHV_vOffset">vOffset</a>. If the <a href="#SkCanvas_drawTextOnPathHV_path">path</a> section corresponding the glyph advance is
curved, the glyph is drawn curved to match; control points in the glyph are
-mapped to projected points parallel to the <a href="#SkCanvas_drawTextOnPathHV_path">path</a>. If the <a href="#SkCanvas_drawTextOnPathHV_text">text</a>'s advance is larger
+mapped to projected points parallel to the <a href="#SkCanvas_drawTextOnPathHV_path">path</a>. If the <a href="#SkCanvas_drawTextOnPathHV_text">text</a> advance is larger
than the <a href="#SkCanvas_drawTextOnPathHV_path">path</a> length, the excess <a href="#SkCanvas_drawTextOnPathHV_text">text</a> is clipped.
-<a href="#SkCanvas_drawTextOnPathHV_text">text</a>'s meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, <a href="#SkCanvas_drawTextOnPathHV_text">text</a> encoding is
+<a href="#SkCanvas_drawTextOnPathHV_text">text</a> meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, <a href="#SkCanvas_drawTextOnPathHV_text">text</a> is encoded as
<a href="undocumented#UTF_8">UTF-8</a>. Origin meaning depends on <a href="#Text_Align">Paint Text Align</a> and <a href="#Vertical_Text">Paint Vertical Text</a>; by
-default <a href="#SkCanvas_drawTextOnPathHV_text">text</a> positions the first glyph's left side bearing at origin x and its
+default <a href="#SkCanvas_drawTextOnPathHV_text">text</a> positions the first glyph left side bearing at origin x and its
baseline at origin y. <a href="undocumented#Text">Text</a> size is affected by <a href="#Matrix">Matrix</a> and <a href="#Text_Size">Paint Text Size</a>.
All elements of <a href="#SkCanvas_drawTextOnPathHV_paint">paint</a>: <a href="undocumented#Path_Effect">Path Effect</a>, <a href="undocumented#Rasterizer">Rasterizer</a>, <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="undocumented#Shader">Shader</a>,
@@ -4472,12 +4471,12 @@ Draw <a href="#SkCanvas_drawTextOnPath_text">text</a> on <a href="SkPath_Referen
Origin of <a href="#SkCanvas_drawTextOnPath_text">text</a> is at beginning of <a href="#SkCanvas_drawTextOnPath_path">path</a> offset by <a href="#SkCanvas_drawTextOnPath_matrix">matrix</a>, if provided, before it
is mapped to <a href="#SkCanvas_drawTextOnPath_path">path</a>. If the <a href="#SkCanvas_drawTextOnPath_path">path</a> section corresponding the glyph advance is
curved, the glyph is drawn curved to match; control points in the glyph are
-mapped to projected points parallel to the <a href="#SkCanvas_drawTextOnPath_path">path</a>. If the <a href="#SkCanvas_drawTextOnPath_text">text</a>'s advance is larger
+mapped to projected points parallel to the <a href="#SkCanvas_drawTextOnPath_path">path</a>. If the <a href="#SkCanvas_drawTextOnPath_text">text</a> advance is larger
than the <a href="#SkCanvas_drawTextOnPath_path">path</a> length, the excess <a href="#SkCanvas_drawTextOnPath_text">text</a> is clipped.
-<a href="#SkCanvas_drawTextOnPath_text">text</a>'s meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, <a href="#SkCanvas_drawTextOnPath_text">text</a> encoding is
+<a href="#SkCanvas_drawTextOnPath_text">text</a> meaning depends on <a href="#Text_Encoding">Paint Text Encoding</a>; by default, <a href="#SkCanvas_drawTextOnPath_text">text</a> is encoded as
<a href="undocumented#UTF_8">UTF-8</a>. Origin meaning depends on <a href="#Text_Align">Paint Text Align</a> and <a href="#Vertical_Text">Paint Vertical Text</a>; by
-default <a href="#SkCanvas_drawTextOnPath_text">text</a> positions the first glyph's left side bearing at origin x and its
+default <a href="#SkCanvas_drawTextOnPath_text">text</a> positions the first glyph left side bearing at origin x and its
baseline at origin y. <a href="undocumented#Text">Text</a> size is affected by <a href="#Matrix">Matrix</a> and <a href="#Text_Size">Paint Text Size</a>.
All elements of <a href="#SkCanvas_drawTextOnPath_paint">paint</a>: <a href="undocumented#Path_Effect">Path Effect</a>, <a href="undocumented#Rasterizer">Rasterizer</a>, <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="undocumented#Shader">Shader</a>,
@@ -4521,7 +4520,7 @@ using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and <a href="SkPai
<a href="undocumented#RSXform">RSXform</a> array specifies a separate square <a href="#SkCanvas_scale">scale</a>, rotation, and translation for
each glyph.
-Optional <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawTextRSXform_cullRect">cullRect</a> is a conservative bounds of <a href="#SkCanvas_drawTextRSXform_text">text</a>, taking into account
+Optional <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawTextRSXform_cullRect">cullRect</a> is a conservative bounds of <a href="#SkCanvas_drawTextRSXform_text">text</a>, taking into account
<a href="undocumented#RSXform">RSXform</a> and <a href="#SkCanvas_drawTextRSXform_paint">paint</a>. If <a href="#SkCanvas_drawTextRSXform_cullRect">cullRect</a> is outside of <a href="#Clip">Clip</a>, canvas can skip drawing.
All elements of <a href="#SkCanvas_drawTextRSXform_paint">paint</a>: <a href="undocumented#Path_Effect">Path Effect</a>, <a href="undocumented#Rasterizer">Rasterizer</a>, <a href="undocumented#Mask_Filter">Mask Filter</a>, <a href="undocumented#Shader">Shader</a>,
@@ -4537,7 +4536,7 @@ byte length of <a href="#SkCanvas_drawTextRSXform_text">text</a> array</td>
</tr> <tr> <td><a name="SkCanvas_drawTextRSXform_xform"> <code><strong>xform </strong></code> </a></td> <td>
<a href="undocumented#RSXform">RSXform</a> rotates, scales, and translates each glyph individually</td>
</tr> <tr> <td><a name="SkCanvas_drawTextRSXform_cullRect"> <code><strong>cullRect </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> bounds of <a href="#SkCanvas_drawTextRSXform_text">text</a> for efficient clipping; or nullptr</td>
+<a href="SkRect_Reference#Rect">Rect</a> bounds of <a href="#SkCanvas_drawTextRSXform_text">text</a> for efficient clipping; or nullptr</td>
</tr> <tr> <td><a name="SkCanvas_drawTextRSXform_paint"> <code><strong>paint </strong></code> </a></td> <td>
<a href="#SkCanvas_drawTextRSXform_text">text</a> size, blend, color, and so on, used to draw</td>
</tr>
@@ -4588,7 +4587,7 @@ blend, color, stroking, and so on, used to draw</td>
---
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void drawTextBlob(const sk_sp<SkTextBlob>& blob, SkScalar x, SkScalar y,
+void drawTextBlob(const sk_sp&lt;SkTextBlob&gt;& blob, SkScalar x, SkScalar y,
const SkPaint& paint)
</pre>
@@ -4650,7 +4649,7 @@ recorded drawing commands to play</td>
---
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void drawPicture(const sk_sp<SkPicture>& picture)
+void drawPicture(const sk_sp&lt;SkPicture&gt;& picture)
</pre>
Draw <a href="undocumented#Picture">Picture</a> <a href="#SkCanvas_drawPicture_2_picture">picture</a>, using <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a>.
@@ -4702,7 +4701,7 @@ recorded drawing commands to play</td>
---
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void drawPicture(const sk_sp<SkPicture>& picture, const SkMatrix* matrix,
+void drawPicture(const sk_sp&lt;SkPicture&gt;& picture, const SkMatrix* matrix,
const SkPaint* paint)
</pre>
@@ -4760,7 +4759,7 @@ specifies the <a href="undocumented#Shader">Shader</a>, used as <a href="undocum
---
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void drawVertices(const sk_sp<SkVertices>& vertices, SkBlendMode mode,
+void drawVertices(const sk_sp&lt;SkVertices&gt;& vertices, SkBlendMode mode,
const SkPaint& paint)
</pre>
@@ -4797,20 +4796,20 @@ void drawPatch(const SkPoint cubics[12], const SkColor colors[4],
Draws a <a href="undocumented#Coons">Coons</a> patch: the interpolation of four <a href="#SkCanvas_drawPatch_cubics">cubics</a> with shared corners,
associating a color, and optionally a texture coordinate, with each corner.
-The <a href="undocumented#Coons">Coons</a> patch uses <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a>, <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawPatch_paint">paint</a>'s <a href="undocumented#Shader">Shader</a>, <a href="undocumented#Color_Filter">Color Filter</a>,
+The <a href="undocumented#Coons">Coons</a> patch uses <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a>, <a href="#SkCanvas_drawPatch_paint">paint</a> <a href="undocumented#Shader">Shader</a>, <a href="undocumented#Color_Filter">Color Filter</a>,
<a href="#Alpha">Color Alpha</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Blend_Mode">Blend Mode</a>. If <a href="undocumented#Shader">Shader</a> is provided it is treated
as the <a href="undocumented#Coons">Coons</a> patch texture; <a href="undocumented#Blend_Mode">Blend Mode</a> <a href="#SkCanvas_drawPatch_mode">mode</a> combines <a href="undocumented#Color">Color</a> <a href="#SkCanvas_drawPatch_colors">colors</a> and <a href="undocumented#Shader">Shader</a> if
both are provided.
-<a href="undocumented#Point">Point</a> array <a href="#SkCanvas_drawPatch_cubics">cubics</a> specifies four <a href="#Cubic">Cubics</a> starting at the top left corner,
+<a href="undocumented#Point">Point</a> array <a href="#SkCanvas_drawPatch_cubics">cubics</a> specifies four <a href="#Cubic">Cubics</a> starting at the top-left corner,
in clockwise order, sharing every fourth point. The last <a href="#Cubic">Cubic</a> ends at the
first point.
-<a href="undocumented#Color">Color</a> array color associates <a href="#SkCanvas_drawPatch_colors">colors</a> with corners in top left, top right,
-bottom right, bottom left order.
+<a href="undocumented#Color">Color</a> array color associates <a href="#SkCanvas_drawPatch_colors">colors</a> with corners in top-left, top-right,
+bottom-right, bottom-left order.
If <a href="#SkCanvas_drawPatch_paint">paint</a> contains <a href="undocumented#Shader">Shader</a>, <a href="undocumented#Point">Point</a> array <a href="#SkCanvas_drawPatch_texCoords">texCoords</a> maps <a href="undocumented#Shader">Shader</a> as texture to
-corners in top left, top right, bottom right, bottom left order.
+corners in top-left, top-right, bottom-right, bottom-left order.
### Parameters
@@ -4843,20 +4842,20 @@ void drawPatch(const SkPoint cubics[12], const SkColor colors[4],
Draws <a href="#Cubic">Cubic</a> <a href="undocumented#Coons">Coons</a> patch: the interpolation of four <a href="#SkCanvas_drawPatch_2_cubics">cubics</a> with shared corners,
associating a color, and optionally a texture coordinate, with each corner.
-The <a href="undocumented#Coons">Coons</a> patch uses <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a>, <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawPatch_2_paint">paint</a>'s <a href="undocumented#Shader">Shader</a>, <a href="undocumented#Color_Filter">Color Filter</a>,
+The <a href="undocumented#Coons">Coons</a> patch uses <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a>, <a href="#SkCanvas_drawPatch_2_paint">paint</a> <a href="undocumented#Shader">Shader</a>, <a href="undocumented#Color_Filter">Color Filter</a>,
<a href="#Alpha">Color Alpha</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Blend_Mode">Blend Mode</a>. If <a href="undocumented#Shader">Shader</a> is provided it is treated
as the <a href="undocumented#Coons">Coons</a> patch texture; <a href="undocumented#Blend_Mode">Blend Mode</a> mode combines <a href="undocumented#Color">Color</a> <a href="#SkCanvas_drawPatch_2_colors">colors</a> and <a href="undocumented#Shader">Shader</a> if
both are provided.
-<a href="undocumented#Point">Point</a> array <a href="#SkCanvas_drawPatch_2_cubics">cubics</a> specifies four <a href="#Cubic">Cubics</a> starting at the top left corner,
+<a href="undocumented#Point">Point</a> array <a href="#SkCanvas_drawPatch_2_cubics">cubics</a> specifies four <a href="#Cubic">Cubics</a> starting at the top-left corner,
in clockwise order, sharing every fourth point. The last <a href="#Cubic">Cubic</a> ends at the
first point.
-<a href="undocumented#Color">Color</a> array color associates <a href="#SkCanvas_drawPatch_2_colors">colors</a> with corners in top left, top right,
-bottom right, bottom left order.
+<a href="undocumented#Color">Color</a> array color associates <a href="#SkCanvas_drawPatch_2_colors">colors</a> with corners in top-left, top-right,
+bottom-right, bottom-left order.
If <a href="#SkCanvas_drawPatch_2_paint">paint</a> contains <a href="undocumented#Shader">Shader</a>, <a href="undocumented#Point">Point</a> array <a href="#SkCanvas_drawPatch_2_texCoords">texCoords</a> maps <a href="undocumented#Shader">Shader</a> as texture to
-corners in top left, top right, bottom right, bottom left order.
+corners in top-left, top-right, bottom-right, bottom-left order.
### Parameters
@@ -4894,7 +4893,7 @@ void drawAtlas(const SkImage* atlas, const SkRSXform xform[], const SkRect tex[]
Draw a set of sprites from <a href="#SkCanvas_drawAtlas_atlas">atlas</a>, using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawAtlas_paint">paint</a>.
<a href="#SkCanvas_drawAtlas_paint">paint</a> uses <a href="SkPaint_Reference#Anti_alias">Anti-alias</a>, <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Blend_Mode">Blend Mode</a>
-to draw, if present. For each entry in the array, <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawAtlas_tex">tex</a> locates sprite in
+to draw, if present. For each entry in the array, <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawAtlas_tex">tex</a> locates sprite in
<a href="#SkCanvas_drawAtlas_atlas">atlas</a>, and <a href="undocumented#RSXform">RSXform</a> <a href="#SkCanvas_drawAtlas_xform">xform</a> transforms it into destination space.
<a href="#SkCanvas_drawAtlas_xform">xform</a>, text, and <a href="#SkCanvas_drawAtlas_colors">colors</a> if present, must contain <a href="#SkCanvas_drawAtlas_count">count</a> entries.
@@ -4909,7 +4908,7 @@ If <a href="#SkCanvas_drawAtlas_cullRect">cullRect</a> is outside of <a href="#C
</tr> <tr> <td><a name="SkCanvas_drawAtlas_xform"> <code><strong>xform </strong></code> </a></td> <td>
<a href="undocumented#RSXform">RSXform</a> mappings for sprites in <a href="#SkCanvas_drawAtlas_atlas">atlas</a></td>
</tr> <tr> <td><a name="SkCanvas_drawAtlas_tex"> <code><strong>tex </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> locations of sprites in <a href="#SkCanvas_drawAtlas_atlas">atlas</a></td>
+<a href="SkRect_Reference#Rect">Rect</a> locations of sprites in <a href="#SkCanvas_drawAtlas_atlas">atlas</a></td>
</tr> <tr> <td><a name="SkCanvas_drawAtlas_colors"> <code><strong>colors </strong></code> </a></td> <td>
one per sprite, blended with sprite using <a href="undocumented#Blend_Mode">Blend Mode</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_drawAtlas_count"> <code><strong>count </strong></code> </a></td> <td>
@@ -4930,14 +4929,14 @@ bounds of transformed sprites for efficient clipping; may be nullptr</td>
---
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void drawAtlas(const sk_sp<SkImage>& atlas, const SkRSXform xform[],
+void drawAtlas(const sk_sp&lt;SkImage&gt;& atlas, const SkRSXform xform[],
const SkRect tex[], const SkColor colors[], int count,
SkBlendMode mode, const SkRect* cullRect, const SkPaint* paint)
</pre>
Draw a set of sprites from <a href="#SkCanvas_drawAtlas_2_atlas">atlas</a>, using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawAtlas_2_paint">paint</a>.
<a href="#SkCanvas_drawAtlas_2_paint">paint</a> uses <a href="SkPaint_Reference#Anti_alias">Anti-alias</a>, <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Blend_Mode">Blend Mode</a>
-to draw, if present. For each entry in the array, <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawAtlas_2_tex">tex</a> locates sprite in
+to draw, if present. For each entry in the array, <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawAtlas_2_tex">tex</a> locates sprite in
<a href="#SkCanvas_drawAtlas_2_atlas">atlas</a>, and <a href="undocumented#RSXform">RSXform</a> <a href="#SkCanvas_drawAtlas_2_xform">xform</a> transforms it into destination space.
<a href="#SkCanvas_drawAtlas_2_xform">xform</a>, text, and <a href="#SkCanvas_drawAtlas_2_colors">colors</a> if present, must contain <a href="#SkCanvas_drawAtlas_2_count">count</a> entries.
@@ -4952,7 +4951,7 @@ If <a href="#SkCanvas_drawAtlas_2_cullRect">cullRect</a> is outside of <a href="
</tr> <tr> <td><a name="SkCanvas_drawAtlas_2_xform"> <code><strong>xform </strong></code> </a></td> <td>
<a href="undocumented#RSXform">RSXform</a> mappings for sprites in <a href="#SkCanvas_drawAtlas_2_atlas">atlas</a></td>
</tr> <tr> <td><a name="SkCanvas_drawAtlas_2_tex"> <code><strong>tex </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> locations of sprites in <a href="#SkCanvas_drawAtlas_2_atlas">atlas</a></td>
+<a href="SkRect_Reference#Rect">Rect</a> locations of sprites in <a href="#SkCanvas_drawAtlas_2_atlas">atlas</a></td>
</tr> <tr> <td><a name="SkCanvas_drawAtlas_2_colors"> <code><strong>colors </strong></code> </a></td> <td>
one per sprite, blended with sprite using <a href="undocumented#Blend_Mode">Blend Mode</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkCanvas_drawAtlas_2_count"> <code><strong>count </strong></code> </a></td> <td>
@@ -4979,7 +4978,7 @@ void drawAtlas(const SkImage* atlas, const SkRSXform xform[], const SkRect tex[]
Draw a set of sprites from <a href="#SkCanvas_drawAtlas_3_atlas">atlas</a>, using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawAtlas_3_paint">paint</a>.
<a href="#SkCanvas_drawAtlas_3_paint">paint</a> uses <a href="SkPaint_Reference#Anti_alias">Anti-alias</a>, <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Blend_Mode">Blend Mode</a>
-to draw, if present. For each entry in the array, <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawAtlas_3_tex">tex</a> locates sprite in
+to draw, if present. For each entry in the array, <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawAtlas_3_tex">tex</a> locates sprite in
<a href="#SkCanvas_drawAtlas_3_atlas">atlas</a>, and <a href="undocumented#RSXform">RSXform</a> <a href="#SkCanvas_drawAtlas_3_xform">xform</a> transforms it into destination space.
<a href="#SkCanvas_drawAtlas_3_xform">xform</a> and text must contain <a href="#SkCanvas_drawAtlas_3_count">count</a> entries.
@@ -4993,7 +4992,7 @@ If <a href="#SkCanvas_drawAtlas_3_cullRect">cullRect</a> is outside of <a href="
</tr> <tr> <td><a name="SkCanvas_drawAtlas_3_xform"> <code><strong>xform </strong></code> </a></td> <td>
<a href="undocumented#RSXform">RSXform</a> mappings for sprites in <a href="#SkCanvas_drawAtlas_3_atlas">atlas</a></td>
</tr> <tr> <td><a name="SkCanvas_drawAtlas_3_tex"> <code><strong>tex </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> locations of sprites in <a href="#SkCanvas_drawAtlas_3_atlas">atlas</a></td>
+<a href="SkRect_Reference#Rect">Rect</a> locations of sprites in <a href="#SkCanvas_drawAtlas_3_atlas">atlas</a></td>
</tr> <tr> <td><a name="SkCanvas_drawAtlas_3_count"> <code><strong>count </strong></code> </a></td> <td>
number of sprites to draw</td>
</tr> <tr> <td><a name="SkCanvas_drawAtlas_3_cullRect"> <code><strong>cullRect </strong></code> </a></td> <td>
@@ -5010,14 +5009,14 @@ bounds of transformed sprites for efficient clipping; may be nullptr</td>
---
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void drawAtlas(const sk_sp<SkImage>& atlas, const SkRSXform xform[],
+void drawAtlas(const sk_sp&lt;SkImage&gt;& atlas, const SkRSXform xform[],
const SkRect tex[], int count, const SkRect* cullRect,
const SkPaint* paint)
</pre>
Draw a set of sprites from <a href="#SkCanvas_drawAtlas_4_atlas">atlas</a>, using <a href="#Clip">Clip</a>, <a href="#Matrix">Matrix</a>, and optional <a href="SkPaint_Reference#Paint">Paint</a> <a href="#SkCanvas_drawAtlas_4_paint">paint</a>.
<a href="#SkCanvas_drawAtlas_4_paint">paint</a> uses <a href="SkPaint_Reference#Anti_alias">Anti-alias</a>, <a href="#Alpha">Color Alpha</a>, <a href="undocumented#Color_Filter">Color Filter</a>, <a href="undocumented#Image_Filter">Image Filter</a>, and <a href="undocumented#Blend_Mode">Blend Mode</a>
-to draw, if present. For each entry in the array, <a href="undocumented#Rect">Rect</a> <a href="#SkCanvas_drawAtlas_4_tex">tex</a> locates sprite in
+to draw, if present. For each entry in the array, <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkCanvas_drawAtlas_4_tex">tex</a> locates sprite in
<a href="#SkCanvas_drawAtlas_4_atlas">atlas</a>, and <a href="undocumented#RSXform">RSXform</a> <a href="#SkCanvas_drawAtlas_4_xform">xform</a> transforms it into destination space.
<a href="#SkCanvas_drawAtlas_4_xform">xform</a> and text must contain <a href="#SkCanvas_drawAtlas_4_count">count</a> entries.
@@ -5031,7 +5030,7 @@ If <a href="#SkCanvas_drawAtlas_4_cullRect">cullRect</a> is outside of <a href="
</tr> <tr> <td><a name="SkCanvas_drawAtlas_4_xform"> <code><strong>xform </strong></code> </a></td> <td>
<a href="undocumented#RSXform">RSXform</a> mappings for sprites in <a href="#SkCanvas_drawAtlas_4_atlas">atlas</a></td>
</tr> <tr> <td><a name="SkCanvas_drawAtlas_4_tex"> <code><strong>tex </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> locations of sprites in <a href="#SkCanvas_drawAtlas_4_atlas">atlas</a></td>
+<a href="SkRect_Reference#Rect">Rect</a> locations of sprites in <a href="#SkCanvas_drawAtlas_4_atlas">atlas</a></td>
</tr> <tr> <td><a name="SkCanvas_drawAtlas_4_count"> <code><strong>count </strong></code> </a></td> <td>
number of sprites to draw</td>
</tr> <tr> <td><a name="SkCanvas_drawAtlas_4_cullRect"> <code><strong>cullRect </strong></code> </a></td> <td>
@@ -5112,7 +5111,7 @@ offset into <a href="#Canvas">Canvas</a> writable pixels in <a href="#SkCanvas_d
void drawAnnotation(const SkRect& rect, const char key[], SkData* value)
</pre>
-Associate <a href="undocumented#Rect">Rect</a> on <a href="#Canvas">Canvas</a> when an annotation; a key-value pair, where the <a href="#SkCanvas_drawAnnotation_key">key</a> is
+Associate <a href="SkRect_Reference#Rect">Rect</a> on <a href="#Canvas">Canvas</a> when an annotation; a key-value pair, where the <a href="#SkCanvas_drawAnnotation_key">key</a> is
a null-terminated utf8 string, and optional <a href="#SkCanvas_drawAnnotation_value">value</a> is stored as <a href="undocumented#Data">Data</a>.
Only some canvas implementations, such as recording to <a href="undocumented#Picture">Picture</a>, or drawing to
@@ -5121,7 +5120,7 @@ Only some canvas implementations, such as recording to <a href="undocumented#Pic
### Parameters
<table> <tr> <td><a name="SkCanvas_drawAnnotation_rect"> <code><strong>rect </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> extent of canvas to annotate</td>
+<a href="SkRect_Reference#Rect">Rect</a> extent of canvas to annotate</td>
</tr> <tr> <td><a name="SkCanvas_drawAnnotation_key"> <code><strong>key </strong></code> </a></td> <td>
string used for lookup</td>
</tr> <tr> <td><a name="SkCanvas_drawAnnotation_value"> <code><strong>value </strong></code> </a></td> <td>
@@ -5137,10 +5136,10 @@ data holding <a href="#SkCanvas_drawAnnotation_value">value</a> stored in annota
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
void drawAnnotation(const SkRect& rect, const char key[],
- const sk_sp<SkData>& value)
+ const sk_sp&lt;SkData&gt;& value)
</pre>
-Associate <a href="undocumented#Rect">Rect</a> on <a href="#Canvas">Canvas</a> when an annotation; a key-value pair, where the <a href="#SkCanvas_drawAnnotation_2_key">key</a> is
+Associate <a href="SkRect_Reference#Rect">Rect</a> on <a href="#Canvas">Canvas</a> when an annotation; a key-value pair, where the <a href="#SkCanvas_drawAnnotation_2_key">key</a> is
a null-terminated utf8 string, and optional <a href="#SkCanvas_drawAnnotation_2_value">value</a> is stored as <a href="undocumented#Data">Data</a>.
Only some canvas implementations, such as recording to <a href="undocumented#Picture">Picture</a>, or drawing to
@@ -5149,7 +5148,7 @@ Only some canvas implementations, such as recording to <a href="undocumented#Pic
### Parameters
<table> <tr> <td><a name="SkCanvas_drawAnnotation_2_rect"> <code><strong>rect </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> extent of canvas to annotate</td>
+<a href="SkRect_Reference#Rect">Rect</a> extent of canvas to annotate</td>
</tr> <tr> <td><a name="SkCanvas_drawAnnotation_2_key"> <code><strong>key </strong></code> </a></td> <td>
string used for lookup</td>
</tr> <tr> <td><a name="SkCanvas_drawAnnotation_2_value"> <code><strong>value </strong></code> </a></td> <td>
@@ -5224,12 +5223,12 @@ clip is empty
virtual bool isClipRect() const
</pre>
-Returns true if <a href="#Clip">Clip</a> is <a href="undocumented#Rect">Rect</a> and not empty.
-Returns false if the clip is empty, or if it is not <a href="undocumented#Rect">Rect</a>.
+Returns true if <a href="#Clip">Clip</a> is <a href="SkRect_Reference#Rect">Rect</a> and not empty.
+Returns false if the clip is empty, or if it is not <a href="SkRect_Reference#Rect">Rect</a>.
### Return Value
-true if <a href="#Clip">Clip</a> is <a href="undocumented#Rect">Rect</a> and not empty
+true if <a href="#Clip">Clip</a> is <a href="SkRect_Reference#Rect">Rect</a> and not empty
### Example
diff --git a/site/user/api/SkPaint_Reference.md b/site/user/api/SkPaint_Reference.md
index d7ba1e232a..e539b3a628 100644
--- a/site/user/api/SkPaint_Reference.md
+++ b/site/user/api/SkPaint_Reference.md
@@ -88,7 +88,7 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_Hinting">Hinting</a> | Level of glyph outline adjustment. |
| <a href="#SkPaint_Join">Join</a> | Corner geometry on stroked shapes. |
| <a href="#SkPaint_Style">Style</a> | Stroke, fill, or both. |
-| <a href="#SkPaint_TextEncoding">TextEncoding</a> | Character or glyph encoding size. |
+| <a href="#SkPaint_TextEncoding">TextEncoding</a> | Character or glyph encoded size. |
## <a name="Structs"></a> Structs
@@ -154,7 +154,7 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_getStyle">getStyle</a> | Returns <a href="#SkPaint_Style">Style</a>: stroke, fill, or both. |
| <a href="#SkPaint_getTextAlign">getTextAlign</a> | Returns <a href="#SkPaint_Align">Align</a>: left, center, or right. |
| <a href="#SkPaint_getTextBlobIntercepts">getTextBlobIntercepts</a> | Returns where lines intersect <a href="undocumented#Text_Blob">Text Blob</a>; underlines. |
-| <a href="#SkPaint_getTextEncoding">getTextEncoding</a> | Returns character or glyph encoding size. |
+| <a href="#SkPaint_getTextEncoding">getTextEncoding</a> | Returns character or glyph encoded size. b |
| <a href="#SkPaint_getTextIntercepts">getTextIntercepts</a> | Returns where lines intersect text; underlines. |
| <a href="#SkPaint_getTextPath">getTextPath</a> | Returns <a href="SkPath_Reference#Path">Path</a> equivalent to text. |
| <a href="#SkPaint_getTextScaleX">getTextScaleX</a> | Returns the text horizontal scale; condensed text. |
@@ -212,7 +212,7 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_setStyle">setStyle</a> | Sets <a href="#SkPaint_Style">Style</a>: stroke, fill, or both. |
| <a href="#SkPaint_setSubpixelText">setSubpixelText</a> | Sets or clears <a href="SkPaint_Reference#Subpixel_Text">Subpixel Text</a>. |
| <a href="#SkPaint_setTextAlign">setTextAlign</a> | Sets <a href="#SkPaint_Align">Align</a>: left, center, or right. |
-| <a href="#SkPaint_setTextEncoding">setTextEncoding</a> | Sets character or glyph encoding size. |
+| <a href="#SkPaint_setTextEncoding">setTextEncoding</a> | Sets character or glyph encoded size. |
| <a href="#SkPaint_setTextScaleX">setTextScaleX</a> | Sets the text horizontal scale; condensed text. |
| <a href="#SkPaint_setTextSkewX">setTextSkewX</a> | Sets the text horizontal skew; oblique text. |
| <a href="#SkPaint_setTextSize">setTextSize</a> | Sets text size in points. |
@@ -369,8 +369,8 @@ path effect unique: true
void reset()
</pre>
-Sets all paint's contents to their initial values. This is equivalent to replacing
-the paint with the result of <a href="#SkPaint_empty_constructor">SkPaint()</a>.
+Sets all <a href="#Paint">Paint</a> contents to their initial values. This is equivalent to replacing
+<a href="#Paint">Paint</a> with the result of <a href="#SkPaint_empty_constructor">SkPaint()</a>.
### Example
@@ -949,7 +949,7 @@ at compile time.
<div><fiddle-embed name="a6575a49467ce8d28bb01cc7638fa04d"><div>A red line is drawn with transparency on the edges to make it look smoother.
A blue line draws only where the pixel centers are contained.
-The lines are drawn into <a href="undocumented#Bitmap">Bitmap</a>, then drawn magnified to make the
+The lines are drawn into <a href="SkBitmap_Reference#Bitmap">Bitmap</a>, then drawn magnified to make the
<a href="#Alias">Aliasing</a> easier to see.</div></fiddle-embed></div>
<a name="SkPaint_isAntiAlias"></a>
@@ -1361,7 +1361,7 @@ the outline glyph if <a href="#SkPaint_kEmbeddedBitmapText_Flag">kEmbeddedBitmap
includes an embedded bitmap <a href="undocumented#Glyph">Glyph</a> at odd font sizes. This example works
on platforms that use <a href="undocumented#FreeType">FreeType</a> as their <a href="#Engine">Font Engine</a>.
<a href="undocumented#Windows">Windows</a> may, but is not required to, return a bitmap glyph if
-<a href="#SkPaint_kEmbeddedBitmapText_Flag">kEmbeddedBitmapText Flag</a> is set.</div><a href="undocumented#SkBitmap">SkBitmap</a> bitmap;
+<a href="#SkPaint_kEmbeddedBitmapText_Flag">kEmbeddedBitmapText Flag</a> is set.</div><a href="SkBitmap_Reference#SkBitmap">SkBitmap</a> bitmap;
bitmap.allocN32Pixels(30, 15);
bitmap.eraseColor(0);
<a href="SkCanvas_Reference#SkCanvas">SkCanvas</a> offscreen(bitmap);
@@ -1601,7 +1601,7 @@ paint1 == paint2
# <a name="Fake_Bold"></a> Fake Bold
<a href="#Fake_Bold">Fake Bold</a> approximates the bold font style accompanying a normal font when a bold font face
is not available. <a href="undocumented#Skia">Skia</a> does not provide font substitution; it is up to the client to find the
-bold font face using the platform's <a href="undocumented#Font_Manager">Font Manager</a>.
+bold font face using the platform <a href="undocumented#Font_Manager">Font Manager</a>.
Use <a href="#Text_Skew_X">Text Skew X</a> to approximate an italic font style when the italic font face
is not available.
@@ -1687,7 +1687,7 @@ spacing by the difference of the hinted and <a href="undocumented#Unhinted">Unhi
<a href="undocumented#FreeType">FreeType</a> as their <a href="#Engine">Font Engine</a>.
<a href="SkPaint_Reference#Full_Hinting_Spacing">Full Hinting Spacing</a> is not related to text <a href="undocumented#Kerning">Kerning</a>, where the space between
-a specific pair of characters is adjusted using data in the font's <a href="undocumented#Kerning">Kerning</a> tables.
+a specific pair of characters is adjusted using data in the font <a href="undocumented#Kerning">Kerning</a> tables.
<a name="SkPaint_isDevKernText"></a>
## isDevKernText
@@ -1759,7 +1759,7 @@ in a noticeable difference.
<td><a href="#SkCanvas_drawImageRect">SkCanvas::drawImageRect</a></td> </tr>
</table>
-and when <a href="#Paint">Paint</a> has a <a href="undocumented#Shader">Shader</a> specialization that uses <a href="undocumented#Image">Image</a> or <a href="undocumented#Bitmap">Bitmap</a>.
+and when <a href="#Paint">Paint</a> has a <a href="undocumented#Shader">Shader</a> specialization that uses <a href="undocumented#Image">Image</a> or <a href="SkBitmap_Reference#Bitmap">Bitmap</a>.
<a href="undocumented#Filter_Quality">Filter Quality</a> is <a href="undocumented#SkFilterQuality">kNone SkFilterQuality</a> by default.
@@ -2044,10 +2044,10 @@ Set <a href="#Style">Style</a> to <a href="#SkPaint_kStroke_Style">kStroke Style
## <a name="Stroke"></a> Stroke
-The stroke covers the area described by following the shape's edge with a pen or brush of
+The stroke covers the area described by following the shape edge with a pen or brush of
<a href="#Stroke_Width">Stroke Width</a>. The area covered where the shape starts and stops is described by <a href="#Stroke_Cap">Stroke Cap</a>.
The area covered where the shape turns a corner is described by <a href="#Stroke_Join">Stroke Join</a>.
-The stroke is centered on the shape; it extends equally on either side of the shape's edge.
+The stroke is centered on the shape; it extends equally on either side of the shape edge.
As <a href="#Stroke_Width">Stroke Width</a> gets smaller, the drawn path frame is thinner. <a href="#Stroke_Width">Stroke Width</a> less than one
may have gaps, and if <a href="#SkPaint_kAntiAlias_Flag">kAntiAlias Flag</a> is set, <a href="#Alpha">Color Alpha</a> will increase to visually decrease coverage.
@@ -2085,8 +2085,8 @@ a fill draw.
<table>
<tr>
<td><a name="SkPaint_kFill_Style"> <code><strong>SkPaint::kFill_Style </strong></code> </a></td><td>0</td><td>Set to fill geometry.
-Applies to <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="#Circle">Circles</a>, <a href="#Oval">Ovals</a>, <a href="SkPath_Reference#Path">Path</a>, and <a href="undocumented#Text">Text</a>.
-<a href="undocumented#Bitmap">Bitmap</a>, <a href="undocumented#Image">Image</a>, <a href="#Patch">Patches</a>, <a href="undocumented#Region">Region</a>, <a href="#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="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="#Circle">Circles</a>, <a href="#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="undocumented#Image">Image</a>, <a href="#Patch">Patches</a>, <a href="undocumented#Region">Region</a>, <a href="#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="#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.
@@ -2094,14 +2094,14 @@ and to create an unfilled hole inside the shape.
</tr>
<tr>
<td><a name="SkPaint_kStroke_Style"> <code><strong>SkPaint::kStroke_Style </strong></code> </a></td><td>1</td><td>Set to stroke geometry.
-Applies to <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="#Arc">Arcs</a>, <a href="#Circle">Circles</a>, <a href="#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="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="#Arc">Arcs</a>, <a href="#Circle">Circles</a>, <a href="#Oval">Ovals</a>, <a href="SkPath_Reference#Path">Path</a>, and <a href="undocumented#Text">Text</a>.
<a href="#Arc">Arcs</a>, <a href="#Line">Lines</a>, and <a href="#Point">Points</a>, 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="#Fill_Type">Path Fill Type</a>.</td>
</tr>
<tr>
<td><a name="SkPaint_kStrokeAndFill_Style"> <code><strong>SkPaint::kStrokeAndFill_Style </strong></code> </a></td><td>2</td><td>Set to stroke and fill geometry.
-Applies to <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="#Circle">Circles</a>, <a href="#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="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="#Circle">Circles</a>, <a href="#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_kWinding_FillType">SkPath::kWinding FillType</a>,
and the set <a href="#Fill_Type">Path Fill Type</a> is ignored.</td>
</tr>
@@ -2189,14 +2189,14 @@ one of: <a href="#SkPaint_kFill_Style">kFill Style</a>, <a href="#SkPaint_kStrok
# <a name="Stroke_Width"></a> Stroke Width
<a href="#Stroke_Width">Stroke Width</a> sets the width for stroking. The width is the thickness
-of the stroke perpendicular to the path's direction when the paint's style is
+of the stroke perpendicular to the path direction when the paint style is
set to <a href="#SkPaint_kStroke_Style">kStroke Style</a> or <a href="#SkPaint_kStrokeAndFill_Style">kStrokeAndFill Style</a>.
When width is greater than zero, the stroke encompasses as many pixels partially
or fully as needed. When the width equals zero, the paint enables hairlines;
the stroke is always one pixel wide.
-The stroke's dimensions are scaled by the canvas matrix, but <a href="#Hairline">Hairline</a> stroke
+The stroke dimensions are scaled by the canvas matrix, but <a href="#Hairline">Hairline</a> stroke
remains one pixel wide regardless of scaling.
The default width for the paint is zero.
@@ -2204,7 +2204,7 @@ The default width for the paint is zero.
### Example
<div><fiddle-embed name="01e3e08a3022a351628ff54e84887756"><div>The pixels hit to represent thin lines vary with the angle of the
-line and the platform's implementation.</div></fiddle-embed></div>
+line and the platform implementation.</div></fiddle-embed></div>
<a name="SkPaint_getStrokeWidth"></a>
## getStrokeWidth
@@ -2417,7 +2417,7 @@ May be used to verify that <a href="#Stroke_Cap">Stroke Cap</a> is a legal value
</tr>
Stroke describes the area covered by a pen of <a href="#Stroke_Width">Stroke Width</a> as it
-follows the <a href="#Contour">Path Contour</a>, moving parallel to the contours's direction.
+follows the <a href="#Contour">Path Contour</a>, moving parallel to the contour direction.
If the <a href="#Contour">Path Contour</a> is not terminated by <a href="#SkPath_kClose_Verb">SkPath::kClose Verb</a>, the contour has a
visible beginning and end.
@@ -2508,7 +2508,7 @@ kRound_Cap == paint.getStrokeCap()
<a href="#Stroke_Join">Stroke Join</a> draws at the sharp corners of an open or closed <a href="#Contour">Path Contour</a>.
Stroke describes the area covered by a pen of <a href="#Stroke_Width">Stroke Width</a> as it
-follows the <a href="#Contour">Path Contour</a>, moving parallel to the contours's direction.
+follows the <a href="#Contour">Path Contour</a>, moving parallel to the contour direction.
If the contour direction changes abruptly, because the tangent direction leading
to the end of a curve within the contour does not match the tangent direction of
@@ -2792,7 +2792,7 @@ nullptr != shader
## refShader
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-sk_sp<SkShader> refShader() const
+sk_sp&lt;SkShader&gt; refShader() const
</pre>
Optional colors used when filling a path, such as a gradient.
@@ -2822,7 +2822,7 @@ shader unique: false
## setShader
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void setShader(sk_sp<SkShader> shader)
+void setShader(sk_sp&lt;SkShader&gt; shader)
</pre>
Optional colors used when filling a path, such as a gradient.
@@ -2887,7 +2887,7 @@ nullptr != color filter
## refColorFilter
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-sk_sp<SkColorFilter> refColorFilter() const
+sk_sp&lt;SkColorFilter&gt; refColorFilter() const
</pre>
Returns <a href="undocumented#Color_Filter">Color Filter</a> if set, or nullptr.
@@ -2916,7 +2916,7 @@ color filter unique: false
## setColorFilter
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void setColorFilter(sk_sp<SkColorFilter> colorFilter)
+void setColorFilter(sk_sp&lt;SkColorFilter&gt; colorFilter)
</pre>
Sets <a href="undocumented#Color_Filter">Color Filter</a> to filter, decreasing <a href="undocumented#Reference_Count">Reference Count</a> of the previous
@@ -3085,7 +3085,7 @@ nullptr != path effect
## refPathEffect
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-sk_sp<SkPathEffect> refPathEffect() const
+sk_sp&lt;SkPathEffect&gt; refPathEffect() const
</pre>
Returns <a href="undocumented#Path_Effect">Path Effect</a> if set, or nullptr.
@@ -3114,7 +3114,7 @@ path effect unique: false
## setPathEffect
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void setPathEffect(sk_sp<SkPathEffect> pathEffect)
+void setPathEffect(sk_sp&lt;SkPathEffect&gt; pathEffect)
</pre>
Sets <a href="undocumented#Path_Effect">Path Effect</a> to <a href="#SkPaint_setPathEffect_pathEffect">pathEffect</a>, decreasing <a href="undocumented#Reference_Count">Reference Count</a> of the previous
@@ -3181,7 +3181,7 @@ nullptr != mask filter
## refMaskFilter
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-sk_sp<SkMaskFilter> refMaskFilter() const
+sk_sp&lt;SkMaskFilter&gt; refMaskFilter() const
</pre>
Returns <a href="undocumented#Mask_Filter">Mask Filter</a> if set, or nullptr.
@@ -3211,7 +3211,7 @@ mask filter unique: false
## setMaskFilter
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void setMaskFilter(sk_sp<SkMaskFilter> maskFilter)
+void setMaskFilter(sk_sp&lt;SkMaskFilter&gt; maskFilter)
</pre>
Sets <a href="undocumented#Mask_Filter">Mask Filter</a> to <a href="#SkPaint_setMaskFilter_maskFilter">maskFilter</a>, decreasing <a href="undocumented#Reference_Count">Reference Count</a> of the previous
@@ -3277,7 +3277,7 @@ nullptr != typeface
## refTypeface
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-sk_sp<SkTypeface> refTypeface() const
+sk_sp&lt;SkTypeface&gt; refTypeface() const
</pre>
Increases <a href="undocumented#Typeface">Typeface</a> <a href="undocumented#Reference_Count">Reference Count</a> by one.
@@ -3305,7 +3305,7 @@ typeface1 == typeface2
## setTypeface
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void setTypeface(sk_sp<SkTypeface> typeface)
+void setTypeface(sk_sp&lt;SkTypeface&gt; typeface)
</pre>
Sets <a href="undocumented#Typeface">Typeface</a> to <a href="#SkPaint_setTypeface_typeface">typeface</a>, decreasing <a href="undocumented#Reference_Count">Reference Count</a> of the previous <a href="undocumented#Typeface">Typeface</a>.
@@ -3334,7 +3334,7 @@ and returns a <a href="undocumented#Mask">Mask</a>.
creating a shadow effect. <a href="undocumented#Rasterizer">Rasterizer</a> forms the base of <a href="#Layer">Rasterizer Layer</a>, which
creates effects like embossing and outlining.
-<a href="undocumented#Rasterizer">Rasterizer</a> applies to <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="#Arc">Arcs</a>, <a href="#Circle">Circles</a>, <a href="#Oval">Ovals</a>,
+<a href="undocumented#Rasterizer">Rasterizer</a> applies to <a href="SkRect_Reference#Rect">Rect</a>, <a href="undocumented#Region">Region</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="#Arc">Arcs</a>, <a href="#Circle">Circles</a>, <a href="#Oval">Ovals</a>,
<a href="SkPath_Reference#Path">Path</a>, and <a href="undocumented#Text">Text</a>.
### Example
@@ -3374,7 +3374,7 @@ nullptr != rasterizer
## refRasterizer
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-sk_sp<SkRasterizer> refRasterizer() const
+sk_sp&lt;SkRasterizer&gt; refRasterizer() const
</pre>
Returns <a href="undocumented#Rasterizer">Rasterizer</a> if set, or nullptr.
@@ -3403,7 +3403,7 @@ rasterizer unique: false
## setRasterizer
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void setRasterizer(sk_sp<SkRasterizer> rasterizer)
+void setRasterizer(sk_sp&lt;SkRasterizer&gt; rasterizer)
</pre>
Sets <a href="undocumented#Rasterizer">Rasterizer</a> to <a href="#SkPaint_setRasterizer_rasterizer">rasterizer</a>, decreasing <a href="undocumented#Reference_Count">Reference Count</a> of the previous
@@ -3473,7 +3473,7 @@ nullptr != image filter
## refImageFilter
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-sk_sp<SkImageFilter> refImageFilter() const
+sk_sp&lt;SkImageFilter&gt; refImageFilter() const
</pre>
Returns <a href="undocumented#Image_Filter">Image Filter</a> if set, or nullptr.
@@ -3502,7 +3502,7 @@ image filter unique: false
## setImageFilter
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void setImageFilter(sk_sp<SkImageFilter> imageFilter)
+void setImageFilter(sk_sp&lt;SkImageFilter&gt; imageFilter)
</pre>
Sets <a href="undocumented#Image_Filter">Image Filter</a> to <a href="#SkPaint_setImageFilter_imageFilter">imageFilter</a>, decreasing <a href="undocumented#Reference_Count">Reference Count</a> of the previous
@@ -3570,7 +3570,7 @@ nullptr != draw looper
## refDrawLooper
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-sk_sp<SkDrawLooper> refDrawLooper() const
+sk_sp&lt;SkDrawLooper&gt; refDrawLooper() const
</pre>
Returns <a href="undocumented#Draw_Looper">Draw Looper</a> if set, or nullptr.
@@ -3616,7 +3616,7 @@ Deprecated.
## setDrawLooper
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void setDrawLooper(sk_sp<SkDrawLooper> drawLooper)
+void setDrawLooper(sk_sp&lt;SkDrawLooper&gt; drawLooper)
</pre>
Sets <a href="undocumented#Draw_Looper">Draw Looper</a> to <a href="#SkPaint_setDrawLooper_drawLooper">drawLooper</a>, decreasing <a href="undocumented#Reference_Count">Reference Count</a> of the previous
@@ -3642,7 +3642,7 @@ iterates through drawing one or more time, altering <a href="#Paint">Paint</a></
## setLooper
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void setLooper(sk_sp<SkDrawLooper> drawLooper)
+void setLooper(sk_sp&lt;SkDrawLooper&gt; drawLooper)
</pre>
Deprecated.
@@ -3953,10 +3953,10 @@ enum <a href="#SkPaint_TextEncoding">TextEncoding</a> {
};</pre>
<a href="#SkPaint_TextEncoding">TextEncoding</a> determines whether text specifies character codes and their encoded
-size, or glyph indices. Character codes use the encoding specified by the<a href="undocumented#Unicode">Unicode</a> standard.
+size, or glyph indices. Characters are encoded as specified by the<a href="undocumented#Unicode">Unicode</a> standard.
Character codes encoded size are specified by <a href="undocumented#UTF_8">UTF-8</a>, <a href="undocumented#UTF_16">UTF-16</a>, or <a href="undocumented#UTF_32">UTF-32</a>.
-All character encodings are able to represent all of <a href="undocumented#Unicode">Unicode</a>, differing only
+All character code formats are able to represent all of <a href="undocumented#Unicode">Unicode</a>, differing only
in the total storage required.
<a href="undocumented#UTF_8">UTF-8</a> (<a href="undocumented#RFC">RFC</a> 3629)encodes each character as one or more 8-bit bytes.
@@ -3990,9 +3990,9 @@ A glyph index is a 16-bit word.
### Example
-<div><fiddle-embed name="b29294e7f29d160a1b46abf2dcec9d2a"><div>First line has <a href="undocumented#UTF_8">UTF-8</a> encoding.
-Second line has <a href="undocumented#UTF_16">UTF-16</a> encoding.
-Third line has <a href="undocumented#UTF_32">UTF-32</a> encoding.
+<div><fiddle-embed name="b29294e7f29d160a1b46abf2dcec9d2a"><div>First line is encoded in <a href="undocumented#UTF_8">UTF-8</a>.
+Second line is encoded in <a href="undocumented#UTF_16">UTF-16</a>.
+Third line is encoded in <a href="undocumented#UTF_32">UTF-32</a>.
Fourth line has 16 bit glyph indices.</div></fiddle-embed></div>
<a name="SkPaint_getTextEncoding"></a>
@@ -4455,8 +4455,7 @@ Returns the number of glyph indices represented by <a href="#SkPaint_textToGlyph
<a href="#Text_Encoding">Text Encoding</a> specifies how <a href="#SkPaint_textToGlyphs_text">text</a> represents characters or <a href="#SkPaint_textToGlyphs_glyphs">glyphs</a>.
<a href="#SkPaint_textToGlyphs_glyphs">glyphs</a> may be nullptr, to compute the glyph count.
-Does not check <a href="#SkPaint_textToGlyphs_text">text</a> for valid character encoding or valid
-glyph indices.
+Does not check <a href="#SkPaint_textToGlyphs_text">text</a> for valid character codes or valid glyph indices.
If <a href="#SkPaint_textToGlyphs_byteLength">byteLength</a> equals zero, returns zero.
If <a href="#SkPaint_textToGlyphs_byteLength">byteLength</a> includes a partial character, the partial character is ignored.
@@ -5103,10 +5102,10 @@ effects in the paint (e.g. stroking). If needed, it uses the <a href="#SkPaint_c
parameter. It returns the adjusted bounds that can then be used
for <a href="#SkCanvas_quickReject">SkCanvas::quickReject</a> tests.
-The returned <a href="undocumented#Rect">Rect</a> will either be <a href="#SkPaint_computeFastBounds_orig">orig</a> or <a href="#SkPaint_computeFastBounds_storage">storage</a>, thus the caller
+The returned <a href="SkRect_Reference#Rect">Rect</a> will either be <a href="#SkPaint_computeFastBounds_orig">orig</a> or <a href="#SkPaint_computeFastBounds_storage">storage</a>, thus the caller
should not rely on <a href="#SkPaint_computeFastBounds_storage">storage</a> being set to the result, but should always
use the returned value. It is legal for <a href="#SkPaint_computeFastBounds_orig">orig</a> and <a href="#SkPaint_computeFastBounds_storage">storage</a> to be the same
-<a href="undocumented#Rect">Rect</a>.
+<a href="SkRect_Reference#Rect">Rect</a>.
### Parameters
diff --git a/site/user/api/SkPath_Reference.md b/site/user/api/SkPath_Reference.md
index cbf344cd09..8f5ad4b029 100644
--- a/site/user/api/SkPath_Reference.md
+++ b/site/user/api/SkPath_Reference.md
@@ -13,11 +13,11 @@ containing two connected <a href="#Line">Lines</a> are described the <a href="#V
with three entries, sharing
the middle entry as the end of the first <a href="undocumented#Line">Line</a> and the start of the second <a href="undocumented#Line">Line</a>.
-<a href="#Path">Path</a> components <a href="#Arc">Arc</a>, <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="undocumented#Circle">Circle</a>, and <a href="undocumented#Oval">Oval</a> are composed of
+<a href="#Path">Path</a> components <a href="#Arc">Arc</a>, <a href="SkRect_Reference#Rect">Rect</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="undocumented#Circle">Circle</a>, and <a href="undocumented#Oval">Oval</a> are composed of
<a href="#Line">Lines</a> and <a href="#Curve">Curves</a> with as many <a href="#Verb">Verbs</a> and <a href="#Point">Points</a> required
for an exact description. Once added to <a href="#Path">Path</a>, these components may lose their
identity; although <a href="#Path">Path</a> can be inspected to determine if it describes a single
-<a href="undocumented#Rect">Rect</a>, <a href="undocumented#Oval">Oval</a>, <a href="undocumented#Round_Rect">Round Rect</a>, and so on.
+<a href="SkRect_Reference#Rect">Rect</a>, <a href="undocumented#Oval">Oval</a>, <a href="undocumented#Round_Rect">Round Rect</a>, and so on.
### Example
@@ -147,13 +147,13 @@ Internally, <a href="#Path">Path</a> lazily computes metrics likes bounds and co
| <a href="#SkPath_addPath">addPath</a> | Adds contents of <a href="#Path">Path</a>. |
| <a href="#SkPath_addPoly">addPoly</a> | Adds one <a href="#Contour">Contour</a> containing connected lines. |
| <a href="#SkPath_addRRect">addRRect</a> | Adds one <a href="#Contour">Contour</a> containing <a href="undocumented#Round_Rect">Round Rect</a>. |
-| <a href="#SkPath_addRect">addRect</a> | Adds one <a href="#Contour">Contour</a> containing <a href="undocumented#Rect">Rect</a>. |
+| <a href="#SkPath_addRect">addRect</a> | Adds one <a href="#Contour">Contour</a> containing <a href="SkRect_Reference#Rect">Rect</a>. |
| <a href="#SkPath_addRoundRect">addRoundRect</a> | Adds one <a href="#Contour">Contour</a> containing <a href="undocumented#Round_Rect">Round Rect</a> with common corner radii. |
| <a href="#SkPath_arcTo">arcTo</a> | Appends <a href="#Arc">Arc</a>. |
| <a href="#SkPath_close">close</a> | Makes last <a href="#Contour">Contour</a> a loop. |
| <a href="#SkPath_computeTightBounds">computeTightBounds</a> | Returns extent of geometry. |
| <a href="#SkPath_conicTo">conicTo</a> | Appends <a href="#Conic">Conic</a>. |
-| <a href="#SkPath_conservativelyContainsRect">conservativelyContainsRect</a> | Returns true if <a href="undocumented#Rect">Rect</a> may be inside. |
+| <a href="#SkPath_conservativelyContainsRect">conservativelyContainsRect</a> | Returns true if <a href="SkRect_Reference#Rect">Rect</a> may be inside. |
| <a href="#SkPath_contains">contains</a> | Returns if <a href="undocumented#Point">Point</a> is in fill area. |
| <a href="#SkPath_countPoints">countPoints</a> | Returns <a href="#Point_Array">Point Array</a> length. |
| <a href="#SkPath_countVerbs">countVerbs</a> | Returns <a href="#Verb_Array">Verb Array</a> length. |
@@ -179,10 +179,10 @@ Internally, <a href="#Path">Path</a> lazily computes metrics likes bounds and co
| <a href="#SkPath_isInverseFillType">isInverseFillType</a> | Returns if <a href="#Fill_Type">Fill Type</a> fills outside geometry. |
| <a href="#SkPath_isLastContourClosed">isLastContourClosed</a> | Returns if final <a href="#Contour">Contour</a> forms a loop. |
| <a href="#SkPath_isLine">isLine</a> | Returns if describes <a href="undocumented#Line">Line</a>. |
-| <a href="#SkPath_isNestedFillRects">isNestedFillRects</a> | Returns if describes <a href="undocumented#Rect">Rect</a> pair, one inside the other. |
+| <a href="#SkPath_isNestedFillRects">isNestedFillRects</a> | Returns if describes <a href="SkRect_Reference#Rect">Rect</a> pair, one inside the other. |
| <a href="#SkPath_isOval">isOval</a> | Returns if describes <a href="undocumented#Oval">Oval</a>. |
| <a href="#SkPath_isRRect">isRRect</a> | Returns if describes <a href="undocumented#Round_Rect">Round Rect</a>. |
-| <a href="#SkPath_isRect">isRect</a> | Returns if describes <a href="undocumented#Rect">Rect</a>. |
+| <a href="#SkPath_isRect">isRect</a> | Returns if describes <a href="SkRect_Reference#Rect">Rect</a>. |
| <a href="#SkPath_isValid">isValid</a> | Returns if data is internally consistent. |
| <a href="#SkPath_isVolatile">isVolatile</a> | Returns if <a href="undocumented#Device">Device</a> should not cache. |
| <a href="#SkPath_lineTo">lineTo</a> | Appends <a href="undocumented#Line">Line</a>. |
@@ -207,7 +207,7 @@ Internally, <a href="#Path">Path</a> lazily computes metrics likes bounds and co
| <a href="#SkPath_setLastPt">setLastPt</a> | Replaces <a href="#Last_Point">Last Point</a>. |
| <a href="#SkPath_swap">swap</a> | Exchanges <a href="#Path">Path</a> pair. |
| <a href="#SkPath_toggleInverseFillType">toggleInverseFillType</a> | Toggles <a href="#Fill_Type">Fill Type</a> between inside and outside geometry. |
-| <a href="#SkPath_transform">transform</a> | Applies <a href="undocumented#Matrix">Matrix</a> to <a href="#Point_Array">Point Array</a> and <a href="#Weight">Weights</a>. |
+| <a href="#SkPath_transform">transform</a> | Applies <a href="SkMatrix_Reference#Matrix">Matrix</a> to <a href="#Point_Array">Point Array</a> and <a href="#Weight">Weights</a>. |
| <a href="#SkPath_unique">unique</a> | Returns if data has single owner. |
| <a href="#SkPath_updateBoundsCache">updateBoundsCache</a> | Refreshes result of <a href="#SkPath_getBounds">getBounds</a>. |
| <a href="#SkPath_writeToMemory">writeToMemory</a> | Copies data to buffer. |
@@ -312,7 +312,7 @@ When <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> multiple o
measures along <a href="#Path">Path</a> to determine where to start and stop stroke; <a href="#Direction">Direction</a>
will change dashed results as it steps clockwise or counterclockwise.
-Closed <a href="#Contour">Contours</a> like <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="undocumented#Circle">Circle</a>, and <a href="undocumented#Oval">Oval</a> added with
+Closed <a href="#Contour">Contours</a> like <a href="SkRect_Reference#Rect">Rect</a>, <a href="undocumented#Round_Rect">Round Rect</a>, <a href="undocumented#Circle">Circle</a>, and <a href="undocumented#Oval">Oval</a> added with
<a href="#SkPath_kCW_Direction">kCW Direction</a> travel clockwise; the same added with <a href="#SkPath_kCCW_Direction">kCCW Direction</a>
travel counterclockwise.
@@ -1033,7 +1033,7 @@ Triggers performance optimizations on some <a href="undocumented#GPU_Surface">GP
### Parameters
<table> <tr> <td><a name="SkPath_isOval_rect"> <code><strong>rect </strong></code> </a></td> <td>
-storage for bounding <a href="undocumented#Rect">Rect</a> of <a href="undocumented#Oval">Oval</a>; may be nullptr</td>
+storage for bounding <a href="SkRect_Reference#Rect">Rect</a> of <a href="undocumented#Oval">Oval</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkPath_isOval_dir"> <code><strong>dir </strong></code> </a></td> <td>
storage for <a href="#SkPath_Direction">Direction</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkPath_isOval_start"> <code><strong>start </strong></code> </a></td> <td>
@@ -1063,7 +1063,7 @@ bool isRRect(SkRRect* rrect, Direction* dir = nullptr, unsigned* start = nullptr
</pre>
Returns true if constructed by <a href="#SkPath_addRoundRect">addRoundRect</a>, <a href="#SkPath_addRRect">addRRect</a>; and if construction
-is not empty, not <a href="undocumented#Rect">Rect</a>, and not <a href="undocumented#Oval">Oval</a>. <a href="#Path">Path</a> constructed with other calls
+is not empty, not <a href="SkRect_Reference#Rect">Rect</a>, and not <a href="undocumented#Oval">Oval</a>. <a href="#Path">Path</a> constructed with other calls
will not return true though <a href="#Path">Path</a> draws <a href="undocumented#Round_Rect">Round Rect</a>.
<a href="#SkPath_isRRect_rrect">rrect</a> receives bounds of <a href="undocumented#Round_Rect">Round Rect</a>.
@@ -1078,7 +1078,7 @@ Triggers performance optimizations on some <a href="undocumented#GPU_Surface">GP
### Parameters
<table> <tr> <td><a name="SkPath_isRRect_rrect"> <code><strong>rrect </strong></code> </a></td> <td>
-storage for bounding <a href="undocumented#Rect">Rect</a> of <a href="undocumented#Round_Rect">Round Rect</a>; may be nullptr</td>
+storage for bounding <a href="SkRect_Reference#Rect">Rect</a> of <a href="undocumented#Round_Rect">Round Rect</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkPath_isRRect_dir"> <code><strong>dir </strong></code> </a></td> <td>
storage for <a href="#SkPath_Direction">Direction</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkPath_isRRect_start"> <code><strong>start </strong></code> </a></td> <td>
@@ -1789,7 +1789,7 @@ Returns minimum and maximum x and y values of <a href="#Point_Array">Point Array
Returns (0, 0, 0, 0) if <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> no points. Returned bounds width and height may
be larger or smaller than area affected when <a href="#Path">Path</a> is drawn.
-<a href="undocumented#Rect">Rect</a> returned includes all <a href="#Point">Points</a> added to <a href="#Path">Path</a>, including <a href="#Point">Points</a> associated with
+<a href="SkRect_Reference#Rect">Rect</a> returned includes all <a href="#Point">Points</a> added to <a href="#Path">Path</a>, including <a href="#Point">Points</a> associated with
<a href="#SkPath_kMove_Verb">kMove Verb</a> that define empty <a href="#Contour">Contours</a>.
### Return Value
@@ -1914,7 +1914,7 @@ the <a href="undocumented#Point">Point</a> or <a href="undocumented#Line">Line</
### Parameters
<table> <tr> <td><a name="SkPath_conservativelyContainsRect_rect"> <code><strong>rect </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a>, <a href="undocumented#Line">Line</a>, or <a href="undocumented#Point">Point</a> checked for containment</td>
+<a href="SkRect_Reference#Rect">Rect</a>, <a href="undocumented#Line">Line</a>, or <a href="undocumented#Point">Point</a> checked for containment</td>
</tr>
</table>
@@ -1924,11 +1924,11 @@ true if <a href="#SkPath_conservativelyContainsRect_rect">rect</a> is contained
### Example
-<div><fiddle-embed name="41638d13e40fa449ece354dde5fb1941"><div><a href="undocumented#Rect">Rect</a> is drawn in blue if it is contained by red <a href="#Path">Path</a>.</div></fiddle-embed></div>
+<div><fiddle-embed name="41638d13e40fa449ece354dde5fb1941"><div><a href="SkRect_Reference#Rect">Rect</a> is drawn in blue if it is contained by red <a href="#Path">Path</a>.</div></fiddle-embed></div>
### See Also
-<a href="#SkPath_contains">contains</a> <a href="undocumented#Op">Op</a> <a href="undocumented#Rect">Rect</a> <a href="#SkPath_Convexity">Convexity</a>
+<a href="#SkPath_contains">contains</a> <a href="undocumented#Op">Op</a> <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkPath_Convexity">Convexity</a>
---
@@ -3168,7 +3168,7 @@ bool isRect(SkRect* rect, bool* isClosed = nullptr,
Direction* direction = nullptr) const
</pre>
-Returns true if <a href="#Path">Path</a> is equivalent to <a href="undocumented#Rect">Rect</a> when filled.
+Returns true if <a href="#Path">Path</a> is equivalent to <a href="SkRect_Reference#Rect">Rect</a> when filled.
If false: <a href="#SkPath_isRect_rect">rect</a>, <a href="#SkPath_isRect_isClosed">isClosed</a>, and <a href="#SkPath_isRect_direction">direction</a> are unchanged.
If true: <a href="#SkPath_isRect_rect">rect</a>, <a href="#SkPath_isRect_isClosed">isClosed</a>, and <a href="#SkPath_isRect_direction">direction</a> are written to if not nullptr.
@@ -3178,17 +3178,17 @@ that do not alter the area drawn by the returned <a href="#SkPath_isRect_rect">r
### Parameters
<table> <tr> <td><a name="SkPath_isRect_rect"> <code><strong>rect </strong></code> </a></td> <td>
-storage for bounds of <a href="undocumented#Rect">Rect</a>; may be nullptr</td>
+storage for bounds of <a href="SkRect_Reference#Rect">Rect</a>; may be nullptr</td>
</tr> <tr> <td><a name="SkPath_isRect_isClosed"> <code><strong>isClosed </strong></code> </a></td> <td>
storage set to true if <a href="#Path">Path</a> is closed; may be nullptr</td>
</tr> <tr> <td><a name="SkPath_isRect_direction"> <code><strong>direction </strong></code> </a></td> <td>
-storage set to <a href="undocumented#Rect">Rect</a> <a href="#SkPath_isRect_direction">direction</a>; may be nullptr</td>
+storage set to <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkPath_isRect_direction">direction</a>; may be nullptr</td>
</tr>
</table>
### Return Value
-true if <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> <a href="undocumented#Rect">Rect</a>
+true if <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> <a href="SkRect_Reference#Rect">Rect</a>
### Example
@@ -3221,17 +3221,17 @@ addPoly is rect (0, 0, 80, 80); is not closed; direction CCW
bool isNestedFillRects(SkRect rect[2], Direction dirs[2] = nullptr) const
</pre>
-Returns true if <a href="#Path">Path</a> is equivalent to nested <a href="undocumented#Rect">Rect</a> pair when filled.
+Returns true if <a href="#Path">Path</a> is equivalent to nested <a href="SkRect_Reference#Rect">Rect</a> pair when filled.
If false, <a href="#SkPath_isNestedFillRects_rect">rect</a> and <a href="#SkPath_isNestedFillRects_dirs">dirs</a> are unchanged.
If true, <a href="#SkPath_isNestedFillRects_rect">rect</a> and <a href="#SkPath_isNestedFillRects_dirs">dirs</a> are written to if not nullptr:
-setting <a href="#SkPath_isNestedFillRects_rect">rect</a>[0] to outer <a href="undocumented#Rect">Rect</a>, and <a href="#SkPath_isNestedFillRects_rect">rect</a>[1] to inner <a href="undocumented#Rect">Rect</a>;
-setting <a href="#SkPath_isNestedFillRects_dirs">dirs</a>[0] to <a href="#SkPath_Direction">Direction</a> of outer <a href="undocumented#Rect">Rect</a>, and <a href="#SkPath_isNestedFillRects_dirs">dirs</a>[1] to <a href="#SkPath_Direction">Direction</a> of inner
-<a href="undocumented#Rect">Rect</a>.
+setting <a href="#SkPath_isNestedFillRects_rect">rect</a>[0] to outer <a href="SkRect_Reference#Rect">Rect</a>, and <a href="#SkPath_isNestedFillRects_rect">rect</a>[1] to inner <a href="SkRect_Reference#Rect">Rect</a>;
+setting <a href="#SkPath_isNestedFillRects_dirs">dirs</a>[0] to <a href="#SkPath_Direction">Direction</a> of outer <a href="SkRect_Reference#Rect">Rect</a>, and <a href="#SkPath_isNestedFillRects_dirs">dirs</a>[1] to <a href="#SkPath_Direction">Direction</a> of inner
+<a href="SkRect_Reference#Rect">Rect</a>.
### Parameters
<table> <tr> <td><a name="SkPath_isNestedFillRects_rect"> <code><strong>rect </strong></code> </a></td> <td>
-storage for <a href="undocumented#Rect">Rect</a> pair; may be nullptr</td>
+storage for <a href="SkRect_Reference#Rect">Rect</a> pair; may be nullptr</td>
</tr> <tr> <td><a name="SkPath_isNestedFillRects_dirs"> <code><strong>dirs </strong></code> </a></td> <td>
storage for <a href="#SkPath_Direction">Direction</a> pair; may be nullptr</td>
</tr>
@@ -3239,7 +3239,7 @@ storage for <a href="#SkPath_Direction">Direction</a> pair; may be nullptr</td>
### Return Value
-true if <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> nested <a href="undocumented#Rect">Rect</a> pair
+true if <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> nested <a href="SkRect_Reference#Rect">Rect</a> pair
### Example
@@ -3267,15 +3267,15 @@ inner (12.5, 22.5, 27.5, 37.5); direction CCW
void addRect(const SkRect& rect, Direction dir = kCW_Direction)
</pre>
-Add <a href="undocumented#Rect">Rect</a> to <a href="#Path">Path</a>, appending <a href="#SkPath_kMove_Verb">kMove Verb</a>, three <a href="#SkPath_kLine_Verb">kLine Verb</a>, and <a href="#SkPath_kClose_Verb">kClose Verb</a>,
-starting with top-left corner of <a href="undocumented#Rect">Rect</a>; followed by top-right, bottom-right,
+Add <a href="SkRect_Reference#Rect">Rect</a> to <a href="#Path">Path</a>, appending <a href="#SkPath_kMove_Verb">kMove Verb</a>, three <a href="#SkPath_kLine_Verb">kLine Verb</a>, and <a href="#SkPath_kClose_Verb">kClose Verb</a>,
+starting with top-left corner of <a href="SkRect_Reference#Rect">Rect</a>; followed by top-right, bottom-right,
and bottom-left if <a href="#SkPath_addRect_dir">dir</a> is <a href="#SkPath_kCW_Direction">kCW Direction</a>; or followed by bottom-left,
bottom-right, and top-right if <a href="#SkPath_addRect_dir">dir</a> is <a href="#SkPath_kCCW_Direction">kCCW Direction</a>.
### Parameters
<table> <tr> <td><a name="SkPath_addRect_rect"> <code><strong>rect </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> to add as a closed contour</td>
+<a href="SkRect_Reference#Rect">Rect</a> to add as a closed contour</td>
</tr> <tr> <td><a name="SkPath_addRect_dir"> <code><strong>dir </strong></code> </a></td> <td>
<a href="#SkPath_Direction">Direction</a> to wind added contour</td>
</tr>
@@ -3283,8 +3283,8 @@ bottom-right, and top-right if <a href="#SkPath_addRect_dir">dir</a> is <a href=
### Example
-<div><fiddle-embed name="0f841e4eaebb613b5069800567917c2d"><div>The left <a href="undocumented#Rect">Rect</a> dashes starting at the top-left corner, to the right.
-The right <a href="undocumented#Rect">Rect</a> dashes starting at the top-left corner, towards the bottom.</div></fiddle-embed></div>
+<div><fiddle-embed name="0f841e4eaebb613b5069800567917c2d"><div>The left <a href="SkRect_Reference#Rect">Rect</a> dashes starting at the top-left corner, to the right.
+The right <a href="SkRect_Reference#Rect">Rect</a> dashes starting at the top-left corner, towards the bottom.</div></fiddle-embed></div>
### See Also
@@ -3296,9 +3296,9 @@ The right <a href="undocumented#Rect">Rect</a> dashes starting at the top-left c
void addRect(const SkRect& rect, Direction dir, unsigned start)
</pre>
-Add <a href="undocumented#Rect">Rect</a> to <a href="#Path">Path</a>, appending <a href="#SkPath_kMove_Verb">kMove Verb</a>, three <a href="#SkPath_kLine_Verb">kLine Verb</a>, and <a href="#SkPath_kClose_Verb">kClose Verb</a>.
-If <a href="#SkPath_addRect_2_dir">dir</a> is <a href="#SkPath_kCW_Direction">kCW Direction</a>, <a href="undocumented#Rect">Rect</a> corners are added clockwise; if <a href="#SkPath_addRect_2_dir">dir</a> is
-<a href="#SkPath_kCCW_Direction">kCCW Direction</a>, <a href="undocumented#Rect">Rect</a> corners are added counterclockwise.
+Add <a href="SkRect_Reference#Rect">Rect</a> to <a href="#Path">Path</a>, appending <a href="#SkPath_kMove_Verb">kMove Verb</a>, three <a href="#SkPath_kLine_Verb">kLine Verb</a>, and <a href="#SkPath_kClose_Verb">kClose Verb</a>.
+If <a href="#SkPath_addRect_2_dir">dir</a> is <a href="#SkPath_kCW_Direction">kCW Direction</a>, <a href="SkRect_Reference#Rect">Rect</a> corners are added clockwise; if <a href="#SkPath_addRect_2_dir">dir</a> is
+<a href="#SkPath_kCCW_Direction">kCCW Direction</a>, <a href="SkRect_Reference#Rect">Rect</a> corners are added counterclockwise.
<a href="#SkPath_addRect_2_start">start</a> determines the first corner added.
| <a href="#SkPath_addRect_2_start">start</a> | first corner |
@@ -3311,11 +3311,11 @@ If <a href="#SkPath_addRect_2_dir">dir</a> is <a href="#SkPath_kCW_Direction">kC
### Parameters
<table> <tr> <td><a name="SkPath_addRect_2_rect"> <code><strong>rect </strong></code> </a></td> <td>
-<a href="undocumented#Rect">Rect</a> to add as a closed contour</td>
+<a href="SkRect_Reference#Rect">Rect</a> to add as a closed contour</td>
</tr> <tr> <td><a name="SkPath_addRect_2_dir"> <code><strong>dir </strong></code> </a></td> <td>
<a href="#SkPath_Direction">Direction</a> to wind added contour</td>
</tr> <tr> <td><a name="SkPath_addRect_2_start"> <code><strong>start </strong></code> </a></td> <td>
-initial corner of <a href="undocumented#Rect">Rect</a> to add</td>
+initial corner of <a href="SkRect_Reference#Rect">Rect</a> to add</td>
</tr>
</table>
@@ -3335,22 +3335,22 @@ void addRect(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom,
Direction dir = kCW_Direction)
</pre>
-Add <a href="undocumented#Rect">Rect</a> (<a href="#SkPath_addRect_3_left">left</a>, <a href="#SkPath_addRect_3_top">top</a>, <a href="#SkPath_addRect_3_right">right</a>, <a href="#SkPath_addRect_3_bottom">bottom</a>) to <a href="#Path">Path</a>,
+Add <a href="SkRect_Reference#Rect">Rect</a> (<a href="#SkPath_addRect_3_left">left</a>, <a href="#SkPath_addRect_3_top">top</a>, <a href="#SkPath_addRect_3_right">right</a>, <a href="#SkPath_addRect_3_bottom">bottom</a>) to <a href="#Path">Path</a>,
appending <a href="#SkPath_kMove_Verb">kMove Verb</a>, three <a href="#SkPath_kLine_Verb">kLine Verb</a>, and <a href="#SkPath_kClose_Verb">kClose Verb</a>,
-starting with top-left corner of <a href="undocumented#Rect">Rect</a>; followed by top-right, bottom-right,
+starting with top-left corner of <a href="SkRect_Reference#Rect">Rect</a>; followed by top-right, bottom-right,
and bottom-left if <a href="#SkPath_addRect_3_dir">dir</a> is <a href="#SkPath_kCW_Direction">kCW Direction</a>; or followed by bottom-left,
bottom-right, and top-right if <a href="#SkPath_addRect_3_dir">dir</a> is <a href="#SkPath_kCCW_Direction">kCCW Direction</a>.
### Parameters
<table> <tr> <td><a name="SkPath_addRect_3_left"> <code><strong>left </strong></code> </a></td> <td>
-smaller x of <a href="undocumented#Rect">Rect</a></td>
+smaller x of <a href="SkRect_Reference#Rect">Rect</a></td>
</tr> <tr> <td><a name="SkPath_addRect_3_top"> <code><strong>top </strong></code> </a></td> <td>
-smaller y of <a href="undocumented#Rect">Rect</a></td>
+smaller y of <a href="SkRect_Reference#Rect">Rect</a></td>
</tr> <tr> <td><a name="SkPath_addRect_3_right"> <code><strong>right </strong></code> </a></td> <td>
-larger x of <a href="undocumented#Rect">Rect</a></td>
+larger x of <a href="SkRect_Reference#Rect">Rect</a></td>
</tr> <tr> <td><a name="SkPath_addRect_3_bottom"> <code><strong>bottom </strong></code> </a></td> <td>
-larger y of <a href="undocumented#Rect">Rect</a></td>
+larger y of <a href="SkRect_Reference#Rect">Rect</a></td>
</tr> <tr> <td><a name="SkPath_addRect_3_dir"> <code><strong>dir </strong></code> </a></td> <td>
<a href="#SkPath_Direction">Direction</a> to wind added contour</td>
</tr>
@@ -3358,8 +3358,8 @@ larger y of <a href="undocumented#Rect">Rect</a></td>
### Example
-<div><fiddle-embed name="3837827310e8b88b8c2e128ef9fbbd65"><div>The <a href="#SkPath_addRect_3_left">left</a> <a href="undocumented#Rect">Rect</a> dashes start at the top-left corner, and continue to the <a href="#SkPath_addRect_3_right">right</a>.
-The <a href="#SkPath_addRect_3_right">right</a> <a href="undocumented#Rect">Rect</a> dashes start at the top-left corner, and continue down.</div></fiddle-embed></div>
+<div><fiddle-embed name="3837827310e8b88b8c2e128ef9fbbd65"><div>The <a href="#SkPath_addRect_3_left">left</a> <a href="SkRect_Reference#Rect">Rect</a> dashes start at the top-left corner, and continue to the <a href="#SkPath_addRect_3_right">right</a>.
+The <a href="#SkPath_addRect_3_right">right</a> <a href="SkRect_Reference#Rect">Rect</a> dashes start at the top-left corner, and continue down.</div></fiddle-embed></div>
### See Also
@@ -3375,7 +3375,7 @@ void addOval(const SkRect& oval, Direction dir = kCW_Direction)
</pre>
Add <a href="undocumented#Oval">Oval</a> to path, appending <a href="#SkPath_kMove_Verb">kMove Verb</a>, four <a href="#SkPath_kConic_Verb">kConic Verb</a>, and <a href="#SkPath_kClose_Verb">kClose Verb</a>.
-<a href="undocumented#Oval">Oval</a> is upright ellipse bounded by <a href="undocumented#Rect">Rect</a> <a href="#SkPath_addOval_oval">oval</a> with radii equal to half <a href="#SkPath_addOval_oval">oval</a> width
+<a href="undocumented#Oval">Oval</a> is upright ellipse bounded by <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkPath_addOval_oval">oval</a> with radii equal to half <a href="#SkPath_addOval_oval">oval</a> width
and half <a href="#SkPath_addOval_oval">oval</a> height. <a href="undocumented#Oval">Oval</a> begins at (<a href="#SkPath_addOval_oval">oval</a>.fRight, <a href="#SkPath_addOval_oval">oval</a>.centerY()) and continues
clockwise if <a href="#SkPath_addOval_dir">dir</a> is <a href="#SkPath_kCW_Direction">kCW Direction</a>, counterclockwise if <a href="#SkPath_addOval_dir">dir</a> is <a href="#SkPath_kCCW_Direction">kCCW Direction</a>.
@@ -3405,7 +3405,7 @@ void addOval(const SkRect& oval, Direction dir, unsigned start)
</pre>
Add <a href="undocumented#Oval">Oval</a> to <a href="#Path">Path</a>, appending <a href="#SkPath_kMove_Verb">kMove Verb</a>, four <a href="#SkPath_kConic_Verb">kConic Verb</a>, and <a href="#SkPath_kClose_Verb">kClose Verb</a>.
-<a href="undocumented#Oval">Oval</a> is upright ellipse bounded by <a href="undocumented#Rect">Rect</a> <a href="#SkPath_addOval_2_oval">oval</a> with radii equal to half <a href="#SkPath_addOval_2_oval">oval</a> width
+<a href="undocumented#Oval">Oval</a> is upright ellipse bounded by <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkPath_addOval_2_oval">oval</a> with radii equal to half <a href="#SkPath_addOval_2_oval">oval</a> width
and half <a href="#SkPath_addOval_2_oval">oval</a> height. <a href="undocumented#Oval">Oval</a> begins at <a href="#SkPath_addOval_2_start">start</a> and continues
clockwise if <a href="#SkPath_addOval_2_dir">dir</a> is <a href="#SkPath_kCW_Direction">kCW Direction</a>, counterclockwise if <a href="#SkPath_addOval_2_dir">dir</a> is <a href="#SkPath_kCCW_Direction">kCCW Direction</a>.
@@ -3530,9 +3530,9 @@ of the upper-left corner and winds counterclockwise.
If either <a href="#SkPath_addRoundRect_rx">rx</a> or <a href="#SkPath_addRoundRect_ry">ry</a> is too large, <a href="#SkPath_addRoundRect_rx">rx</a> and <a href="#SkPath_addRoundRect_ry">ry</a> are scaled uniformly until the
corners fit. If <a href="#SkPath_addRoundRect_rx">rx</a> or <a href="#SkPath_addRoundRect_ry">ry</a> is less than or equal to zero, <a href="#SkPath_addRoundRect">addRoundRect</a> appends
-<a href="undocumented#Rect">Rect</a> <a href="#SkPath_addRoundRect_rect">rect</a> to <a href="#Path">Path</a>.
+<a href="SkRect_Reference#Rect">Rect</a> <a href="#SkPath_addRoundRect_rect">rect</a> to <a href="#Path">Path</a>.
-After appending, <a href="#Path">Path</a> may be empty, or may contain: <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Oval">Oval</a>, or RoundRect.
+After appending, <a href="#Path">Path</a> may be empty, or may contain: <a href="SkRect_Reference#Rect">Rect</a>, <a href="undocumented#Oval">Oval</a>, or RoundRect.
### Parameters
@@ -3549,7 +3549,7 @@ y-radius of rounded corners on the <a href="undocumented#Round_Rect">Round Rect<
### Example
-<div><fiddle-embed name="24736f685f265cf533f1700c042db353"><div>If either radius is zero, path <a href="#SkPath_contains">contains</a> <a href="undocumented#Rect">Rect</a> and is drawn red.
+<div><fiddle-embed name="24736f685f265cf533f1700c042db353"><div>If either radius is zero, path <a href="#SkPath_contains">contains</a> <a href="SkRect_Reference#Rect">Rect</a> and is drawn red.
If sides are only radii, path <a href="#SkPath_contains">contains</a> <a href="undocumented#Oval">Oval</a> and is drawn blue.
All remaining path draws are convex, and are drawn in gray; no
paths constructed from <a href="#SkPath_addRoundRect">addRoundRect</a> are concave, so none are
@@ -3589,7 +3589,7 @@ If both <a href="#SkPath_addRoundRect_2_radii">radii</a> on any side of <a href=
uniformly until the corners fit. If either radius of a corner is less than or
equal to zero, both are treated as zero.
-After appending, <a href="#Path">Path</a> may be empty, or may contain: <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Oval">Oval</a>, or RoundRect.
+After appending, <a href="#Path">Path</a> may be empty, or may contain: <a href="SkRect_Reference#Rect">Rect</a>, <a href="undocumented#Oval">Oval</a>, or RoundRect.
### Parameters
@@ -3624,7 +3624,7 @@ Add <a href="#SkPath_addRRect_rrect">rrect</a> to <a href="#Path">Path</a>, crea
winds clockwise. If <a href="#SkPath_addRRect_dir">dir</a> is <a href="#SkPath_kCCW_Direction">kCCW Direction</a>, <a href="#SkPath_addRRect_rrect">rrect</a> starts at the bottom-left
of the upper-left corner and winds counterclockwise.
-After appending, <a href="#Path">Path</a> may be empty, or may contain: <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Oval">Oval</a>, or <a href="undocumented#Round_Rect">Round Rect</a>.
+After appending, <a href="#Path">Path</a> may be empty, or may contain: <a href="SkRect_Reference#Rect">Rect</a>, <a href="undocumented#Oval">Oval</a>, or <a href="undocumented#Round_Rect">Round Rect</a>.
### Parameters
@@ -3664,7 +3664,7 @@ winds clockwise; if <a href="#SkPath_addRRect_2_dir">dir</a> is <a href="#SkPath
| 6 | top of bottom-left corner |
| 7 | bottom of top-left corner |
-After appending, <a href="#Path">Path</a> may be empty, or may contain: <a href="undocumented#Rect">Rect</a>, <a href="undocumented#Oval">Oval</a>, or <a href="undocumented#Round_Rect">Round Rect</a>.
+After appending, <a href="#Path">Path</a> may be empty, or may contain: <a href="SkRect_Reference#Rect">Rect</a>, <a href="undocumented#Oval">Oval</a>, or <a href="undocumented#Round_Rect">Round Rect</a>.
### Parameters
@@ -3956,7 +3956,7 @@ is replaced.
### Parameters
<table> <tr> <td><a name="SkPath_transform_matrix"> <code><strong>matrix </strong></code> </a></td> <td>
-<a href="undocumented#Matrix">Matrix</a> to apply to <a href="#Path">Path</a></td>
+<a href="SkMatrix_Reference#Matrix">Matrix</a> to apply to <a href="#Path">Path</a></td>
</tr> <tr> <td><a name="SkPath_transform_dst"> <code><strong>dst </strong></code> </a></td> <td>
overwritten, transformed copy of <a href="#Path">Path</a>; may be nullptr</td>
</tr>
@@ -3968,7 +3968,7 @@ overwritten, transformed copy of <a href="#Path">Path</a>; may be nullptr</td>
### See Also
-<a href="#SkPath_addPath">addPath</a> <a href="#SkPath_offset">offset</a> <a href="#SkCanvas_concat">SkCanvas::concat()</a> <a href="undocumented#SkMatrix">SkMatrix</a>
+<a href="#SkPath_addPath">addPath</a> <a href="#SkPath_offset">offset</a> <a href="#SkCanvas_concat">SkCanvas::concat()</a> <a href="SkMatrix_Reference#SkMatrix">SkMatrix</a>
---
@@ -3983,7 +3983,7 @@ Transform <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Arr
### Parameters
<table> <tr> <td><a name="SkPath_transform_2_matrix"> <code><strong>matrix </strong></code> </a></td> <td>
-<a href="undocumented#Matrix">Matrix</a> to apply to <a href="#Path">Path</a></td>
+<a href="SkMatrix_Reference#Matrix">Matrix</a> to apply to <a href="#Path">Path</a></td>
</tr>
</table>
@@ -3993,7 +3993,7 @@ Transform <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Arr
### See Also
-<a href="#SkPath_addPath">addPath</a> <a href="#SkPath_offset">offset</a> <a href="#SkCanvas_concat">SkCanvas::concat()</a> <a href="undocumented#SkMatrix">SkMatrix</a>
+<a href="#SkPath_addPath">addPath</a> <a href="#SkPath_offset">offset</a> <a href="#SkCanvas_concat">SkCanvas::concat()</a> <a href="SkMatrix_Reference#SkMatrix">SkMatrix</a>
---
@@ -4390,7 +4390,7 @@ path is equal to copy
## serialize
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-sk_sp<SkData> serialize() const
+sk_sp&lt;SkData&gt; serialize() const
</pre>
Write <a href="#Path">Path</a> to buffer, returning the buffer written to, wrapped in <a href="undocumented#Data">Data</a>.
diff --git a/site/user/api/SkPixmap_Reference.md b/site/user/api/SkPixmap_Reference.md
index fd454a4c37..9c7deb64cb 100644
--- a/site/user/api/SkPixmap_Reference.md
+++ b/site/user/api/SkPixmap_Reference.md
@@ -9,11 +9,11 @@ SkPixmap Reference
raster destinations. <a href="SkCanvas_Reference#Canvas">Canvas</a> can not draw <a href="#Pixmap">Pixmap</a>, nor does <a href="#Pixmap">Pixmap</a> provide
a direct drawing destination.
-Use <a href="undocumented#Bitmap">Bitmap</a> to draw pixels referenced by <a href="#Pixmap">Pixmap</a>; use <a href="undocumented#Surface">Surface</a> to draw into
+Use <a href="SkBitmap_Reference#Bitmap">Bitmap</a> to draw pixels referenced by <a href="#Pixmap">Pixmap</a>; use <a href="undocumented#Surface">Surface</a> to draw into
pixels referenced by <a href="#Pixmap">Pixmap</a>.
-<a href="#Pixmap">Pixmap</a> does not try to manage the lifetime of the pixel memory. Use <a href="undocumented#PixelRef">PixelRef</a>
-to manage pixel memory; <a href="undocumented#PixelRef">PixelRef</a> is safe across threads.
+<a href="#Pixmap">Pixmap</a> does not try to manage the lifetime of the pixel memory. Use <a href="undocumented#Pixel_Ref">Pixel Ref</a>
+to manage pixel memory; <a href="undocumented#Pixel_Ref">Pixel Ref</a> is safe across threads.
# <a name="Overview"></a> Overview
@@ -238,7 +238,7 @@ size of one row of <a href="#SkPixmap_addr">addr</a>; <a href="#SkPixmap_width">
## setColorSpace
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void setColorSpace(sk_sp<SkColorSpace> colorSpace)
+void setColorSpace(sk_sp&lt;SkColorSpace&gt; colorSpace)
</pre>
Changes <a href="undocumented#Color_Space">Color Space</a> in <a href="#Info">Image Info</a>; preserves <a href="#SkPixmap_width">width</a>, <a href="#SkPixmap_height">height</a>, <a href="undocumented#SkAlphaType">SkAlphaType</a>, and
@@ -391,7 +391,8 @@ size_t rowBytes() const
Returns row bytes, the interval from one pixel row to the next. Row bytes
is at least as large as<a href="#SkPixmap_width">width</a> * <a href="#SkPixmap_info">info</a>.bytesPerPixel().
-It is up to the <a href="#Pixmap">Pixmap</a> creator to ensure that row bytes is a useful value.
+Returns zero if <a href="#SkPixmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kUnknown SkColorType</a>.
+It is up to the <a href="SkBitmap_Reference#Bitmap">Bitmap</a> creator to ensure that row bytes is a useful value.
### Return Value
@@ -479,7 +480,7 @@ pixmap width: 16 info width: 16
### See Also
-<a href="#SkPixmap_height">height</a>
+<a href="#SkPixmap_height">height</a> <a href="#SkImageInfo_width">SkImageInfo::width()</a>
---
@@ -498,7 +499,7 @@ pixel <a href="#SkPixmap_height">height</a> in <a href="#Info">Image Info</a>
### Example
-<div><fiddle-embed name="cf80286d58a00cb0328c4205b6517755">
+<div><fiddle-embed name="4a996d32122f469d51ddd0186efb48cc">
#### Example Output
@@ -510,7 +511,7 @@ pixmap height: 32 info height: 32
### See Also
-<a href="#SkPixmap_width">width</a>
+<a href="#SkPixmap_width">width</a> ImageInfo::height()
---
@@ -543,7 +544,7 @@ color type: kAlpha_SkColorType
### See Also
-<a href="#SkPixmap_alphaType">alphaType</a>
+<a href="#SkPixmap_alphaType">alphaType</a> <a href="#SkImageInfo_colorType">SkImageInfo::colorType</a>
---
@@ -575,7 +576,7 @@ alpha type: kPremul_SkAlphaType
### See Also
-<a href="#SkPixmap_colorType">colorType</a>
+<a href="#SkPixmap_colorType">colorType</a> <a href="#SkImageInfo_alphaType">SkImageInfo::alphaType</a>
---
@@ -586,11 +587,13 @@ alpha type: kPremul_SkAlphaType
SkColorSpace* colorSpace() const
</pre>
-Returns <a href="undocumented#Color_Space">Color Space</a> associated with <a href="#Info">Image Info</a>.
+Returns <a href="undocumented#Color_Space">Color Space</a> associated with <a href="#Info">Image Info</a>. The
+reference count of <a href="undocumented#Color_Space">Color Space</a> is unchanged. The returned <a href="undocumented#Color_Space">Color Space</a> is
+immutable.
### Return Value
-<a href="undocumented#Color_Space">Color Space</a> in <a href="#Info">Image Info</a>
+<a href="undocumented#Color_Space">Color Space</a>, the range of colors, in <a href="#Info">Image Info</a>
### Example
@@ -607,7 +610,7 @@ gammaCloseToSRGB: false gammaIsLinear: true isSRGB: false
### See Also
-<a href="undocumented#Color_Space">Color Space</a>
+<a href="undocumented#Color_Space">Color Space</a> <a href="#SkImageInfo_colorSpace">SkImageInfo::colorSpace</a>
---
@@ -619,7 +622,8 @@ bool isOpaque() const
</pre>
Returns true if <a href="undocumented#Alpha_Type">Alpha Type</a> is <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>.
-Does not check if <a href="undocumented#Color_Type">Color Type</a> allows <a href="#Alpha">Alpha</a>, or <a href="#Alpha">Alpha</a> in pixel values.
+Does not check if <a href="undocumented#Color_Type">Color Type</a> allows <a href="#Alpha">Alpha</a>, or if any pixel value has
+transparency.
### Return Value
@@ -653,7 +657,7 @@ isOpaque: true
SkIRect bounds() const
</pre>
-Returns <a href="undocumented#IRect">IRect</a>{ 0, 0, <a href="#SkPixmap_width">width</a>, <a href="#SkPixmap_height">height</a> }.
+Returns <a href="SkIRect_Reference#IRect">IRect</a>{ 0, 0, <a href="#SkPixmap_width">width</a>, <a href="#SkPixmap_height">height</a> }.
### Return Value
@@ -676,7 +680,7 @@ width: 2 height: 2 empty: false
### See Also
-<a href="#SkPixmap_height">height</a> <a href="#SkPixmap_width">width</a> <a href="undocumented#IRect">IRect</a>
+<a href="#SkPixmap_height">height</a> <a href="#SkPixmap_width">width</a> <a href="SkIRect_Reference#IRect">IRect</a>
---
@@ -769,26 +773,6 @@ Includes unused memory on last row when <a href="#SkPixmap_rowBytesAsPixels">row
conservative pixel storage size
-### Example
-
-<div><fiddle-embed name="2ab8c15170ff23edb386258299221051">
-
-#### Example Output
-
-~~~~
-width: 1 height: 1 getSize64: 5
-width: 1 height: 1000 getSize64: 5000
-width: 1 height: 1000000 getSize64: 5000000
-width: 1000 height: 1 getSize64: 5000
-width: 1000 height: 1000 getSize64: 5000000
-width: 1000 height: 1000000 getSize64: 5000000000
-width: 1000000 height: 1 getSize64: 5000000
-width: 1000000 height: 1000 getSize64: 5000000000
-width: 1000000 height: 1000000 getSize64: 5000000000000
-~~~~
-
-</fiddle-embed></div>
-
### See Also
<a href="#SkPixmap_getSafeSize64">getSafeSize64</a> <a href="#SkPixmap_getSafeSize">getSafeSize</a> <a href="#SkPixmap_height">height</a> <a href="#SkPixmap_rowBytes">rowBytes</a> <a href="#SkPixmap_width">width</a> <a href="#SkImageInfo_bytesPerPixel">SkImageInfo::bytesPerPixel</a>
@@ -809,26 +793,6 @@ Does not include unused memory on last row when <a href="#SkPixmap_rowBytesAsPix
exact pixel storage size
-### Example
-
-<div><fiddle-embed name="aee6a517fce327bba42844b26bd4655f">
-
-#### Example Output
-
-~~~~
-width: 1 height: 1 getSafeSize64: 4
-width: 1 height: 1000 getSafeSize64: 4999
-width: 1 height: 1000000 getSafeSize64: 4999999
-width: 1000 height: 1 getSafeSize64: 4000
-width: 1000 height: 1000 getSafeSize64: 4999000
-width: 1000 height: 1000000 getSafeSize64: 4999999000
-width: 1000000 height: 1 getSafeSize64: 4000000
-width: 1000000 height: 1000 getSafeSize64: 4999000000
-width: 1000000 height: 1000000 getSafeSize64: 4999999000000
-~~~~
-
-</fiddle-embed></div>
-
### See Also
<a href="#SkPixmap_getSize64">getSize64</a> <a href="#SkPixmap_getSafeSize">getSafeSize</a> <a href="#SkPixmap_height">height</a> <a href="#SkPixmap_rowBytes">rowBytes</a> <a href="#SkPixmap_width">width</a> <a href="#SkImageInfo_bytesPerPixel">SkImageInfo::bytesPerPixel</a>
@@ -851,29 +815,52 @@ The largest value than can be returned is 2,147,483,647.
exact pixel storage size if size fits in signed 32 bits
+### See Also
+
+<a href="#SkPixmap_getSize64">getSize64</a> <a href="#SkPixmap_getSafeSize64">getSafeSize64</a> <a href="#SkPixmap_height">height</a> <a href="#SkPixmap_rowBytes">rowBytes</a> <a href="#SkPixmap_width">width</a> <a href="#SkImageInfo_bytesPerPixel">SkImageInfo::bytesPerPixel</a> <a href="undocumented#sk_64_isS32">sk 64 isS32</a>
+
+---
+
+<a name="SkPixmap_computeByteSize"></a>
+## computeByteSize
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+size_t computeByteSize() const
+</pre>
+
+Returns minimum memory required for pixel storage.
+Does not include unused memory on last row when <a href="#SkPixmap_rowBytesAsPixels">rowBytesAsPixels</a> exceeds <a href="#SkPixmap_width">width</a>.
+Returns zero if result does not fit in size_t.
+Returns zero if <a href="#SkPixmap_height">height</a> or <a href="#SkPixmap_width">width</a> is 0.
+Returns <a href="#SkPixmap_height">height</a> times <a href="#SkPixmap_rowBytes">rowBytes</a> if <a href="#SkPixmap_colorType">colorType</a> is <a href="undocumented#SkColorType">kUnknown SkColorType</a>.
+
+### Return Value
+
+size in bytes of image buffer
+
### Example
-<div><fiddle-embed name="1e2830708e4da1db886d8d7541af618b">
+<div><fiddle-embed name="410d14ddc45d272598c5a4e52bb047de">
#### Example Output
~~~~
-width: 1 height: 1 getSafeSize: 4
-width: 1 height: 1000 getSafeSize: 4999
-width: 1 height: 1000000 getSafeSize: 4999999
-width: 1000 height: 1 getSafeSize: 4000
-width: 1000 height: 1000 getSafeSize: 4999000
-width: 1000 height: 1000000 getSafeSize: 0
-width: 1000000 height: 1 getSafeSize: 4000000
-width: 1000000 height: 1000 getSafeSize: 0
-width: 1000000 height: 1000000 getSafeSize: 0
+width: 1 height: 1 computeByteSize: 4
+width: 1 height: 1000 computeByteSize: 4999
+width: 1 height: 1000000 computeByteSize: 4999999
+width: 1000 height: 1 computeByteSize: 4000
+width: 1000 height: 1000 computeByteSize: 4999000
+width: 1000 height: 1000000 computeByteSize: 4999999000
+width: 1000000 height: 1 computeByteSize: 4000000
+width: 1000000 height: 1000 computeByteSize: 4999000000
+width: 1000000 height: 1000000 computeByteSize: 4999999000000
~~~~
</fiddle-embed></div>
### See Also
-<a href="#SkPixmap_getSize64">getSize64</a> <a href="#SkPixmap_getSafeSize64">getSafeSize64</a> <a href="#SkPixmap_height">height</a> <a href="#SkPixmap_rowBytes">rowBytes</a> <a href="#SkPixmap_width">width</a> <a href="#SkImageInfo_bytesPerPixel">SkImageInfo::bytesPerPixel</a> <a href="undocumented#sk_64_isS32">sk 64 isS32</a>
+<a href="#SkImageInfo_computeByteSize">SkImageInfo::computeByteSize</a>
---
@@ -902,7 +889,7 @@ Returns false for <a href="undocumented#SkColorType">kUnknown SkColorType</a>.
### Return Value
-true all pixels have opaque values or <a href="undocumented#Color_Type">Color Type</a> is opaque
+true if all pixels have opaque values or <a href="undocumented#Color_Type">Color Type</a> is opaque
### Example
@@ -990,10 +977,13 @@ Unpremultiplied:
const void* addr(int x, int y) const
</pre>
-Returns readable pixel address at (<a href="#SkPixmap_addr_2_x">x</a>, <a href="#SkPixmap_addr_2_y">y</a>).
+Returns readable pixel address at (<a href="#SkPixmap_addr_2_x">x</a>, <a href="#SkPixmap_addr_2_y">y</a>). Returns nullptr if <a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr.
Input is not validated: out of <a href="#SkPixmap_bounds">bounds</a> values of <a href="#SkPixmap_addr_2_x">x</a> or <a href="#SkPixmap_addr_2_y">y</a> trigger an assert() if
-built with <a href="undocumented#SK_DEBUG">SK DEBUG</a> defined. Returns zero if <a href="undocumented#Color_Type">Color Type</a> is <a href="undocumented#SkColorType">kUnknown SkColorType</a>.
+built with <a href="undocumented#SK_DEBUG">SK DEBUG</a> defined. Returns nullptr if <a href="undocumented#Color_Type">Color Type</a> is <a href="undocumented#SkColorType">kUnknown SkColorType</a>.
+
+Performs a lookup of pixel size; for better performance, call
+one of: <a href="#SkPixmap_addr8">addr8</a>, <a href="#SkPixmap_addr16">addr16</a>, <a href="#SkPixmap_addr32">addr32</a>, <a href="#SkPixmap_addr64">addr64</a>, or <a href="#SkPixmap_addrF16">addrF16</a>.
### Parameters
@@ -1022,7 +1012,7 @@ pixmap.addr(1, 2) == &storage[1 + 2 * w]
### See Also
-<a href="#SkPixmap_addr8">addr8</a> <a href="#SkPixmap_addr16">addr16</a> <a href="#SkPixmap_addr32">addr32</a> <a href="#SkPixmap_addr64">addr64</a> <a href="#SkPixmap_addrF16">addrF16</a> <a href="#SkPixmap_getColor">getColor</a> <a href="#SkPixmap_writable_addr">writable addr</a>
+<a href="#SkPixmap_addr8">addr8</a> <a href="#SkPixmap_addr16">addr16</a> <a href="#SkPixmap_addr32">addr32</a> <a href="#SkPixmap_addr64">addr64</a> <a href="#SkPixmap_addrF16">addrF16</a> <a href="#SkPixmap_getColor">getColor</a> <a href="#SkPixmap_writable_addr">writable addr</a> <a href="#SkBitmap_getAddr">SkBitmap::getAddr</a>
---
@@ -1521,7 +1511,7 @@ writable unsigned 8-bit pointer to pixels
### Example
-<div><fiddle-embed name="809284db136748208b3efc31cd89de29"><div>Altering pixels after drawing <a href="undocumented#Bitmap">Bitmap</a> is not guaranteed to affect subsequent
+<div><fiddle-embed name="809284db136748208b3efc31cd89de29"><div>Altering pixels after drawing <a href="SkBitmap_Reference#Bitmap">Bitmap</a> is not guaranteed to affect subsequent
drawing on all platforms. Adding a second <a href="#SkBitmap_installPixels">SkBitmap::installPixels</a> after editing
pixel memory is safer.</div></fiddle-embed></div>
@@ -1689,7 +1679,7 @@ bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
int srcX, int srcY, SkTransferFunctionBehavior behavior) const
</pre>
-Copies a <a href="undocumented#Rect">Rect</a> of pixels to <a href="#SkPixmap_readPixels_dstPixels">dstPixels</a>. Copy starts at (<a href="#SkPixmap_readPixels_srcX">srcX</a>, <a href="#SkPixmap_readPixels_srcY">srcY</a>), and does not exceed(this-><a href="#SkPixmap_width">width</a>, this-><a href="#SkPixmap_height">height</a>).
+Copies a <a href="SkRect_Reference#Rect">Rect</a> of pixels to <a href="#SkPixmap_readPixels_dstPixels">dstPixels</a>. Copy starts at (<a href="#SkPixmap_readPixels_srcX">srcX</a>, <a href="#SkPixmap_readPixels_srcY">srcY</a>), and does not exceed(this-><a href="#SkPixmap_width">width</a>, this-><a href="#SkPixmap_height">height</a>).
<a href="#SkPixmap_readPixels_dstInfo">dstInfo</a> specifies <a href="#SkPixmap_width">width</a>, <a href="#SkPixmap_height">height</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, and
<a href="undocumented#Color_Space">Color Space</a> of destination. <a href="#SkPixmap_readPixels_dstRowBytes">dstRowBytes</a> specifics the gap from one destination
@@ -1709,7 +1699,7 @@ or ifabs(srcY) >= this-><a href="#SkPixmap_height">height</a>.
If <a href="#SkPixmap_readPixels_behavior">behavior</a> is <a href="#SkTransferFunctionBehavior_kRespect">SkTransferFunctionBehavior::kRespect</a>: converts source
pixels to a linear space before converting to <a href="#SkPixmap_readPixels_dstInfo">dstInfo</a>.
If <a href="#SkPixmap_readPixels_behavior">behavior</a> is <a href="#SkTransferFunctionBehavior_kIgnore">SkTransferFunctionBehavior::kIgnore</a>: source
-pixels are treated as if they are linear, regardless of their encoding.
+pixels are treated as if they are linear, regardless of how they are encoded.
### Parameters
@@ -1747,7 +1737,7 @@ true if pixels are copied to <a href="#SkPixmap_readPixels_dstPixels">dstPixels<
bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes) const
</pre>
-Copies a <a href="undocumented#Rect">Rect</a> of pixels to <a href="#SkPixmap_readPixels_2_dstPixels">dstPixels</a>. Copy starts at (0, 0), and does not
+Copies a <a href="SkRect_Reference#Rect">Rect</a> of pixels to <a href="#SkPixmap_readPixels_2_dstPixels">dstPixels</a>. Copy starts at (0, 0), and does not
exceed(this-><a href="#SkPixmap_width">width</a>, this-><a href="#SkPixmap_height">height</a>).
<a href="#SkPixmap_readPixels_2_dstInfo">dstInfo</a> specifies <a href="#SkPixmap_width">width</a>, <a href="#SkPixmap_height">height</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, and
@@ -1795,7 +1785,7 @@ bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
int srcX, int srcY) const
</pre>
-Copies a <a href="undocumented#Rect">Rect</a> of pixels to <a href="#SkPixmap_readPixels_3_dstPixels">dstPixels</a>. Copy starts at (<a href="#SkPixmap_readPixels_3_srcX">srcX</a>, <a href="#SkPixmap_readPixels_3_srcY">srcY</a>), and does not
+Copies a <a href="SkRect_Reference#Rect">Rect</a> of pixels to <a href="#SkPixmap_readPixels_3_dstPixels">dstPixels</a>. Copy starts at (<a href="#SkPixmap_readPixels_3_srcX">srcX</a>, <a href="#SkPixmap_readPixels_3_srcY">srcY</a>), and does not
exceed(this-><a href="#SkPixmap_width">width</a>, this-><a href="#SkPixmap_height">height</a>).
<a href="#SkPixmap_readPixels_3_dstInfo">dstInfo</a> specifies <a href="#SkPixmap_width">width</a>, <a href="#SkPixmap_height">height</a>, <a href="undocumented#Color_Type">Color Type</a>, <a href="undocumented#Alpha_Type">Alpha Type</a>, and
@@ -1846,7 +1836,7 @@ true if pixels are copied to <a href="#SkPixmap_readPixels_3_dstPixels">dstPixel
bool readPixels(const SkPixmap& dst, int srcX, int srcY) const
</pre>
-Copies a <a href="undocumented#Rect">Rect</a> of pixels to <a href="#SkPixmap_readPixels_4_dst">dst</a>. Copy starts at (<a href="#SkPixmap_readPixels_4_srcX">srcX</a>, <a href="#SkPixmap_readPixels_4_srcY">srcY</a>), and does not
+Copies a <a href="SkRect_Reference#Rect">Rect</a> of pixels to <a href="#SkPixmap_readPixels_4_dst">dst</a>. Copy starts at (<a href="#SkPixmap_readPixels_4_srcX">srcX</a>, <a href="#SkPixmap_readPixels_4_srcY">srcY</a>), and does not
exceed (this-><a href="#SkPixmap_width">width</a>, this-><a href="#SkPixmap_height">height</a>). <a href="#SkPixmap_readPixels_4_dst">dst</a> specifies <a href="#SkPixmap_width">width</a>, <a href="#SkPixmap_height">height</a>, <a href="undocumented#Color_Type">Color Type</a>,
<a href="undocumented#Alpha_Type">Alpha Type</a>, and <a href="undocumented#Color_Space">Color Space</a> of destination. Returns true if pixels are copied.
Returns false if <a href="#SkPixmap_readPixels_4_dst">dst</a>.<a href="#SkPixmap_addr">addr</a> equals nullptr, or <a href="#SkPixmap_readPixels_4_dst">dst</a>.<a href="#SkPixmap_rowBytes">rowBytes</a> is less than
@@ -1993,7 +1983,7 @@ not intersect <a href="#SkPixmap_bounds">bounds</a>.
<table> <tr> <td><a name="SkPixmap_erase_color"> <code><strong>color </strong></code> </a></td> <td>
<a href="#Unpremultiply">Unpremultiplied</a> <a href="undocumented#Color">Color</a> to write</td>
</tr> <tr> <td><a name="SkPixmap_erase_subset"> <code><strong>subset </strong></code> </a></td> <td>
-bounding integer <a href="undocumented#Rect">Rect</a> of written pixels</td>
+bounding integer <a href="SkRect_Reference#Rect">Rect</a> of written pixels</td>
</tr>
</table>
@@ -2054,7 +2044,7 @@ not intersect <a href="#SkPixmap_bounds">bounds</a>, or if <a href="#SkPixmap_er
<table> <tr> <td><a name="SkPixmap_erase_3_color"> <code><strong>color </strong></code> </a></td> <td>
<a href="#Unpremultiply">Unpremultiplied</a> <a href="undocumented#Color">Color</a> to write</td>
</tr> <tr> <td><a name="SkPixmap_erase_3_subset"> <code><strong>subset </strong></code> </a></td> <td>
-bounding integer <a href="undocumented#Rect">Rect</a> of pixels to write; may be nullptr</td>
+bounding integer <a href="SkRect_Reference#Rect">Rect</a> of pixels to write; may be nullptr</td>
</tr>
</table>
diff --git a/site/user/api/undocumented.md b/site/user/api/undocumented.md
index 6d3dbd70f0..e0c27af766 100644
--- a/site/user/api/undocumented.md
+++ b/site/user/api/undocumented.md
@@ -3,8 +3,6 @@ undocumented
# <a name="Glyph"></a> Glyph
-# <a name="Curve"></a> Curve
-
# <a name="Document"></a> Document
# <a name="SkDocument"></a> Class SkDocument
@@ -21,41 +19,18 @@ SkCanvas* beginPage(SkScalar width, SkScalar height,
## <a name="PDF"></a> PDF
-# <a name="Arc"></a> Arc
-
-# <a name="Rect"></a> Rect
-
-# <a name="SkRect"></a> Struct SkRect
-
-<a name="SkRect_MakeEmpty"></a>
-## MakeEmpty
-
-<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-static constexpr SkRect SK_WARN_UNUSED_RESULT MakeEmpty()
-</pre>
-
----
-
-<a name="SkRect_dump"></a>
-## dump
-
-<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void dump() const
-</pre>
-
----
+# <a name="PostScript"></a> PostScript
-<a name="SkRect_dumpHex"></a>
-## dumpHex
+## <a name="Arct"></a> Arct
-<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void dumpHex() const
-</pre>
+# <a name="Size"></a> Size
----
+# <a name="Arc"></a> Arc
# <a name="Line"></a> Line
+# <a name="Mip_Map"></a> Mip Map
+
# <a name="Region"></a> Region
# <a name="SkRegion"></a> Class SkRegion
@@ -68,6 +43,10 @@ void dumpHex() const
# <a name="SkVector"></a> Struct SkVector
+# <a name="Patch"></a> Patch
+
+# <a name="Curve"></a> Curve
+
# <a name="Point"></a> Point
# <a name="SkPoint"></a> Struct SkPoint
@@ -83,8 +62,6 @@ bool equalsWithinTolerance(const SkPoint& p) const
## <a name="Array"></a> Array
-# <a name="Patch"></a> Patch
-
# <a name="Typeface"></a> Typeface
# <a name="SkTypeface"></a> Class SkTypeface
@@ -105,40 +82,6 @@ bool equalsWithinTolerance(const SkPoint& p) const
# <a name="SkBBHFactory"></a> Class SkBBHFactory
-# <a name="Bitmap"></a> Bitmap
-
-# <a name="SkBitmap"></a> Class SkBitmap
-
-## <a name="Row_Bytes"></a> Row Bytes
-
-<a name="SkBitmap_erase"></a>
-## erase
-
-<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-void erase(SkColor c, const SkIRect& area) const
-</pre>
-
----
-
-<a name="SkBitmap_installPixels"></a>
-## installPixels
-
-<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-bool installPixels(const SkImageInfo& info, void* pixels, size_t rowBytes)
-</pre>
-
----
-
-<a name="SkBitmap_readPixels"></a>
-## readPixels
-
-<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
- int srcX, int srcY, SkTransferFunctionBehavior behavior) const
-</pre>
-
----
-
# <a name="Blend_Mode"></a> Blend Mode
## <a name="SkBlendMode"></a> Enum SkBlendMode
@@ -271,7 +214,7 @@ int SkColorSetARGB(a, r, g, b)
## MakeSRGBLinear
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-static sk_sp<SkColorSpace> MakeSRGBLinear()
+static sk_sp&lt;SkColorSpace&gt; MakeSRGBLinear()
</pre>
---
@@ -329,8 +272,8 @@ void draw(SkCanvas*, const SkMatrix* = NULL)
## MakeCanvas
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-static std::unique_ptr<SkCanvas>
- MakeCanvas(std::unique_ptr<SkRasterHandleAllocator>,
+static std::unique_ptr&lt;SkCanvas&gt;
+ MakeCanvas(std::unique_ptr&lt;SkRasterHandleAllocator&gt;,
const SkImageInfo&,
const Rec* rec = nullptr)
</pre>
@@ -469,7 +412,7 @@ SkImageInfo()
## makeColorSpace
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-SkImageInfo makeColorSpace(sk_sp<SkColorSpace> cs) const
+SkImageInfo makeColorSpace(sk_sp&lt;SkColorSpace&gt; cs) const
</pre>
---
@@ -501,13 +444,79 @@ int bytesPerPixel() const
---
+<a name="SkImageInfo_height"></a>
+## height
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+int height() const
+</pre>
+
+---
+
+<a name="SkImageInfo_width"></a>
+## width
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+int width() const
+</pre>
+
+---
+
+<a name="SkImageInfo_colorType"></a>
+## colorType
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkColorType colorType() const
+</pre>
+
+---
+
+<a name="SkImageInfo_alphaType"></a>
+## alphaType
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkAlphaType alphaType() const
+</pre>
+
+---
+
+<a name="SkImageInfo_colorSpace"></a>
+## colorSpace
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkColorSpace* colorSpace() const
+</pre>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool isOpaque() const
+</pre>
+
+---
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+size_t minRowBytes() const
+</pre>
+
+---
+
+<a name="SkImageInfo_computeByteSize"></a>
+## computeByteSize
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+size_t computeByteSize(size_t rowBytes) const
+</pre>
+
+---
+
# <a name="SkImage"></a> Class SkImage
<a name="SkImage_makeShader"></a>
## makeShader
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-sk_sp<SkShader> makeShader(SkShader::TileMode, SkShader::TileMode,
+sk_sp&lt;SkShader&gt; makeShader(SkShader::TileMode, SkShader::TileMode,
const SkMatrix* localMatrix = nullptr) const
</pre>
@@ -517,7 +526,7 @@ sk_sp<SkShader> makeShader(SkShader::TileMode, SkShader::TileMode,
## MakeRasterCopy
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-static sk_sp<SkImage> MakeRasterCopy(const SkPixmap&)
+static sk_sp&lt;SkImage&gt; MakeRasterCopy(const SkPixmap&)
</pre>
---
@@ -550,15 +559,24 @@ bool scalePixels(const SkPixmap& dst, SkFilterQuality,
# <a name="Image_Scaling"></a> Image Scaling
-# <a name="IRect"></a> IRect
+# <a name="Malloc_Pixel_Ref"></a> Malloc Pixel Ref
+
+# <a name="SkMallocPixelRef"></a> Class SkMallocPixelRef
-# <a name="SkIRect"></a> Struct SkIRect
+<a name="SkMallocPixelRef_MakeZeroed"></a>
+## MakeZeroed
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+static sk_sp&lt;SkPixelRef&gt; MakeZeroed(const SkImageInfo&, size_t rowBytes)
+</pre>
+
+---
-<a name="SkIRect_intersect"></a>
-## intersect
+<a name="SkMallocPixelRef_MakeAllocate"></a>
+## MakeAllocate
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-bool intersect(const SkIRect& r)
+static sk_sp&lt;SkPixelRef&gt; MakeAllocate(const SkImageInfo&, size_t rowBytes)
</pre>
---
@@ -596,6 +614,16 @@ k <tr>
# <a name="SkMaskFilter"></a> Class SkMaskFilter
+<a name="SkMaskFilter_filterMask"></a>
+## filterMask
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix&,
+ SkIPoint* margin) const
+</pre>
+
+---
+
# <a name="Math"></a> Math
<a name="sk_64_isS32"></a>
@@ -607,9 +635,59 @@ static inline bool sk_64_isS32(int64_t value)
---
-# <a name="Matrix"></a> Matrix
+<a name="SkIntToScalar"></a>
+## SkIntToScalar
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkIntToScalar(x)
+</pre>
+
+---
+
+<a name="SkScalarRoundToInt"></a>
+## SkScalarRoundToInt
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkScalarRoundToInt(x)
+</pre>
+
+---
-# <a name="SkMatrix"></a> Struct SkMatrix
+<a name="SkScalarFloorToInt"></a>
+## SkScalarFloorToInt
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkScalarFloorToInt(x)
+</pre>
+
+---
+
+<a name="SkScalarCeilToInt"></a>
+## SkScalarCeilToInt
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkScalarCeilToInt(x)
+</pre>
+
+---
+
+<a name="SkScalarFloorToScalar"></a>
+## SkScalarFloorToScalar
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkScalarFloorToScalar(x)
+</pre>
+
+---
+
+<a name="SkScalarCeilToScalar"></a>
+## SkScalarCeilToScalar
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+SkScalarCeilToScalar(x)
+</pre>
+
+---
# <a name="Nine_Patch"></a> Nine Patch
@@ -701,13 +779,45 @@ SkCanvas* beginRecording(const SkRect& bounds, SkBBHFactory* bbhFactory = NULL,
## <a name="Storage"></a> Storage
-# <a name="PixelRef"></a> PixelRef
+# <a name="Pixel_Ref"></a> Pixel Ref
# <a name="SkPixelRef"></a> Class SkPixelRef
-# <a name="PostScript"></a> PostScript
+<a name="SkPixelRef_width"></a>
+## width
-## <a name="Arct"></a> Arct
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+int width() const
+</pre>
+
+---
+
+<a name="SkPixelRef_height"></a>
+## height
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+int height() const
+</pre>
+
+---
+
+<a name="SkPixelRef_isImmutable"></a>
+## isImmutable
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+bool isImmutable() const
+</pre>
+
+---
+
+<a name="SkPixelRef_setImmutable"></a>
+## setImmutable
+
+<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
+void setImmutable()
+</pre>
+
+---
# <a name="Premultiply"></a> Premultiply
@@ -723,6 +833,8 @@ SkCanvas* beginRecording(const SkRect& bounds, SkBBHFactory* bbhFactory = NULL,
# <a name="Reference_Count"></a> Reference Count
+# <a name="SkRefCnt"></a> Class SkRefCnt
+
# <a name="sk_sp"></a> Class sk_sp
# <a name="Right_Side_Bearing"></a> Right Side Bearing
@@ -772,7 +884,7 @@ void dumpHex() const
## MakeBitmapShader
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-static sk_sp<SkShader> MakeBitmapShader(const SkBitmap& src, TileMode tmx,
+static sk_sp&lt;SkShader&gt; MakeBitmapShader(const SkBitmap& src, TileMode tmx,
TileMode tmy,
const SkMatrix* localMatrix = nullptr)
</pre>
@@ -801,7 +913,7 @@ static sk_sp<SkShader> MakeBitmapShader(const SkBitmap& src, TileMode tmx,
## MakeRasterDirect
<pre style="padding: 1em 1em 1em 1em;width: 50em; background-color: #f0f0f0">
-static sk_sp<SkSurface> MakeRasterDirect(const SkImageInfo&, void* pixels,
+static sk_sp&lt;SkSurface&gt; MakeRasterDirect(const SkImageInfo&, void* pixels,
size_t rowBytes,
const SkSurfaceProps* = nullptr)
</pre>
diff --git a/tools/bookmaker/bookmaker.cpp b/tools/bookmaker/bookmaker.cpp
index 2ec987b333..4d0c2d9171 100644
--- a/tools/bookmaker/bookmaker.cpp
+++ b/tools/bookmaker/bookmaker.cpp
@@ -10,6 +10,18 @@
#include "SkOSFile.h"
#include "SkOSPath.h"
+DEFINE_string2(bmh, b, "", "Path to a *.bmh file or a directory.");
+DEFINE_string2(examples, e, "", "File of fiddlecli input, usually fiddle.json (For now, disables -r -f -s)");
+DEFINE_string2(fiddle, f, "", "File of fiddlecli output, usually fiddleout.json.");
+DEFINE_string2(include, i, "", "Path to a *.h file or a directory.");
+DEFINE_bool2(hack, k, false, "Do a find/replace hack to update all *.bmh files. (Requires -b)");
+DEFINE_bool2(stdout, o, false, "Write file out to standard out.");
+DEFINE_bool2(populate, p, false, "Populate include from bmh. (Requires -b -i)");
+DEFINE_string2(ref, r, "", "Resolve refs and write bmh_*.md files to path. (Requires -b)");
+DEFINE_string2(spellcheck, s, "", "Spell-check [once, all, mispelling]. (Requires -b)");
+DEFINE_string2(tokens, t, "", "Directory to write bmh from include. (Requires -i)");
+DEFINE_bool2(crosscheck, x, false, "Check bmh against includes. (Requires -b -i)");
+DEFINE_bool2(skip, z, false, "Skip missing example error.");
/* recipe for generating timestamps for existing doxygen comments
find include/core -type f -name '*.h' -print -exec git blame {} \; > ~/all.blame.txt
@@ -118,6 +130,17 @@ void Definition::setCanonicalFiddle() {
SkASSERT('=' == fName[opPos + 1]);
result += "equal_operator";
}
+ } else if ('[' == fName[opPos]) {
+ result += "subscript_operator";
+ const char* end = fContentStart;
+ while (end > fStart && ' ' >= end[-1]) {
+ --end;
+ }
+ string constCheck(fStart, end - fStart);
+ size_t constPos = constCheck.rfind("const");
+ if (constCheck.length() == constPos + 5) {
+ result += "_const";
+ }
} else {
SkASSERT(0); // todo: incomplete
}
@@ -331,7 +354,8 @@ bool Definition::checkMethod() const {
methodParser.skipName("#Method");
methodParser.skipSpace();
string name = this->methodName();
- if (MethodType::kNone == fMethodType && "()" == name.substr(name.length() - 2)) {
+ if (MethodType::kNone == fMethodType && name.length() > 2 &&
+ "()" == name.substr(name.length() - 2)) {
name = name.substr(0, name.length() - 2);
}
bool expectReturn = this->methodHasReturn(name, &methodParser);
@@ -366,6 +390,9 @@ bool Definition::checkMethod() const {
string paramName;
methodParser.fChar = nextEnd + 1;
methodParser.skipSpace();
+ if (1494 == methodParser.fLineCount) {
+ SkDebugf("");
+ }
if (!this->nextMethodParam(&methodParser, &nextEnd, &paramName)) {
continue;
}
@@ -663,11 +690,29 @@ string Definition::methodName() const {
bool Definition::nextMethodParam(TextParser* methodParser, const char** nextEndPtr,
string* paramName) const {
- *nextEndPtr = methodParser->anyOf(",)");
- const char* nextEnd = *nextEndPtr;
- if (!nextEnd) {
- return methodParser->reportError<bool>("#Method function missing close paren");
+ int parenCount = 0;
+ TextParser::Save saveState(methodParser);
+ while (true) {
+ if (methodParser->eof()) {
+ return methodParser->reportError<bool>("#Method function missing close paren");
+ }
+ char ch = methodParser->peek();
+ if ('(' == ch) {
+ ++parenCount;
+ }
+ if (parenCount == 0 && (')' == ch || ',' == ch)) {
+ *nextEndPtr = methodParser->fChar;
+ break;
+ }
+ if (')' == ch) {
+ if (0 > --parenCount) {
+ return this->reportError<bool>("mismatched parentheses");
+ }
+ }
+ methodParser->next();
}
+ saveState.restore();
+ const char* nextEnd = *nextEndPtr;
const char* paramEnd = nextEnd;
const char* assign = methodParser->strnstr(" = ", paramEnd);
if (assign) {
@@ -684,6 +729,10 @@ bool Definition::nextMethodParam(TextParser* methodParser, const char** nextEndP
}
}
}
+ const char* function = methodParser->strnstr(")(", paramEnd);
+ if (function) {
+ paramEnd = function;
+ }
while (paramEnd > methodParser->fChar && ' ' == paramEnd[-1]) {
--paramEnd;
}
@@ -1071,7 +1120,9 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
if (definition->fChildren.size() == 0) {
TextParser emptyCheck(definition);
if (emptyCheck.eof() || !emptyCheck.skipWhiteSpace()) {
- return this->reportError<bool>("missing example body");
+ if (!FLAGS_skip) {
+ return this->reportError<bool>("missing example body");
+ }
}
}
}
@@ -2141,18 +2192,6 @@ string BmhParser::word(const string& prefix, const string& delimiter) {
// pass one: parse text, collect definitions
// pass two: lookup references
-DEFINE_string2(bmh, b, "", "Path to a *.bmh file or a directory.");
-DEFINE_string2(examples, e, "", "File of fiddlecli input, usually fiddle.json (For now, disables -r -f -s)");
-DEFINE_string2(fiddle, f, "", "File of fiddlecli output, usually fiddleout.json.");
-DEFINE_string2(include, i, "", "Path to a *.h file or a directory.");
-DEFINE_bool2(hack, k, false, "Do a find/replace hack to update all *.bmh files. (Requires -b)");
-DEFINE_bool2(stdout, o, false, "Write file out to standard out.");
-DEFINE_bool2(populate, p, false, "Populate include from bmh. (Requires -b -i)");
-DEFINE_string2(ref, r, "", "Resolve refs and write bmh_*.md files to path. (Requires -b)");
-DEFINE_string2(spellcheck, s, "", "Spell-check [once, all, mispelling]. (Requires -b)");
-DEFINE_string2(tokens, t, "", "Directory to write bmh from include. (Requires -i)");
-DEFINE_bool2(crosscheck, x, false, "Check bmh against includes. (Requires -b -i)");
-
static int count_children(const Definition& def, MarkType markType) {
int count = 0;
if (markType == def.fMarkType) {
diff --git a/tools/bookmaker/mdOut.cpp b/tools/bookmaker/mdOut.cpp
index b0cec6659b..0b0b2e1bca 100644
--- a/tools/bookmaker/mdOut.cpp
+++ b/tools/bookmaker/mdOut.cpp
@@ -14,6 +14,20 @@ static void add_ref(const string& leadingSpaces, const string& ref, string* resu
*result += leadingSpaces + ref;
}
+static string preformat(const string& orig) {
+ string result;
+ for (auto c : orig) {
+ if ('<' == c) {
+ result += "&lt;";
+ } else if ('>' == c) {
+ result += "&gt;";
+ } else {
+ result += c;
+ }
+ }
+ return result;
+}
+
// FIXME: preserve inter-line spaces and don't add new ones
string MdOut::addReferences(const char* refStart, const char* refEnd,
BmhParser::Resolvable resolvable) {
@@ -149,7 +163,7 @@ string MdOut::addReferences(const char* refStart, const char* refEnd,
if (('f' != ref[0] && string::npos == ref.find("()"))
// || '.' != t.backup(ref.c_str())
&& ('k' != ref[0] && string::npos == ref.find("_Private"))) {
- if ('.' == wordStart[0] && distFromParam == 1) {
+ if ('.' == wordStart[0] && (distFromParam >= 1 && distFromParam <= 16)) {
const Definition* paramType = this->findParamType();
if (paramType) {
string fullName = paramType->fName + "::" + ref;
@@ -756,10 +770,11 @@ void MdOut::markTypeOut(Definition* def) {
// TODO: put in css spec that we can define somewhere else (if markup supports that)
// TODO: 50em below should match limt = 80 in formatFunction()
this->writePending();
+ string preformattedStr = preformat(formattedStr);
fprintf(fOut, "<pre style=\"padding: 1em 1em 1em 1em;"
"width: 50em; background-color: #f0f0f0\">\n"
"%s\n"
- "</pre>", formattedStr.c_str());
+ "</pre>", preformattedStr.c_str());
this->lf(2);
fTableState = TableState::kNone;
fMethod = def;
diff --git a/tools/bookmaker/spellCheck.cpp b/tools/bookmaker/spellCheck.cpp
index 7a45fb04ed..eb430f877c 100644
--- a/tools/bookmaker/spellCheck.cpp
+++ b/tools/bookmaker/spellCheck.cpp
@@ -579,7 +579,8 @@ void SpellCheck::wordCheck(const string& str) {
hasColon |= isColon;
bool isDot = '.' == ch;
hasDot |= isDot;
- bool isParen = '(' == ch || ')' == ch || '~' == ch || '=' == ch || '!' == ch;
+ bool isParen = '(' == ch || ')' == ch || '~' == ch || '=' == ch || '!' == ch ||
+ '[' == ch || ']' == ch;
hasParen |= isParen;
bool isUnderscore = '_' == ch;
hasUnderscore |= isUnderscore;
@@ -594,6 +595,7 @@ void SpellCheck::wordCheck(const string& str) {
sawSpecial = true;
continue;
}
+ SkDebugf("");
SkASSERT(0);
}
if (sawSpecial && !hasParen) {