aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--docs/SkAutoCanvasRestore_Reference.bmh6
-rw-r--r--docs/SkBitmap_Reference.bmh73
-rw-r--r--docs/SkCanvas_Reference.bmh64
-rw-r--r--docs/SkIPoint16_Reference.bmh30
-rw-r--r--docs/SkIPoint_Reference.bmh42
-rw-r--r--docs/SkIRect_Reference.bmh135
-rw-r--r--docs/SkImageInfo_Reference.bmh49
-rw-r--r--docs/SkImage_Reference.bmh387
-rw-r--r--docs/SkMatrix_Reference.bmh221
-rw-r--r--docs/SkPaint_Reference.bmh69
-rw-r--r--docs/SkPath_Reference.bmh210
-rw-r--r--docs/SkPixmap_Reference.bmh47
-rw-r--r--docs/SkPoint_Reference.bmh100
-rw-r--r--docs/SkRect_Reference.bmh248
-rw-r--r--docs/SkSurface_Reference.bmh107
-rw-r--r--docs/undocumented.bmh4
-rw-r--r--docs/usingBookmaker.bmh12
-rw-r--r--site/user/api/SkAutoCanvasRestore_Reference.md10
-rw-r--r--site/user/api/SkBitmap_Reference.md66
-rw-r--r--site/user/api/SkCanvas_Reference.md52
-rw-r--r--site/user/api/SkIPoint16_Reference.md37
-rw-r--r--site/user/api/SkIPoint_Reference.md62
-rw-r--r--site/user/api/SkIRect_Reference.md91
-rw-r--r--site/user/api/SkImageInfo_Reference.md39
-rw-r--r--site/user/api/SkImage_Reference.md449
-rw-r--r--site/user/api/SkMatrix_Reference.md137
-rw-r--r--site/user/api/SkPaint_Reference.md62
-rw-r--r--site/user/api/SkPath_Reference.md164
-rw-r--r--site/user/api/SkPixmap_Reference.md49
-rw-r--r--site/user/api/SkPoint_Reference.md109
-rw-r--r--site/user/api/SkRect_Reference.md110
-rw-r--r--site/user/api/SkSurface_Reference.md130
-rw-r--r--site/user/api/catalog.htm47
-rw-r--r--site/user/api/usingBookmaker.md11
-rw-r--r--tools/bookmaker/bookmaker.cpp44
-rw-r--r--tools/bookmaker/bookmaker.h44
-rw-r--r--tools/bookmaker/definition.cpp17
-rw-r--r--tools/bookmaker/includeWriter.cpp38
-rw-r--r--tools/bookmaker/mdOut.cpp61
-rw-r--r--tools/bookmaker/selfCheck.cpp394
-rw-r--r--tools/bookmaker/spellCheck.cpp45
41 files changed, 1745 insertions, 2327 deletions
diff --git a/docs/SkAutoCanvasRestore_Reference.bmh b/docs/SkAutoCanvasRestore_Reference.bmh
index 112d6310ee..132a042c95 100644
--- a/docs/SkAutoCanvasRestore_Reference.bmh
+++ b/docs/SkAutoCanvasRestore_Reference.bmh
@@ -1,7 +1,7 @@
#Topic Automatic_Canvas_Restore
#Subtopic Overview
- #Subtopic Subtopics
+ #Subtopic Subtopic
#Populate
##
##
@@ -12,11 +12,11 @@ Stack helper class calls SkCanvas::restoreToCount() when SkAutoCanvasRestore
goes out of scope. Use this to guarantee that the canvas is restored to a known
state.
-#Subtopic Constructors
+#Subtopic Constructor
#Populate
##
-#Subtopic Member_Functions
+#Subtopic Member_Function
#Populate
##
diff --git a/docs/SkBitmap_Reference.bmh b/docs/SkBitmap_Reference.bmh
index 1a943ad326..088158e748 100644
--- a/docs/SkBitmap_Reference.bmh
+++ b/docs/SkBitmap_Reference.bmh
@@ -3,7 +3,7 @@
#Alias Bitmap_Reference
#Subtopic Overview
- #Subtopic Subtopics
+ #Subtopic Subtopic
#Populate
##
##
@@ -39,23 +39,27 @@ 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.
##
-#Subtopic Related_Functions
+#Subtopic Related_Function
#Populate
##
-#Subtopic Classes_and_Structs
+#Subtopic Constant
#Populate
##
-#Subtopic Constructors
+#Subtopic Class_or_Struct
#Populate
##
-#Subtopic Operators
+#Subtopic Constructor
#Populate
##
-#Subtopic Member_Functions
+#Subtopic Operator
+#Populate
+##
+
+#Subtopic Member_Function
#Populate
##
@@ -1412,7 +1416,7 @@ canvas->drawBitmap(bitmap, 0, 0);
# ------------------------------------------------------------------------------
#Enum AllocFlags
-
+#Line # zero pixel memory ##
#Code
enum AllocFlags {
kZeroPixels_AllocFlag = 1 << 0,
@@ -1843,8 +1847,8 @@ Caller must ensure that pixels are valid for the lifetime of Bitmap and Pixel_Re
#Return true if Image_Info is set to info ##
#Example
+#Bug 7079
#Description
-#Bug 7079 ##
GPU does not support kUnpremul_SkAlphaType, does not assert that it does not.
##
void draw(SkCanvas* canvas) {
@@ -1914,47 +1918,7 @@ Draw a five by five bitmap, and draw it again with a center white pixel.
# ------------------------------------------------------------------------------
#Method bool installMaskPixels(const SkMask& mask)
-
-#Line # creates Pixel_Ref from 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
-
+#Deprecated soon
##
# ------------------------------------------------------------------------------
@@ -2468,15 +2432,9 @@ then Color_RGB is ignored.
# ------------------------------------------------------------------------------
#Method void eraseArea(const SkIRect& area, SkColor c) const
-
-#Line # deprecated ##
-Legacy call to be deprecated.
-
#Deprecated
##
-##
-
# ------------------------------------------------------------------------------
#Method SkColor getColor(int x, int y) const
@@ -3305,7 +3263,7 @@ Pixel_Ref. Sets offset to top-left position for dst for alignment with Bitmap;
#Return true if Alpha layer was constructed in dst Pixel_Ref ##
-#Bug 7103 ##
+#Bug 7103
#Example
#Height 160
SkBitmap alpha, bitmap;
@@ -3354,7 +3312,7 @@ mask.
#Return true if Alpha layer was constructed in dst Pixel_Ref ##
-#Bug 7104 ##
+#Bug 7104
#Example
#Height 128
SkBitmap alpha, bitmap;
@@ -3490,3 +3448,4 @@ suppressed by defining SK_IGNORE_TO_STRING.
#Class SkBitmap ##
#Topic Bitmap ##
+
diff --git a/docs/SkCanvas_Reference.bmh b/docs/SkCanvas_Reference.bmh
index 2225b205de..67445d4464 100644
--- a/docs/SkCanvas_Reference.bmh
+++ b/docs/SkCanvas_Reference.bmh
@@ -2,7 +2,7 @@
#Alias Canvas_Reference
#Subtopic Overview
- #Subtopic Subtopics
+ #Subtopic Subtopic
#Populate
##
##
@@ -30,27 +30,27 @@ destination.
Canvas can be constructed to draw to Bitmap without first creating Raster_Surface.
This approach may be deprecated in the future.
-#Subtopic Related_Functions
+#Subtopic Related_Function
#Populate
##
-#Subtopic Constants
+#Subtopic Constant
#Populate
##
-#Subtopic Classes_and_Structs
+#Subtopic Class_or_Struct
#Populate
##
-#Subtopic Constructors
+#Subtopic Constructor
-Create the desired type of Surface to obtain its Canvas when possible. Constructors are useful
+Create the desired type of Surface to obtain its Canvas when possible. Useful
when no Surface is required, and some helpers implicitly create Raster_Surface.
#Populate
##
-#Subtopic Member_Functions
+#Subtopic Member_Function
#Populate
##
@@ -295,25 +295,7 @@ different characteristics, it is best not to rely on this legacy behavior.
# ------------------------------------------------------------------------------
#Method explicit SkCanvas(SkBaseDevice* device)
-
-#Line # to be deprecated ##
-Construct a canvas that draws into device.
-Used by child classes of SkCanvas.
-
-#ToDo Since SkBaseDevice is private, shouldn't this be private also? ##
-
-#Param device specifies a device for the canvas to draw into ##
-
-#Return Canvas that can be used to draw into device ##
-
-#ToDo unsure how to create a meaningful example ##
-#NoExample
-##
-
-#ToDo either remove doc or figure out a way to fiddle it ##
-
-#SeeAlso MakeRasterDirect SkRasterHandleAllocator::MakeCanvas SkSurface::getCanvas SkCreateColorSpaceXformCanvas
-
+#Deprecated soon
##
# ------------------------------------------------------------------------------
@@ -675,7 +657,7 @@ smaller (due to clipping or saveLayer).
# ------------------------------------------------------------------------------
#Method sk_sp<SkSurface> makeSurface(const SkImageInfo& info, const SkSurfaceProps* props = nullptr)
-
+#In Constructor
#Line # creates Surface matching SkImageInfo and SkSurfaceProps ##
Creates Surface matching info and props, and associates it with Canvas.
Returns nullptr if no match found.
@@ -1707,11 +1689,7 @@ defining how Layer allocated by saveLayer operates.
##
#Const kDontClipToLayer_Legacy_SaveLayerFlag 0x80000000
-#Private
- to be deprecated: bug.skia.org/2440
-##
- Only present on Android.
- Skips setting a clip to the Layer bounds.
+#Deprecated soon
##
#Example
@@ -2864,7 +2842,7 @@ is Anti-aliased.
##
# local canvas in example works around bug in fiddle ##
-#Bug 6524 ##
+#Bug 6524
#SeeAlso getDeviceClipBounds getBaseLayerSize quickReject
##
@@ -2901,7 +2879,7 @@ is Anti-aliased.
##
# local canvas in example works around bug in fiddle ##
-#Bug 6524 ##
+#Bug 6524
#SeeAlso getDeviceClipBounds getBaseLayerSize quickReject
##
@@ -2955,7 +2933,7 @@ void draw(SkCanvas* canvas) {
#SeeAlso getLocalClipBounds getBaseLayerSize quickReject
# device canvas in example works around bug in fiddle ##
-#Bug 6524 ##
+#Bug 6524
##
@@ -6127,23 +6105,11 @@ Document_PDF, use annotations.
##
#Method SkDrawFilter* getDrawFilter() const
-
-#Line # legacy; to be deprecated ##
-Legacy call to be deprecated.
-
-#Deprecated
-##
-
+#Deprecated soon
##
#Method virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter)
-
-#Line # legacy; to be deprecated ##
-Legacy call to be deprecated.
-
-#Deprecated
-##
-
+#Deprecated soon
##
# ------------------------------------------------------------------------------
diff --git a/docs/SkIPoint16_Reference.bmh b/docs/SkIPoint16_Reference.bmh
index e4d08b42af..7d6c872831 100644
--- a/docs/SkIPoint16_Reference.bmh
+++ b/docs/SkIPoint16_Reference.bmh
@@ -2,7 +2,7 @@
#Alias IPoint16_Reference
#Subtopic Overview
- #Subtopic Subtopics
+ #Subtopic Subtopic
#Populate
##
##
@@ -11,15 +11,15 @@
SkIPoint16 holds two 16 bit integer coordinates.
-#Subtopic Constructors
+#Subtopic Related_Function
#Populate
##
-#Subtopic Member_Functions
+#Subtopic Member_Function
#Populate
##
-#Subtopic Members
+#Subtopic Member
#Populate
#Member int16_t fX
@@ -32,12 +32,17 @@ x-axis value used by IPoint16
y-axis value used by IPoint16
##
-#Subtopic Members ##
+#Subtopic Member ##
# ------------------------------------------------------------------------------
+#Subtopic Constructor
+#Populate
+##
+
#Method static constexpr SkIPoint16 Make(int x, int y)
+#In Constructor
#Line # constructs from integer inputs ##
Sets fX to x, fY to y. If SK_DEBUG is defined, asserts
if x or y does not fit in 16 bits.
@@ -64,8 +69,14 @@ pt1.fY == pt2.fY
# ------------------------------------------------------------------------------
+#Subtopic Property
+#Line # member values ##
+#Populate
+##
+
#Method int16_t x() const
+#In Property
#Line # returns fX ##
Returns x-axis value of IPoint16.
@@ -86,7 +97,7 @@ pt1.fX == pt1.x()
# ------------------------------------------------------------------------------
#Method int16_t y() const
-
+#In Property
#Line # returns fY ##
Returns y-axis value of IPoint.
@@ -106,8 +117,13 @@ pt1.fY == pt1.y()
# ------------------------------------------------------------------------------
-#Method void set(int x, int y)
+#Subtopic Set
+#Populate
+#Line # replaces all values ##
+##
+#Method void set(int x, int y)
+#In Set
#Line # sets to integer input ##
Sets fX to x and fY to y.
diff --git a/docs/SkIPoint_Reference.bmh b/docs/SkIPoint_Reference.bmh
index 4c39f82ffa..11a6cdcd1d 100644
--- a/docs/SkIPoint_Reference.bmh
+++ b/docs/SkIPoint_Reference.bmh
@@ -3,7 +3,7 @@
#Alias IPoint_Reference
#Subtopic Overview
- #Subtopic Subtopics
+ #Subtopic Subtopic
#Populate
##
##
@@ -12,19 +12,15 @@
SkIPoint holds two 32 bit integer coordinates.
-#Subtopic Constructors
+#Subtopic Related_Function
#Populate
##
-#Subtopic Operators
+#Subtopic Member_Function
#Populate
##
-#Subtopic Member_Functions
-#Populate
-##
-
-#Subtopic Members
+#Subtopic Member
#Populate
#Member int32_t fX
@@ -37,12 +33,17 @@ x-axis value used by IPoint.
y-axis value used by IPoint.
##
-#Subtopic Members ##
+#Subtopic Member ##
# ------------------------------------------------------------------------------
+#Subtopic Constructor
+#Populate
+##
+
#Method static constexpr SkIPoint Make(int32_t x, int32_t y)
+#In Constructor
#Line # constructs from integer inputs ##
Sets fX to x, fY to y.
@@ -66,8 +67,13 @@ pt1 == pt2
# ------------------------------------------------------------------------------
-#Method int32_t x() const
+#Subtopic Property
+#Line # member values ##
+#Populate
+##
+#Method int32_t x() const
+#In Property
#Line # returns fX ##
Returns x-axis value of IPoint.
@@ -88,7 +94,7 @@ pt1.fX == pt1.x()
# ------------------------------------------------------------------------------
#Method int32_t y() const
-
+#In Property
#Line # returns fY ##
Returns y-axis value of IPoint.
@@ -109,7 +115,7 @@ pt1.fY == pt1.y()
# ------------------------------------------------------------------------------
#Method bool isZero() const
-
+#In Property
#Line # returns true if both members equal zero ##
Returns true if fX and fY are both zero.
@@ -129,8 +135,13 @@ pt.isZero() == true
# ------------------------------------------------------------------------------
-#Method void set(int32_t x, int32_t y)
+#Subtopic Set
+#Populate
+#Line # replaces all values ##
+##
+#Method void set(int32_t x, int32_t y)
+#In Set
#Line # sets to integer input ##
Sets fX to x and fY to y.
@@ -151,6 +162,9 @@ pt1 == pt2
#Method ##
# ------------------------------------------------------------------------------
+#Subtopic Operator
+#Populate
+##
#Method SkIPoint operator-()_const
@@ -260,7 +274,7 @@ Subtracts IVector v from IPoint. Sets IPoint to:
# ------------------------------------------------------------------------------
#Method bool equals(int32_t x, int32_t y) const
-
+#In Operator
#Line # returns true if members are equal ##
Returns true if IPoint is equivalent to IPoint constructed from (x, y).
diff --git a/docs/SkIRect_Reference.bmh b/docs/SkIRect_Reference.bmh
index f534d74972..9106715e96 100644
--- a/docs/SkIRect_Reference.bmh
+++ b/docs/SkIRect_Reference.bmh
@@ -3,7 +3,7 @@
#Alias IRect_Reference
#Subtopic Overview
- #Subtopic Subtopics
+ #Subtopic Subtopic
#Populate
##
##
@@ -16,26 +16,15 @@ from position, width, and height. SkIRect describes an area; if its right
is less than or equal to its left, or if its bottom is less than or equal to
its top, it is considered empty.
-#Subtopic Related_Functions
-#Table
-#Legend
-# name # description ##
-#Legend ##
-# Inset_Outset_Offset # moves sides ##
-# Intersection # set to shared bounds ##
-# Join # set to union of bounds ##
-# Properties # side values, center, validity ##
-# Rounding # adjust to integer bounds ##
-# Set # replaces all values ##
-# Sorting # orders sides ##
-#Table ##
+#Subtopic Related_Function
+#Populate
#Subtopic ##
-#Subtopic Member_Functions
+#Subtopic Member_Function
#Populate
#Subtopic ##
-#Subtopic Members
+#Subtopic Member
#Populate
#Member int32_t fLeft
@@ -62,16 +51,16 @@ May contain any value. The larger of the vertical values when sorted.
When equal to or less than fTop, IRect is empty.
##
-#Subtopic Members ##
+#Subtopic Member ##
-#Subtopic Constructors
+#Subtopic Constructor
#Populate
# ------------------------------------------------------------------------------
#Method static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeEmpty()
-#In Constructors
+#In Constructor
#Line # returns bounds of (0, 0, 0, 0) ##
Returns constructed IRect set to (0, 0, 0, 0).
Many other rectangles are empty; if left is equal to or greater than right,
@@ -105,7 +94,7 @@ outset rect isEmpty: false
#Method static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeWH(int32_t w, int32_t h)
-#In Constructors
+#In Constructor
#Line # constructs from int input returning (0, 0, width, height) ##
Returns constructed IRect set to (0, 0, w, h). Does not validate input; w or h
may be negative.
@@ -135,7 +124,7 @@ all equal
#Method static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeSize(const SkISize& size)
-#In Constructors
+#In Constructor
#Line # constructs from ISize returning (0, 0, width, height) ##
Returns constructed IRect set to (0, 0, size.width(), size.height()).
Does not validate input; size.width() or size.height() may be negative.
@@ -164,7 +153,7 @@ floor width: 25 height: 35
#Method static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b)
-#In Constructors
+#In Constructor
#Line # constructs from int left, top, right, bottom ##
Returns constructed IRect set to (l, t, r, b). Does not sort input; IRect may
result in fLeft greater than fRight, or fTop greater than fBottom.
@@ -197,7 +186,7 @@ rect: 5, 25, 15, 35 isEmpty: false
#Method static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
-#In Constructors
+#In Constructor
#Line # constructs from int input returning (x, y, width, height) ##
Returns constructed IRect set to:
#Formula
@@ -230,13 +219,18 @@ rect: -10, 35, 5, 60 isEmpty: false
##
-#Subtopic Constructors ##
+#Subtopic Constructor ##
+#Subtopic Property
+#Line # member values, center, validity ##
+#Populate
+##
# ------------------------------------------------------------------------------
#Method int32_t left() const
+#In Property
#Line # returns smaller bounds in x, if sorted ##
Returns left edge of IRect, if sorted.
Call sort() to reverse fLeft and fRight if needed.
@@ -262,6 +256,7 @@ sorted.fLeft: 10 sorted.left(): 10
#Method int32_t top() const
+#In Property
#Line # returns smaller bounds in y, if sorted ##
Returns top edge of IRect, if sorted. Call isEmpty to see if IRect may be invalid,
and sort() to reverse fTop and fBottom if needed.
@@ -287,6 +282,7 @@ sorted.fTop: 5 sorted.top(): 5
#Method int32_t right() const
+#In Property
#Line # returns larger bounds in x, if sorted ##
Returns right edge of IRect, if sorted.
Call sort() to reverse fLeft and fRight if needed.
@@ -312,6 +308,7 @@ sorted.fRight: 15 sorted.right(): 15
#Method int32_t bottom() const
+#In Property
#Line # returns larger bounds in y, if sorted ##
Returns bottom edge of IRect, if sorted. Call isEmpty to see if IRect may be invalid,
and sort() to reverse fTop and fBottom if needed.
@@ -337,6 +334,7 @@ sorted.fBottom: 25 sorted.bottom(): 25
#Method int32_t x() const
+#In Property
#Line # returns bounds left ##
Returns left edge of IRect, if sorted. Call isEmpty to see if IRect may be invalid,
and sort() to reverse fLeft and fRight if needed.
@@ -362,6 +360,7 @@ sorted.fLeft: 10 sorted.x(): 10
#Method int32_t y() const
+#In Property
#Line # returns bounds top ##
Returns top edge of IRect, if sorted. Call isEmpty to see if IRect may be invalid,
and sort() to reverse fTop and fBottom if needed.
@@ -387,6 +386,7 @@ sorted.fTop: 5 sorted.y(): 5
#Method int32_t width() const
+#In Property
#Line # returns span in x ##
Returns span on the x-axis. This does not check if IRect is sorted, or if
result fits in 32-bit signed integer; result may be negative.
@@ -412,6 +412,7 @@ large width: -5
#Method int64_t width64() const
+#In Property
#Line # returns span in y as int64_t ##
Returns span on the x-axis. This does not check if IRect is sorted, so the
result may be negative. This is safer than calling width() since width() might
@@ -419,7 +420,7 @@ overflow in its calculation.
#Return fRight minus fLeft cast to int64_t ##
-#Bug 7489 ##
+#Bug 7489
# width64 is not yet visible to fiddle
#NoExample
SkIRect large = { -2147483647, 1, 2147483644, 2 };
@@ -437,6 +438,7 @@ width: -5 width64: 4294967291
#Method int32_t height() const
+#In Property
#Line # returns span in y ##
Returns span on the y-axis. This does not check if IRect is sorted, or if
result fits in 32-bit signed integer; result may be negative.
@@ -462,6 +464,7 @@ large height: -5
#Method int64_t height64() const
+#In Property
#Line # returns span in y as int64_t ##
Returns span on the y-axis. This does not check if IRect is sorted, so the
result may be negative. This is safer than calling height() since height() might
@@ -469,7 +472,7 @@ overflow in its calculation.
#Return fBottom minus fTop cast to int64_t ##
-#Bug 7489 ##
+#Bug 7489
# height64 not yet visible to fiddle
#NoExample
SkIRect large = { 1, -2147483647, 2, 2147483644 };
@@ -487,6 +490,7 @@ height: -5 height64: 4294967291
#Method SkISize size() const
+#In Property
#Line # returns ISize (width, height) ##
Returns spans on the x-axis and y-axis. This does not check if IRect is sorted,
or if result fits in 32-bit signed integer; result may be negative.
@@ -521,6 +525,7 @@ original rect: 20, 30, 40, 50 size: 20, 20
#Method int32_t centerX() const
+#In Property
#Line # returns midpoint in x ##
Returns average of left edge and right edge. Result does not change if IRect
is sorted. Result may be incorrect if IRect is far from the origin.
@@ -553,6 +558,7 @@ left: -10 right: 11 centerX: 0 div2: 0
#Method int32_t centerY() const
+#In Property
#Line # returns midpoint in y ##
Returns average of top edge and bottom edge. Result does not change if IRect
is sorted. Result may be incorrect if IRect is far from the origin.
@@ -579,6 +585,7 @@ left: 1073741824 right: 1073741826 centerX: -1073741823 safe mid x: 1073741825
#Method bool isEmpty() const
+#In Property
#Line # returns true if width or height are zero or negative or they exceed int32_t ##
Returns true if width() or height() .
@@ -609,6 +616,7 @@ sorted: {20, 40, 20, 50} is empty
#Method bool isEmpty64() const
+#In Property
#Line # returns true if width or height are zero or negative ##
Returns true if fLeft is equal to or greater than fRight, or if fTop is equal
to or greater than fBottom. Call sort() to reverse rectangles with negative
@@ -616,7 +624,7 @@ width64() or height64().
#Return true if width64() or height64() are zero or negative ##
-#Bug 7489 ##
+#Bug 7489
# isEmpty64 not yet visible to fiddle
#NoExample
SkIRect tests[] = {{20, 40, 10, 50}, {20, 40, 20, 50}};
@@ -639,14 +647,14 @@ sorted: {20, 40, 20, 50} is empty
##
-#Subtopic Operators
+#Subtopic Operator
#Populate
# ------------------------------------------------------------------------------
#Method bool operator==(const SkIRect& a, const SkIRect& b)
-#In Operators
+#In Operator
#Line # returns true if members are equal ##
Returns true if all members in a: fLeft, fTop, fRight, and fBottom; are
identical to corresponding members in b.
@@ -673,7 +681,7 @@ test == sorted
#Method bool operator!=(const SkIRect& a, const SkIRect& b)
-#In Operators
+#In Operator
#Line # returns true if members are unequal ##
Returns true if any member in a: fLeft, fTop, fRight, and fBottom; is not
identical to the corresponding member in b.
@@ -696,12 +704,13 @@ test != sorted
##
-#Subtopic Operators ##
+#Subtopic Operator ##
# ------------------------------------------------------------------------------
#Method bool is16Bit() const
+#In Property
#Line # returns true if members fit in 16-bit word ##
Returns true if all members: fLeft, fTop, fRight, and fBottom; values are
equal to or larger than -32768 and equal to or smaller than 32767.
@@ -728,6 +737,7 @@ equal to or larger than -32768 and equal to or smaller than 32767.
#Method void setEmpty()
+#In Set
#Line # sets to (0, 0, 0, 0) ##
Sets IRect to (0, 0, 0, 0).
@@ -756,6 +766,7 @@ rect: {0, 0, 0, 0} is empty
#Method void set(int32_t left, int32_t top, int32_t right, int32_t bottom)
+#In Set
#Line # sets to (left, top, right, bottom) ##
Sets IRect to (left, top, right, bottom).
left and right are not sorted; left is not necessarily less than right.
@@ -786,6 +797,7 @@ rect2: {3, 4, 1, 2}
#Method void setLTRB(int32_t left, int32_t top, int32_t right, int32_t bottom)
+#In Set
#Line # sets to SkScalar input (left, top, right, bottom) ##
Sets IRect to (left, top, right, bottom).
left and right are not sorted; left is not necessarily less than right.
@@ -816,6 +828,7 @@ rect2: {3, 4, 1, 2}
#Method void setXYWH(int32_t x, int32_t y, int32_t width, int32_t height)
+#In Set
#Line # sets to (x, y, width, height) ##
Sets IRect to:
#Formula
@@ -849,21 +862,7 @@ rect: -10, 35, 5, 60 isEmpty: false
#Subtopic Inset_Outset_Offset
#Line # moves sides ##
-
-#Table
-#Legend
-# name # description ##
-#Legend ##
-# inset() # moves the sides symmetrically about the center ##
-# makeInset # constructs from sides moved symmetrically about the center ##
-# makeOffset # constructs from translated sides ##
-# makeOutset # constructs from sides moved symmetrically about the center ##
-# offset() # translates sides without changing width and height ##
-# # void offset(int32_t dx, int32_t dy) ##
-# # void offset(const SkIPoint& delta) ##
-# offsetTo # translates to (x, y) without changing width and height ##
-# outset() # moves the sides symmetrically about the center ##
-#Table ##
+#Populate
# ------------------------------------------------------------------------------
@@ -1128,24 +1127,7 @@ empty() returns false. The intersection of IRect pair can be described by:
The intersection is only meaningful if the resulting IRect is not empty and
describes an area: fLeft is less than fRight, and fTop is less than fBottom.
-#Table
-#Legend
-# name # description ##
-#Legend ##
-# Intersects # returns true if areas overlap ##
-# IntersectsNoEmptyCheck # returns true if areas overlap skips empty check ##
-# contains() # returns true if points are equal or inside ##
-# # bool contains(int32_t x, int32_t y) const ##
-# # bool contains(int32_t left, int32_t top, int32_t right, int32_t bottom) const ##
-# # bool contains(const SkIRect& r) const ##
-# intersect() # sets to shared area; returns true if not empty ##
-# # bool intersect(const SkIRect& r) ##
-# # bool intersect(const SkIRect& a, const SkIRect& b) ##
-# # bool intersect(int32_t left, int32_t top, int32_t right, int32_t bottom) ##
-# intersectNoEmptyCheck # sets to shared area; returns true if not empty skips empty check ##
-# quickReject # returns true if rectangles do not intersect ##
-#Table ##
-
+#Populate
# ------------------------------------------------------------------------------
@@ -1609,8 +1591,14 @@ Asserts if either a or b is empty, and if SK_DEBUG is defined.
# ------------------------------------------------------------------------------
+#Subtopic Join
+#Line # set to union of bounds ##
+#Populate
+##
+
#Method void join(int32_t left, int32_t top, int32_t right, int32_t bottom)
+#In Join
#Line # sets to union of bounds ##
Constructs IRect to intersect from (left, top, right, bottom). Does not sort
construction.
@@ -1642,6 +1630,7 @@ IRect to construction.
#Method void join(const SkIRect& r)
+#In Join
Sets IRect to the union of itself and r.
Has no effect if r is empty. Otherwise, if IRect is empty, sets IRect to r.
@@ -1663,8 +1652,14 @@ Has no effect if r is empty. Otherwise, if IRect is empty, sets IRect to r.
# ------------------------------------------------------------------------------
+#Subtopic Sorting
+#Line # orders sides ##
+#Populate
+##
+
#Method void sort()
+#In Sorting
#Line # orders sides from smaller to larger ##
Swaps fLeft and fRight if fLeft is greater than fRight; and swaps
fTop and fBottom if fTop is greater than fBottom. Result may be empty,
@@ -1689,6 +1684,8 @@ sorted: 20, 10, 30, 50
#Method SkIRect makeSorted() const
+#In Sorting
+#In Constructor
#Line # constructs, ordering sides from smaller to larger ##
Returns IRect with fLeft and fRight swapped if fLeft is greater than fRight; and
with fTop and fBottom swapped if fTop is greater than fBottom. Result may be empty;
@@ -1715,6 +1712,7 @@ sorted: 20, 10, 30, 50
#Method static const SkIRect& SK_WARN_UNUSED_RESULT EmptyIRect()
+#In Constructor
#Line # returns immutable bounds of (0, 0, 0, 0) ##
Returns a reference to immutable empty IRect, set to (0, 0, 0, 0).
@@ -1733,18 +1731,9 @@ rect: 0, 0, 0, 0
##
#Method static SkIRect SK_WARN_UNUSED_RESULT MakeLargest()
-
-#Line # deprecated ##
#Deprecated
##
-Returns constructed SkIRect setting left and top to most negative value, and
-setting right and bottom to most positive value.
-
-#Return bounds (SK_MinS32, SK_MinS32, SK_MaxS32, SK_MaxS32) ##
-
-##
-
#Struct SkIRect ##
#Topic IRect ##
diff --git a/docs/SkImageInfo_Reference.bmh b/docs/SkImageInfo_Reference.bmh
index 41f939f466..856725a512 100644
--- a/docs/SkImageInfo_Reference.bmh
+++ b/docs/SkImageInfo_Reference.bmh
@@ -2,12 +2,12 @@
#Alias Image_Info_Reference
#Subtopic Overview
- #Subtopic Subtopics
+ #Subtopic Subtopic
#Populate
##
##
-#Subtopic Constants
+#Subtopic Constant
#Populate
##
@@ -73,7 +73,10 @@ generate this on output.
kRGB_565_SkColorType,
kARGB_4444_SkColorType,
kRGBA_8888_SkColorType,
+ kRGB_888x_SkColorType,
kBGRA_8888_SkColorType,
+ kRGBA_1010102_SkColorType,
+ kRGB_101010x_SkColorType,
kGray_8_SkColorType,
kRGBA_F16_SkColorType,
kLastEnum_SkColorType = kRGBA_F16_SkColorType,
@@ -83,9 +86,11 @@ generate this on output.
##
Describes how to interpret the components of a pixel.
-kN32_SkColorType is an alias for whichever 32 bit Color_ARGB format is the "native"
-form for skia's blitters. Use this if you don't have a swizzle preference
-for 32 bit pixels.
+
+kN32_SkColorType selects the native 32-bit Color_ARGB format. On Little_Endian
+processors, pixels containing 8-bit Color_ARGB components pack into 32-bit
+kBGRA_8888_SkColorType. On Big_Endian processors, pixels pack into 32-bit
+kRGBA_8888_SkColorType.
#Const kUnknown_SkColorType 0
##
@@ -185,18 +190,18 @@ range. See http://en.wikipedia.org/wiki/Rec._709 for details.
#Struct SkImageInfo
-Describe an image's dimensions and pixel type.
-Used for both src images and render-targets (surfaces).
+Describes Image dimensions and pixel type.
+Used for both source images and render-targets (surfaces).
-#Subtopic Operators
+#Subtopic Operator
#Populate
##
-#Subtopic Member_Functions
+#Subtopic Member_Function
#Populate
##
-#Subtopic Constructors
+#Subtopic Constructor
#Populate
##
@@ -204,7 +209,7 @@ Used for both src images and render-targets (surfaces).
#Method SkImageInfo()
-#In Constructors
+#In Constructor
#Line # creates with zero dimensions, kUnknown_SkColorType, kUnknown_SkAlphaType ##
#Return incomplete ##
@@ -220,7 +225,7 @@ Used for both src images and render-targets (surfaces).
#Method static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at,
sk_sp<SkColorSpace> cs = nullptr)
-#In Constructors
+#In Constructor
#Line # creates Image_Info from dimensions, Color_Type, Alpha_Type, Color_Space ##
#Param width incomplete ##
@@ -243,10 +248,10 @@ Used for both src images and render-targets (surfaces).
#Method static SkImageInfo MakeN32(int width, int height, SkAlphaType at,
sk_sp<SkColorSpace> cs = nullptr)
-#In Constructors
+#In Constructor
#Line # creates Image_Info with Native_Color_Type ##
-Sets colortype to kN32_SkColorType.
+Sets Color_Type to kN32_SkColorType.
#Param width incomplete ##
#Param height incomplete ##
@@ -267,7 +272,7 @@ Sets colortype to kN32_SkColorType.
#Method static SkImageInfo MakeS32(int width, int height, SkAlphaType at)
-#In Constructors
+#In Constructor
#Line # creates Image_Info with Native_Color_Type, sRGB Color_Space ##
Creates Image_Info marked as sRGB with kN32_SkColorType swizzle.
@@ -289,9 +294,9 @@ Creates Image_Info marked as sRGB with kN32_SkColorType swizzle.
#Method static SkImageInfo MakeN32Premul(int width, int height, sk_sp<SkColorSpace> cs = nullptr)
-#In Constructors
+#In Constructor
#Line # creates Image_Info with Native_Color_Type, kPremul_SkAlphaType ##
-Sets colortype to kN32_SkColorType, and the alphatype to premul.
+Sets Color_Type to kN32_SkColorType, and the Alpha_Type to kPremul_SkAlphaType.
#Param width incomplete ##
#Param height incomplete ##
@@ -311,7 +316,7 @@ Sets colortype to kN32_SkColorType, and the alphatype to premul.
#Method static SkImageInfo MakeN32Premul(const SkISize& size)
-#In Constructors
+#In Constructor
#Param size incomplete ##
#Return incomplete ##
@@ -328,7 +333,7 @@ Sets colortype to kN32_SkColorType, and the alphatype to premul.
#Method static SkImageInfo MakeA8(int width, int height)
-#In Constructors
+#In Constructor
#Line # creates Image_Info with kAlpha_8_SkColorType, kPremul_SkAlphaType ##
#Param width incomplete ##
#Param height incomplete ##
@@ -347,7 +352,7 @@ Sets colortype to kN32_SkColorType, and the alphatype to premul.
#Method static SkImageInfo MakeUnknown(int width, int height)
-#In Constructors
+#In Constructor
#Line # creates Image_Info with kUnknown_SkColorType, kUnknown_SkAlphaType ##
#Param width incomplete ##
#Param height incomplete ##
@@ -366,7 +371,7 @@ Sets colortype to kN32_SkColorType, and the alphatype to premul.
#Method static SkImageInfo MakeUnknown()
-#In Constructors
+#In Constructor
#Return incomplete ##
#Example
@@ -548,7 +553,7 @@ Sets colortype to kN32_SkColorType, and the alphatype to premul.
#Method SkImageInfo makeWH(int newWidth, int newHeight) const
#Line # creates Image_Info with changed dimensions ##
-Creates Image_Info with the same colortype and alphatype as this info,
+Creates Image_Info with the same Color_Type and Alpha_Type as this info,
but with the specified width and height.
#Param newWidth incomplete ##
diff --git a/docs/SkImage_Reference.bmh b/docs/SkImage_Reference.bmh
index 5c79548ef8..0280b317fb 100644
--- a/docs/SkImage_Reference.bmh
+++ b/docs/SkImage_Reference.bmh
@@ -2,7 +2,7 @@
#Alias Image_Reference
#Subtopic Overview
- #Subtopic Subtopics
+ #Subtopic Subtopic
#Populate
##
##
@@ -10,7 +10,7 @@
#Class SkImage
Image describes a two dimensional array of pixels to draw. The pixels may be
-unencoded in a Raster_Bitmap, encoded in a Picture or compressed data stream,
+decoded in a Raster_Bitmap, encoded in a Picture or compressed data stream,
or located in GPU memory as a GPU_Texture.
Image cannot be modified after it is created. Image may allocate additional
@@ -21,13 +21,13 @@ or height returns Image equal to nullptr.
Image may be created from Bitmap, Pixmap, Surface, Picture, encoded streams,
GPU_Texture, YUV_ColorSpace data, or hardware buffer. Encoded streams supported
-include BMP, GIF, HEIF, ICO, JPEG, PNG, WBMP, WebP. Supported encodings details
+include BMP, GIF, HEIF, ICO, JPEG, PNG, WBMP, WebP. Supported encoding details
vary with platform.
#Subtopic Raster_Image
#Alias Raster_Image
-#Line # pixels unencoded in Raster_Bitmap ##
-Raster_Image pixels are unencoded in a Raster_Bitmap. These pixels may be read
+#Line # pixels decoded in Raster_Bitmap ##
+Raster_Image pixels are decoded in a Raster_Bitmap. These pixels may be read
directly and in most cases written to, although edited pixels may not be drawn
if Image has been copied internally.
##
@@ -47,19 +47,19 @@ Image is drawn. Lazy_Image caches result if possible to speed up repeated
drawing.
##
-#Subtopic Related_Functions
+#Subtopic Related_Function
#Populate
##
-#Subtopic Classes_and_Structs
+#Subtopic Class_or_Struct
#Populate
##
-#Subtopic Constructors
+#Subtopic Constructor
#Populate
##
-#Subtopic Member_Functions
+#Subtopic Member_Function
#Populate
##
@@ -70,8 +70,8 @@ drawing.
# ------------------------------------------------------------------------------
#Method static sk_sp<SkImage> MakeRasterCopy(const SkPixmap& pixmap)
-
-#Line # Creates Image from Pixmap and copied pixels. ##
+#In Constructor
+#Line # creates Image from Pixmap and copied pixels ##
Creates Image from Pixmap and copy of pixels. Since pixels are copied, Pixmap
pixels may be modified or deleted without affecting Image.
@@ -116,8 +116,8 @@ contains a copy of the pixels.
# ------------------------------------------------------------------------------
#Method static sk_sp<SkImage> MakeRasterData(const Info& info, sk_sp<SkData> pixels, size_t rowBytes)
-
-#Line # Creates Image from Image_Info and shared pixels. ##
+#In Constructor
+#Line # creates Image from Image_Info and shared pixels ##
Creates Image from Image_Info, sharing pixels.
Image is returned if Image_Info is valid. Valid Image_Info parameters include:
@@ -172,7 +172,8 @@ provided by caller when Image is created, and may be nullptr.
#Method static sk_sp<SkImage> MakeFromRaster(const SkPixmap& pixmap,
RasterReleaseProc rasterReleaseProc,
ReleaseContext releaseContext)
-#Line # Creates Image from Pixmap, with release. ##
+#In Constructor
+#Line # creates Image from Pixmap, with release ##
Creates Image from pixmap, sharing Pixmap pixels. Pixels must remain valid and
unchanged until rasterReleaseProc is called. rasterReleaseProc is passed
@@ -225,8 +226,8 @@ after reset: 1
# ------------------------------------------------------------------------------
#Method static sk_sp<SkImage> MakeFromBitmap(const SkBitmap& bitmap)
-
-#Line # Creates Image from Bitmap, sharing or copying pixels. ##
+#In Constructor
+#Line # creates Image from Bitmap, sharing or copying pixels ##
Creates Image from bitmap, sharing or copying bitmap pixels. If the bitmap
is marked immutable, and its pixel memory is shareable, it may be shared
instead of copied.
@@ -276,7 +277,8 @@ memory does not alter the second Image.
#Method static sk_sp<SkImage> MakeFromGenerator(std::unique_ptr<SkImageGenerator> imageGenerator,
const SkIRect* subset = nullptr)
-#Line # Creates Image from a stream of data. ##
+#In Constructor
+#Line # creates Image from a stream of data ##
Creates Image from data returned by imageGenerator. Generated data is owned by Image and may not
be shared or accessed.
@@ -315,14 +317,14 @@ The generator returning Picture cannot be shared; std::move transfers ownership
# ------------------------------------------------------------------------------
#Method static sk_sp<SkImage> MakeFromEncoded(sk_sp<SkData> encoded, const SkIRect* subset = nullptr)
-
-#Line # Creates Image from encoded data. ##
+#In Constructor
+#Line # creates Image from encoded data ##
Creates Image from encoded data.
subset allows selecting a portion of the full image. Pass nullptr to select the entire image;
otherwise, subset must be contained by image bounds.
Image is returned if format of the encoded data is recognized and supported.
-Recognized formats vary by platfrom.
+Recognized formats vary by platform.
#Param encoded data of Image to decode ##
#Param subset bounds of returned Image; may be nullptr ##
@@ -355,22 +357,7 @@ for (int quality : { 100, 50, 10, 1} ) {
GrSurfaceOrigin origin,
SkAlphaType alphaType,
sk_sp<SkColorSpace> colorSpace)
-#Line # Creates Image from GPU_Texture, managed externally. ##
-
#Deprecated
-Deprecated.
-##
-
-#Param context GPU_Context ##
-#Param backendTexture texture residing on GPU ##
-#Param origin one of: kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin ##
-#Param alphaType one of: kUnknown_SkAlphaType, kOpaque_SkAlphaType,
- kPremul_SkAlphaType, kUnpremul_SkAlphaType
-##
-#Param colorSpace range of colors; may be nullptr ##
-
-#Return created Image, or nullptr ##
-
#Method ##
# ------------------------------------------------------------------------------
@@ -384,21 +371,6 @@ Deprecated.
ReleaseContext releaseContext)
#Deprecated
-Deprecated.
-##
-
-#Param context GPU_Context ##
-#Param backendTexture texture residing on GPU ##
-#Param origin one of: kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin ##
-#Param alphaType one of: kUnknown_SkAlphaType, kOpaque_SkAlphaType,
- kPremul_SkAlphaType, kUnpremul_SkAlphaType
-##
-#Param colorSpace range of colors; may be nullptr ##
-#Param textureReleaseProc function called when texture can be released ##
-#Param releaseContext state passed to textureReleaseProc ##
-
-#Return created Image, or nullptr ##
-
#Method ##
# ------------------------------------------------------------------------------
@@ -524,7 +496,8 @@ for (auto origin : { kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin } ) {
#Method static sk_sp<SkImage> MakeCrossContextFromEncoded(GrContext* context, sk_sp<SkData> data,
bool buildMips,
SkColorSpace* dstColorSpace)
-#Line # Creates Image from encoded data, and uploads to GPU. ##
+#In Constructor
+#Line # creates Image from encoded data, and uploads to GPU ##
Creates Image from encoded data. Image is uploaded to GPU back-end using context.
@@ -570,7 +543,8 @@ canvas->drawImage(image, 0, 0);
#Method static sk_sp<SkImage> MakeCrossContextFromPixmap(GrContext* context, const SkPixmap& pixmap,
bool buildMips,
SkColorSpace* dstColorSpace)
-#Line # Creates Image from Pixmap, and uploads to GPU. ##
+#In Constructor
+#Line # creates Image from Pixmap, and uploads to GPU ##
Creates Image from pixmap. Image is uploaded to GPU back-end using context.
@@ -620,25 +594,7 @@ if (source.peekPixels(&pixmap)) {
GrSurfaceOrigin surfaceOrigin,
SkAlphaType alphaType = kPremul_SkAlphaType,
sk_sp<SkColorSpace> colorSpace = nullptr)
-#Line # Creates Image from GPU_Texture, managed internally. ##
-
-Deprecated.
-
-#Param context GPU_Context ##
-#Param backendTexture texture residing on GPU ##
-#Param surfaceOrigin one of: kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin ##
-#Param alphaType one of: kUnknown_SkAlphaType, kOpaque_SkAlphaType,
- kPremul_SkAlphaType, kUnpremul_SkAlphaType
-##
-#Param colorSpace range of colors; may be nullptr ##
-
-#Return created Image, or nullptr ##
-
-#NoExample
-##
-
-#SeeAlso MakeFromTexture MakeFromYUVTexturesCopy
-
+#Deprecated
#Method ##
# ------------------------------------------------------------------------------
@@ -649,7 +605,8 @@ Deprecated.
SkColorType colorType,
SkAlphaType alphaType = kPremul_SkAlphaType,
sk_sp<SkColorSpace> colorSpace = nullptr)
-
+#In Constructor
+#Line # creates Image from GPU_Texture, managed internally ##
Creates Image from backendTexture associated with context. backendTexture and
returned Image are managed internally, and are released when no longer needed.
@@ -704,11 +661,12 @@ Recognized formats vary by GPU back-end.
const SkISize yuvSizes[3],
GrSurfaceOrigin surfaceOrigin,
sk_sp<SkColorSpace> colorSpace = nullptr)
-#Line # Creates Image from YUV_ColorSpace data in three planes. ##
+#In Constructor
+#Line # creates Image from YUV_ColorSpace data in three planes ##
Creates Image from copy of yuvTextureHandles, an array of textures on GPU.
yuvTextureHandles contain pixels for YUV planes of Image.
-yuvSizes conain dimensions for each pixel plane. Dimensions must be greater than
+yuvSizes contain dimensions for each pixel plane. Dimensions must be greater than
zero but may differ from plane to plane. Returned Image has the dimensions
yuvSizes[0]. yuvColorSpace describes how YUV colors convert to RGB colors.
@@ -745,7 +703,7 @@ should this be moved to chrome only?
Creates Image from copy of yuvTextureHandles, an array of textures on GPU.
yuvTextureHandles contain pixels for YUV planes of Image.
-yuvSizes conain dimensions for each pixel plane. Dimensions must be greater than
+yuvSizes contain dimensions for each pixel plane. Dimensions must be greater than
zero but may differ from plane to plane. Returned Image has the dimensions
yuvSizes[0]. yuvColorSpace describes how YUV colors convert to RGB colors.
@@ -780,13 +738,14 @@ should this be moved to chrome only?
const SkISize nv12Sizes[2],
GrSurfaceOrigin surfaceOrigin,
sk_sp<SkColorSpace> colorSpace = nullptr)
-#Line # Creates Image from YUV_ColorSpace data in two planes. ##
+#In Constructor
+#Line # creates Image from YUV_ColorSpace data in two planes ##
Creates Image from copy of nv12TextureHandles, an array of textures on GPU.
nv12TextureHandles[0] contains pixels for YUV_Component_Y plane.
nv12TextureHandles[1] contains pixels for YUV_Component_U plane,
followed by pixels for YUV_Component_V plane.
-nv12Sizes conain dimensions for each pixel plane. Dimensions must be greater than
+nv12Sizes contain dimensions for each pixel plane. Dimensions must be greater than
zero but may differ from plane to plane. Returned Image has the dimensions
nv12Sizes[0]. yuvColorSpace describes how YUV colors convert to RGB colors.
@@ -826,7 +785,7 @@ Creates Image from copy of nv12TextureHandles, an array of textures on GPU.
nv12TextureHandles[0] contains pixels for YUV_Component_Y plane.
nv12TextureHandles[1] contains pixels for YUV_Component_U plane,
followed by pixels for YUV_Component_V plane.
-nv12Sizes conain dimensions for each pixel plane. Dimensions must be greater than
+nv12Sizes contain dimensions for each pixel plane. Dimensions must be greater than
zero but may differ from plane to plane. Returned Image has the dimensions
nv12Sizes[0]. yuvColorSpace describes how YUV colors convert to RGB colors.
@@ -855,9 +814,8 @@ should this be moved to chrome only?
# ------------------------------------------------------------------------------
+# currently uncalled by any test or client ##
#Bug 7424
-currently uncalled by any test or client
-##
#Enum BitDepth
@@ -888,7 +846,8 @@ Use 16 bits per Color_ARGB component using half-precision floating point format.
const SkMatrix* matrix, const SkPaint* paint,
BitDepth bitDepth,
sk_sp<SkColorSpace> colorSpace)
-#Line # Creates Image from Picture. ##
+#In Constructor
+#Line # creates Image from Picture ##
Creates Image from picture. Returned Image width and height are set by dimensions.
Image draws picture with matrix and paint, set to bitDepth and colorSpace.
@@ -936,9 +895,10 @@ with default Paint. colorSpace may be nullptr.
#Method static sk_sp<SkImage> MakeFromAHardwareBuffer(AHardwareBuffer* hardwareBuffer,
SkAlphaType alphaType = kPremul_SkAlphaType,
sk_sp<SkColorSpace> colorSpace = nullptr)
-#Line # Creates Image from Android hardware buffer. ##
+#In Constructor
+#Line # creates Image from Android hardware buffer ##
-#Bug 7447 ##
+#Bug 7447
Creates Image from Android hardware buffer.
Returned Image takes a reference on the buffer.
@@ -961,10 +921,14 @@ Only available on Android, when __ANDROID_API__ is defined to be 26 or greater.
#Method ##
# ------------------------------------------------------------------------------
+#Subtopic Property
+#Populate
+#Line # values and attributes ##
+##
#Method int width() const
-
-#Line # Returns pixel column count. ##
+#In Property
+#Line # returns pixel column count ##
Returns pixel count in each row.
#Return pixel width in Image ##
@@ -988,8 +952,8 @@ Returns pixel count in each row.
# ------------------------------------------------------------------------------
#Method int height() const
-
-#Line # Returns pixel row count. ##
+#In Property
+#Line # returns pixel row count ##
Returns pixel row count.
#Return pixel height in Image ##
@@ -1014,8 +978,8 @@ Returns pixel row count.
# ------------------------------------------------------------------------------
#Method SkISize dimensions() const
-
-#Line # Returns width() and height(). ##
+#In Property
+#Line # returns width() and height() ##
Returns ISize { width(), height() }.
#Return integral size of width() and height() ##
@@ -1035,8 +999,8 @@ Returns ISize { width(), height() }.
# ------------------------------------------------------------------------------
#Method SkIRect bounds() const
-
-#Line # Returns width() and height() as Rectangle. ##
+#In Property
+#Line # returns width() and height() as Rectangle ##
Returns IRect { 0, 0, width(), height() }.
#Return integral rectangle from origin to width() and height() ##
@@ -1059,8 +1023,8 @@ Returns IRect { 0, 0, width(), height() }.
# ------------------------------------------------------------------------------
#Method uint32_t uniqueID() const
-
-#Line # Identifier for Image. ##
+#In Property
+#Line # identifier for Image ##
Returns value unique to image. Image contents cannot change after Image is
created. Any operation to create a new Image will receive generate a new
unique number.
@@ -1088,8 +1052,8 @@ unique number.
# ------------------------------------------------------------------------------
#Method SkAlphaType alphaType() const
-
-#Line # Returns Alpha_Type. ##
+#In Property
+#Line # returns Alpha_Type ##
Returns Alpha_Type, one of: kUnknown_SkAlphaType, kOpaque_SkAlphaType,
kPremul_SkAlphaType, kUnpremul_SkAlphaType.
@@ -1115,8 +1079,8 @@ or was parsed from encoded data.
# ------------------------------------------------------------------------------
#Method SkColorSpace* colorSpace() const
-
-#Line # Returns Color_Space. ##
+#In Property
+#Line # returns Color_Space ##
Returns Color_Space, the range of colors, associated with Image. The
reference count of Color_Space is unchanged. The returned Color_Space is
immutable.
@@ -1156,8 +1120,8 @@ is drawn, depending on the capabilities of the Surface receiving the drawing.
# ------------------------------------------------------------------------------
#Method sk_sp<SkColorSpace> refColorSpace() const
-
-#Line # Returns Image_Info Color_Space. ##
+#In Property
+#Line # returns Image_Info Color_Space ##
Returns a smart pointer to Color_Space, the range of colors, associated with
Image. The smart pointer tracks the number of objects sharing this
SkColorSpace reference so the memory is released when the owners destruct.
@@ -1199,8 +1163,8 @@ is drawn, depending on the capabilities of the Surface receiving the drawing.
# ------------------------------------------------------------------------------
#Method bool isAlphaOnly() const
-
-#Line # Returns if pixels represent a transparency mask. ##
+#In Property
+#Line # returns if pixels represent a transparency mask ##
Returns true if Image pixels represent transparency only. If true, each pixel
is packed in 8 bits as defined by kAlpha_8_SkColorType.
@@ -1222,8 +1186,8 @@ alphaOnly = true
# ------------------------------------------------------------------------------
#Method bool isOpaque() const
-
-#Line # Returns if Alpha_Type is kOpaque_SkAlphaType. ##
+#In Property
+#Line # returns if Alpha_Type is kOpaque_SkAlphaType ##
Returns true if pixels ignore their Alpha value and are treated as fully opaque.
#Return true if Alpha_Type is kOpaque_SkAlphaType ##
@@ -1251,7 +1215,8 @@ isOpaque = true
#Method sk_sp<SkShader> makeShader(SkShader::TileMode tileMode1, SkShader::TileMode tileMode2,
const SkMatrix* localMatrix = nullptr) const
-#Line # Creates Shader, Paint element that can tile Image. ##
+#In Constructor
+#Line # creates Shader, Paint element that can tile Image ##
Creates Shader from Image. Shader dimensions are taken from Image. Shader uses
SkShader::TileMode rules to fill drawn area outside Image. localMatrix permits
@@ -1311,7 +1276,7 @@ canvas->drawPaint(paint);
#Method bool peekPixels(SkPixmap* pixmap) const
-#Line # Returns Pixmap if possible. ##
+#Line # returns Pixmap if possible ##
Copies Image pixel address, row bytes, and Image_Info to pixmap, if address
is available, and returns true. If pixel address is not available, return
false and leave pixmap unchanged.
@@ -1361,24 +1326,14 @@ false and leave pixmap unchanged.
# ------------------------------------------------------------------------------
#Method GrTexture* getTexture() const
-
-#Line # Deprecated. ##
-Deprecated.
-
#Deprecated
-##
-
-#Private
-Currently used by Canvas2DLayerBridge in Chromium.
-##
-
#Method ##
# ------------------------------------------------------------------------------
#Method bool isTextureBacked() const
-
-#Line # Returns if Image was created from GPU_Texture. ##
+#In Property
+#Line # returns if Image was created from GPU_Texture ##
Returns true the contents of Image was created on or uploaded to GPU memory,
and is available as a GPU_Texture.
@@ -1416,8 +1371,8 @@ drawImage(textureImage, "backEndTexture");
# ------------------------------------------------------------------------------
#Method bool isValid(GrContext* context) const
-
-#Line # Returns if Image can draw to Raster_Surface or GPU_Context. ##
+#In Property
+#Line # returns if Image can draw to Raster_Surface or GPU_Context ##
Returns true if Image can be drawn on either Raster_Surface or GPU_Surface.
If context is nullptr, tests if Image draws on Raster_Surface;
otherwise, tests if Image draws on GPU_Surface associated with context.
@@ -1467,7 +1422,7 @@ drawImage(textureImage, "backEndTexture");
#Method GrBackendObject getTextureHandle(bool flushPendingGrContextIO,
GrSurfaceOrigin* origin = nullptr) const
-#Line # Returns GPU reference to Image as texture. ##
+#Line # returns GPU reference to Image as texture ##
Retrieves the back-end API handle of texture. If flushPendingGrContextIO is true,
complete deferred I/O operations.
@@ -1573,7 +1528,7 @@ Disallows Skia from internally caching decoded and copied pixels.
#Method bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
int srcX, int srcY, CachingHint cachingHint = kAllow_CachingHint) const
-#Line # Copies and converts pixels. ##
+#Line # copies and converts pixels ##
Copies Rect of pixels from Image to dstPixels. Copy starts at offset (srcX, srcY),
and does not exceed Image (width(), height()).
@@ -1720,7 +1675,7 @@ If cachingHint is kDisallow_CachingHint, pixels are not added to the local cache
#Method bool scalePixels(const SkPixmap& dst, SkFilterQuality filterQuality,
CachingHint cachingHint = kAllow_CachingHint) const
-#Line # Scales and converts one Image to another. ##
+#Line # scales and converts one Image to another ##
Copies Image to dst, scaling pixels to fit dst.width() and dst.height(), and
converting pixels to match dst.colorType and dst.alphaType. Returns true if
@@ -1780,7 +1735,7 @@ If cachingHint is kDisallow_CachingHint, pixels are not added to the local cache
#Method sk_sp<SkData> encodeToData(SkEncodedImageFormat encodedImageFormat, int quality) const
-#Line # Returns encoded Image as SkData. ##
+#Line # returns encoded Image as SkData ##
Encodes Image pixels, returning result as SkData.
Returns nullptr if encoding fails, or if encodedImageFormat is not supported.
@@ -1851,7 +1806,7 @@ encoding fails.
#Method sk_sp<SkData> refEncodedData() const
-#Line # Returns Image encoded in SkData if present. ##
+#Line # returns Image encoded in SkData if present ##
Returns encoded Image pixels as SkData, if Image was created from supported
encoded stream format. Platform support for formats vary and may require building
with one or more of: SK_HAS_JPEG_LIBRARY, SK_HAS_PNG_LIBRARY, SK_HAS_WEBP_LIBRARY.
@@ -1887,10 +1842,14 @@ Returns nullptr if Image contents are not encoded.
#Method ##
# ------------------------------------------------------------------------------
+#Subtopic Utility
+#Populate
+#Line # rarely called management functions ##
+##
#Method const char* toString(SkString* string) const
-
-#Line # Converts Image to machine readable form. ##
+#In Utility
+#Line # converts Image to machine readable form ##
Appends Image description to string, including unique ID, width, height, and
whether the image is opaque.
@@ -1923,8 +1882,8 @@ whether the image is opaque.
# ------------------------------------------------------------------------------
#Method sk_sp<SkImage> makeSubset(const SkIRect& subset) const
-
-#Line # Creates Image containing part of original. ##
+#In Constructor
+#Line # creates Image containing part of original ##
Returns subset of Image. subset must be fully contained by Image dimensions().
The implementation may share pixels, or may copy them.
@@ -1955,8 +1914,8 @@ pixels in Image could not be read or copied.
# ------------------------------------------------------------------------------
#Method sk_sp<SkImage> makeTextureImage(GrContext* context, SkColorSpace* dstColorSpace) const
-
-#Line # Creates Image matching Color_Space if possible. ##
+#In Constructor
+#Line # creates Image matching Color_Space if possible ##
Returns Image backed by GPU_Texture associated with context. Returned Image is
compatible with Surface created with dstColorSpace. Returns original
Image if context and dstColorSpace match.
@@ -2001,10 +1960,10 @@ GrContext.
# ------------------------------------------------------------------------------
#Method sk_sp<SkImage> makeNonTextureImage() const
-
-#Line # Creates Image without dependency on GPU_Texture. ##
+#In Constructor
+#Line # creates Image without dependency on GPU_Texture ##
Returns Raster_Image or Lazy_Image. Copies Image backed by GPU_Texture into
-CPU memory if needed. Returns original Image if unencoded in Raster_Bitmap,
+CPU memory if needed. Returns original Image if decoded in Raster_Bitmap,
or if encoded in a stream.
Returns nullptr if backed by GPU_Texture and copy fails.
@@ -2042,17 +2001,17 @@ Returns nullptr if backed by GPU_Texture and copy fails.
# ------------------------------------------------------------------------------
#Method sk_sp<SkImage> makeRasterImage() const
-
-#Line # Creates Image compatible with Raster_Surface if possible. ##
+#In Constructor
+#Line # creates Image compatible with Raster_Surface if possible ##
Returns Raster_Image. Copies Image backed by GPU_Texture into CPU memory,
-or decodes Image from Lazy_Image. Returns original Image if unencoded in
+or decodes Image from Lazy_Image. Returns original Image if decoded in
Raster_Bitmap.
Returns nullptr if copy, decode, or pixel read fails.
#Return Raster_Image, or nullptr ##
-#Bug 7479 ##
+#Bug 7479
#Example
#Image 5
#Platform gpu
@@ -2086,7 +2045,8 @@ Returns nullptr if copy, decode, or pixel read fails.
#Method sk_sp<SkImage> makeWithFilter(const SkImageFilter* filter, const SkIRect& subset,
const SkIRect& clipBounds, SkIRect* outSubset,
SkIPoint* offset) const
-#Line # Creates filtered, clipped Image. ##
+#In Constructor
+#Line # creates filtered, clipped Image ##
Creates filtered Image. filter processes original Image, potentially changing
color, position, and size. subset is the bounds of original Image processed
@@ -2149,51 +2109,9 @@ By translating canvas by returned offset, Image appears stationary.
# ------------------------------------------------------------------------------
#Struct DeferredTextureImageUsageParams
-#Line # to be deprecated ##
-
-Used only by Chrome; to be deprecated.
-
-#Code
- struct DeferredTextureImageUsageParams {
- DeferredTextureImageUsageParams(const SkMatrix matrix, const SkFilterQuality quality,
- int preScaleMipLevel);
- SkMatrix fMatrix;
- SkFilterQuality fQuality;
- int fPreScaleMipLevel;
- };
-##
-
-#Member SkMatrix fMatrix
-##
-
-#Member SkFilterQuality fQuality
-##
-
-#Member int fPreScaleMipLevel
-##
-
-#Method DeferredTextureImageUsageParams(const SkMatrix matrix, const SkFilterQuality quality,
- int preScaleMipLevel)
-
-#Param matrix incomplete ##
-#Param quality incomplete ##
-#Param preScaleMipLevel incomplete ##
-
-#Return incomplete ##
-
-#Example
-// incomplete
-##
-
-#SeeAlso incomplete
-
-##
-
-#Example
-// incomplete
-##
+#Deprecated soon
-#SeeAlso incomplete
+Used only by Chrome.
##
@@ -2203,95 +2121,16 @@ Used only by Chrome; to be deprecated.
void* buffer,
SkColorSpace* dstColorSpace = nullptr,
SkColorType dstColorType = kN32_SkColorType) const
-#Line # To be deprecated. ##
-
-Used only by Chrome; to be deprecated.
-
-This method allows clients to capture the data necessary to turn a SkImage into a texture-
-backed image. If the original image is codec-backed this will decode into a format optimized
-for the context represented by the proxy. This method is thread safe with respect to the
-GrContext whence the proxy came. Clients allocate and manage the storage of the deferred
-texture data and control its lifetime. No cleanup is required, thus it is safe to simply free
-the memory out from under the data.
-
-The same method is used both for getting the size necessary for pre-uploaded texture data
-and for retrieving the data. The params array represents the set of draws over which to
-optimize the pre-upload data.
-
-When called with a null buffer this returns the size that the client must allocate in order
-to create deferred texture data for this image (or zero if this is an inappropriate
-candidate). The buffer allocated by the client should be 8 byte aligned.
-
-When buffer is not null this fills in the deferred texture data for this image in the
-provided buffer (assuming this is an appropriate candidate image and the buffer is
-appropriately aligned). Upon success the size written is returned, otherwise 0.
-
-dstColorSpace is the Color_Space of the surface where this texture will ultimately be used.
-If the method determines that mip-maps are needed, this helps determine the correct strategy
-for building them (gamma-correct or not).
-
-dstColorType is the color type of the surface where this texture will ultimately be used.
-This determines the format with which the image will be uploaded to the GPU. If dstColorType
-does not support Color_Space (low bit depth types such as kARGB_4444_SkColorType),
-then dstColorSpace must be null.
-
-#Param contextThreadSafeProxy thread safe GPU context ##
-#Param deferredTextureImageUsageParams array of Image transformations ##
-#Param paramCnt entries in deferredTextureImageUsageParams array ##
-#Param buffer storage for GPU_Texture data, or nullptr ##
-#Param dstColorSpace Surface Color_Space, or nullptr ##
-#Param dstColorType Surface Color_Type ##
-
-#Return size of storage for GPU_Texture data ##
-
-#Example
-#Image 5
-#Platform gpu
- GrContext* context = canvas->getGrContext();
- if (!context) {
- return;
- }
- sk_sp<GrContextThreadSafeProxy> proxy(context->threadSafeProxy());
- auto params = SkImage::DeferredTextureImageUsageParams(SkMatrix::MakeScale(2, 2),
- kNone_SkFilterQuality, 0);
- SkColorSpace* colorSpace = canvas->imageInfo().colorSpace();
- size_t requiredMemoryInBytes = image->getDeferredTextureImageData(
- *proxy, &params, 1, nullptr, colorSpace);
- std::vector<uint8_t> memory;
- memory.resize(requiredMemoryInBytes);
- image->getDeferredTextureImageData(*proxy, &params, 1, memory.data(), colorSpace);
- sk_sp<SkImage> uploadedEncodedImage = SkImage::MakeFromDeferredTextureImageData(
- context, memory.data(), SkBudgeted::kNo);
- canvas->scale(2, 2);
- canvas->drawImage(uploadedEncodedImage, 10, 10);
-##
-
-#SeeAlso MakeFromDeferredTextureImageData
+#Deprecated soon
+Used only by Chrome.
##
#Method static sk_sp<SkImage> MakeFromDeferredTextureImageData(GrContext* context, const void* data,
SkBudgeted budgeted)
-#Line # To be deprecated. ##
-
-Used only by Chrome; to be deprecated.
-
-Returns a texture-backed image from data produced in SkImage::getDeferredTextureImageData.
-The context must be the context that provided the proxy passed to
-getDeferredTextureImageData.
-
-#Param context GPU_Context ##
-#Param data incomplete ##
-#Param budgeted incomplete ##
-
-#Return incomplete ##
-
-#Example
-// incomplete
-##
-
-#SeeAlso incomplete
+#Deprecated soon
+Used only by Chrome.
##
# ------------------------------------------------------------------------------
@@ -2306,7 +2145,8 @@ getDeferredTextureImageData.
sk_sp<SkImage> image,
GrBackendTexture* backendTexture,
BackendTextureReleaseProc* backendTextureReleaseProc)
-#Line # Creates GPU_Texture from Image. ##
+#In Constructor
+#Line # creates GPU_Texture from Image ##
Creates a GrBackendTexture from the provided SkImage. Returns true on success. The
GrBackendTexture and BackendTextureReleaseProc are populated on success. It is the callers
@@ -2319,8 +2159,8 @@ If image is both texture backed and singly referenced; that is, its only
reference was transferred using std::move(): image is returned in backendTexture
without conversion or making a copy.
-If the SkImage is not texture backed, this function will generate a texture with the image's
-contents and return that.
+If Image is not texture backed, this function returns texture with Image
+contents.
#Param context GPU_Context ##
#Param image incomplete ##
@@ -2366,8 +2206,8 @@ Helper functions to convert to SkBitmap
# ------------------------------------------------------------------------------
#Method bool asLegacyBitmap(SkBitmap* bitmap, LegacyBitmapMode legacyBitmapMode) const
-
-#Line # Returns as Raster_Bitmap. ##
+#In Constructor
+#Line # returns as Raster_Bitmap ##
Creates raster Bitmap with same pixels as Image. If legacyBitmapMode is
kRO_LegacyBitmapMode, returned bitmap is read-only and immutable.
Returns true if Bitmap is stored in bitmap. Returns false and resets bitmap if
@@ -2389,8 +2229,8 @@ Bitmap write did not succeed.
# ------------------------------------------------------------------------------
#Method bool isLazyGenerated() const
-
-#Line # Returns if Image is created as needed. ##
+#In Property
+#Line # returns if Image is created as needed ##
Returns true if Image is backed by an image-generator or other service that creates
and caches its pixels or texture on-demand.
@@ -2464,7 +2304,8 @@ void draw(SkCanvas* canvas) {
#Method sk_sp<SkImage> makeColorSpace(sk_sp<SkColorSpace> target,
SkTransferFunctionBehavior premulBehavior) const
-#Line # Creates Image matching Color_Space if possible. ##
+#In Constructor
+#Line # creates Image matching Color_Space if possible ##
Creates Image in target Color_Space.
Returns nullptr if Image could not be created.
diff --git a/docs/SkMatrix_Reference.bmh b/docs/SkMatrix_Reference.bmh
index c1567b60f3..433466a90c 100644
--- a/docs/SkMatrix_Reference.bmh
+++ b/docs/SkMatrix_Reference.bmh
@@ -3,7 +3,7 @@
#Alias Matrix_Reference
#Subtopic Overview
- #Subtopic Subtopics
+ #Subtopic Subtopic
#Populate
##
##
@@ -22,22 +22,22 @@ initializes all Matrix elements with the corresponding mapping.
Matrix includes a hidden variable that classifies the type of matrix to
improve performance. Matrix is not thread safe unless getType is called first.
-#Subtopic Constructors
+#Subtopic Constructor
#Populate
##
-#Subtopic Operators
+#Subtopic Operator
#Populate
##
-#Subtopic Member_Functions
+#Subtopic Member_Function
#Populate
##
# ------------------------------------------------------------------------------
#Method static SkMatrix SK_WARN_UNUSED_RESULT MakeScale(SkScalar sx, SkScalar sy)
-
+#In Constructor
#Line # constructs from scale in x and y ##
Sets Matrix to scale by (sx, sy). Returned matrix is:
@@ -93,7 +93,7 @@ canvas->drawBitmap(source, 0, 0);
# ------------------------------------------------------------------------------
#Method static SkMatrix SK_WARN_UNUSED_RESULT MakeTrans(SkScalar dx, SkScalar dy)
-
+#In Constructor
#Line # constructs from translate in x and y ##
Sets Matrix to translate by (dx, dy). Returned matrix is:
@@ -127,6 +127,7 @@ for (int i = 0; i < 4; ++i) {
#Method static SkMatrix SK_WARN_UNUSED_RESULT MakeAll(SkScalar scaleX, SkScalar skewX, SkScalar transX,
SkScalar skewY, SkScalar scaleY, SkScalar transY,
SkScalar pers0, SkScalar pers1, SkScalar pers2)
+#In Constructor
#Line # constructs all nine values ##
@@ -239,9 +240,13 @@ after setPolyToPoly: kTranslate_Mask kScale_Mask kAffine_Mask kPerspective_Mask
##
# ------------------------------------------------------------------------------
+#Subtopic Property
+#Populate
+#Line # values and attributes ##
+##
#Method TypeMask getType() const
-
+#In Property
#Line # returns transform complexity ##
Returns a bit field describing the transformations the matrix may
perform. The bit field is computed conservatively, so it may include
@@ -271,7 +276,7 @@ set all flags hex: f decimal: 15
# ------------------------------------------------------------------------------
#Method bool isIdentity() const
-
+#In Property
#Line # returns if matrix equals the identity Matrix ##
Returns true if Matrix is identity. Identity matrix is:
@@ -303,7 +308,7 @@ is identity: false
# ------------------------------------------------------------------------------
#Method bool isScaleTranslate() const
-
+#In Property
#Line # returns if transform is limited to scale and translate ##
Returns true if Matrix at most scales and translates. Matrix may be identity,
contain only scale elements, only translate elements, or both. Matrix form is:
@@ -340,7 +345,7 @@ is scale-translate: true
# ------------------------------------------------------------------------------
#Method bool isTranslate() const
-
+#In Property
#Line # returns if transform is limited to translate ##
Returns true if Matrix is identity, or translates. Matrix form is:
@@ -376,7 +381,7 @@ is translate: false
# ------------------------------------------------------------------------------
#Method bool rectStaysRect() const
-
+#In Property
#Line # returns if mapped Rect can be represented by another Rect ##
Returns true Matrix maps Rect to another Rect. If true, Matrix is identity,
or scales, or rotates a multiple of 90 degrees, or mirrors in x or y. In all
@@ -426,7 +431,7 @@ rectStaysRect: true
# ------------------------------------------------------------------------------
#Method bool preservesAxisAlignment() const
-
+#In Property
#Line # returns if mapping restricts to 90 degree multiples and mirroring ##
Returns true Matrix maps Rect to another Rect. If true, Matrix is identity,
@@ -477,7 +482,7 @@ preservesAxisAlignment: true
# ------------------------------------------------------------------------------
#Method bool hasPerspective() const
-
+#In Property
#Line # returns if transform includes perspective ##
Returns true if the matrix contains perspective elements. Matrix form is:
@@ -516,7 +521,7 @@ canvas->drawString(string, 0, source.bounds().height() + 48, paint);
# ------------------------------------------------------------------------------
#Method bool isSimilarity(SkScalar tol = SK_ScalarNearlyZero) const
-
+#In Property
#Line # returns if transform is limited to square scale and rotation ##
Returns true if Matrix contains only translation, rotation, reflection, and
uniform scale.
@@ -568,7 +573,7 @@ with isSimilarity false reveals the pair not visible through the matrix.
# ------------------------------------------------------------------------------
#Method bool preservesRightAngles(SkScalar tol = SK_ScalarNearlyZero) const
-
+#In Property
#Line # returns if mapped 90 angle remains 90 degrees ##
Returns true if Matrix contains only translation, rotation, reflection, and
scale. Scale may differ along rotated axes.
@@ -763,7 +768,7 @@ matrix[SkMatrix::kMScaleY] == 24
# ------------------------------------------------------------------------------
#Method SkScalar get(int index) const
-
+#In Property
#Line # returns one of nine Matrix values ##
Returns one matrix value. Asserts if index is out of range and SK_DEBUG is
defined.
@@ -794,7 +799,7 @@ matrix.get(SkMatrix::kMSkewY) == 24
# ------------------------------------------------------------------------------
#Method SkScalar getScaleX() const
-
+#In Property
#Line # returns horizontal scale factor ##
Returns scale factor multiplied by x input, contributing to x output.
With mapPoints, scales Points along the x-axis.
@@ -817,7 +822,7 @@ matrix.getScaleX() == 42
# ------------------------------------------------------------------------------
#Method SkScalar getScaleY() const
-
+#In Property
#Line # returns vertical scale factor ##
Returns scale factor multiplied by y input, contributing to y output.
With mapPoints, scales Points along the y-axis.
@@ -840,7 +845,7 @@ matrix.getScaleY() == 24
# ------------------------------------------------------------------------------
#Method SkScalar getSkewY() const
-
+#In Property
#Line # returns vertical skew factor ##
Returns scale factor multiplied by x input, contributing to y output.
With mapPoints, skews Points along the y-axis.
@@ -864,7 +869,7 @@ matrix.getSkewY() == 24
# ------------------------------------------------------------------------------
#Method SkScalar getSkewX() const
-
+#In Property
#Line # returns horizontal skew factor ##
Returns scale factor multiplied by y input, contributing to x output.
With mapPoints, skews Points along the x-axis.
@@ -888,7 +893,7 @@ matrix.getSkewX() == 42
# ------------------------------------------------------------------------------
#Method SkScalar getTranslateX() const
-
+#In Property
#Line # returns horizontal translation ##
Returns translation contributing to x output.
With mapPoints, moves Points along the x-axis.
@@ -911,7 +916,7 @@ matrix.getTranslateX() == 42
# ------------------------------------------------------------------------------
#Method SkScalar getTranslateY() const
-
+#In Property
#Line # returns vertical translation ##
Returns translation contributing to y output.
With mapPoints, moves Points along the y-axis.
@@ -934,7 +939,7 @@ matrix.getTranslateY() == 24
# ------------------------------------------------------------------------------
#Method SkScalar getPerspX() const
-
+#In Property
#Line # returns input x perspective factor ##
Returns factor scaling input x relative to input y.
@@ -965,7 +970,7 @@ Returns factor scaling input x relative to input y.
# ------------------------------------------------------------------------------
#Method SkScalar getPerspY() const
-
+#In Property
#Line # returns input y perspective factor ##
Returns factor scaling input y relative to input x.
@@ -1035,9 +1040,13 @@ after dirty cache: x = 66
##
# ------------------------------------------------------------------------------
+#Subtopic Set
+#Populate
+#Line # set one or more matrix values ##
+##
#Method void set(int index, SkScalar value)
-
+#In Set
#Line # sets one value ##
Sets Matrix value. Asserts if index is out of range and SK_DEBUG is
defined. Safer than operator[]; internal cache is always maintained.
@@ -1069,7 +1078,7 @@ after 2nd skew x mod: x = 66
# ------------------------------------------------------------------------------
#Method void setScaleX(SkScalar v)
-
+#In Set
#Line # sets horizontal scale factor ##
Sets horizontal scale factor.
@@ -1095,7 +1104,7 @@ canvas->drawString("x scale", 0, 48, paint);
# ------------------------------------------------------------------------------
#Method void setScaleY(SkScalar v)
-
+#In Set
#Line # sets vertical scale factor ##
Sets vertical scale factor.
@@ -1121,7 +1130,7 @@ canvas->drawString("y scale", 12, 48, paint);
# ------------------------------------------------------------------------------
#Method void setSkewY(SkScalar v)
-
+#In Set
#Line # sets vertical skew factor ##
Sets vertical skew factor.
@@ -1147,7 +1156,7 @@ canvas->drawString("y skew", 12, 48, paint);
# ------------------------------------------------------------------------------
#Method void setSkewX(SkScalar v)
-
+#In Set
#Line # sets horizontal skew factor ##
Sets horizontal skew factor.
@@ -1173,7 +1182,7 @@ canvas->drawString("x skew", 36, 48, paint);
# ------------------------------------------------------------------------------
#Method void setTranslateX(SkScalar v)
-
+#In Set
#Line # sets horizontal translation ##
Sets horizontal translation.
@@ -1199,7 +1208,7 @@ canvas->drawString("x translate", 8, 24, paint);
# ------------------------------------------------------------------------------
#Method void setTranslateY(SkScalar v)
-
+#In Set
#Line # sets vertical translation ##
Sets vertical translation.
@@ -1225,7 +1234,7 @@ canvas->drawString("y translate", 8, 24, paint);
# ------------------------------------------------------------------------------
#Method void setPerspX(SkScalar v)
-
+#In Set
#Line # sets input x perspective factor ##
Sets input x perspective factor, which causes mapXY to vary input x inversely
proportional to input y.
@@ -1253,7 +1262,7 @@ for (SkScalar perspX : { -.003f, 0.f, .003f, .012f } ) {
# ------------------------------------------------------------------------------
#Method void setPerspY(SkScalar v)
-
+#In Set
#Line # sets input y perspective factor ##
Sets input y perspective factor, which causes mapXY to vary input y inversely
proportional to input x.
@@ -1283,6 +1292,7 @@ for (SkScalar perspX : { -.003f, 0.f, .003f, .012f } ) {
#Method void setAll(SkScalar scaleX, SkScalar skewX, SkScalar transX,
SkScalar skewY, SkScalar scaleY, SkScalar transY,
SkScalar persp0, SkScalar persp1, SkScalar persp2)
+#In Set
#Line # sets all values from parameters ##
Sets all values from parameters. Sets matrix to:
@@ -1327,7 +1337,7 @@ Sets all values from parameters. Sets matrix to:
# ------------------------------------------------------------------------------
#Method void get9(SkScalar buffer[9]) const
-
+#In Property
#Line # returns all nine Matrix values ##
Copies nine Scalar values contained by Matrix into buffer, in member value
ascending order: kMScaleX, kMSkewX, kMTransX, kMSkewY, kMScaleY, kMTransY,
@@ -1356,7 +1366,8 @@ SkDebugf("{%g, %g, %g},\n{%g, %g, %g},\n{%g, %g, %g}\n", b[0], b[1], b[2],
# ------------------------------------------------------------------------------
#Method void set9(const SkScalar buffer[9])
-
+#In Set
+#In Constructor
#Line # sets all values from Scalar array ##
Sets Matrix to nine Scalar values in buffer, in member value ascending order:
kMScaleX, kMSkewX, kMTransX, kMSkewY, kMScaleY, kMTransY, kMPersp0, kMPersp1,
@@ -1393,7 +1404,8 @@ canvas->drawBitmap(source, 0, 0);
# ------------------------------------------------------------------------------
#Method void reset()
-
+#In Constructor
+#In Set
#Line # sets Matrix to identity ##
Sets Matrix to identity; which has no effect on mapped Points. Sets Matrix to:
@@ -1423,7 +1435,8 @@ m.isIdentity(): true
# ------------------------------------------------------------------------------
#Method void setIdentity()
-
+#In Constructor
+#In Set
#Line # sets Matrix to identity ##
Sets Matrix to identity; which has no effect on mapped Points. Sets Matrix to:
@@ -1453,7 +1466,8 @@ m.isIdentity(): true
# ------------------------------------------------------------------------------
#Method void setTranslate(SkScalar dx, SkScalar dy)
-
+#In Constructor
+#In Set
#Line # sets to translate in x and y ##
Sets Matrix to translate by (dx, dy).
@@ -1503,7 +1517,8 @@ canvas->drawString("translate", 8, 24, paint);
# ------------------------------------------------------------------------------
#Method void setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
-
+#In Constructor
+#In Set
#Line # sets to scale about a point ##
Sets Matrix to scale by sx and sy, about a pivot point at (px, py).
The pivot point is unchanged when mapped with Matrix.
@@ -1566,7 +1581,8 @@ Sets Matrix to scale by sx and sy about at pivot point at (0, 0).
# ------------------------------------------------------------------------------
#Method void setRotate(SkScalar degrees, SkScalar px, SkScalar py)
-
+#In Constructor
+#In Set
#Line # sets to rotate about a point ##
Sets Matrix to rotate by degrees about a pivot point at (px, py).
The pivot point is unchanged when mapped with Matrix.
@@ -1628,6 +1644,8 @@ Positive degrees rotates clockwise.
#Method void setSinCos(SkScalar sinValue, SkScalar cosValue,
SkScalar px, SkScalar py)
+#In Constructor
+#In Set
#Line # sets to rotate and scale about a point ##
Sets Matrix to rotate by sinValue and cosValue, about a pivot point at (px, py).
@@ -1697,7 +1715,8 @@ Canvas needs offset after applying Matrix to pivot about Rect center.
# ------------------------------------------------------------------------------
#Method SkMatrix& setRSXform(const SkRSXform& rsxForm)
-
+#In Constructor
+#In Set
#Line # sets to rotate, scale, and translate ##
Sets Matrix to rotate, scale, and translate using a compressed matrix form.
@@ -1734,7 +1753,8 @@ Canvas needs offset after applying Matrix to pivot about Rect center.
# ------------------------------------------------------------------------------
#Method void setSkew(SkScalar kx, SkScalar ky, SkScalar px, SkScalar py)
-
+#In Constructor
+#In Set
#Line # sets to skew about a point ##
Sets Matrix to skew by kx and ky, about a pivot point at (px, py).
The pivot point is unchanged when mapped with Matrix.
@@ -1795,7 +1815,8 @@ Sets Matrix to skew by kx and ky, about a pivot point at (0, 0).
# ------------------------------------------------------------------------------
#Method void setConcat(const SkMatrix& a, const SkMatrix& b)
-
+#In Constructor
+#In Set
#Line # sets to Matrix parameter multiplied by Matrix parameter ##
Sets Matrix to Matrix a multiplied by Matrix b. Either a or b may be this.
@@ -1843,7 +1864,8 @@ canvas->drawBitmap(source, 0, 0);
# ------------------------------------------------------------------------------
#Method void preTranslate(SkScalar dx, SkScalar dy)
-
+#In Set
+#In Operator
#Line # pre-multiplies Matrix by translation ##
Sets Matrix to Matrix multiplied by Matrix constructed from translation (dx, dy).
This can be thought of as moving the point to be mapped before applying Matrix.
@@ -1900,7 +1922,8 @@ Matrix * T(dx, dy) = | D E F | | 0 1 dy | = | D E D*dx+E*dy+F |
# ------------------------------------------------------------------------------
#Method void preScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
-
+#In Set
+#In Operator
#Line # pre-multiplies Matrix by scale ##
Sets Matrix to Matrix multiplied by Matrix constructed from scaling by (sx, sy)
about pivot point (px, py).
@@ -1955,7 +1978,8 @@ canvas->drawBitmap(source, 0, 0);
# ------------------------------------------------------------------------------
#Method void preScale(SkScalar sx, SkScalar sy)
-
+#In Set
+#In Operator
Sets Matrix to Matrix multiplied by Matrix constructed from scaling by (sx, sy)
about pivot point (0, 0).
This can be thought of as scaling about the origin before applying Matrix.
@@ -1999,7 +2023,8 @@ canvas->drawBitmap(source, 0, 0);
# ------------------------------------------------------------------------------
#Method void preRotate(SkScalar degrees, SkScalar px, SkScalar py)
-
+#In Set
+#In Operator
#Line # pre-multiplies Matrix by rotation ##
Sets Matrix to Matrix multiplied by Matrix constructed from rotating by degrees
about pivot point (px, py).
@@ -2110,7 +2135,8 @@ canvas->drawBitmap(source, 0, 0);
# ------------------------------------------------------------------------------
#Method void preSkew(SkScalar kx, SkScalar ky, SkScalar px, SkScalar py)
-
+#In Set
+#In Operator
#Line # pre-multiplies Matrix by skew ##
Sets Matrix to Matrix multiplied by Matrix constructed from skewing by (kx, ky)
about pivot point (px, py).
@@ -2209,7 +2235,8 @@ canvas->drawBitmap(source, 0, 0);
# ------------------------------------------------------------------------------
#Method void preConcat(const SkMatrix& other)
-
+#In Set
+#In Operator
#Line # pre-multiplies Matrix by Matrix parameter ##
Sets Matrix to Matrix multiplied by Matrix other.
This can be thought of mapping by other before applying Matrix.
@@ -2257,7 +2284,8 @@ canvas->drawBitmap(source, 0, 0);
# ------------------------------------------------------------------------------
#Method void postTranslate(SkScalar dx, SkScalar dy)
-
+#In Set
+#In Operator
#Line # post-multiplies Matrix by translation ##
Sets Matrix to Matrix constructed from translation (dx, dy) multiplied by Matrix.
This can be thought of as moving the point to be mapped after applying Matrix.
@@ -2317,7 +2345,8 @@ Compare with preTranslate example.
# ------------------------------------------------------------------------------
#Method void postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
-
+#In Set
+#In Operator
#Line # post-multiplies Matrix by scale ##
Sets Matrix to Matrix constructed from scaling by (sx, sy) about pivot point
(px, py), multiplied by Matrix.
@@ -2416,7 +2445,8 @@ canvas->drawBitmap(source, 0, 0);
# ------------------------------------------------------------------------------
#Method bool postIDiv(int divx, int divy)
-
+#In Set
+#In Operator
#Line # post-multiplies Matrix by inverse scale ##
Sets Matrix to Matrix constructed from scaling by
#Formula
@@ -2475,7 +2505,8 @@ canvas->drawBitmap(source, 0, 0);
# ------------------------------------------------------------------------------
#Method void postRotate(SkScalar degrees, SkScalar px, SkScalar py)
-
+#In Set
+#In Operator
#Line # post-multiplies Matrix by rotation ##
Sets Matrix to Matrix constructed from rotating by degrees about pivot point
(px, py), multiplied by Matrix.
@@ -2586,7 +2617,8 @@ canvas->drawBitmap(source, 0, 0);
# ------------------------------------------------------------------------------
#Method void postSkew(SkScalar kx, SkScalar ky, SkScalar px, SkScalar py)
-
+#In Set
+#In Operator
#Line # post-multiplies Matrix by skew ##
Sets Matrix to Matrix constructed from skewing by (kx, ky) about pivot point
(px, py), multiplied by Matrix.
@@ -2685,7 +2717,8 @@ canvas->drawBitmap(source, 0, 0);
# ------------------------------------------------------------------------------
#Method void postConcat(const SkMatrix& other)
-
+#In Set
+#In Operator
#Line # post-multiplies Matrix by Matrix parameter ##
Sets Matrix to Matrix other multiplied by Matrix.
This can be thought of mapping by other after applying Matrix.
@@ -2796,7 +2829,7 @@ how Matrix maps to the side or center of the destination Rect.
# ------------------------------------------------------------------------------
#Method bool setRectToRect(const SkRect& src, const SkRect& dst, ScaleToFit stf)
-
+#In Set
#Line # sets to map one Rect to another ##
Sets Matrix to scale and translate src Rect to dst Rect. stf selects whether
mapping completely fills dst or preserves the aspect ratio, and how to align
@@ -2851,7 +2884,7 @@ src: 1, 2, 3, 4 dst: 5, 6, 8, 9 success: true
# ------------------------------------------------------------------------------
#Method static SkMatrix MakeRectToRect(const SkRect& src, const SkRect& dst, ScaleToFit stf)
-
+#In Constructor
#Line # constructs from source Rect to destination Rect ##
Returns Matrix set to scale and translate src Rect to dst Rect. stf selects
whether mapping completely fills dst or preserves the aspect ratio, and how to
@@ -2904,7 +2937,7 @@ src: 1, 2, 3, 4 dst: 5, 6, 8, 9
# ------------------------------------------------------------------------------
#Method bool setPolyToPoly(const SkPoint src[], const SkPoint dst[], int count)
-
+#In Set
#Line # sets to map one to four points to an equal array of points ##
Sets Matrix to map src to dst. count must be zero or greater, and four or less.
@@ -2955,7 +2988,7 @@ perspective.
# ------------------------------------------------------------------------------
#Method bool SK_WARN_UNUSED_RESULT invert(SkMatrix* inverse) const
-
+#In Operator
#Line # returns inverse, if possible ##
Sets inverse to reciprocal matrix, returning true if Matrix can be inverted.
Geometrically, if Matrix maps from source to destination, inverse Matrix
@@ -2992,7 +3025,7 @@ unchanged.
# ------------------------------------------------------------------------------
#Method static void SetAffineIdentity(SkScalar affine[6])
-
+#In Constructor
#Line # sets 3x2 array to identity ##
Fills affine with identity values in column major order.
Sets affine to:
@@ -3027,7 +3060,7 @@ ScaleX: 1 SkewY: 0 SkewX: 0 ScaleY: 1 TransX: 0 TransY: 0
# ------------------------------------------------------------------------------
#Method bool SK_WARN_UNUSED_RESULT asAffine(SkScalar affine[6]) const
-
+#In Constructor
#Line # copies to 3x2 array ##
Fills affine in column major order. Sets affine to:
@@ -3065,7 +3098,8 @@ ScaleX: 2 SkewY: 5 SkewX: 3 ScaleY: 6 TransX: 4 TransY: 7
# ------------------------------------------------------------------------------
#Method void setAffine(const SkScalar affine[6])
-
+#In Constructor
+#In Set
#Line # sets left two columns ##
Sets Matrix to affine values, passed in column major order. Given affine,
column, then row, as:
@@ -3111,9 +3145,13 @@ ScaleX: 2 SkewY: 5 SkewX: 3 ScaleY: 6 TransX: 4 TransY: 7
##
# ------------------------------------------------------------------------------
+#Subtopic Transform
+#Populate
+#Line # map points with Matrix ##
+##
#Method void mapPoints(SkPoint dst[], const SkPoint src[], int count) const
-
+#In Transform
#Line # maps Point array ##
Maps src Point array of length count to dst Point array of equal or greater
length. Points are mapped by multiplying each Point by Matrix. Given:
@@ -3227,7 +3265,7 @@ Matrix * pt = |D E F| |y| = |Ax+By+C Dx+Ey+F Gx+Hy+I| = ------- , -------
# ------------------------------------------------------------------------------
#Method void mapHomogeneousPoints(SkPoint3 dst[], const SkPoint3 src[], int count) const
-
+#In Transform
#Line # maps Point3 array ##
Maps src Point3 array of length count to dst Point3 array, which must of length count or
greater. Point3 array is mapped by multiplying each Point3 by Matrix. Given:
@@ -3285,7 +3323,7 @@ Matrix * src = |D E F| |y| = |Ax+By+Cz Dx+Ey+Fz Gx+Hy+Iz|
# ------------------------------------------------------------------------------
#Method void mapXY(SkScalar x, SkScalar y, SkPoint* result) const
-
+#In Transform
#Line # maps Point ##
Maps Point (x, y) to result. Point is mapped by multiplying by Matrix. Given:
@@ -3380,7 +3418,7 @@ canvas->drawBitmap(source, 0, 0);
# ------------------------------------------------------------------------------
#Method void mapVectors(SkVector dst[], const SkVector src[], int count) const
-
+#In Transform
#Line # maps Vector array ##
Maps src Vector array of length count to Vector Point array of equal or greater
length. Vectors are mapped by multiplying each Vector by Matrix, treating
@@ -3499,7 +3537,7 @@ Matrix * vec = |D E 0| |y| = |Ax+By Dx+Ey Gx+Hy+I| = ------- , -------
# ------------------------------------------------------------------------------
#Method void mapVector(SkScalar dx, SkScalar dy, SkVector* result) const
-
+#In Transform
#Line # maps Vector ##
Maps Vector (x, y) to result. Vector is mapped by multiplying by Matrix,
treating Matrix translation as zero. Given:
@@ -3599,7 +3637,7 @@ Matrix * vec = |D E 0| |dy| = |A*dx+B*dy D*dx+E*dy G*dx+H*dy+I| = ----------- ,
# ------------------------------------------------------------------------------
#Method bool mapRect(SkRect* dst, const SkRect& src) const
-
+#In Transform
#Line # returns bounds of mapped Rect ##
Sets dst to bounds of src corners mapped by Matrix.
Returns true if mapped corners are dst corners.
@@ -3663,7 +3701,7 @@ Returned value is the same as calling rectStaysRect.
# ------------------------------------------------------------------------------
#Method void mapRectToQuad(SkPoint dst[4], const SkRect& rect) const
-
+#In Transform
#Line # maps Rect to Point array ##
Maps four corners of rect to dst. Points are mapped by multiplying each
rect corner by Matrix. rect corner is processed in this order:
@@ -3720,7 +3758,7 @@ Matrix * pt = |D E F| |y| = |Ax+By+C Dx+Ey+F Gx+Hy+I| = ------- , -------
# ------------------------------------------------------------------------------
#Method void mapRectScaleTranslate(SkRect* dst, const SkRect& src) const
-
+#In Transform
#Line # returns bounds of mapped Rect ##
Sets dst to bounds of src corners mapped by Matrix. If matrix contains
elements other than scale or translate: asserts if SK_DEBUG is defined;
@@ -3749,7 +3787,7 @@ otherwise, results are undefined.
# ------------------------------------------------------------------------------
#Method SkScalar mapRadius(SkScalar radius) const
-
+#In Transform
#Line # returns mean radius of mapped Circle ##
Returns geometric mean radius of ellipse formed by constructing Circle of
size radius, and mapping constructed Circle with Matrix. The result squared is
@@ -3803,9 +3841,8 @@ the area enclosed by the ellipse major and minor axes.
##
# ------------------------------------------------------------------------------
-
#Method bool isFixedStepInX() const
-
+#In Property
#Line # returns if transformation supports fixed step in x ##
Returns true if a unit step in x at some y mapped through Matrix can be
represented by a constant Vector. Returns true if getType returns kIdentity_Mask,
@@ -3854,7 +3891,7 @@ isFixedStepInX: false
# ------------------------------------------------------------------------------
#Method SkVector fixedStepInX(SkScalar y) const
-
+#In Property
#Line # returns step in x for a position in y ##
Returns Vector representing a unit step in x at y mapped through Matrix.
If isFixedStepInX is false, returned value is undefined.
@@ -3894,7 +3931,7 @@ If isFixedStepInX is false, returned value is undefined.
# ------------------------------------------------------------------------------
#Method bool cheapEqualTo(const SkMatrix& m) const
-
+#In Operator
#Line # compares Matrix pair using memcmp() ##
Returns true if Matrix equals m, using an efficient comparison.
@@ -3949,7 +3986,7 @@ contains NaN, even if the other Matrix also contains NaN.
#Param a Matrix to compare ##
#Param b Matrix to compare ##
-#Return true if m and Matrix are numerically equal ##
+#Return true if Matrix a and Matrix b are numerically equal ##
#Example
auto debugster = [](const char* prefix, const SkMatrix& a, const SkMatrix& b) -> void {
@@ -3982,7 +4019,7 @@ contains NaN, even if the other Matrix also contains NaN.
#Param a Matrix to compare ##
#Param b Matrix to compare ##
-#Return true if m and Matrix are numerically not equal ##
+#Return true if Matrix a and Matrix b are numerically not equal ##
#Example
auto debugster = [](const char* prefix, const SkMatrix& a, const SkMatrix& b) -> void {
@@ -4000,9 +4037,13 @@ contains NaN, even if the other Matrix also contains NaN.
##
# ------------------------------------------------------------------------------
+#Subtopic Utility
+#Populate
+#Line # rarely called management functions ##
+##
#Method void dump() const
-
+#In Utility
#Line # sends text representation using floats to standard output ##
Writes text representation of Matrix to standard output. Floating point values
are written with limited precision; it may not be possible to reconstruct
@@ -4030,7 +4071,7 @@ matrix != nearlyEqual
# ------------------------------------------------------------------------------
#Method void toString(SkString* str) const
-
+#In Utility
#Line # converts Matrix to machine readable form ##
Creates string representation of Matrix. Floating point values
are written with limited precision; it may not be possible to reconstruct
@@ -4063,7 +4104,7 @@ matrix != nearlyEqual
# ------------------------------------------------------------------------------
#Method SkScalar getMinScale() const
-
+#In Property
#Line # returns minimum scaling, if possible ##
Returns the minimum scaling factor of Matrix by decomposing the scaling and
skewing elements.
@@ -4088,7 +4129,7 @@ matrix.getMinScale() 24
# ------------------------------------------------------------------------------
#Method SkScalar getMaxScale() const
-
+#In Property
#Line # returns maximum scaling, if possible ##
Returns the maximum scaling factor of Matrix by decomposing the scaling and
skewing elements.
@@ -4113,7 +4154,7 @@ matrix.getMaxScale() 42
# ------------------------------------------------------------------------------
#Method bool SK_WARN_UNUSED_RESULT getMinMaxScales(SkScalar scaleFactors[2]) const
-
+#In Property
#Line # returns minimum and maximum scaling, if possible ##
Sets scaleFactors[0] to the minimum scaling factor, and scaleFactors[1] to the
maximum scaling factor. Scaling factors are computed by decomposing
@@ -4145,7 +4186,7 @@ matrix.getMinMaxScales() false 2 2
# ------------------------------------------------------------------------------
#Method bool decomposeScale(SkSize* scale, SkMatrix* remaining = nullptr) const
-
+#In Property
#Line # separates scale if possible ##
Decomposes Matrix into scale components and whatever remains. Returns false if
Matrix could not be decomposed.
@@ -4199,7 +4240,7 @@ success: true scale: 0.5, 0.25
# ------------------------------------------------------------------------------
#Method static const SkMatrix& I()
-
+#In Constructor
#Line # returns a reference to a const identity Matrix ##
Returns reference to const identity Matrix. Returned Matrix is set to:
@@ -4232,7 +4273,7 @@ m2 == m3
# ------------------------------------------------------------------------------
#Method static const SkMatrix& InvalidMatrix()
-
+#In Constructor
#Line # returns a reference to a const invalid Matrix ##
Returns reference to a const Matrix with invalid values. Returned Matrix is set
to:
@@ -4260,7 +4301,7 @@ scaleX 3.40282e+38
# ------------------------------------------------------------------------------
#Method static SkMatrix Concat(const SkMatrix& a, const SkMatrix& b)
-
+#In Operator
#Line # returns the concatenation of Matrix pair ##
Returns Matrix a multiplied by Matrix b.
@@ -4311,7 +4352,7 @@ canvas->drawBitmap(source, 0, 0);
# ------------------------------------------------------------------------------
#Method void dirtyMatrixTypeCache()
-
+#In Utility
#Line # sets internal cache to unknown state ##
Sets internal cache to unknown state. Use to force update after repeated
modifications to Matrix element reference returned by operator[](int index).
@@ -4342,7 +4383,8 @@ after dirty cache: x = 66
# ------------------------------------------------------------------------------
#Method void setScaleTranslate(SkScalar sx, SkScalar sy, SkScalar tx, SkScalar ty)
-
+#In Constructor
+#In Set
#Line # sets to scale and translate ##
Initializes Matrix with scale and translate elements.
@@ -4374,7 +4416,7 @@ matrix.dump();
# ------------------------------------------------------------------------------
#Method bool isFinite() const
-
+#In Property
#Line # returns if all Matrix values are not infinity, NaN ##
Returns true if all elements of the matrix are finite. Returns false if any
element is infinity, or NaN.
@@ -4400,3 +4442,4 @@ matrix != matrix
#Class SkMatrix ##
#Topic Matrix ##
+
diff --git a/docs/SkPaint_Reference.bmh b/docs/SkPaint_Reference.bmh
index 0b4d73f682..60c74d19ab 100644
--- a/docs/SkPaint_Reference.bmh
+++ b/docs/SkPaint_Reference.bmh
@@ -2,7 +2,7 @@
#Alias Paint_Reference
#Subtopic Overview
- #Subtopic Subtopics
+ #Subtopic Subtopic
#Populate
##
##
@@ -35,27 +35,27 @@ Paint describes a single color, a single font, a single image quality, and so on
Multiple colors are drawn either by using multiple paints or with objects like
Shader attached to Paint.
-#Subtopic Related_Functions
+#Subtopic Related_Function
#Populate
##
-#Subtopic Constants
+#Subtopic Constant
#Populate
##
-#Subtopic Classes_and_Structs
+#Subtopic Class_or_Struct
#Populate
##
-#Subtopic Constructors
+#Subtopic Constructor
#Populate
##
-#Subtopic Operators
+#Subtopic Operator
#Populate
##
-#Subtopic Member_Functions
+#Subtopic Member_Function
#Populate
##
@@ -405,7 +405,7 @@ can reconstitute the paint at a later time.
#Param buffer Write_Buffer receiving the flattened Paint data ##
# why is flatten() public?
-#Bug 6172 ##
+#Bug 6172
#NoExample
##
@@ -429,7 +429,7 @@ by the client.
#Return false if the buffer contains invalid data ##
# why is unflatten() public?
-#Bug 6172 ##
+#Bug 6172
#NoExample
##
@@ -494,7 +494,7 @@ as the Font_Engine.
#Track
#File SkFontHost_mac.cpp:1777,1806
#Time 2013-03-03 07:16:29 +0000
-#Bug 915 ##
+#Bug 915
On OS_X and iOS, hinting controls whether Core_Graphics dilates the font outlines
to account for LCD text. No hinting uses Core_Text gray scale output.
Normal hinting uses Core_Text LCD output. If kLCDRenderText_Flag is clear,
@@ -640,11 +640,9 @@ Flags default to all flags clear, disabling the associated feature.
#Enum ##
#Enum ReserveFlags
-#Line # values described by bits and masks ##
+#Deprecated soon
-#Private
-To be deprecated; only valid for Android framework.
-##
+Only valid for Android framework.
#Code
enum ReserveFlags {
@@ -653,16 +651,13 @@ To be deprecated; only valid for Android framework.
};
##
- #Const kUnderlineText_ReserveFlag 0x0008
- mask for underline text
- ##
- #Const kStrikeThruText_ReserveFlag 0x0010
- mask for strike-thru text
- ##
-
-#SeeAlso Flags getFlags
-
-#Enum ##
+#Const kUnderlineText_ReserveFlag 0x0008
+#Deprecated soon
+##
+#Const kStrikeThruText_ReserveFlag 0x0010
+#Deprecated soon
+##
+##
#Method uint32_t getFlags() const
@@ -713,7 +708,7 @@ All Flags members may be cleared, or one or more may be set.
# ------------------------------------------------------------------------------
#Subtopic Anti-alias
#Alias Anti-alias # permit hyphen in topic name, should probably not substitute hyphen with _
-#In Related_Functions
+#In Related_Function
#Line # approximating coverage with transparency ##
Anti-alias drawing approximates partial pixel coverage with transparency.
@@ -3498,20 +3493,11 @@ Set Draw_Looper to nullptr to prevent Draw_Looper from modifying the draw.
##
#Method SkDrawLooper* getLooper() const
-
-#Line # deprecated ##
-#In Draw_Looper_Methods
-Deprecated.
-
+#Bug 6259
#Deprecated
-(see bug.skia.org/6259)
-#Deprecated ##
-
-#Return Draw_Looper if previously set, nullptr otherwise ##
##
#Method void setDrawLooper(sk_sp<SkDrawLooper> drawLooper)
-
#In Draw_Looper_Methods
#Line # sets Draw_Looper, multiple layers ##
Sets Draw_Looper to drawLooper, decreasing Reference_Count of the previous
@@ -3538,20 +3524,12 @@ Increments drawLooper Reference_Count by one.
##
#Method void setLooper(sk_sp<SkDrawLooper> drawLooper)
-
-#Line # deprecated ##
-#In Draw_Looper_Methods
-Deprecated.
-
+#Bug 6259
#Deprecated
-(see bug.skia.org/6259)
-#Deprecated ##
-
-#Param drawLooper sets Draw_Looper to drawLooper ##
-
##
#Subtopic Draw_Looper_Methods ##
+
# ------------------------------------------------------------------------------
#Subtopic Text_Align
#Line # text placement relative to position ##
@@ -5242,3 +5220,4 @@ suppressed by defining SK_IGNORE_TO_STRING.
#Class SkPaint ##
#Topic Paint ##
+
diff --git a/docs/SkPath_Reference.bmh b/docs/SkPath_Reference.bmh
index 24364f2ce8..5091d3af99 100644
--- a/docs/SkPath_Reference.bmh
+++ b/docs/SkPath_Reference.bmh
@@ -3,7 +3,7 @@
#Alias Paths
#Subtopic Overview
- #Subtopic Subtopics
+ #Subtopic Subtopic
#Populate
##
##
@@ -191,27 +191,27 @@ overlapping contours.
Internally, Path lazily computes metrics likes bounds and convexity. Call
SkPath::updateBoundsCache to make Path thread safe.
-#Subtopic Related_Functions
+#Subtopic Related_Function
#Populate
##
-#Subtopic Constants
+#Subtopic Constant
#Populate
##
-#Subtopic Classes_and_Structs
+#Subtopic Class_or_Struct
#Populate
##
-#Subtopic Constructors
+#Subtopic Constructor
#Populate
##
-#Subtopic Operators
+#Subtopic Operator
#Populate
##
-#Subtopic Member_Functions
+#Subtopic Member_Function
#Populate
##
@@ -590,8 +590,14 @@ convexity !=
# ------------------------------------------------------------------------------
-#Method bool isInterpolatable(const SkPath& compare) const
+#Subtopic Property
+#Populate
+#Line # metrics and attributes ##
+##
+#Method bool isInterpolatable(const SkPath& compare) const
+#In Property
+#In Interpolate
#Line # returns if pair contains equal counts of Verb_Array and Weights ##
Return true if Paths contain equal Verbs and equal Weights.
If Paths contain one or more Conics, the Weights must match.
@@ -624,8 +630,13 @@ paths are interpolatable
# ------------------------------------------------------------------------------
-#Method bool interpolate(const SkPath& ending, SkScalar weight, SkPath* out) const
+#Subtopic Interpolate
+#Populate
+#Line # weighted average of Path pair ##
+##
+#Method bool interpolate(const SkPath& ending, SkScalar weight, SkPath* out) const
+#In Interpolate
#Line # interpolates between Path pair ##
Interpolate between Paths with Point_Array of equal size.
Copy Verb_Array and Weights to out, and set out Point_Array to a weighted
@@ -680,14 +691,8 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method bool unique() const
-
-#Line # returns if data has single owner ##
-#Private
-To be deprecated; only valid for Android framework.
-##
-
-#Return true if Path has one owner ##
-
+#Deprecated soon
+Only valid for Android framework.
##
# ------------------------------------------------------------------------------
@@ -1124,19 +1129,8 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void setIsConvex(bool isConvex)
-
-#In Convexity
-#Line # deprecated ##
-Deprecated. Use setConvexity.
-
#Deprecated
-##
-
-#NoExample
-##
-
-#SeeAlso Convexity setConvexity getConvexity
-
+Use setConvexity.
##
#Subtopic Convexity ##
@@ -1145,6 +1139,7 @@ Deprecated. Use setConvexity.
#Method bool isOval(SkRect* rect, Direction* dir = nullptr,
unsigned* start = nullptr) const
+#In Property
#Line # returns if describes Oval ##
Returns true if constructed by addCircle, addOval; and in some cases,
@@ -1201,6 +1196,7 @@ void draw(SkCanvas* canvas) {
#Method bool isRRect(SkRRect* rrect, Direction* dir = nullptr,
unsigned* start = nullptr) const
+#In Property
#Line # returns if describes Round_Rect ##
Returns true if constructed by addRoundRect, addRRect; and if construction
@@ -1261,7 +1257,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void reset()
-
+#In Constructor
#Line # removes Verb_Array, Point_Array, and Weights; frees memory ##
Sets Path to its initial state.
Removes Verb_Array, Point_Array, and Weights, and sets FillType to kWinding_FillType.
@@ -1283,7 +1279,7 @@ Internal storage associated with Path is released.
# ------------------------------------------------------------------------------
#Method void rewind()
-
+#In Constructor
#Line # removes Verb_Array, Point_Array, and Weights, keeping memory ##
Sets Path to its initial state, preserving internal storage.
Removes Verb_Array, Point_Array, and Weights, and sets FillType to kWinding_FillType.
@@ -1312,7 +1308,7 @@ a newly initialized path.
# ------------------------------------------------------------------------------
#Method bool isEmpty() const
-
+#In Property
#Line # returns if verb count is zero ##
Empty Path may have FillType but has no SkPoint, Verb, or Conic_Weight.
SkPath() constructs empty Path; reset() and (rewind) make Path empty.
@@ -1351,7 +1347,7 @@ after reset path is empty
# ------------------------------------------------------------------------------
#Method bool isLastContourClosed() const
-
+#In Property
#Line # returns if final Contour forms a loop ##
Contour is closed if Path Verb array was last modified by close(). When stroked,
closed Contour draws Paint_Stroke_Join instead of Paint_Stroke_Cap at first and last Point.
@@ -1392,7 +1388,7 @@ after close last contour is closed
# ------------------------------------------------------------------------------
#Method bool isFinite() const
-
+#In Property
#Line # returns if all Point values are finite ##
Returns true for finite Point array values between negative SK_ScalarMax and
positive SK_ScalarMax. Returns false for any Point array value of
@@ -1427,7 +1423,8 @@ after scale path is not finite
# ------------------------------------------------------------------------------
#Method bool isVolatile() const
-
+#In Property
+#In Volatile
#Line # returns if Device should not cache ##
Returns true if the path is volatile; it will not be altered or discarded
by the caller after it is drawn. Paths by default have volatile set false, allowing
@@ -1449,9 +1446,13 @@ volatile by default is false
##
# ------------------------------------------------------------------------------
+#Subtopic Volatile
+#Populate
+#Line # caching attribute ##
+##
#Method void setIsVolatile(bool isVolatile)
-
+#In Volatile
#Line # sets if Device should not cache ##
Specify whether Path is volatile; whether it will be altered or discarded
by the caller after it is drawn. Paths by default have volatile set false, allowing
@@ -1492,7 +1493,7 @@ GPU_Surface Path draws are affected by volatile for some shadows and concave geo
# ------------------------------------------------------------------------------
#Method static bool IsLineDegenerate(const SkPoint& p1, const SkPoint& p2, bool exact)
-
+#In Property
#Line # returns if Line is very small ##
Test if Line between Point pair is degenerate.
Line with no length or that moves a very short distance is degenerate; it is
@@ -1539,6 +1540,7 @@ line from (100,100) to (100.0001,100.0001) is not degenerate, exactly
#Method static bool IsQuadDegenerate(const SkPoint& p1, const SkPoint& p2,
const SkPoint& p3, bool exact)
+#In Property
#Line # returns if Quad is very small ##
Test if Quad is degenerate.
@@ -1592,6 +1594,7 @@ quad (1100,1100), (1100,1100), (1100,1100) is degenerate, exactly
#Method static bool IsCubicDegenerate(const SkPoint& p1, const SkPoint& p2,
const SkPoint& p3, const SkPoint& p4, bool exact)
+#In Property
#Line # returns if Cubic is very small ##
Test if Cubic is degenerate.
@@ -1638,7 +1641,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method bool isLine(SkPoint line[2]) const
-
+#In Property
#Line # returns if describes Line ##
Returns true if Path contains only one Line;
Path_Verb array has two entries: kMove_Verb, kLine_Verb.
@@ -1896,7 +1899,7 @@ just right verb count: 3 move line line
# ------------------------------------------------------------------------------
#Method void swap(SkPath& other)
-
+#In Operator
#Line # exchanges Path pair ##
Exchanges the Verb_Array, Point_Array, Weights, and Fill_Type with other.
Cached state is also exchanged. swap() internally exchanges pointers, so
@@ -1929,7 +1932,7 @@ path2 bounds = 10, 20, 30, 40
# ------------------------------------------------------------------------------
#Method const SkRect& getBounds() const
-
+#In Property
#Line # returns maximum and minimum of Point_Array ##
Returns minimum and maximum x and y values of Point_Array.
Returns (0, 0, 0, 0) if Path contains no points. Returned bounds width and height may
@@ -1970,9 +1973,13 @@ rotated circle bounds = 14.6447, 9.64466, 85.3553, 80.3553
##
# ------------------------------------------------------------------------------
+#Subtopic Utility
+#Populate
+#Line # rarely called management functions ##
+##
#Method void updateBoundsCache() const
-
+#In Utility
#Line # refreshes result of getBounds ##
Update internal bounds so that subsequent calls to getBounds are instantaneous.
Unaltered copies of Path may also access cached bounds through getBounds.
@@ -2013,7 +2020,7 @@ cached avg: 0.182784 ms
# ------------------------------------------------------------------------------
#Method SkRect computeTightBounds() const
-
+#In Property
#Line # returns extent of geometry ##
Returns minimum and maximum x and y values of the lines and curves in Path.
Returns (0, 0, 0, 0) if Path contains no points.
@@ -2058,7 +2065,7 @@ rotated circle bounds = 25, 20, 75, 70
# ------------------------------------------------------------------------------
#Method bool conservativelyContainsRect(const SkRect& rect) const
-
+#In Property
#Line # returns true if Rect may be inside ##
Returns true if rect is contained by Path.
May return false when rect is contained by Path.
@@ -2105,7 +2112,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void incReserve(unsigned extraPtCount)
-
+#In Utility
#Line # reserves space for additional data ##
grows Path Verb_Array and Point_Array to contain extraPtCount additional Points.
May improve performance and use less memory by
@@ -2143,9 +2150,13 @@ void draw(SkCanvas* canvas) {
##
# ------------------------------------------------------------------------------
+#Subtopic Build
+#Populate
+#Line # adds points and verbs to path ##
+##
#Method void moveTo(SkScalar x, SkScalar y)
-
+#In Build
#Line # starts Contour ##
Adds beginning of Contour at Point (x, y).
@@ -2202,7 +2213,7 @@ void draw(SkCanvas* canvas) {
##
#Method void rMoveTo(SkScalar dx, SkScalar dy)
-
+#In Build
#Line # starts Contour relative to Last_Point ##
Adds beginning of Contour relative to Last_Point.
If Path is empty, starts Contour at (dx, dy).
@@ -2235,7 +2246,7 @@ Function name stands for "relative move to".
# ------------------------------------------------------------------------------
#Method void lineTo(SkScalar x, SkScalar y)
-
+#In Build
#Line # appends Line ##
Adds Line from Last_Point to (x, y). If Path is empty, or last Verb is
kClose_Verb, Last_Point is set to (0, 0) before adding Line.
@@ -2309,7 +2320,7 @@ lineTo then appends kLine_Verb to Verb_Array and Point p to Point_Array.
# ------------------------------------------------------------------------------
#Method void rLineTo(SkScalar dx, SkScalar dy)
-
+#In Build
#Line # appends Line relative to Last_Point ##
Adds Line from Last_Point to Vector (dx, dy). If Path is empty, or last Verb is
kClose_Verb, Last_Point is set to (0, 0) before adding Line.
@@ -2444,7 +2455,7 @@ void draw(SkCanvas* canvas) {
##
#Method void quadTo(const SkPoint& p1, const SkPoint& p2)
-
+#In Build
#In Quad
Adds Quad from Last_Point towards Point p1, to Point p2.
If Path is empty, or last Verb is kClose_Verb, Last_Point is set to (0, 0)
@@ -2477,7 +2488,7 @@ void draw(SkCanvas* canvas) {
##
#Method void rQuadTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2)
-
+#In Build
#In Quad
#Line # appends Quad relative to Last_Point ##
Adds Quad from Last_Point towards Vector (dx1, dy1), to Vector (dx2, dy2).
@@ -2649,6 +2660,7 @@ done
#Method void conicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
SkScalar w)
#In Conic
+#In Build
#Line # appends Conic ##
Adds Conic from Last_Point towards (x1, y1), to (x2, y2), weighted by w.
@@ -2705,7 +2717,7 @@ void draw(SkCanvas* canvas) {
##
#Method void conicTo(const SkPoint& p1, const SkPoint& p2, SkScalar w)
-
+#In Build
#In Conic
Adds Conic from Last_Point towards Point p1, to Point p2, weighted by w.
If Path is empty, or last Verb is kClose_Verb, Last_Point is set to (0, 0)
@@ -2763,6 +2775,7 @@ void draw(SkCanvas* canvas) {
#Method void rConicTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2,
SkScalar w)
+#In Build
#In Conic
#Line # appends Conic relative to Last_Point ##
@@ -2852,6 +2865,7 @@ void draw(SkCanvas* canvas) {
#Method void cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
SkScalar x3, SkScalar y3)
+#In Build
#In Cubic
#Line # appends Cubic ##
@@ -2897,6 +2911,7 @@ void draw(SkCanvas* canvas) {
#Method void cubicTo(const SkPoint& p1, const SkPoint& p2, const SkPoint& p3)
+#In Build
#In Cubic
Adds Cubic from Last_Point towards Point p1, then towards Point p2, ending at
Point p3. If Path is empty, or last Verb is kClose_Verb, Last_Point is set to
@@ -2930,6 +2945,7 @@ to Point_Array.
#Method void rCubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
SkScalar x3, SkScalar y3)
+#In Build
#In Cubic
#Line # appends Cubic relative to Last_Point ##
@@ -3164,7 +3180,7 @@ void draw(SkCanvas* canvas) {
#Method void arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, bool forceMoveTo)
-
+#In Build
#In Arc
#Line # appends Arc ##
Append Arc to Path. Arc added is part of ellipse
@@ -3212,7 +3228,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar radius)
-
+#In Build
#In Arc
Append Arc to Path, after appending Line if needed. Arc is implemented by Conic
weighted to describe part of Circle. Arc is contained by tangent from
@@ -3361,7 +3377,7 @@ conic (79.2893,20),(200,20),(114.645,105.355) weight 0.382683
# ------------------------------------------------------------------------------
#Method void arcTo(const SkPoint p1, const SkPoint p2, SkScalar radius)
-
+#In Build
#In Arc
Append Arc to Path, after appending Line if needed. Arc is implemented by Conic
weighted to describe part of Circle. Arc is contained by tangent from
@@ -3476,6 +3492,7 @@ void draw(SkCanvas* canvas) {
#Method void arcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc,
Direction sweep, SkScalar x, SkScalar y)
+#In Build
#In Arc
Append Arc to Path. Arc is implemented by one or more Conics weighted to
@@ -3530,6 +3547,7 @@ void draw(SkCanvas* canvas) {
#Method void arcTo(const SkPoint r, SkScalar xAxisRotate, ArcSize largeArc, Direction sweep,
const SkPoint xy)
+#In Build
#In Arc
Append Arc to Path. Arc is implemented by one or more Conic weighted to describe part of Oval
@@ -3574,6 +3592,7 @@ void draw(SkCanvas* canvas) {
#Method void rArcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc,
Direction sweep, SkScalar dx, SkScalar dy)
+#In Build
#In Arc
#Line # appends Arc relative to Last_Point ##
@@ -3629,7 +3648,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void close()
-
+#In Build
#Line # makes last Contour a loop ##
Append kClose_Verb to Path. A closed Contour connects the first and last Point
with Line, forming a continuous loop. Open and closed Contour draw the same
@@ -3667,7 +3686,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method static bool IsInverseFillType(FillType fill)
-
+#In Property
#Line # returns if Fill_Type represents outside geometry ##
Returns true if fill is inverted and Path with fill represents area outside
of its geometric bounds.
@@ -3723,7 +3742,7 @@ IsInverseFillType(kInverseEvenOdd_FillType) == true
# ------------------------------------------------------------------------------
#Method static FillType ConvertToNonInverseFillType(FillType fill)
-
+#In Utility
#Line # returns Fill_Type representing inside geometry ##
Returns equivalent Fill_Type representing Path fill inside its bounds.
.
@@ -3784,6 +3803,7 @@ ConvertToNonInverseFillType(kInverseEvenOdd_FillType) == kEvenOdd_FillType
#Method static int ConvertConicToQuads(const SkPoint& p0, const SkPoint& p1, const SkPoint& p2,
SkScalar w, SkPoint pts[], int pow2)
+#In Utility
#Line # approximates Conic with Quad array ##
Approximates Conic with Quad array. Conic is constructed from start Point p0,
@@ -3853,7 +3873,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method bool isRect(SkRect* rect, bool* isClosed = nullptr, Direction* direction = nullptr) const
-
+#In Property
#Line # returns if describes Rect ##
Returns true if Path is equivalent to Rect when filled.
If false: rect, isClosed, and direction are unchanged.
@@ -3914,7 +3934,7 @@ addPoly is rect (0, 0, 80, 80); is not closed; direction CCW
# ------------------------------------------------------------------------------
#Method bool isNestedFillRects(SkRect rect[2], Direction dirs[2] = nullptr) const
-
+#In Property
#Line # returns if describes Rect pair, one inside the other ##
Returns true if Path is equivalent to nested Rect pair when filled.
If false, rect and dirs are unchanged.
@@ -3961,7 +3981,7 @@ inner (12.5, 22.5, 27.5, 37.5); direction CCW
# ------------------------------------------------------------------------------
#Method void addRect(const SkRect& rect, Direction dir = kCW_Direction)
-
+#In Build
#Line # adds one Contour containing Rect ##
Add Rect to Path, appending kMove_Verb, three kLine_Verb, and kClose_Verb,
starting with top-left corner of Rect; followed by top-right, bottom-right,
@@ -4100,7 +4120,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void addOval(const SkRect& oval, Direction dir = kCW_Direction)
-
+#In Build
#Line # adds one Contour containing Oval ##
Add Oval to path, appending kMove_Verb, four kConic_Verb, and kClose_Verb.
Oval is upright ellipse bounded by Rect oval with radii equal to half oval width
@@ -4186,6 +4206,7 @@ void draw(SkCanvas* canvas) {
#Method void addCircle(SkScalar x, SkScalar y, SkScalar radius,
Direction dir = kCW_Direction)
+#In Build
#Line # adds one Contour containing Circle ##
Add Circle centered at (x, y) of size radius to Path, appending kMove_Verb,
@@ -4224,7 +4245,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void addArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle)
-
+#In Build
#Line # adds one Contour containing Arc ##
Append Arc to Path, as the start of new Contour. Arc added is part of ellipse
bounded by oval, from startAngle through sweepAngle. Both startAngle and
@@ -4267,6 +4288,7 @@ void draw(SkCanvas* canvas) {
#Method void addRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry,
Direction dir = kCW_Direction)
+#In Build
#Line # adds one Contour containing Round_Rect with common corner radii ##
Append Round_Rect to Path, creating a new closed Contour. Round_Rect has bounds
@@ -4375,7 +4397,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void addRRect(const SkRRect& rrect, Direction dir = kCW_Direction)
-
+#In Build
#Line # adds one Contour containing Round_Rect ##
Add rrect to Path, creating a new closed Contour. If
dir is kCW_Direction, rrect starts at top-left of the lower-left corner and
@@ -4461,7 +4483,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Method void addPoly(const SkPoint pts[], int count, bool close)
-
+#In Build
#Line # adds one Contour containing connected lines ##
Add Contour created from Line array, adding (count - 1) Line segments.
Contour added starts at pts[0], then adds a line for every additional Point
@@ -4561,6 +4583,7 @@ The top right composition is made up of one contour; the other three have two.
#Method void addPath(const SkPath& src, SkScalar dx, SkScalar dy,
AddPathMode mode = kAppend_AddPathMode)
+#In Build
#Line # adds contents of Path ##
Append src to Path, offset by (dx, dy).
@@ -4590,7 +4613,7 @@ Verbs, Points, and Conic_Weights.
canvas->drawPath(dest, paint);
##
-#SeeAlso AddPathMode offset() reverseAddPath
+#SeeAlso AddPathMode offset reverseAddPath
##
@@ -4654,14 +4677,14 @@ Verbs, Points, and Conic_Weights.
canvas->drawPath(dest, paint);
##
-#SeeAlso AddPathMode transform() offset() reverseAddPath
+#SeeAlso AddPathMode transform offset reverseAddPath
##
# ------------------------------------------------------------------------------
#Method void reverseAddPath(const SkPath& src)
-
+#In Build
#Line # adds contents of Path back to front ##
Append src to Path, from back to front.
Reversed src always appends a new Contour to Path.
@@ -4693,14 +4716,14 @@ Reversed src always appends a new Contour to Path.
}
##
-#SeeAlso AddPathMode transform() offset() addPath
+#SeeAlso AddPathMode transform offset addPath
##
# ------------------------------------------------------------------------------
#Method void offset(SkScalar dx, SkScalar dy, SkPath* dst) const
-
+#In Transform
#Line # translates Point_Array ##
Offset Point_Array by (dx, dy). Offset Path replaces dst.
If dst is nullptr, Path is replaced by offset data.
@@ -4729,9 +4752,13 @@ If dst is nullptr, Path is replaced by offset data.
##
# ------------------------------------------------------------------------------
+#Subtopic Transform
+#Populate
+#Line # modify all points ##
+##
#Method void offset(SkScalar dx, SkScalar dy)
-
+#In Transform
Offset Point_Array by (dx, dy). Path is replaced by offset data.
#Param dx offset added to Point_Array x coordinates ##
@@ -4758,7 +4785,7 @@ Offset Point_Array by (dx, dy). Path is replaced by offset data.
# ------------------------------------------------------------------------------
#Method void transform(const SkMatrix& matrix, SkPath* dst) const
-
+#In Transform
#Line # applies Matrix to Point_Array and Weights ##
Transform Verb_Array, Point_Array, and weight by matrix.
transform may change Verbs and increase their number.
@@ -4828,7 +4855,7 @@ Contour. Last_Point of Contour is shared as first Point of added Line or Curve.
Last_Point can be read and written directly with getLastPt and setLastPt.
#Method bool getLastPt(SkPoint* lastPt) const
-
+#In Property
#In Last_Point
#Line # returns Last_Point ##
Returns Last_Point on Path in lastPt. Returns false if Point_Array is empty,
@@ -4858,7 +4885,7 @@ Last_Point can be read and written directly with getLastPt and setLastPt.
##
#Method void setLastPt(SkScalar x, SkScalar y)
-
+#In Utility
#In Last_Point
#Line # replaces Last_Point ##
Set Last_Point to (x, y). If Point_Array is empty, append kMove_Verb to
@@ -4883,7 +4910,6 @@ Last_Point can be read and written directly with getLastPt and setLastPt.
#Method void setLastPt(const SkPoint& p)
-#In Last_Point
Set the last point on the path. If no points have been added, moveTo(p)
is automatically called.
@@ -4928,7 +4954,7 @@ Last_Point can be read and written directly with getLastPt and setLastPt.
SegmentMask constants correspond to each drawing Verb type in Path; for
instance, if Path only contains Lines, only the kLine_SegmentMask bit is set.
-#Bug 6785 ##
+#Bug 6785
#Const kLine_SegmentMask 1
Set if Verb_Array contains kLine_Verb.
##
@@ -4965,7 +4991,8 @@ Path kQuad_SegmentMask is set
# ------------------------------------------------------------------------------
#Method uint32_t getSegmentMasks() const
-
+#In Utility
+#In Property
#Line # returns types in Verb_Array ##
Returns a mask, where each set bit corresponds to a SegmentMask constant
if Path contains one or more Verbs of that type.
@@ -5000,7 +5027,7 @@ mask quad set
# ------------------------------------------------------------------------------
#Method bool contains(SkScalar x, SkScalar y) const
-
+#In Property
#Line # returns if Point is in fill area ##
Returns true if the point (x, y) is contained by Path, taking into
account FillType.
@@ -5046,7 +5073,7 @@ for (int y = 2; y < 256; y += 9) {
# ------------------------------------------------------------------------------
#Method void dump(SkWStream* stream, bool forceClose, bool dumpAsHex) const
-
+#In Utility
#Line # sends text representation using floats to standard output ##
Writes text representation of Path to stream. If stream is nullptr, writes to
standard output. Set forceClose to true to get edges used to fill Path.
@@ -5125,7 +5152,7 @@ path is not equal to copy
# ------------------------------------------------------------------------------
#Method void dumpHex() const
-
+#In Utility
#Line # sends text representation using hexadecimal to standard output ##
Writes text representation of Path to standard output. The representation may be
directly compiled as C++ code. Floating point values are written
@@ -5159,7 +5186,7 @@ path is equal to copy
# ------------------------------------------------------------------------------
#Method size_t writeToMemory(void* buffer) const
-
+#In Utility
#Line # copies data to buffer ##
Writes Path to buffer, returning the number of bytes written.
Pass nullptr to obtain the storage size.
@@ -5195,7 +5222,7 @@ path is equal to copy
##
#Method sk_sp<SkData> serialize() const
-
+#In Utility
#Line # copies data to buffer ##
Write Path to buffer, returning the buffer written to, wrapped in Data.
@@ -5226,7 +5253,7 @@ path is equal to copy
# ------------------------------------------------------------------------------
#Method size_t readFromMemory(const void* buffer, size_t length)
-
+#In Utility
#Line # Initializes from buffer ##
Initializes Path from buffer of size length. Returns zero if the buffer is
data is inconsistent, or the length is too small.
@@ -5290,7 +5317,6 @@ Each time the path is modified, a different Generation_ID will be returned.
#Bug 1762
Fill_Type does affect Generation_ID on Android framework.
-##
#Return non-zero, globally unique value ##
@@ -5320,7 +5346,8 @@ empty genID = 1
# ------------------------------------------------------------------------------
#Method bool isValid() const
-
+#In Property
+#In Utility
#Line # returns if data is internally consistent ##
Returns if Path data is consistent. Corrupt Path data is detected if
internal values are out of range or internal storage does not match
@@ -5334,18 +5361,7 @@ empty genID = 1
##
#Method bool pathRefIsValid() const
-
-#Line # to be deprecated ##
- Returns if Path data is consistent.
-
- #Deprecated
- To be deprecated soon.
- ##
-
- #Return true if Path data is consistent ##
-
- #NoExample
- ##
+#Deprecated soon
##
# ------------------------------------------------------------------------------
@@ -5885,7 +5901,6 @@ Verb_Array, Point_Array, and Conic_Weight are returned unaltered.
A simple fix changes the output of hairlines and needs to be
investigated to see if the change is correct or not.
https://skia-review.googlesource.com/c/21340/
- ##
#SeeAlso next()
@@ -5929,3 +5944,4 @@ Verb_Array, Point_Array, and Conic_Weight are returned unaltered.
#Class SkPath ##
#Topic Path ##
+
diff --git a/docs/SkPixmap_Reference.bmh b/docs/SkPixmap_Reference.bmh
index 0c4fcda0df..fc4d8dc51d 100644
--- a/docs/SkPixmap_Reference.bmh
+++ b/docs/SkPixmap_Reference.bmh
@@ -2,7 +2,7 @@
#Alias Pixmap_Reference
#Subtopic Overview
- #Subtopic Subtopics
+ #Subtopic Subtopic
#Populate
##
##
@@ -20,15 +20,15 @@ pixels referenced by Pixmap.
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.
-#Subtopic Related_Functions
+#Subtopic Related_Function
#Populate
##
-#Subtopic Constructors
+#Subtopic Constructor
#Populate
##
-#Subtopic Member_Functions
+#Subtopic Member_Function
#Populate
##
@@ -235,44 +235,7 @@ is not unique
# ------------------------------------------------------------------------------
#Method bool SK_WARN_UNUSED_RESULT reset(const SkMask& mask)
-
-#In Initialization
-Sets width, height, pixel address, and row bytes to Mask properties, if Mask
-format is SkMask::kA8_Format; and returns true. Otherwise sets width, height,
-row bytes to zero; pixel address to nullptr; SkColorType to kUnknown_SkColorType;
-and SkAlphaType to kUnknown_SkAlphaType; and returns false.
-
-Failing to read the return value generates a compile time warning.
-
-#Param mask Mask containing pixels and dimensions ##
-
-#Return true if set to Mask properties ##
-
-#Example
- const int width = 2;
- const int height = 2;
- uint8_t bytes[] = { 0, 1, 2, 3, 4, 5, 6, 7 };
- SkMask mask;
- mask.fFormat = SkMask::kA8_Format;
- mask.fBounds = {0, 0, width, height};
- mask.fImage = bytes;
- mask.fRowBytes = (width + 7) >> 3;
- SkPixmap pixmap;
- bool success = pixmap.reset(mask);
- SkDebugf("success: %s width: %d height: %d\n", success ? "true " : "false",
- pixmap.width(), pixmap.height());
- mask.fFormat = SkMask::kBW_Format;
- success = pixmap.reset(mask);
- SkDebugf("success: %s width: %d height: %d\n", success ? "true " : "false",
- pixmap.width(), pixmap.height());
-#StdOut
-success: true width: 2 height: 2
-success: false width: 0 height: 0
-##
-##
-
-#SeeAlso Mask reset()
-
+#Deprecated soon
##
# ------------------------------------------------------------------------------
diff --git a/docs/SkPoint_Reference.bmh b/docs/SkPoint_Reference.bmh
index 116be80486..ff7710e781 100644
--- a/docs/SkPoint_Reference.bmh
+++ b/docs/SkPoint_Reference.bmh
@@ -3,26 +3,24 @@
#Alias Point_Reference
#Subtopic Overview
- #Subtopic Subtopics
+ #Subtopic Subtopic
#Populate
##
##
#Struct SkPoint
-#Subtopic Constructors
-#Populate
-##
+SkPoint holds two 32 bit floating point coordinates.
-#Subtopic Operators
+#Subtopic Related_Function
#Populate
##
-#Subtopic Member_Functions
+#Subtopic Member_Function
#Populate
##
-#Subtopic Members
+#Subtopic Member
#Populate
#Member SkScalar fX
@@ -37,12 +35,16 @@ y-axis value used by both Point and Vector. May contain any value, including
infinities and NaN.
##
-#Subtopic Members ##
+#Subtopic Member ##
# ------------------------------------------------------------------------------
-#Method static constexpr SkPoint Make(SkScalar x, SkScalar y)
+#Subtopic Constructor
+#Populate
+##
+#Method static constexpr SkPoint Make(SkScalar x, SkScalar y)
+#In Constructor
#Line # constructs from SkScalar inputs ##
Sets fX to x, fY to y. Used both to set Point and Vector.
@@ -68,8 +70,13 @@ all equal
# ------------------------------------------------------------------------------
-#Method SkScalar x() const
+#Subtopic Property
+#Line # member values ##
+#Populate
+##
+#Method SkScalar x() const
+#In Property
#Line # returns fX ##
Returns x-axis value of Point or Vector.
@@ -90,7 +97,7 @@ pt1.fX == pt1.x()
# ------------------------------------------------------------------------------
#Method SkScalar y() const
-
+#In Property
#Line # returns fY ##
Returns y-axis value of Point or Vector.
@@ -111,7 +118,7 @@ pt1.fY == pt1.y()
# ------------------------------------------------------------------------------
#Method bool isZero() const
-
+#In Property
#Line # returns true if both members equal zero ##
Returns true if fX and fY are both zero.
@@ -134,8 +141,13 @@ pt.isZero() == true
# ------------------------------------------------------------------------------
-#Method void set(SkScalar x, SkScalar y)
+#Subtopic Set
+#Populate
+#Line # replaces all values ##
+##
+#Method void set(SkScalar x, SkScalar y)
+#In Set
#Line # sets to SkScalar input ##
Sets fX to x and fY to y.
@@ -158,7 +170,7 @@ pt1 == pt2
# ------------------------------------------------------------------------------
#Method void iset(int32_t x, int32_t y)
-
+#In Set
#Line # sets to integer input ##
Sets fX to x and fY to y, promoting integers to SkScalar values.
@@ -210,7 +222,7 @@ fPt: -2.14748e+09, 2.14748e+09
# ------------------------------------------------------------------------------
#Method void setAbs(const SkPoint& pt)
-
+#In Set
#Line # sets sign of both members to positive ##
Sets fX to absolute value of pt.fX; and fY to absolute value of pt.fY.
@@ -239,8 +251,13 @@ pt: nan, -nan abs: nan, nan
# ------------------------------------------------------------------------------
-#Method static void Offset(SkPoint points[], int count, const SkVector& offset)
+#Subtopic Offset
+#Line # moves sides ##
+#Populate
+##
+#Method static void Offset(SkPoint points[], int count, const SkVector& offset)
+#In Offset
#Line # translates Point array ##
Adds offset to each Point in points array with count entries.
@@ -298,7 +315,7 @@ Adds offset (dx, dy) to each Point in points array of length count.
# ------------------------------------------------------------------------------
#Method void offset(SkScalar dx, SkScalar dy)
-
+#In Offset
#Line # translates Point ##
Adds offset (dx, dy) to Point.
@@ -328,7 +345,7 @@ Adds offset (dx, dy) to Point.
# ------------------------------------------------------------------------------
#Method SkScalar length() const
-
+#In Property
#Line # returns straight-line distance to origin ##
Returns the Euclidean_Distance from origin, computed as:
#Code
@@ -363,7 +380,7 @@ sqrt(fX * fX + fY * fY)
# ------------------------------------------------------------------------------
#Method SkScalar distanceToOrigin() const
-
+#In Property
#Line # returns straight-line distance to origin ##
Returns the Euclidean_Distance from origin, computed as:
#Code
@@ -399,7 +416,7 @@ sqrt(fX * fX + fY * fY)
# ------------------------------------------------------------------------------
#Method bool normalize()
-
+#In Set
#Line # sets length to one, preserving direction ##
Scales (fX, fY) so that length() returns one, while preserving ratio of fX to fY,
if possible. If prior length is nearly zero, sets Vector to (0, 0) and returns
@@ -431,7 +448,7 @@ false; otherwise returns true.
# ------------------------------------------------------------------------------
#Method bool setNormalize(SkScalar x, SkScalar y)
-
+#In Set
#Line # sets length to one, in direction of (x, y) ##
Sets Vector to (x, y) scaled so length() returns one, and so that
(fX, fY) is proportional to (x, y). If (x, y) length is nearly zero,
@@ -468,7 +485,7 @@ sets Vector to (0, 0) and returns false; otherwise returns true.
# ------------------------------------------------------------------------------
#Method bool setLength(SkScalar length)
-
+#In Set
#Line # sets straight-line distance to origin ##
Scales Vector so that distanceToOrigin returns length, if possible. If former
length is nearly zero, sets Vector to (0, 0) and return false; otherwise returns
@@ -540,8 +557,13 @@ true.
# ------------------------------------------------------------------------------
-#Method void scale(SkScalar scale, SkPoint* dst) const
+#Subtopic Operator
+#Populate
+##
+#Method void scale(SkScalar scale, SkPoint* dst) const
+#In Offset
+#In Operator
#Line # multiplies Point by scale factor ##
Sets dst to Point times scale. dst may be Point to modify Point in place.
@@ -593,7 +615,7 @@ Scales Point in place by scale.
# ------------------------------------------------------------------------------
#Method void negate()
-
+#In Operator
#Line # reverses the sign of both members ##
Changes the sign of fX and fY.
@@ -787,7 +809,7 @@ Multiplies Point by scale. Sets Point to:
# ------------------------------------------------------------------------------
#Method bool isFinite() const
-
+#In Property
#Line # returns true if no member is infinite or NaN ##
Returns true if both fX and fY are measurable values.
@@ -813,7 +835,7 @@ pt: nan, -1 finite: false
# ------------------------------------------------------------------------------
#Method bool equals(SkScalar x, SkScalar y) const
-
+#In Operator
#Line # returns true if Points are equal ##
Returns true if Point is equivalent to Point constructed from (x, y).
@@ -982,7 +1004,7 @@ Can also be used to add Vector to Vector, returning Vector.
# ------------------------------------------------------------------------------
#Method static SkScalar Length(SkScalar x, SkScalar y)
-
+#In Property
#Line # returns straight-line distance to origin ##
Returns the Euclidean_Distance from origin, computed as:
#Code
@@ -1020,7 +1042,7 @@ sqrt(x * x + y * y)
# ------------------------------------------------------------------------------
#Method static SkScalar Normalize(SkVector* vec)
-
+#In Offset
#Line # sets length to one, and returns prior length ##
Scales (vec->fX, vec->fY) so that length() returns one, while preserving ratio of vec->fX to vec->fY,
if possible. If original length is nearly zero, sets vec to (0, 0) and returns zero;
@@ -1060,7 +1082,7 @@ Note that normalize() is faster if prior length is not required.
# ------------------------------------------------------------------------------
#Method static SkScalar Distance(const SkPoint& a, const SkPoint& b)
-
+#In Property
#Line # returns straight-line distance between points ##
Returns the Euclidean_Distance between a and b.
@@ -1095,7 +1117,7 @@ Returns the Euclidean_Distance between a and b.
# ------------------------------------------------------------------------------
#Method static SkScalar DotProduct(const SkVector& a, const SkVector& b)
-
+#In Operator
#Line # returns dot product ##
Returns the dot product of Vector a and Vector b.
@@ -1127,13 +1149,13 @@ Returns the dot product of Vector a and Vector b.
# ------------------------------------------------------------------------------
#Method static SkScalar CrossProduct(const SkVector& a, const SkVector& b)
-
+#In Operator
#Line # returns cross product ##
Returns the cross product of Vector a and Vector b.
-a and b form three-dimensional vectors with z equal to zero. The cross product
-is a three-dimensional vector with x and y equal to zero. The cross product z
-term equals the returned value.
+a and b form three-dimensional vectors with z-axis value equal to zero. The
+cross product is a three-dimensional vector with x-axis and y-axis values equal
+to zero. The cross product z-axis component is returned.
#Param a left side of cross product ##
#Param b right side of cross product ##
@@ -1167,13 +1189,13 @@ term equals the returned value.
# ------------------------------------------------------------------------------
#Method SkScalar cross(const SkVector& vec) const
-
+#In Operator
#Line # returns cross product ##
Returns the cross product of Vector and vec.
-Vector and vec form three-dimensional vectors with z equal to zero. The
-cross product is a three-dimensional vector with x and y equal to zero.
-The cross product z term equals the returned value.
+Vector and vec form three-dimensional vectors with z-axis value equal to zero.
+The cross product is a three-dimensional vector with x-axis and y-axis values
+equal to zero. The cross product z-axis component is returned.
#Param vec right side of cross product ##
@@ -1206,7 +1228,7 @@ The cross product z term equals the returned value.
# ------------------------------------------------------------------------------
#Method SkScalar dot(const SkVector& vec) const
-
+#In Operator
#Line # returns dot product ##
Returns the dot product of Vector and Vector vec.
diff --git a/docs/SkRect_Reference.bmh b/docs/SkRect_Reference.bmh
index 7f1bdd8b19..5807f0a281 100644
--- a/docs/SkRect_Reference.bmh
+++ b/docs/SkRect_Reference.bmh
@@ -3,7 +3,7 @@
#Alias Rect_Reference
#Subtopic Overview
- #Subtopic Subtopics
+ #Subtopic Subtopic
#Populate
##
##
@@ -20,15 +20,15 @@ its top, it is considered empty.
SkRect can be constructed from int values to avoid compiler warnings that
integer input cannot convert to SkScalar without loss of precision.
-#Subtopic Related_Functions
+#Subtopic Related_Function
#Populate
#Subtopic ##
-#Subtopic Member_Functions
+#Subtopic Member_Function
#Populate
##
-#Subtopic Members
+#Subtopic Member
#Populate
#Member SkScalar fLeft
@@ -55,33 +55,16 @@ May contain any value, including infinities and NaN. The larger of the
vertical values when sorted. When equal to or less than fTop, Rect is empty.
##
-#Subtopic Members ##
+#Subtopic Member ##
-#Subtopic Constructors
-#Table
-#Legend
-# name # description ##
-#Legend ##
-# Make # constructs from ISize returning (0, 0, width, height) ##
-# MakeEmpty # constructs from bounds of (0, 0, 0, 0) ##
-# MakeFromIRect # deprecated ##
-# MakeIWH # constructs from int input returning (0, 0, width, height) ##
-# MakeLTRB # constructs from SkScalar left, top, right, bottom ##
-# MakeLargest # deprecated ##
-# MakeSize # constructs from Size returning (0, 0, width, height) ##
-# MakeWH # constructs from SkScalar input returning (0, 0, width, height) ##
-# MakeXYWH # constructs from SkScalar input returning (x, y, width, height) ##
-# makeInset # constructs from sides moved symmetrically about the center ##
-# makeOffset # constructs from translated sides ##
-# makeOutset # constructs from sides moved symmetrically about the center ##
-# makeSorted # constructs, ordering sides from smaller to larger ##
-#Table ##
+#Subtopic Constructor
+#Populate
# ------------------------------------------------------------------------------
#Method static constexpr SkRect SK_WARN_UNUSED_RESULT MakeEmpty()
-#In Constructors
+#In Constructor
#Line # constructs from bounds of (0, 0, 0, 0) ##
Returns constructed Rect set to (0, 0, 0, 0).
Many other rectangles are empty; if left is equal to or greater than right,
@@ -115,7 +98,7 @@ outset rect isEmpty: false
#Method static constexpr SkRect SK_WARN_UNUSED_RESULT MakeWH(SkScalar w, SkScalar h)
-#In Constructors
+#In Constructor
#Line # constructs from SkScalar input returning (0, 0, width, height) ##
Returns constructed Rect set to SkScalar values (0, 0, w, h). Does not
validate input; w or h may be negative.
@@ -148,7 +131,7 @@ all equal
#Method static SkRect SK_WARN_UNUSED_RESULT MakeIWH(int w, int h)
-#In Constructors
+#In Constructor
#Line # constructs from int input returning (0, 0, width, height) ##
Returns constructed Rect set to integer values (0, 0, w, h). Does not validate
input; w or h may be negative.
@@ -182,7 +165,7 @@ i_rect width: 125000111 f_rect width:125000112
#Method static constexpr SkRect SK_WARN_UNUSED_RESULT MakeSize(const SkSize& size)
-#In Constructors
+#In Constructor
#Line # constructs from Size returning (0, 0, width, height) ##
Returns constructed Rect set to (0, 0, size.width(), size.height()). Does not
validate input; size.width() or size.height() may be negative.
@@ -212,7 +195,7 @@ floor width: 25 height: 35
#Method static constexpr SkRect SK_WARN_UNUSED_RESULT MakeLTRB(SkScalar l, SkScalar t, SkScalar r,
SkScalar b)
-#In Constructors
+#In Constructor
#Line # constructs from SkScalar left, top, right, bottom ##
Returns constructed Rect set to (l, t, r, b). Does not sort input; Rect may
@@ -246,7 +229,7 @@ rect: 5, 25, 15, 35 isEmpty: false
#Method static constexpr SkRect SK_WARN_UNUSED_RESULT MakeXYWH(SkScalar x, SkScalar y, SkScalar w, SkScalar h)
-#In Constructors
+#In Constructor
#Line # constructs from SkScalar input returning (x, y, width, height) ##
Returns constructed Rect set to
#Formula
@@ -282,30 +265,14 @@ rect: -10, 35, 5, 60 isEmpty: false
# ------------------------------------------------------------------------------
#Method static SkRect SK_WARN_UNUSED_RESULT MakeFromIRect(const SkIRect& irect)
-
-#In Constructors
-#Line # deprecated ##
-Deprecated.
-
#Deprecated
##
-#Param irect integer rect ##
-
-#Return irect as SkRect ##
-
-#NoExample
-##
-
-#SeeAlso Make
-
-##
-
# ------------------------------------------------------------------------------
#Method static SkRect Make(const SkISize& size)
-#In Constructors
+#In Constructor
#Line # constructs from ISize returning (0, 0, width, height) ##
Returns constructed IRect set to (0, 0, size.width(), size.height()).
Does not validate input; size.width() or size.height() may be negative.
@@ -331,7 +298,7 @@ rect1 == rect2
#Method static SkRect SK_WARN_UNUSED_RESULT Make(const SkIRect& irect)
-#In Constructors
+#In Constructor
Returns constructed IRect set to irect, promoting integers to Scalar.
Does not validate input; fLeft may be greater than fRight, fTop may be greater
than fBottom.
@@ -353,35 +320,17 @@ than fBottom.
##
-#Subtopic Constructors ##
+#Subtopic Constructor ##
-#Subtopic Properties
-#Line # side values, center, validity ##
-
-#Table
-#Legend
-# name # description ##
-#Legend ##
-# bottom() # returns larger bounds in y, if sorted ##
-# centerX # returns midpoint in x ##
-# centerY # returns midpoint in y ##
-# height() # returns span in y ##
-# isEmpty # returns true if width or height are zero or negative ##
-# isFinite # returns true if no member is infinite or NaN ##
-# isSorted # returns true if width or height are zero or positive ##
-# left() # returns smaller bounds in x, if sorted ##
-# right() # returns larger bounds in x, if sorted ##
-# top() # returns smaller bounds in y, if sorted ##
-# width() # returns span in x ##
-# x() # returns bounds left ##
-# y() # returns bounds top ##
-#Table ##
+#Subtopic Property
+#Line # member values, center, validity ##
+#Populate
# ------------------------------------------------------------------------------
#Method bool isEmpty() const
-#In Properties
+#In Property
#Line # returns true if width or height are zero or negative ##
Returns true if fLeft is equal to or greater than fRight, or if fTop is equal
to or greater than fBottom. Call sort() to reverse rectangles with negative
@@ -414,7 +363,7 @@ sorted: {20, 40, 20, 50} is empty
#Method bool isSorted() const
-#In Properties
+#In Property
#Line # returns true if width or height are zero or positive ##
Returns true if fLeft is equal to or less than fRight, or if fTop is equal
to or less than fBottom. Call sort() to reverse rectangles with negative
@@ -447,7 +396,7 @@ sorted: {20, 40, 20, 50} is sorted
#Method bool isFinite() const
-#In Properties
+#In Property
#Line # returns true if no member is infinite or NaN ##
Returns true if all values in the rectangle are finite: SK_ScalarMin or larger,
and SK_ScalarMax or smaller.
@@ -475,7 +424,7 @@ widest is finite: false
#Method SkScalar x() const
-#In Properties
+#In Property
#Line # returns bounds left ##
Returns left edge of Rect, if sorted. Call isSorted to see if Rect is valid.
Call sort() to reverse fLeft and fRight if needed.
@@ -501,7 +450,7 @@ sorted.fLeft: 10 sorted.x(): 10
#Method SkScalar y() const
-#In Properties
+#In Property
#Line # returns bounds top ##
Returns top edge of Rect, if sorted. Call isEmpty to see if Rect may be invalid,
and sort() to reverse fTop and fBottom if needed.
@@ -527,7 +476,7 @@ sorted.fTop: 5 sorted.y(): 5
#Method SkScalar left() const
-#In Properties
+#In Property
#Line # returns smaller bounds in x, if sorted ##
Returns left edge of Rect, if sorted. Call isSorted to see if Rect is valid.
Call sort() to reverse fLeft and fRight if needed.
@@ -553,7 +502,7 @@ sorted.fLeft: 10 sorted.left(): 10
#Method SkScalar top() const
-#In Properties
+#In Property
#Line # returns smaller bounds in y, if sorted ##
Returns top edge of Rect, if sorted. Call isEmpty to see if Rect may be invalid,
and sort() to reverse fTop and fBottom if needed.
@@ -579,7 +528,7 @@ sorted.fTop: 5 sorted.top(): 5
#Method SkScalar right() const
-#In Properties
+#In Property
#Line # returns larger bounds in x, if sorted ##
Returns right edge of Rect, if sorted. Call isSorted to see if Rect is valid.
Call sort() to reverse fLeft and fRight if needed.
@@ -605,7 +554,7 @@ sorted.fRight: 15 sorted.right(): 15
#Method SkScalar bottom() const
-#In Properties
+#In Property
#Line # returns larger bounds in y, if sorted ##
Returns bottom edge of Rect, if sorted. Call isEmpty to see if Rect may be invalid,
and sort() to reverse fTop and fBottom if needed.
@@ -631,7 +580,7 @@ sorted.fBottom: 25 sorted.bottom(): 25
#Method SkScalar width() const
-#In Properties
+#In Property
#Line # returns span in x ##
Returns span on the x-axis. This does not check if Rect is sorted, or if
result fits in 32-bit float; result may be negative or infinity.
@@ -660,7 +609,7 @@ large width: 4294967296
#Method SkScalar height() const
-#In Properties
+#In Property
#Line # returns span in y ##
Returns span on the y-axis. This does not check if IRect is sorted, or if
result fits in 32-bit float; result may be negative or infinity.
@@ -689,7 +638,7 @@ large height: 4294967296
#Method SkScalar centerX() const
-#In Properties
+#In Property
#Line # returns midpoint in x ##
Returns average of left edge and right edge. Result does not change if Rect
is sorted. Result may overflow to infinity if Rect is far from the origin.
@@ -719,7 +668,7 @@ left: -41 right: -20 centerX: -30.5
#Method SkScalar centerY() const
-#In Properties
+#In Property
#Line # returns midpoint in y ##
Returns average of top edge and bottom edge. Result does not change if Rect
is sorted. Result may overflow to infinity if Rect is far from the origin.
@@ -739,23 +688,17 @@ left: 2e+38 right: 3e+38 centerX: inf safe mid x: 2.5e+38
##
-#Subtopic Properties ##
+#Subtopic Property ##
-#Subtopic Operators
+#Subtopic Operator
-#Table
-#Legend
-# name # description ##
-#Legend ##
-# operator!=(const SkRect& a, const SkRect& b) # returns true if members are unequal ##
-# operator==(const SkRect& a, const SkRect& b) # returns true if members are equal ##
-#Table ##
+#Populate
# ------------------------------------------------------------------------------
#Method bool operator==(const SkRect& a, const SkRect& b)
-#In Operators
+#In Operator
#Line # returns true if members are equal ##
Returns true if all members in a: fLeft, fTop, fRight, and fBottom; are
equal to the corresponding members in b.
@@ -800,7 +743,7 @@ tests are equal
#Method bool operator!=(const SkRect& a, const SkRect& b)
-#In Operators
+#In Operator
#Line # returns true if members are unequal ##
Returns true if any in a: fLeft, fTop, fRight, and fBottom; does not
equal the corresponding members in b.
@@ -825,19 +768,12 @@ test with NaN is not equal to itself
##
-#Subtopic Operators ##
+#Subtopic Operator ##
#Subtopic As_Points
#Line # conversion to and from Points ##
-#Table
-#Legend
-# name # description ##
-#Legend ##
-# setBounds # sets to upper and lower limits of Point array ##
-# setBoundsCheck # sets to upper and lower limits of Point array ##
-# toQuad # returns four corners as Point ##
-#Table ##
+#Populate
# ------------------------------------------------------------------------------
@@ -964,22 +900,7 @@ added: nan, 8 count: 4 rect: 0, 0, 0, 0 success: false
#Subtopic Set
#Line # replaces all values ##
-#Table
-#Legend
-# name # description ##
-#Legend ##
-# iset() # sets to int input (left, top, right, bottom) ##
-# isetWH # sets to int input (0, 0, width, height) ##
-# set() # sets to SkScalar input (left, top, right, bottom) and others ##
-# # void set(const SkIRect& src) ##
-# # void set(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) ##
-# # void set(const SkPoint pts[], int count) ##
-# # void set(const SkPoint& p0, const SkPoint& p1) ##
-# setEmpty # sets to (0, 0, 0, 0) ##
-# setLTRB # sets to SkScalar input (left, top, right, bottom) ##
-# setWH # sets to SkScalar input (0, 0, width, height) ##
-# setXYWH # sets to SkScalar input (x, y, width, height) ##
-#Table ##
+#Populate
# ------------------------------------------------------------------------------
@@ -1237,13 +1158,7 @@ rect: -15, 0, 0, 25 isEmpty: false
#Subtopic From_Integers
#Line # set Scalar values from integer input ##
-#Table
-#Legend
-# name # description ##
-#Legend ##
-# iset() # sets to int input (left, top, right, bottom) ##
-# isetWH # sets to int input (0, 0, width, height) ##
-#Table ##
+#Populate
# ------------------------------------------------------------------------------
@@ -1311,20 +1226,7 @@ rect2: {0, 0, 1, 2}
#Subtopic Inset_Outset_Offset
#Line # moves sides ##
-#Table
-#Legend
-# name # description ##
-#Legend ##
-# inset() # moves the sides symmetrically about the center ##
-# makeInset # constructs from sides moved symmetrically about the center ##
-# makeOffset # constructs from translated sides ##
-# makeOutset # constructs from sides moved symmetrically about the center ##
-# offset() # translates sides without changing width and height ##
-# # void offset(SkScalar dx, SkScalar dy) ##
-# # void offset(const SkPoint& delta) ##
-# offsetTo # translates to (x, y) without changing width and height ##
-# outset() # moves the sides symmetrically about the center ##
-#Table ##
+#Populate
# ------------------------------------------------------------------------------
@@ -1589,22 +1491,7 @@ empty() returns false. The intersection of Rect pair can be described by:
The intersection is only meaningful if the resulting Rect is not empty and
describes an area: fLeft is less than fRight, and fTop is less than fBottom.
-#Table
-#Legend
-# name # description ##
-#Legend ##
-# Intersects # returns true if areas overlap ##
-# contains() # returns true if points are equal or inside ##
-# # bool contains(const SkRect& r) const ##
-# # bool contains(const SkIRect& r) const ##
-# intersect() # sets to shared area; returns true if not empty ##
-# # bool intersect(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) ##
-# # bool intersect(const SkRect& r) ##
-# # bool intersect(const SkRect& a, const SkRect& b) ##
-# intersects() # returns true if areas overlap ##
-# # bool intersects(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) const ##
-# # bool intersects(const SkRect& r) const ##
-#Table ##
+#Populate
# ------------------------------------------------------------------------------
@@ -1863,16 +1750,7 @@ Returns false if either a or b is empty, or do not intersect.
#Subtopic Join
#Line # set to union of bounds ##
-#Table
-#Legend
-# name # description ##
-#Legend ##
-# join() # sets to union of bounds ##
-# # void join(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) ##
-# # void join(const SkRect& r) ##
-# joinNonEmptyArg # sets to union of bounds, asserting that argument is not empty ##
-# joinPossiblyEmptyRect # sets to union of bounds. Skips empty check for both ##
-#Table ##
+#Populate
# ------------------------------------------------------------------------------
@@ -2005,19 +1883,7 @@ sorted: 10, 0, 55, 100
#Subtopic Rounding
#Line # adjust to integer bounds ##
-#Table
-#Legend
-# name # description ##
-#Legend ##
-# round() # sets members to nearest integer value ##
-# # void round(SkIRect* dst) const ##
-# # SkIRect round() const ##
-# roundIn # sets members to nearest integer value towards opposite ##
-# roundOut # sets members to nearest integer value away from opposite ##
-# # void roundOut(SkIRect* dst) const ##
-# # void roundOut(SkRect* dst) const ##
-# # SkIRect roundOut() const ##
-#Table ##
+#Populate
#Method void round(SkIRect* dst) const
@@ -2198,13 +2064,7 @@ round: 30, 50, 41, 61
#Subtopic Sorting
#Line # orders sides ##
-#Table
-#Legend
-# name # description ##
-#Legend ##
-# makeSorted # constructs, ordering sides from smaller to larger ##
-# sort() # orders sides from smaller to larger ##
-#Table ##
+#Populate
# ------------------------------------------------------------------------------
@@ -2236,6 +2096,7 @@ sorted: 20.5, 10.5, 30.5, 50.5
#Method SkRect makeSorted() const
#In Sorting
+#In Constructor
#Line # constructs, ordering sides from smaller to larger ##
Returns Rect with fLeft and fRight swapped if fLeft is greater than fRight; and
with fTop and fBottom swapped if fTop is greater than fBottom. Result may be empty;
@@ -2263,7 +2124,7 @@ sorted: 20.5, 10.5, 30.5, 50.5
# ------------------------------------------------------------------------------
#Method const SkScalar* asScalars() const
-
+#In Property
#Line # returns pointer to members as array ##
Returns pointer to first Scalar in Rect, to treat it as an array with four
entries.
@@ -2285,7 +2146,7 @@ rect.asScalars() == &rect.fLeft
# ------------------------------------------------------------------------------
#Method void dump(bool asHex) const
-
+#In Property
#Line # sends text representation to standard output using floats ##
Writes text representation of Rect to standard output. Set asHex to true to
generate exact binary representations of floating point numbers.
@@ -2339,7 +2200,7 @@ rect is not equal to copy
# ------------------------------------------------------------------------------
#Method void dumpHex() const
-
+#In Property
#Line # sends text representation to standard output using hexadecimal ##
Writes text representation of Rect to standard output. The representation may be
directly compiled as C++ code. Floating point values are written
@@ -2372,18 +2233,9 @@ rect is equal to copy
##
#Method static SkRect SK_WARN_UNUSED_RESULT MakeLargest()
-
-#Line # deprecated ##
#Deprecated
##
-Returns constructed SkRect setting left and top to most negative finite value, and
-setting right and bottom to most positive finite value.
-
-#Return bounds (SK_ScalarMin, SK_ScalarMin, SK_ScalarMax, SK_ScalarMax) ##
-
-##
-
#Struct SkRect ##
#Topic Rect ##
diff --git a/docs/SkSurface_Reference.bmh b/docs/SkSurface_Reference.bmh
index d8123e0983..189ff79e9a 100644
--- a/docs/SkSurface_Reference.bmh
+++ b/docs/SkSurface_Reference.bmh
@@ -2,7 +2,7 @@
#Alias Surface_Reference
#Subtopic Overview
- #Subtopic Subtopics
+ #Subtopic Subtopic
#Populate
##
##
@@ -16,19 +16,23 @@ surface->getCanvas() to use that canvas (but don't delete it, it is owned by the
SkSurface always has non-zero dimensions. If there is a request for a new surface, and either
of the requested dimensions are zero, then nullptr will be returned.
-#Subtopic Constructors
+#Subtopic Related_Function
#Populate
-##
+#Subtopic ##
-#Subtopic Member_Functions
+#Subtopic Member_Function
#Populate
##
# ------------------------------------------------------------------------------
+#Subtopic Constructor
+#Populate
+##
#Method static sk_sp<SkSurface> MakeRasterDirect(const SkImageInfo& imageInfo, void* pixels,
size_t rowBytes,
const SkSurfaceProps* surfaceProps = nullptr)
+#In Constructor
#Line # creates Surface from SkImageInfo and Pixel_Storage ##
Allocates raster Surface. Canvas returned by Surface draws directly into pixels.
@@ -92,6 +96,7 @@ void draw(SkCanvas* ) {
size_t rowBytes,
void (*releaseProc)(void* pixels, void* context),
void* context, const SkSurfaceProps* surfaceProps = nullptr)
+#In Constructor
#Line # creates Surface from SkImageInfo and Pixel_Storage ##
Allocates raster Surface. Canvas returned by Surface draws directly into pixels.
@@ -167,6 +172,7 @@ expected release context
#Method static sk_sp<SkSurface> MakeRaster(const SkImageInfo& imageInfo, size_t rowBytes,
const SkSurfaceProps* surfaceProps)
+#In Constructor
#Line # creates Surface from SkImageInfo ##
Allocates raster Surface. Canvas returned by Surface draws directly into pixels.
@@ -283,6 +289,7 @@ void draw(SkCanvas* ) {
#Method static sk_sp<SkSurface> MakeRasterN32Premul(int width, int height,
const SkSurfaceProps* surfaceProps = nullptr)
+#In Constructor
#Line # creates Surface from width, height matching output ##
Allocates raster Surface. Canvas returned by Surface draws directly into pixels.
@@ -344,6 +351,7 @@ void draw(SkCanvas* ) {
GrSurfaceOrigin origin, int sampleCnt,
sk_sp<SkColorSpace> colorSpace,
const SkSurfaceProps* surfaceProps)
+#In Constructor
#Line # creates Surface from GPU-backed texture ##
Wraps a GPU-backed texture into Surface. Caller must ensure the texture is
@@ -462,6 +470,7 @@ If SK_SUPPORT_GPU is defined as zero, has no effect and returns nullptr.
GrSurfaceOrigin origin,
sk_sp<SkColorSpace> colorSpace,
const SkSurfaceProps* surfaceProps)
+#In Constructor
#Line # creates Surface from GPU memory buffer ##
Wraps a GPU-backed buffer into Surface. Caller must ensure render target is
@@ -577,6 +586,7 @@ If SK_SUPPORT_GPU is defined as zero, has no effect and returns nullptr.
int sampleCnt,
sk_sp<SkColorSpace> colorSpace,
const SkSurfaceProps* surfaceProps)
+#In Constructor
#Line # creates Surface from GPU-backed texture ##
Used to wrap a GPU-backed texture as a SkSurface. Skia will treat the texture as
@@ -685,11 +695,12 @@ If SK_SUPPORT_GPU is defined as zero, has no effect and returns nullptr.
int sampleCount, GrSurfaceOrigin surfaceOrigin,
const SkSurfaceProps* surfaceProps,
bool shouldCreateWithMips = false)
+#In Constructor
#Line # creates Surface pointing to new GPU memory buffer ##
-Returns offscreen Surface on GPU indicated by context. Allocates memory for
+Returns Surface on GPU indicated by context. Allocates memory for
pixels, based on the width, height, and Color_Type in ImageInfo. budgeted
-selects whether allocation for offscreen pixels is tracked by context. imageInfo
+selects whether allocation for pixels is tracked by context. imageInfo
describes the pixel format in Color_Type, and transparency in
Alpha_Type, and color matching in Color_Space.
@@ -752,9 +763,9 @@ If SK_SUPPORT_GPU is defined as zero, has no effect and returns nullptr.
const SkImageInfo& imageInfo, int sampleCount,
const SkSurfaceProps* props)
-Returns offscreen Surface on GPU indicated by context. Allocates memory for
+Returns Surface on GPU indicated by context. Allocates memory for
pixels, based on the width, height, and Color_Type in ImageInfo. budgeted
-selects whether allocation for offscreen pixels is tracked by context. imageInfo
+selects whether allocation for pixels is tracked by context. imageInfo
describes the pixel format in Color_Type, and transparency in
Alpha_Type, and color matching in Color_Space.
@@ -781,7 +792,7 @@ Surface bottom-left corner is pinned to the origin.
#Platform cpu gpu
#Description
LCD text takes advantage of raster striping to improve resolution. Only one of
-the four combinations is correct, depending on whether the monitor's LCD is
+the four combinations is correct, depending on whether monitor LCD striping is
horizontal or vertical, and whether the order of the stripes is red blue green
or red green blue.
##
@@ -824,9 +835,9 @@ void draw(SkCanvas* canvas) {
#Method static sk_sp<SkSurface> MakeRenderTarget(GrContext* context, SkBudgeted budgeted,
const SkImageInfo& imageInfo)
-Returns offscreen Surface on GPU indicated by context. Allocates memory for
+Returns Surface on GPU indicated by context. Allocates memory for
pixels, based on the width, height, and Color_Type in ImageInfo. budgeted
-selects whether allocation for offscreen pixels is tracked by context. imageInfo
+selects whether allocation for pixels is tracked by context. imageInfo
describes the pixel format in Color_Type, and transparency in
Alpha_Type, and color matching in Color_Space.
@@ -866,6 +877,7 @@ Surface bottom-left corner is pinned to the origin.
#Method static sk_sp<SkSurface> MakeNull(int width, int height)
+#In Constructor
#Line # creates Surface without backing pixels ##
Returns Surface without backing pixels. Drawing to Canvas returned from Surface
has no effect. Calling makeImageSnapshot() on returned Surface returns nullptr.
@@ -896,9 +908,14 @@ surf->makeImageSnapshot() == nullptr
#Method ##
# ------------------------------------------------------------------------------
+#Subtopic Property
+#Populate
+#Line # member values ##
+##
#Method int width() const
+#In Property
#Line # returns pixel column count ##
Returns pixel count in each row; may be zero or greater.
@@ -923,7 +940,7 @@ surface width=37 canvas width=37
# ------------------------------------------------------------------------------
#Method int height() const
-
+#In Property
#Line # returns pixel row count ##
Returns pixel row count; may be zero or greater.
@@ -948,7 +965,7 @@ surface height=1000 canvas height=1000
# ------------------------------------------------------------------------------
#Method uint32_t generationID()
-
+#In Property
#Line # returns unique ID ##
Returns unique value identifying the content of Surface. Returned value changes
each time the content changes. Content is changed by drawing, or by calling
@@ -1005,8 +1022,16 @@ If a snapshot has been generated, this copies the Surface contents.
# ------------------------------------------------------------------------------
-#Method void notifyContentWillChange(ContentChangeMode mode)
+#ToDo not crazy about misc catagory -- hopefully will become clear with time
+##
+#Subtopic Miscellaneous
+#Populate
+#Line # other functions ##
+##
+
+#Method void notifyContentWillChange(ContentChangeMode mode)
+#In Miscellaneous
#Line # notifies that contents will be changed outside of Skia ##
Notifies that Surface contents will be changed by code outside of Skia.
Subsequent calls to generationID return a different value.
@@ -1065,20 +1090,14 @@ Caller must overwrite the entire back-end object.
##
#Const kFlushRead_TextureHandleAccess 0
-Deprecated.
#Deprecated
##
-##
#Const kFlushWrite_TextureHandleAccess 1
-Deprecated.
#Deprecated
##
-##
#Const kDiscardWrite_TextureHandleAccess 2
-Deprecated.
#Deprecated
##
-##
#Example
#Platform gpu
@@ -1116,7 +1135,7 @@ Deprecated.
# ------------------------------------------------------------------------------
#Method GrBackendObject getTextureHandle(BackendHandleAccess backendHandleAccess)
-
+#In Property
#Line # returns the GPU reference to texture ##
Returns the GPU back-end reference of the texture used by Surface, or zero
if Surface is not backed by a GPU texture.
@@ -1160,6 +1179,7 @@ or when Surface is deleted.
#Method bool getRenderTargetHandle(GrBackendObject* backendObject,
BackendHandleAccess backendHandleAccess)
+#In Property
#Line # returns the GPU reference to render target ##
Returns true and stores the GPU back-end reference of the render target used
@@ -1209,7 +1229,7 @@ In OpenGL this returns the frame buffer object ID.
# ------------------------------------------------------------------------------
#Method SkCanvas* getCanvas()
-
+#In Property
#Line # returns Canvas that draws into Surface ##
Returns Canvas that draws into Surface. Subsequent calls return the same Canvas.
Canvas returned is managed and owned by Surface, and is deleted when Surface
@@ -1228,14 +1248,14 @@ is deleted.
surface->draw(canvas, 0, 0, nullptr);
##
-#SeeAlso makeSurface makeImageSnapshot draw()
+#SeeAlso makeSurface makeImageSnapshot draw
#Method ##
# ------------------------------------------------------------------------------
#Method sk_sp<SkSurface> makeSurface(const SkImageInfo& imageInfo)
-
+#In Constructor
#Line # creates a compatible Surface ##
Returns a compatible Surface, or nullptr. Returned Surface contains
the same raster, GPU, or null properties as the original. Returned Surface
@@ -1269,14 +1289,14 @@ is incompatible with Surface.
}
##
-#SeeAlso makeImageSnapshot getCanvas draw()
+#SeeAlso makeImageSnapshot getCanvas draw
#Method ##
# ------------------------------------------------------------------------------
#Method sk_sp<SkImage> makeImageSnapshot()
-
+#In Constructor
#Line # creates Image capturing Surface contents ##
Returns Image capturing Surface contents. Subsequent drawing to Surface contents
are not captured. Image allocation is accounted for if Surface was created with
@@ -1302,9 +1322,13 @@ SkBudgeted::kYes.
#Method ##
# ------------------------------------------------------------------------------
+#Subtopic Pixels
+#Populate
+#Line # functions with pixel access ##
+##
#Method void draw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkPaint* paint)
-
+#In Pixels
#Line # draws Surface contents to canvas ##
Draws Surface contents to canvas, with its top-left corner at (x, y).
@@ -1340,7 +1364,7 @@ Blend_Mode, and Draw_Looper.
# ------------------------------------------------------------------------------
#Method bool peekPixels(SkPixmap* pixmap)
-
+#In Pixels
#Line # copies Surface parameters to Pixmap ##
Copies Surface pixel address, row bytes, and Image_Info to Pixmap, if address
is available, and returns true. If pixel address is not available, return
@@ -1375,7 +1399,7 @@ pixmap contents become invalid on any future change to Surface.
# ------------------------------------------------------------------------------
#Method bool readPixels(const SkPixmap& dst, int srcX, int srcY)
-
+#In Pixels
#Line # copies Rect of pixels ##
Copies Rect of pixels to dst.
@@ -1558,7 +1582,7 @@ Does not copy, and returns false if:
# ------------------------------------------------------------------------------
#Method const SkSurfaceProps& props() const
-
+#In Property
#Line # returns Surface_Properties ##
Returns Surface_Properties for surface.
@@ -1580,19 +1604,17 @@ surf.props(): kRGB_H_SkPixelGeometry
# ------------------------------------------------------------------------------
#Method void prepareForExternalIO()
-
-#Line # to be deprecated ##
-To be deprecated.
-
-#NoExample
-##
-
+#Deprecated soon
#Method ##
# ------------------------------------------------------------------------------
+#Subtopic Utility
+#Populate
+#Line # rarely called management functions ##
+##
#Method void flush()
-
+#In Utility
#Line # resolve pending I/O ##
Issues pending Surface commands to the GPU-backed API and resolves any Surface MSAA.
@@ -1611,6 +1633,7 @@ GPU calls.
#Method GrSemaphoresSubmitted flushAndSignalSemaphores(int numSemaphores,
GrBackendSemaphore signalSemaphores[])
+#In Utility
#Line # resolve pending I/O, and signal ##
Issues pending Surface commands to the GPU-backed API and resolves any Surface MSAA.
@@ -1651,7 +1674,7 @@ Pending surface commands are flushed regardless of the return result.
# ------------------------------------------------------------------------------
#Method bool wait(int numSemaphores, const GrBackendSemaphore* waitSemaphores)
-
+#In Utility
#Line # rause commands until signaled ##
Inserts a list of GPU semaphores that the current GPU-backed API must wait on before
executing any more commands on the GPU for this surface. Skia will take ownership of the
@@ -1706,10 +1729,10 @@ and the client will still own the semaphores.
# ------------------------------------------------------------------------------
#Method bool characterize(SkSurfaceCharacterization* characterization) const
-
-#Line # sets Surface_Characterization for threaded pre-processing ##
+#In Utility
+#Line # sets Surface_Characterization for threaded GPU processing ##
Initializes Surface_Characterization that can be used to perform GPU back-end
-pre-processing in a separate thread. Typically this is used to divide drawing
+processing in a separate thread. Typically this is used to divide drawing
into multiple tiles. DeferredDisplayListRecorder records the drawing commands
for each tile.
diff --git a/docs/undocumented.bmh b/docs/undocumented.bmh
index 150e2bcd47..ac801bed3b 100644
--- a/docs/undocumented.bmh
+++ b/docs/undocumented.bmh
@@ -8,12 +8,12 @@
Unicode Unicode5 UTF-8 UTF-16 UTF-32 ASCII Unichar
API
BMP GIF HEIF ICO JPEG PNG WBMP WebP
- CPU
+ CPU Little_Endian Big_Endian
GPU GPU-backed OpenGL Vulkan I/O MSAA UV_Mapping Multi_Sample_Anti_Aliasing GPU_Share_Group
PDF XPS
RFC
NaN NaNs
- Bezier_Curve Coons_Patch Cartesian_Coordinate Euclidean_Distance Euclidean_Space
+ Bezier_Curve Coons_Patch Cartesian_Coordinate Euclidean_Distance Euclidean_Space Mip_Map
C C++ Destructor Subclasses
SkUserConfig # not external, but still thinking about how markup refers to this
SkXXX.h # ditto
diff --git a/docs/usingBookmaker.bmh b/docs/usingBookmaker.bmh
index 50fde6d17a..5261e61b44 100644
--- a/docs/usingBookmaker.bmh
+++ b/docs/usingBookmaker.bmh
@@ -32,13 +32,19 @@ documentation to be deprecated as well.
#Code
###$
#Method void someMethodThatIsNowDeprecated()
-
#Deprecated
##
+$$
+
+Use
+
+$Code
+##Deprecated soon
+$$
+
+if the change is soon to be deprecated.
-##
$$$#
-##
To regenerate the documentation, follow the Installing and Regenerate steps below.
diff --git a/site/user/api/SkAutoCanvasRestore_Reference.md b/site/user/api/SkAutoCanvasRestore_Reference.md
index 901e763ed4..f3dce64a2e 100644
--- a/site/user/api/SkAutoCanvasRestore_Reference.md
+++ b/site/user/api/SkAutoCanvasRestore_Reference.md
@@ -5,24 +5,24 @@ SkAutoCanvasRestore Reference
## <a name="Overview"></a> Overview
-## <a name="Subtopics"></a> Subtopics
+## <a name="Subtopic"></a> Subtopic
| name | description |
| --- | --- |
-| <a href="SkAutoCanvasRestore_Reference#Automatic_Canvas_Restore_Constructors">Constructors</a> | functions that construct <a href="SkAutoCanvasRestore_Reference#SkAutoCanvasRestore">SkAutoCanvasRestore</a> |
-| <a href="SkAutoCanvasRestore_Reference#Automatic_Canvas_Restore_Member_Functions">Member Functions</a> | static functions and member methods |
+| <a href="SkAutoCanvasRestore_Reference#Automatic_Canvas_Restore_Constructor">Constructor</a> | functions that construct <a href="SkAutoCanvasRestore_Reference#SkAutoCanvasRestore">SkAutoCanvasRestore</a> |
+| <a href="SkAutoCanvasRestore_Reference#Automatic_Canvas_Restore_Member_Function">Member Function</a> | static functions and member methods |
# <a name="SkAutoCanvasRestore"></a> Class SkAutoCanvasRestore
Stack helper class calls
-## <a name="Constructors"></a> Constructors
+## <a name="Constructor"></a> Constructor
| name | description |
| --- | --- |
| <a href="#SkAutoCanvasRestore_SkCanvas_star">SkAutoCanvasRestore(SkCanvas* canvas, bool doSave)</a> | preserves <a href="SkCanvas_Reference#Canvas">Canvas</a> save count |
| <a href="#SkAutoCanvasRestore_destructor">~SkAutoCanvasRestore()</a> | restores <a href="SkCanvas_Reference#Canvas">Canvas</a> to saved state |
-## <a name="Member_Functions"></a> Member Functions
+## <a name="Member_Function"></a> Member Function
| name | description |
| --- | --- |
diff --git a/site/user/api/SkBitmap_Reference.md b/site/user/api/SkBitmap_Reference.md
index 41d6378396..edef11b2ec 100644
--- a/site/user/api/SkBitmap_Reference.md
+++ b/site/user/api/SkBitmap_Reference.md
@@ -5,16 +5,16 @@ SkBitmap Reference
## <a name="Overview"></a> Overview
-## <a name="Subtopics"></a> Subtopics
+## <a name="Subtopic"></a> Subtopic
| name | description |
| --- | --- |
-| <a href="#Classes_and_Structs">Classes and Structs</a> | embedded struct and class members |
-| Constants | enum and enum class, const values |
-| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkBitmap_Reference#SkBitmap">SkBitmap</a> |
-| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
-| <a href="#Operators">Operators</a> | operator overloading methods |
-| <a href="#Related_Functions">Related Functions</a> | similar methods grouped together |
+| <a href="#Class_or_Struct">Class or Struct</a> | embedded struct and class members |
+| <a href="#Constant">Constant</a> | enum and enum class, const values |
+| <a href="#Constructor">Constructor</a> | functions that construct <a href="SkBitmap_Reference#SkBitmap">SkBitmap</a> |
+| <a href="#Member_Function">Member Function</a> | static functions and member methods |
+| <a href="#Operator">Operator</a> | operator overloading methods |
+| <a href="#Related_Function">Related Function</a> | similar methods grouped together |
# <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
@@ -45,20 +45,26 @@ sometimes passing zero will compute the <a href="#Row_Bytes">Row Bytes</a> from
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="Related_Functions"></a> Related Functions
+## <a name="Related_Function"></a> Related Function
| name | description |
| --- | --- |
| <a href="#Row_Bytes">Row Bytes</a> | interval from one row to the next |
-## <a name="Classes_and_Structs"></a> Classes and Structs
+## <a name="Constant"></a> Constant
+
+| name | description |
+| --- | --- |
+| <a href="#SkBitmap_AllocFlags">AllocFlags</a> | zero pixel memory |
+
+## <a name="Class_or_Struct"></a> Class or Struct
| name | description |
| --- | --- |
| <a href="#SkBitmap_Allocator">Allocator</a> | abstract subclass of <a href="#SkBitmap_HeapAllocator">HeapAllocator</a> |
| <a href="#SkBitmap_HeapAllocator">HeapAllocator</a> | allocates pixel memory from heap |
-## <a name="Constructors"></a> Constructors
+## <a name="Constructor"></a> Constructor
| name | description |
| --- | --- |
@@ -67,14 +73,14 @@ is useful to position one or more <a href="#Bitmap">Bitmaps</a> within a shared
| <a href="#SkBitmap_copy_const_SkBitmap">SkBitmap(const SkBitmap& src)</a> | shares ownership of pixels |
| <a href="#SkBitmap_destructor">~SkBitmap()</a> | releases ownership of pixels |
-## <a name="Operators"></a> Operators
+## <a name="Operator"></a> Operator
| name | description |
| --- | --- |
| <a href="#SkBitmap_move_operator">operator=(SkBitmap&& src)</a> | takes ownership of pixels |
| <a href="#SkBitmap_copy_operator">operator=(const SkBitmap& src)</a> | shares ownership of pixels |
-## <a name="Member_Functions"></a> Member Functions
+## <a name="Member_Function"></a> Member Function
| name | description |
| --- | --- |
@@ -93,7 +99,6 @@ is useful to position one or more <a href="#Bitmap">Bitmaps</a> within a shared
| <a href="#SkBitmap_empty">empty</a> | returns true if <a href="SkImageInfo_Reference#Image_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> | deprecated |
| <a href="#SkBitmap_extractAlpha">extractAlpha</a> | creates <a href="#Bitmap">Bitmap</a> containing <a href="#Alpha">Alpha</a> of pixels |
@@ -107,10 +112,9 @@ is useful to position one or more <a href="#Bitmap">Bitmaps</a> within a shared
| <a href="#SkBitmap_getGenerationID">getGenerationID</a> | returns unique ID |
| <a href="#SkBitmap_getPixels">getPixels</a> | returns address of pixels |
| <a href="#SkBitmap_getSubset">getSubset</a> | returns bounds offset by origin |
-| <a href="#SkBitmap_hasHardwareMipMap">hasHardwareMipMap</a> | returns <a href="undocumented#Mip_Map">Mip Map</a> support present; Android only |
+| <a href="#SkBitmap_hasHardwareMipMap">hasHardwareMipMap</a> | returns Mip_Map support present; Android only |
| <a href="#SkBitmap_height">height</a> | returns pixel row count |
| <a href="#SkBitmap_info">info</a> | returns <a href="SkImageInfo_Reference#Image_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 |
@@ -128,7 +132,7 @@ is useful to position one or more <a href="#Bitmap">Bitmaps</a> within a shared
| <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="SkImageInfo_Reference#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; Android only |
+| <a href="#SkBitmap_setHasHardwareMipMap">setHasHardwareMipMap</a> | sets Mip_Map support present; Android only |
| <a href="#SkBitmap_setImmutable">setImmutable</a> | marks that pixels will not change |
| <a href="#SkBitmap_setInfo">setInfo</a> | sets height, width, <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, and so on, releasing pixels |
| <a href="#SkBitmap_setIsVolatile">setIsVolatile</a> | marks if pixels should not be cached |
@@ -2086,33 +2090,7 @@ true if <a href="SkImageInfo_Reference#Image_Info">Image Info</a> was set to pix
bool installMaskPixels(const SkMask& mask)
</pre>
-Sets <a href="SkImageInfo_Reference#Image_Info">Image Info</a> to <a href="#SkBitmap_installMaskPixels_mask">mask</a> width, <a href="#SkBitmap_installMaskPixels_mask">mask</a> height, <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>, and
-<a href="SkImageInfo_Reference#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> width or <a href="#SkBitmap_installMaskPixels_mask">mask</a> height 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> width.
-
-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="SkImageInfo_Reference#Image_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><sup><a href="#SkBitmap_installPixels_2">[2]</a></sup><sup><a href="#SkBitmap_installPixels_3">[3]</a></sup> <a href="#SkBitmap_allocPixels">allocPixels</a><sup><a href="#SkBitmap_allocPixels_2">[2]</a></sup><sup><a href="#SkBitmap_allocPixels_3">[3]</a></sup><sup><a href="#SkBitmap_allocPixels_4">[4]</a></sup>
+soon
---
@@ -2581,8 +2559,6 @@ rectangle to fill</td>
void eraseArea(const SkIRect& area, SkColor c) const
</pre>
-Legacy call to be deprecated.
-
---
<a name="SkBitmap_getColor"></a>
diff --git a/site/user/api/SkCanvas_Reference.md b/site/user/api/SkCanvas_Reference.md
index 2dd0073d2b..ebd746356f 100644
--- a/site/user/api/SkCanvas_Reference.md
+++ b/site/user/api/SkCanvas_Reference.md
@@ -5,15 +5,15 @@ SkCanvas Reference
## <a name="Overview"></a> Overview
-## <a name="Subtopics"></a> Subtopics
+## <a name="Subtopic"></a> Subtopic
| name | description |
| --- | --- |
-| <a href="#Classes_and_Structs">Classes and Structs</a> | embedded struct and class members |
-| <a href="#Constants">Constants</a> | enum and enum class, const values |
-| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkCanvas_Reference#SkCanvas">SkCanvas</a> |
-| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
-| <a href="#Related_Functions">Related Functions</a> | similar methods grouped together |
+| <a href="#Class_or_Struct">Class or Struct</a> | embedded struct and class members |
+| <a href="#Constant">Constant</a> | enum and enum class, const values |
+| <a href="#Constructor">Constructor</a> | functions that construct <a href="SkCanvas_Reference#SkCanvas">SkCanvas</a> |
+| <a href="#Member_Function">Member Function</a> | static functions and member methods |
+| <a href="#Related_Function">Related Function</a> | similar methods grouped together |
# <a name="SkCanvas"></a> Class SkCanvas
<a href="#Canvas">Canvas</a> provides an interface for drawing, and how the drawing is clipped and transformed.
@@ -37,7 +37,7 @@ destination.
<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="Related_Functions"></a> Related Functions
+## <a name="Related_Function"></a> Related Function
| name | description |
| --- | --- |
@@ -47,7 +47,7 @@ This approach may be deprecated in the future.
| <a href="#Matrix">Matrix</a> | coordinate transformation |
| <a href="#State_Stack">State Stack</a> | stack of state for hierarchical drawing |
-## <a name="Constants"></a> Constants
+## <a name="Constant"></a> Constant
| name | description |
| --- | --- |
@@ -56,16 +56,16 @@ This approach may be deprecated in the future.
| <a href="#SkCanvas_SrcRectConstraint">SrcRectConstraint</a> | sets <a href="#SkCanvas_drawImageRect">drawImageRect</a> options |
| _anonymous | sets <a href="#SkCanvas_SaveLayerRec">SaveLayerRec</a> options |
-## <a name="Classes_and_Structs"></a> Classes and Structs
+## <a name="Class_or_Struct"></a> Class or Struct
| name | description |
| --- | --- |
| <a href="#SkCanvas_Lattice">Lattice</a> | divides <a href="SkBitmap_Reference#Bitmap">Bitmap</a> or <a href="SkImage_Reference#Image">Image</a> into a rectangular grid |
| <a href="#SkCanvas_SaveLayerRec">SaveLayerRec</a> | contains the state used to create the <a href="#Layer">Layer</a> |
-## <a name="Constructors"></a> Constructors
+## <a name="Constructor"></a> Constructor
-Create the desired type of <a href="SkSurface_Reference#Surface">Surface</a> to obtain its <a href="#Canvas">Canvas</a> when possible. <a href="#Constructors">Constructors</a> are useful
+Create the desired type of <a href="SkSurface_Reference#Surface">Surface</a> to obtain its <a href="#Canvas">Canvas</a> when possible. Useful
when no <a href="SkSurface_Reference#Surface">Surface</a> is required, and some helpers implicitly create <a href="undocumented#Raster_Surface">Raster Surface</a>.
| name | description |
@@ -73,7 +73,6 @@ when no <a href="SkSurface_Reference#Surface">Surface</a> is required, and some
| <a href="#SkCanvas_MakeRasterDirect">MakeRasterDirect</a> | creates from <a href="SkImageInfo_Reference#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> |
| <a href="#SkCanvas_empty_constructor">SkCanvas()</a> | creates with no <a href="SkSurface_Reference#Surface">Surface</a>, no dimensions |
-| <a href="#SkCanvas_copy_SkBaseDevice_star">SkCanvas(SkBaseDevice* device)</a> | to be deprecated |
| <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">SkCanvas(const SkBitmap& bitmap, ColorBehavior behavior)</a> | Android framework only |
| <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="undocumented#Surface_Properties">Surface Properties</a> |
@@ -81,7 +80,7 @@ when no <a href="SkSurface_Reference#Surface">Surface</a> is required, and some
| <a href="#SkCanvas_makeSurface">makeSurface</a> | creates <a href="SkSurface_Reference#Surface">Surface</a> matching <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> and <a href="undocumented#SkSurfaceProps">SkSurfaceProps</a> |
| <a href="#SkCanvas_destructor">~SkCanvas()</a> | draws saved <a href="#Layer">Layers</a>, frees resources |
-## <a name="Member_Functions"></a> Member Functions
+## <a name="Member_Function"></a> Member Function
| name | description |
| --- | --- |
@@ -137,7 +136,6 @@ when no <a href="SkSurface_Reference#Surface">Surface</a> is required, and some
| <a href="#SkCanvas_flush">flush</a> | triggers execution of all pending draw operations |
| <a href="#SkCanvas_getBaseLayerSize">getBaseLayerSize</a> | returns size of base <a href="#Layer">Layer</a> in global coordinates |
| <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 |
| <a href="#SkCanvas_getMetaData">getMetaData</a> | associates additional data with the canvas |
@@ -161,7 +159,6 @@ when no <a href="SkSurface_Reference#Surface">Surface</a> is required, and some
| <a href="#SkCanvas_saveLayerPreserveLCDTextRequests">saveLayerPreserveLCDTextRequests</a> | saves <a href="#Clip">Clip</a> and <a href="#Matrix">Matrix</a> on stack; creates <a href="#Layer">Layer</a> for LCD text |
| <a href="#SkCanvas_scale">scale</a> | scales <a href="#Matrix">Matrix</a> |
| <a href="#SkCanvas_setAllowSimplifyClip">setAllowSimplifyClip</a> | experimental |
-| <a href="#SkCanvas_setDrawFilter">setDrawFilter</a> | legacy; to be deprecated |
| <a href="#SkCanvas_setMatrix">setMatrix</a> | sets <a href="#Matrix">Matrix</a> |
| <a href="#SkCanvas_skew">skew</a> | skews <a href="#Matrix">Matrix</a> |
| <a href="#SkCanvas_translate">translate</a> | translates <a href="#Matrix">Matrix</a> |
@@ -389,23 +386,7 @@ canvas is empty
explicit SkCanvas(SkBaseDevice* device)
</pre>
-Construct a canvas that draws into <a href="#SkCanvas_copy_SkBaseDevice_star_device">device</a>.
-Used by child classes of <a href="#SkCanvas">SkCanvas</a>.
-
-### Parameters
-
-<table> <tr> <td><a name="SkCanvas_copy_SkBaseDevice_star_device"> <code><strong>device </strong></code> </a></td> <td>
-specifies a <a href="#SkCanvas_copy_SkBaseDevice_star_device">device</a> for the canvas to draw into</td>
- </tr>
-</table>
-
-### Return Value
-
-<a href="#Canvas">Canvas</a> that can be used to draw into <a href="#SkCanvas_copy_SkBaseDevice_star_device">device</a>
-
-### See Also
-
-<a href="#SkCanvas_MakeRasterDirect">MakeRasterDirect</a> <a href="#SkRasterHandleAllocator_MakeCanvas">SkRasterHandleAllocator::MakeCanvas</a> <a href="#SkSurface_getCanvas">SkSurface::getCanvas</a> <a href="undocumented#SkCreateColorSpaceXformCanvas">SkCreateColorSpaceXformCanvas</a>
+soon
---
@@ -1697,8 +1678,7 @@ defining how <a href="#Layer">Layer</a> allocated by <a href="#SkCanvas_saveLaye
<td><a name="SkCanvas_kInitWithPrevious_SaveLayerFlag"> <code><strong>SkCanvas::kInitWithPrevious_SaveLayerFlag </strong></code> </a></td><td>4</td><td>Initializes <a href="#Layer">Layer</a> with the contents of the previous <a href="#Layer">Layer</a>.</td>
</tr>
<tr>
- <td><a name="SkCanvas_kDontClipToLayer_Legacy_SaveLayerFlag"> <code><strong>SkCanvas::kDontClipToLayer_Legacy_SaveLayerFlag </strong></code> </a></td><td>0x80000000</td><td>Only present on Android.
-Skips setting a clip to the <a href="#Layer">Layer</a> bounds.</td>
+ <td><a name="SkCanvas_kDontClipToLayer_Legacy_SaveLayerFlag"> <code><strong>SkCanvas::kDontClipToLayer_Legacy_SaveLayerFlag </strong></code> </a></td><td>0x80000000</td><td>soon</td>
</tr>
</table>
@@ -5731,7 +5711,7 @@ data holding <a href="#SkCanvas_drawAnnotation_2_value">value</a> stored in anno
SkDrawFilter* getDrawFilter() const
</pre>
-Legacy call to be deprecated.
+soon
---
@@ -5742,7 +5722,7 @@ Legacy call to be deprecated.
virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter)
</pre>
-Legacy call to be deprecated.
+soon
---
diff --git a/site/user/api/SkIPoint16_Reference.md b/site/user/api/SkIPoint16_Reference.md
index 8d6e962beb..fdc2672d06 100644
--- a/site/user/api/SkIPoint16_Reference.md
+++ b/site/user/api/SkIPoint16_Reference.md
@@ -5,24 +5,26 @@ SkIPoint16 Reference
## <a name="Overview"></a> Overview
-## <a name="Subtopics"></a> Subtopics
+## <a name="Subtopic"></a> Subtopic
| name | description |
| --- | --- |
-| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkIPoint16_Reference#SkIPoint16">SkIPoint16</a> |
-| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
-| <a href="#Members">Members</a> | member values |
+| <a href="#Constructor">Constructor</a> | functions that construct <a href="SkIPoint16_Reference#SkIPoint16">SkIPoint16</a> |
+| <a href="#Member_Function">Member Function</a> | static functions and member methods |
+| <a href="#Member">Member</a> | member values |
+| <a href="#Related_Function">Related Function</a> | similar methods grouped together |
# <a name="SkIPoint16"></a> Struct SkIPoint16
<a href="#SkIPoint16">SkIPoint16</a> holds two 16 bit integer coordinates.
-## <a name="Constructors"></a> Constructors
+## <a name="Related_Function"></a> Related Function
| name | description |
| --- | --- |
-| <a href="#SkIPoint16_Make">Make</a> | constructs from integer inputs |
+| <a href="#Property">Property</a> | member values |
+| <a href="#Set">Set</a> | replaces all values |
-## <a name="Member_Functions"></a> Member Functions
+## <a name="Member_Function"></a> Member Function
| name | description |
| --- | --- |
@@ -31,7 +33,7 @@ SkIPoint16 Reference
| <a href="#SkIPoint16_x">x</a> | returns <a href="#SkIPoint16_fX">fX</a> |
| <a href="#SkIPoint16_y">y</a> | returns <a href="#SkIPoint16_fY">fY</a> |
-## <a name="Members"></a> Members
+## <a name="Member"></a> Member
| name | description |
| --- | --- |
@@ -46,6 +48,12 @@ x-axis value used by <a href="#IPoint16">IPoint16</a>
y-axis value used by <a href="#IPoint16">IPoint16</a>
+## <a name="Constructor"></a> Constructor
+
+| name | description |
+| --- | --- |
+| <a href="#SkIPoint16_Make">Make</a> | constructs from integer inputs |
+
<a name="SkIPoint16_Make"></a>
## Make
@@ -88,6 +96,13 @@ pt1.fY == pt2.fY
---
+## <a name="Property"></a> Property
+
+| name | description |
+| --- | --- |
+| <a href="#SkIPoint16_x">x</a> | returns <a href="#SkIPoint16_fX">fX</a> |
+| <a href="#SkIPoint16_y">y</a> | returns <a href="#SkIPoint16_fY">fY</a> |
+
<a name="SkIPoint16_x"></a>
## x
@@ -150,6 +165,12 @@ pt1.fY == pt1.y()
---
+## <a name="Set"></a> Set
+
+| name | description |
+| --- | --- |
+| <a href="#SkIPoint16_set">set</a> | sets to integer input |
+
<a name="SkIPoint16_set"></a>
## set
diff --git a/site/user/api/SkIPoint_Reference.md b/site/user/api/SkIPoint_Reference.md
index d43a9b8bc9..cae7fb38ca 100644
--- a/site/user/api/SkIPoint_Reference.md
+++ b/site/user/api/SkIPoint_Reference.md
@@ -5,37 +5,24 @@ SkIPoint Reference
## <a name="Overview"></a> Overview
-## <a name="Subtopics"></a> Subtopics
+## <a name="Subtopic"></a> Subtopic
| name | description |
| --- | --- |
-| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkIPoint_Reference#SkIPoint">SkIPoint</a> |
-| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
-| <a href="#Members">Members</a> | member values |
-| <a href="#Operators">Operators</a> | operator overloading methods |
+| <a href="#Constructor">Constructor</a> | functions that construct <a href="SkIPoint_Reference#SkIPoint">SkIPoint</a> |
+| <a href="#Member_Function">Member Function</a> | static functions and member methods |
+| <a href="#Member">Member</a> | member values |
+| <a href="#Operator">Operator</a> | operator overloading methods |
# <a name="SkIPoint"></a> Struct SkIPoint
<a href="#SkIPoint">SkIPoint</a> holds two 32 bit integer coordinates.
-## <a name="Constructors"></a> Constructors
+## <a name="Related_Function"></a> Related Function
| name | description |
| --- | --- |
-| <a href="#SkIPoint_Make">Make</a> | constructs from integer inputs |
-## <a name="Operators"></a> Operators
-
-| name | description |
-| --- | --- |
-| <a href="#SkIPoint_notequal_operator">operator!=(const SkIPoint& a, const SkIPoint& b)</a> | returns true if <a href="#IPoint">IPoints</a> are unequal |
-| <a href="#SkIPoint_add_operator">operator+(const SkIPoint& a, const SkIVector& b)</a> | returns <a href="#IPoint">IPoint</a> offset by <a href="SkIPoint_Reference#IVector">IVector</a> |
-| <a href="#SkIPoint_addto_operator">operator+=(const SkIVector& v)</a> | adds <a href="SkIPoint_Reference#IVector">IVector</a> to <a href="#IPoint">IPoint</a> |
-| <a href="#SkIPoint_minus_operator">operator-() const</a> | reverses sign of <a href="#IPoint">IPoint</a> |
-| <a href="#SkIPoint_subtract_operator">operator-(const SkIPoint& a, const SkIPoint& b)</a> | returns <a href="SkIPoint_Reference#IVector">IVector</a> between <a href="#IPoint">IPoints</a> |
-| <a href="#SkIPoint_subtractfrom_operator">operator-=(const SkIVector& v)</a> | subtracts <a href="SkIPoint_Reference#IVector">IVector</a> from <a href="#IPoint">IPoint</a> |
-| <a href="#SkIPoint_equal_operator">operator==(const SkIPoint& a, const SkIPoint& b)</a> | returns true if <a href="#IPoint">IPoints</a> are equal |
-
-## <a name="Member_Functions"></a> Member Functions
+## <a name="Member_Function"></a> Member Function
| name | description |
| --- | --- |
@@ -46,7 +33,7 @@ SkIPoint Reference
| <a href="#SkIPoint_x">x</a> | returns <a href="#SkIPoint_fX">fX</a> |
| <a href="#SkIPoint_y">y</a> | returns <a href="#SkIPoint_fY">fY</a> |
-## <a name="Members"></a> Members
+## <a name="Member"></a> Member
| name | description |
| --- | --- |
@@ -61,6 +48,12 @@ x-axis value used by <a href="#IPoint">IPoint</a>.
y-axis value used by <a href="#IPoint">IPoint</a>.
+## <a name="Constructor"></a> Constructor
+
+| name | description |
+| --- | --- |
+| <a href="#SkIPoint_Make">Make</a> | constructs from integer inputs |
+
<a name="SkIPoint_Make"></a>
## Make
@@ -101,6 +94,14 @@ pt1 == pt2
---
+## <a name="Property"></a> Property
+
+| name | description |
+| --- | --- |
+| <a href="#SkIPoint_isZero">isZero</a> | returns true if both members equal zero |
+| <a href="#SkIPoint_x">x</a> | returns <a href="#SkIPoint_fX">fX</a> |
+| <a href="#SkIPoint_y">y</a> | returns <a href="#SkIPoint_fY">fY</a> |
+
<a name="SkIPoint_x"></a>
## x
@@ -194,6 +195,12 @@ pt.isZero() == true
---
+## <a name="Set"></a> Set
+
+| name | description |
+| --- | --- |
+| <a href="#SkIPoint_set">set</a> | sets to integer input |
+
<a name="SkIPoint_set"></a>
## set
@@ -230,6 +237,19 @@ pt1 == pt2
---
+## <a name="Operator"></a> Operator
+
+| name | description |
+| --- | --- |
+| <a href="#SkIPoint_equals">equals</a> | returns true if members are equal |
+| <a href="#SkIPoint_notequal_operator">operator!=(const SkIPoint& a, const SkIPoint& b)</a> | returns true if <a href="#IPoint">IPoints</a> are unequal |
+| <a href="#SkIPoint_add_operator">operator+(const SkIPoint& a, const SkIVector& b)</a> | returns <a href="#IPoint">IPoint</a> offset by <a href="SkIPoint_Reference#IVector">IVector</a> |
+| <a href="#SkIPoint_addto_operator">operator+=(const SkIVector& v)</a> | adds <a href="SkIPoint_Reference#IVector">IVector</a> to <a href="#IPoint">IPoint</a> |
+| <a href="#SkIPoint_minus_operator">operator-() const</a> | reverses sign of <a href="#IPoint">IPoint</a> |
+| <a href="#SkIPoint_subtract_operator">operator-(const SkIPoint& a, const SkIPoint& b)</a> | returns <a href="SkIPoint_Reference#IVector">IVector</a> between <a href="#IPoint">IPoints</a> |
+| <a href="#SkIPoint_subtractfrom_operator">operator-=(const SkIVector& v)</a> | subtracts <a href="SkIPoint_Reference#IVector">IVector</a> from <a href="#IPoint">IPoint</a> |
+| <a href="#SkIPoint_equal_operator">operator==(const SkIPoint& a, const SkIPoint& b)</a> | returns true if <a href="#IPoint">IPoints</a> are equal |
+
<a name="SkIPoint_minus_operator"></a>
## operator-
diff --git a/site/user/api/SkIRect_Reference.md b/site/user/api/SkIRect_Reference.md
index 78129ec813..ec9a7249cd 100644
--- a/site/user/api/SkIRect_Reference.md
+++ b/site/user/api/SkIRect_Reference.md
@@ -5,15 +5,15 @@ SkIRect Reference
## <a name="Overview"></a> Overview
-## <a name="Subtopics"></a> Subtopics
+## <a name="Subtopic"></a> Subtopic
| name | description |
| --- | --- |
-| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkIRect_Reference#SkIRect">SkIRect</a> |
-| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
-| <a href="#Members">Members</a> | member values |
-| <a href="#Operators">Operators</a> | operator overloading methods |
-| <a href="#Related_Functions">Related Functions</a> | similar methods grouped together |
+| <a href="#Constructor">Constructor</a> | functions that construct <a href="SkIRect_Reference#SkIRect">SkIRect</a> |
+| <a href="#Member_Function">Member Function</a> | static functions and member methods |
+| <a href="#Member">Member</a> | member values |
+| <a href="#Operator">Operator</a> | operator overloading methods |
+| <a href="#Related_Function">Related Function</a> | similar methods grouped together |
# <a name="SkIRect"></a> Struct SkIRect
<a href="#SkIRect">SkIRect</a> holds four 32 bit integer coordinates describing the upper and
@@ -22,19 +22,16 @@ from position, width, and height. <a href="#SkIRect">SkIRect</a> describes an ar
is less than or equal to its left, or if its bottom is less than or equal to
its top, it is considered empty.
-## <a name="Related_Functions"></a> Related Functions
+## <a name="Related_Function"></a> Related Function
| name | description |
-| --- | --- |
+| --- | --- |
| <a href="#Inset_Outset_Offset">Inset Outset Offset</a> | moves sides |
| <a href="#Intersection">Intersection</a> | set to shared bounds |
-| Join | set to union of bounds |
-| Properties | side values, center, validity |
-| Rounding | adjust to integer bounds |
-| Set | replaces all values |
-| Sorting | orders sides |
+| <a href="#Join">Join</a> | set to union of bounds |
+| <a href="#Sorting">Sorting</a> | orders sides |
-## <a name="Member_Functions"></a> Member Functions
+## <a name="Member_Function"></a> Member Function
| name | description |
| --- | --- |
@@ -43,7 +40,6 @@ its top, it is considered empty.
| <a href="#SkIRect_IntersectsNoEmptyCheck">IntersectsNoEmptyCheck</a> | returns true if areas overlap skips empty check |
| <a href="#SkIRect_MakeEmpty">MakeEmpty</a> | returns bounds of (0, 0, 0, 0) |
| <a href="#SkIRect_MakeLTRB">MakeLTRB</a> | constructs from int left, top, right, bottom |
-| <a href="#SkIRect_MakeLargest">MakeLargest</a> | deprecated |
| <a href="#SkIRect_MakeSize">MakeSize</a> | constructs from <a href="undocumented#ISize">ISize</a> returning (0, 0, width, height) |
| <a href="#SkIRect_MakeWH">MakeWH</a> | constructs from int input returning (0, 0, width, height) |
| <a href="#SkIRect_MakeXYWH">MakeXYWH</a> | constructs from int input returning (x, y, width, height) |
@@ -83,7 +79,7 @@ its top, it is considered empty.
| <a href="#SkIRect_x">x</a> | returns bounds left |
| <a href="#SkIRect_y">y</a> | returns bounds top |
-## <a name="Members"></a> Members
+## <a name="Member"></a> Member
| name | description |
| --- | --- |
@@ -112,13 +108,13 @@ When equal to or less than <a href="#SkIRect_fLeft">fLeft</a>, <a href="#IRect">
May contain any value. The larger of the vertical values when sorted.
When equal to or less than <a href="#SkIRect_fTop">fTop</a>, <a href="#IRect">IRect</a> is empty.
-## <a name="Constructors"></a> Constructors
+## <a name="Constructor"></a> Constructor
| name | description |
| --- | --- |
+| <a href="#SkIRect_EmptyIRect">EmptyIRect</a> | returns immutable bounds of (0, 0, 0, 0) |
| <a href="#SkIRect_MakeEmpty">MakeEmpty</a> | returns bounds of (0, 0, 0, 0) |
| <a href="#SkIRect_MakeLTRB">MakeLTRB</a> | constructs from int left, top, right, bottom |
-| <a href="#SkIRect_MakeLargest">MakeLargest</a> | deprecated |
| <a href="#SkIRect_MakeSize">MakeSize</a> | constructs from <a href="undocumented#ISize">ISize</a> returning (0, 0, width, height) |
| <a href="#SkIRect_MakeWH">MakeWH</a> | constructs from int input returning (0, 0, width, height) |
| <a href="#SkIRect_MakeXYWH">MakeXYWH</a> | constructs from int input returning (x, y, width, height) |
@@ -339,6 +335,27 @@ rect: -10, 35, 5, 60 isEmpty: false
---
+## <a name="Property"></a> Property
+
+| name | description |
+| --- | --- |
+| <a href="#SkIRect_bottom">bottom</a> | returns larger bounds in y, if sorted |
+| <a href="#SkIRect_centerX">centerX</a> | returns midpoint in x |
+| <a href="#SkIRect_centerY">centerY</a> | returns midpoint in y |
+| <a href="#SkIRect_height">height</a> | returns span in y |
+| <a href="#SkIRect_height64">height64</a> | returns span in y as int64_t |
+| <a href="#SkIRect_is16Bit">is16Bit</a> | returns true if members fit in 16-bit word |
+| <a href="#SkIRect_isEmpty">isEmpty</a> | returns true if width or height are zero or negative or they exceed int32_t |
+| <a href="#SkIRect_isEmpty64">isEmpty64</a> | returns true if width or height are zero or negative |
+| <a href="#SkIRect_left">left</a> | returns smaller bounds in x, if sorted |
+| <a href="#SkIRect_right">right</a> | returns larger bounds in x, if sorted |
+| <a href="#SkIRect_size">size</a> | returns <a href="undocumented#ISize">ISize</a> (width, height) |
+| <a href="#SkIRect_top">top</a> | returns smaller bounds in y, if sorted |
+| <a href="#SkIRect_width">width</a> | returns span in x |
+| <a href="#SkIRect_width64">width64</a> | returns span in y as int64_t |
+| <a href="#SkIRect_x">x</a> | returns bounds left |
+| <a href="#SkIRect_y">y</a> | returns bounds top |
+
<a name="SkIRect_left"></a>
## left
@@ -832,7 +849,7 @@ sorted: {20, 40, 20, 50} is empty
---
-## <a name="Operators"></a> Operators
+## <a name="Operator"></a> Operator
| name | description |
| --- | --- |
@@ -1119,14 +1136,9 @@ rect: -10, 35, 5, 60 isEmpty: false
## <a name="Inset_Outset_Offset"></a> Inset Outset Offset
| name | description |
-| --- | --- |
+| --- | --- |
| <a href="#SkIRect_inset">inset</a> | moves the sides symmetrically about the center |
-| <a href="#SkIRect_makeInset">makeInset</a> | constructs from sides moved symmetrically about the center |
-| <a href="#SkIRect_makeOffset">makeOffset</a> | constructs from translated sides |
-| <a href="#SkIRect_makeOutset">makeOutset</a> | constructs from sides moved symmetrically about the center |
| <a href="#SkIRect_offset">offset</a> | translates sides without changing width and height |
-| | void <a href="#SkIRect_offset">offset(int32 t dx, int32 t dy)</a> |
-| | void <a href="#SkIRect_offset_2">offset(const SkIPoint& delta)</a> |
| <a href="#SkIRect_offsetTo">offsetTo</a> | translates to (x, y) without changing width and height |
| <a href="#SkIRect_outset">outset</a> | moves the sides symmetrically about the center |
@@ -1480,17 +1492,12 @@ The intersection is only meaningful if the resulting <a href="#IRect">IRect</a>
describes an area: <a href="#SkIRect_fLeft">fLeft</a> is less than <a href="#SkIRect_fRight">fRight</a>, and <a href="#SkIRect_fTop">fTop</a> is less than <a href="#SkIRect_fBottom">fBottom</a>.
| name | description |
-| --- | --- |
+| --- | --- |
| <a href="#SkIRect_Intersects">Intersects</a> | returns true if areas overlap |
| <a href="#SkIRect_IntersectsNoEmptyCheck">IntersectsNoEmptyCheck</a> | returns true if areas overlap skips empty check |
| <a href="#SkIRect_contains">contains</a> | returns true if points are equal or inside |
-| | bool <a href="#SkIRect_contains">contains(int32 t x, int32 t y)</a> const |
-| | bool <a href="#SkIRect_contains_2">contains(int32 t left, int32 t top, int32 t right, int32 t bottom)</a> const |
-| | bool <a href="#SkIRect_contains_3">contains(const SkIRect& r)</a> const |
+| <a href="#SkIRect_containsNoEmptyCheck">containsNoEmptyCheck</a> | returns true if points are equal or inside skips empty check |
| <a href="#SkIRect_intersect">intersect</a> | sets to shared area; returns true if not empty |
-| | bool <a href="#SkIRect_intersect">intersect(const SkIRect& r)</a> |
-| | bool <a href="#SkIRect_intersect_2">intersect(const SkIRect& a, const SkIRect& b)</a> |
-| | bool <a href="#SkIRect_intersect_3">intersect(int32 t left, int32 t top, int32 t right, int32 t bottom)</a> |
| <a href="#SkIRect_intersectNoEmptyCheck">intersectNoEmptyCheck</a> | sets to shared area; returns true if not empty skips empty check |
| <a href="#SkIRect_quickReject">quickReject</a> | returns true if rectangles do not intersect |
@@ -2081,6 +2088,13 @@ intersection
---
+## <a name="Join"></a> Join
+
+| name | description |
+| --- | --- |
+| <a href="#SkIRect_join">join</a> | sets to union of bounds |
+| | join |
+
<a name="SkIRect_join"></a>
## join
@@ -2162,6 +2176,12 @@ join: 10, 20, 55, 65
---
+## <a name="Sorting"></a> Sorting
+
+| name | description |
+| --- | --- |
+| <a href="#SkIRect_sort">sort</a> | orders sides from smaller to larger |
+
<a name="SkIRect_sort"></a>
## sort
@@ -2264,12 +2284,5 @@ rect: 0, 0, 0, 0
static SkIRect SK_WARN_UNUSED_RESULT MakeLargest()
</pre>
-Returns constructed <a href="#SkIRect">SkIRect</a> setting left and top to most negative value, and
-setting right and bottom to most positive value.
-
-### Return Value
-
-bounds (<a href="undocumented#SK_MinS32">SK MinS32</a>, <a href="undocumented#SK_MinS32">SK MinS32</a>, <a href="undocumented#SK_MaxS32">SK MaxS32</a>, <a href="undocumented#SK_MaxS32">SK MaxS32</a>)
-
---
diff --git a/site/user/api/SkImageInfo_Reference.md b/site/user/api/SkImageInfo_Reference.md
index c947cb4223..0ad21b609a 100644
--- a/site/user/api/SkImageInfo_Reference.md
+++ b/site/user/api/SkImageInfo_Reference.md
@@ -5,15 +5,15 @@ SkImageInfo Reference
## <a name="Overview"></a> Overview
-## <a name="Subtopics"></a> Subtopics
+## <a name="Subtopic"></a> Subtopic
| name | description |
| --- | --- |
-| <a href="SkImageInfo_Reference#Image_Info_Constructors">Constructors</a> | functions that construct <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> |
-| <a href="SkImageInfo_Reference#Image_Info_Member_Functions">Member Functions</a> | static functions and member methods |
-| <a href="SkImageInfo_Reference#Image_Info_Operators">Operators</a> | operator overloading methods |
+| <a href="SkImageInfo_Reference#Image_Info_Constructor">Constructor</a> | functions that construct <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> |
+| <a href="SkImageInfo_Reference#Image_Info_Member_Function">Member Function</a> | static functions and member methods |
+| <a href="SkImageInfo_Reference#Image_Info_Operator">Operator</a> | operator overloading methods |
-## <a name="Constants"></a> Constants
+## <a name="Constant"></a> Constant
| name | description |
| --- | --- |
@@ -75,7 +75,10 @@ enum <a href="#SkColorType">SkColorType</a> {
<a href="SkImageInfo_Reference#kRGB_565_SkColorType">kRGB 565 SkColorType</a>,
<a href="SkImageInfo_Reference#kARGB_4444_SkColorType">kARGB 4444 SkColorType</a>,
<a href="SkImageInfo_Reference#kRGBA_8888_SkColorType">kRGBA 8888 SkColorType</a>,
+<a href="SkImageInfo_Reference#kRGB_888x_SkColorType">kRGB 888x SkColorType</a>,
<a href="SkImageInfo_Reference#kBGRA_8888_SkColorType">kBGRA 8888 SkColorType</a>,
+<a href="SkImageInfo_Reference#kRGBA_1010102_SkColorType">kRGBA 1010102 SkColorType</a>,
+<a href="SkImageInfo_Reference#kRGB_101010x_SkColorType">kRGB 101010x SkColorType</a>,
<a href="SkImageInfo_Reference#kGray_8_SkColorType">kGray 8 SkColorType</a>,
<a href="SkImageInfo_Reference#kRGBA_F16_SkColorType">kRGBA F16 SkColorType</a>,
kLastEnum_SkColorType = <a href="SkImageInfo_Reference#kRGBA_F16_SkColorType">kRGBA F16 SkColorType</a>,
@@ -84,9 +87,11 @@ kLastEnum_SkColorType = <a href="SkImageInfo_Reference#kRGBA_F16_SkColorType">kR
};</pre>
Describes how to interpret the components of a pixel.
-<a href="SkImageInfo_Reference#kN32_SkColorType">kN32 SkColorType</a> is an alias for whichever 32 bit <a href="#ARGB">Color ARGB</a> format is the ""
-form for skia's blitters. Use this if you don't have a swizzle preference
-for 32 bit pixels.
+
+<a href="SkImageInfo_Reference#kN32_SkColorType">kN32 SkColorType</a> selects the native 32-bit <a href="#ARGB">Color ARGB</a> format. On Little_Endian
+processors, pixels containing 8-bit <a href="#ARGB">Color ARGB</a> components pack into 32-bit
+<a href="SkImageInfo_Reference#kBGRA_8888_SkColorType">kBGRA 8888 SkColorType</a>. On Big_Endian processors, pixels pack into 32-bit
+<a href="SkImageInfo_Reference#kRGBA_8888_SkColorType">kRGBA 8888 SkColorType</a>.
### Constants
@@ -212,17 +217,17 @@ incomplete
# <a name="SkImageInfo"></a> Struct SkImageInfo
-Describe an image's dimensions and pixel type.
-Used for both src images and render-targets (surfaces).
+Describes <a href="SkImage_Reference#Image">Image</a> dimensions and pixel type.
+Used for both source images and render-targets (surfaces).
-## <a name="Operators"></a> Operators
+## <a name="Operator"></a> Operator
| name | description |
| --- | --- |
| <a href="#SkImageInfo_notequal1_operator">operator!=(const SkImageInfo& other) const</a> | incomplete |
| <a href="#SkImageInfo_equal1_operator">operator==(const SkImageInfo& other) const</a> | incomplete |
-## <a name="Member_Functions"></a> Member Functions
+## <a name="Member_Function"></a> Member Function
| name | description |
| --- | --- |
@@ -261,7 +266,7 @@ Used for both src images and render-targets (surfaces).
| <a href="#SkImageInfo_validate">validate</a> | incomplete |
| <a href="#SkImageInfo_width">width</a> | incomplete |
-## <a name="Constructors"></a> Constructors
+## <a name="Constructor"></a> Constructor
| name | description |
| --- | --- |
@@ -269,8 +274,10 @@ Used for both src images and render-targets (surfaces).
| <a href="#SkImageInfo_MakeA8">MakeA8</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a> |
| <a href="#SkImageInfo_MakeN32">MakeN32</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#Color_Type">Native Color Type</a> |
| <a href="#SkImageInfo_MakeN32Premul">MakeN32Premul</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#Color_Type">Native Color Type</a>, <a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a> |
+| | <a href="#SkImageInfo_MakeN32Premul">MakeN32Premul</a> |
| <a href="#SkImageInfo_MakeS32">MakeS32</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#Color_Type">Native Color Type</a>, sRGB <a href="undocumented#Color_Space">Color Space</a> |
| <a href="#SkImageInfo_MakeUnknown">MakeUnknown</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a> |
+| | <a href="#SkImageInfo_MakeUnknown">MakeUnknown</a> |
| <a href="#SkImageInfo_empty_constructor">SkImageInfo()</a> | creates with zero dimensions, <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a> |
| <a href="#SkImageInfo_makeAlphaType">makeAlphaType</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with changed <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> |
| <a href="#SkImageInfo_makeColorSpace">makeColorSpace</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with changed <a href="undocumented#Color_Space">Color Space</a> |
@@ -342,7 +349,7 @@ incomplete
static SkImageInfo MakeN32(int width, int height, SkAlphaType at, sk_sp&lt;SkColorSpace&gt; cs = nullptr)
</pre>
-Sets colortype to <a href="SkImageInfo_Reference#SkColorType">kN32 SkColorType</a>.
+Sets <a href="SkImageInfo_Reference#Color_Type">Color Type</a> to <a href="SkImageInfo_Reference#SkColorType">kN32 SkColorType</a>.
### Parameters
@@ -412,7 +419,7 @@ incomplete
static SkImageInfo MakeN32Premul(int width, int height, sk_sp&lt;SkColorSpace&gt; cs = nullptr)
</pre>
-Sets colortype to <a href="SkImageInfo_Reference#SkColorType">kN32 SkColorType</a>, and the alphatype to premul.
+Sets <a href="SkImageInfo_Reference#Color_Type">Color Type</a> to <a href="SkImageInfo_Reference#SkColorType">kN32 SkColorType</a>, and the <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> to <a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>.
### Parameters
@@ -784,7 +791,7 @@ incomplete
SkImageInfo makeWH(int newWidth, int newHeight) const
</pre>
-Creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with the same colortype and alphatype as this info,
+Creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with the same <a href="SkImageInfo_Reference#Color_Type">Color Type</a> and <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> as this info,
but with the specified width and height.
### Parameters
diff --git a/site/user/api/SkImage_Reference.md b/site/user/api/SkImage_Reference.md
index 019f23c4be..bf5e0cabee 100644
--- a/site/user/api/SkImage_Reference.md
+++ b/site/user/api/SkImage_Reference.md
@@ -5,19 +5,19 @@ SkImage Reference
## <a name="Overview"></a> Overview
-## <a name="Subtopics"></a> Subtopics
+## <a name="Subtopic"></a> Subtopic
| name | description |
| --- | --- |
-| <a href="#Classes_and_Structs">Classes and Structs</a> | embedded struct and class members |
-| Constants | enum and enum class, const values |
-| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkImage_Reference#SkImage">SkImage</a> |
-| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
-| <a href="#Related_Functions">Related Functions</a> | similar methods grouped together |
+| <a href="#Class_or_Struct">Class or Struct</a> | embedded struct and class members |
+| Constant | enum and enum class, const values |
+| <a href="#Constructor">Constructor</a> | functions that construct <a href="SkImage_Reference#SkImage">SkImage</a> |
+| <a href="#Member_Function">Member Function</a> | static functions and member methods |
+| <a href="#Related_Function">Related Function</a> | similar methods grouped together |
# <a name="SkImage"></a> Class SkImage
<a href="#Image">Image</a> describes a two dimensional array of pixels to draw. The pixels may be
-unencoded in a <a href="undocumented#Raster_Bitmap">Raster Bitmap</a>, encoded in a <a href="undocumented#Picture">Picture</a> or compressed data stream,
+decoded in a <a href="undocumented#Raster_Bitmap">Raster Bitmap</a>, encoded in a <a href="undocumented#Picture">Picture</a> or compressed data stream,
or located in GPU memory as a <a href="undocumented#GPU_Texture">GPU Texture</a>.
<a href="#Image">Image</a> cannot be modified after it is created. <a href="#Image">Image</a> may allocate additional
@@ -28,12 +28,12 @@ or height returns <a href="#Image">Image</a> equal to nullptr.
<a href="#Image">Image</a> may be created from <a href="SkBitmap_Reference#Bitmap">Bitmap</a>, <a href="SkPixmap_Reference#Pixmap">Pixmap</a>, <a href="SkSurface_Reference#Surface">Surface</a>, <a href="undocumented#Picture">Picture</a>, encoded streams,
<a href="undocumented#GPU_Texture">GPU Texture</a>, <a href="undocumented#YUV_ColorSpace">YUV ColorSpace</a> data, or hardware buffer. Encoded streams supported
-include BMP, GIF, HEIF, ICO, JPEG, PNG, WBMP, WebP. Supported encodings details
+include BMP, GIF, HEIF, ICO, JPEG, PNG, WBMP, WebP. Supported encoding details
vary with platform.
## <a name="Raster_Image"></a> Raster Image
-<a href="SkImage_Reference#Raster_Image">Raster Image</a> pixels are unencoded in a <a href="undocumented#Raster_Bitmap">Raster Bitmap</a>. These pixels may be read
+<a href="SkImage_Reference#Raster_Image">Raster Image</a> pixels are decoded in a <a href="undocumented#Raster_Bitmap">Raster Bitmap</a>. These pixels may be read
directly and in most cases written to, although edited pixels may not be drawn
if <a href="#Image">Image</a> has been copied internally.
@@ -50,98 +50,93 @@ performance.
<a href="#Image">Image</a> is drawn. <a href="#Lazy_Image">Lazy Image</a> caches result if possible to speed up repeated
drawing.
-## <a name="Related_Functions"></a> Related Functions
+## <a name="Related_Function"></a> Related Function
| name | description |
| --- | --- |
| <a href="#Lazy_Image">Lazy Image</a> | deferred pixel buffer |
-| <a href="SkImage_Reference#Raster_Image">Raster Image</a> | pixels unencoded in <a href="undocumented#Raster_Bitmap">Raster Bitmap</a> |
+| <a href="SkImage_Reference#Raster_Image">Raster Image</a> | pixels decoded in <a href="undocumented#Raster_Bitmap">Raster Bitmap</a> |
| <a href="#Texture_Image">Texture Image</a> | pixels located on GPU |
-## <a name="Classes_and_Structs"></a> Classes and Structs
+## <a name="Class_or_Struct"></a> Class or Struct
| name | description |
| --- | --- |
-| <a href="#SkImage_DeferredTextureImageUsageParams">DeferredTextureImageUsageParams</a> | to be deprecated |
-## <a name="Constructors"></a> Constructors
+## <a name="Constructor"></a> Constructor
| name | description |
| --- | --- |
-| <a href="#SkImage_MakeBackendTextureFromSkImage">MakeBackendTextureFromSkImage</a> | Creates <a href="undocumented#GPU_Texture">GPU Texture</a> from <a href="#Image">Image</a>. |
-| <a href="#SkImage_MakeCrossContextFromEncoded">MakeCrossContextFromEncoded</a> | Creates <a href="#Image">Image</a> from encoded data, and uploads to GPU. |
-| <a href="#SkImage_MakeCrossContextFromPixmap">MakeCrossContextFromPixmap</a> | Creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixmap</a>, and uploads to GPU. |
-| <a href="#SkImage_MakeFromAHardwareBuffer">MakeFromAHardwareBuffer</a> | Creates <a href="#Image">Image</a> from Android hardware buffer. |
-| <a href="#SkImage_MakeFromAdoptedTexture">MakeFromAdoptedTexture</a> | Creates <a href="#Image">Image</a> from <a href="undocumented#GPU_Texture">GPU Texture</a>, managed internally. |
-| <a href="#SkImage_MakeFromBitmap">MakeFromBitmap</a> | Creates <a href="#Image">Image</a> from <a href="SkBitmap_Reference#Bitmap">Bitmap</a>, sharing or copying pixels. |
-| <a href="#SkImage_MakeFromDeferredTextureImageData">MakeFromDeferredTextureImageData</a> | To be deprecated. |
-| <a href="#SkImage_MakeFromEncoded">MakeFromEncoded</a> | Creates <a href="#Image">Image</a> from encoded data. |
-| <a href="#SkImage_MakeFromGenerator">MakeFromGenerator</a> | Creates <a href="#Image">Image</a> from a stream of data. |
-| <a href="#SkImage_MakeFromNV12TexturesCopy">MakeFromNV12TexturesCopy</a> | Creates <a href="#Image">Image</a> from <a href="undocumented#YUV_ColorSpace">YUV ColorSpace</a> data in two planes. |
-| <a href="#SkImage_MakeFromPicture">MakeFromPicture</a> | Creates <a href="#Image">Image</a> from <a href="undocumented#Picture">Picture</a>. |
-| <a href="#SkImage_MakeFromRaster">MakeFromRaster</a> | Creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixmap</a>, with release. |
-| <a href="#SkImage_MakeFromTexture">MakeFromTexture</a> | Creates <a href="#Image">Image</a> from <a href="undocumented#GPU_Texture">GPU Texture</a>, managed externally. |
-| <a href="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a> | Creates <a href="#Image">Image</a> from <a href="undocumented#YUV_ColorSpace">YUV ColorSpace</a> data in three planes. |
-| <a href="#SkImage_MakeRasterCopy">MakeRasterCopy</a> | Creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixmap</a> and copied pixels. |
-| <a href="#SkImage_MakeRasterData">MakeRasterData</a> | Creates <a href="#Image">Image</a> from <a href="#Info">Image Info</a> and shared pixels. |
-| <a href="#SkImage_makeColorSpace">makeColorSpace</a> | Creates <a href="#Image">Image</a> matching <a href="undocumented#Color_Space">Color Space</a> if possible. |
-| <a href="#SkImage_makeNonTextureImage">makeNonTextureImage</a> | Creates <a href="#Image">Image</a> without dependency on <a href="undocumented#GPU_Texture">GPU Texture</a>. |
-| <a href="#SkImage_makeRasterImage">makeRasterImage</a> | Creates <a href="#Image">Image</a> compatible with <a href="undocumented#Raster_Surface">Raster Surface</a> if possible. |
-| <a href="#SkImage_makeShader">makeShader</a> | Creates <a href="undocumented#Shader">Shader</a>, <a href="SkPaint_Reference#Paint">Paint</a> element that can tile <a href="#Image">Image</a>. |
-| <a href="#SkImage_makeSubset">makeSubset</a> | Creates <a href="#Image">Image</a> containing part of original. |
-| <a href="#SkImage_makeTextureImage">makeTextureImage</a> | Creates <a href="#Image">Image</a> matching <a href="undocumented#Color_Space">Color Space</a> if possible. |
-| <a href="#SkImage_makeWithFilter">makeWithFilter</a> | Creates filtered, clipped <a href="#Image">Image</a>. |
-
-## <a name="Member_Functions"></a> Member Functions
+| <a href="#SkImage_MakeBackendTextureFromSkImage">MakeBackendTextureFromSkImage</a> | creates <a href="undocumented#GPU_Texture">GPU Texture</a> from <a href="#Image">Image</a> |
+| <a href="#SkImage_MakeCrossContextFromEncoded">MakeCrossContextFromEncoded</a> | creates <a href="#Image">Image</a> from encoded data, and uploads to GPU |
+| <a href="#SkImage_MakeCrossContextFromPixmap">MakeCrossContextFromPixmap</a> | creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixmap</a>, and uploads to GPU |
+| <a href="#SkImage_MakeFromAHardwareBuffer">MakeFromAHardwareBuffer</a> | creates <a href="#Image">Image</a> from Android hardware buffer |
+| <a href="#SkImage_MakeFromBitmap">MakeFromBitmap</a> | creates <a href="#Image">Image</a> from <a href="SkBitmap_Reference#Bitmap">Bitmap</a>, sharing or copying pixels |
+| <a href="#SkImage_MakeFromEncoded">MakeFromEncoded</a> | creates <a href="#Image">Image</a> from encoded data |
+| <a href="#SkImage_MakeFromGenerator">MakeFromGenerator</a> | creates <a href="#Image">Image</a> from a stream of data |
+| <a href="#SkImage_MakeFromNV12TexturesCopy">MakeFromNV12TexturesCopy</a> | creates <a href="#Image">Image</a> from <a href="undocumented#YUV_ColorSpace">YUV ColorSpace</a> data in two planes |
+| | <a href="#SkImage_MakeFromNV12TexturesCopy">MakeFromNV12TexturesCopy</a> |
+| <a href="#SkImage_MakeFromPicture">MakeFromPicture</a> | creates <a href="#Image">Image</a> from <a href="undocumented#Picture">Picture</a> |
+| <a href="#SkImage_MakeFromRaster">MakeFromRaster</a> | creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixmap</a>, with release |
+| <a href="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a> | creates <a href="#Image">Image</a> from <a href="undocumented#YUV_ColorSpace">YUV ColorSpace</a> data in three planes |
+| | <a href="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a> |
+| <a href="#SkImage_MakeRasterCopy">MakeRasterCopy</a> | creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixmap</a> and copied pixels |
+| <a href="#SkImage_MakeRasterData">MakeRasterData</a> | creates <a href="#Image">Image</a> from <a href="#Info">Image Info</a> and shared pixels |
+| <a href="#SkImage_asLegacyBitmap">asLegacyBitmap</a> | returns as <a href="undocumented#Raster_Bitmap">Raster Bitmap</a> |
+| <a href="#SkImage_makeColorSpace">makeColorSpace</a> | creates <a href="#Image">Image</a> matching <a href="undocumented#Color_Space">Color Space</a> if possible |
+| <a href="#SkImage_makeNonTextureImage">makeNonTextureImage</a> | creates <a href="#Image">Image</a> without dependency on <a href="undocumented#GPU_Texture">GPU Texture</a> |
+| <a href="#SkImage_makeRasterImage">makeRasterImage</a> | creates <a href="#Image">Image</a> compatible with <a href="undocumented#Raster_Surface">Raster Surface</a> if possible |
+| <a href="#SkImage_makeShader">makeShader</a> | creates <a href="undocumented#Shader">Shader</a>, <a href="SkPaint_Reference#Paint">Paint</a> element that can tile <a href="#Image">Image</a> |
+| | <a href="#SkImage_makeShader">makeShader</a> |
+| <a href="#SkImage_makeSubset">makeSubset</a> | creates <a href="#Image">Image</a> containing part of original |
+| <a href="#SkImage_makeTextureImage">makeTextureImage</a> | creates <a href="#Image">Image</a> matching <a href="undocumented#Color_Space">Color Space</a> if possible |
+| <a href="#SkImage_makeWithFilter">makeWithFilter</a> | creates filtered, clipped <a href="#Image">Image</a> |
+
+## <a name="Member_Function"></a> Member Function
| name | description |
| --- | --- |
-| <a href="#SkImage_MakeBackendTextureFromSkImage">MakeBackendTextureFromSkImage</a> | Creates <a href="undocumented#GPU_Texture">GPU Texture</a> from <a href="#Image">Image</a>. |
-| <a href="#SkImage_MakeCrossContextFromEncoded">MakeCrossContextFromEncoded</a> | Creates <a href="#Image">Image</a> from encoded data, and uploads to GPU. |
-| <a href="#SkImage_MakeCrossContextFromPixmap">MakeCrossContextFromPixmap</a> | Creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixmap</a>, and uploads to GPU. |
-| <a href="#SkImage_MakeFromAHardwareBuffer">MakeFromAHardwareBuffer</a> | Creates <a href="#Image">Image</a> from Android hardware buffer. |
-| <a href="#SkImage_MakeFromAdoptedTexture">MakeFromAdoptedTexture</a> | Creates <a href="#Image">Image</a> from <a href="undocumented#GPU_Texture">GPU Texture</a>, managed internally. |
-| <a href="#SkImage_MakeFromBitmap">MakeFromBitmap</a> | Creates <a href="#Image">Image</a> from <a href="SkBitmap_Reference#Bitmap">Bitmap</a>, sharing or copying pixels. |
-| <a href="#SkImage_MakeFromDeferredTextureImageData">MakeFromDeferredTextureImageData</a> | To be deprecated. |
-| <a href="#SkImage_MakeFromEncoded">MakeFromEncoded</a> | Creates <a href="#Image">Image</a> from encoded data. |
-| <a href="#SkImage_MakeFromGenerator">MakeFromGenerator</a> | Creates <a href="#Image">Image</a> from a stream of data. |
-| <a href="#SkImage_MakeFromNV12TexturesCopy">MakeFromNV12TexturesCopy</a> | Creates <a href="#Image">Image</a> from <a href="undocumented#YUV_ColorSpace">YUV ColorSpace</a> data in two planes. |
-| <a href="#SkImage_MakeFromPicture">MakeFromPicture</a> | Creates <a href="#Image">Image</a> from <a href="undocumented#Picture">Picture</a>. |
-| <a href="#SkImage_MakeFromRaster">MakeFromRaster</a> | Creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixmap</a>, with release. |
-| <a href="#SkImage_MakeFromTexture">MakeFromTexture</a> | Creates <a href="#Image">Image</a> from <a href="undocumented#GPU_Texture">GPU Texture</a>, managed externally. |
-| <a href="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a> | Creates <a href="#Image">Image</a> from <a href="undocumented#YUV_ColorSpace">YUV ColorSpace</a> data in three planes. |
-| <a href="#SkImage_MakeRasterCopy">MakeRasterCopy</a> | Creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixmap</a> and copied pixels. |
-| <a href="#SkImage_MakeRasterData">MakeRasterData</a> | Creates <a href="#Image">Image</a> from <a href="#Info">Image Info</a> and shared pixels. |
-| <a href="#SkImage_alphaType">alphaType</a> | Returns <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>. |
-| <a href="#SkImage_asLegacyBitmap">asLegacyBitmap</a> | Returns as <a href="undocumented#Raster_Bitmap">Raster Bitmap</a>. |
-| <a href="#SkImage_bounds">bounds</a> | Returns <a href="#SkImage_width">width</a> and <a href="#SkImage_height">height</a> as Rectangle. |
-| <a href="#SkImage_colorSpace">colorSpace</a> | Returns <a href="undocumented#Color_Space">Color Space</a>. |
-| <a href="#SkImage_dimensions">dimensions</a> | Returns <a href="#SkImage_width">width</a> and <a href="#SkImage_height">height</a>. |
-| <a href="#SkImage_encodeToData">encodeToData</a> | Returns encoded <a href="#Image">Image</a> as <a href="undocumented#SkData">SkData</a>. |
-| <a href="#SkImage_getDeferredTextureImageData">getDeferredTextureImageData</a> | To be deprecated. |
-| <a href="#SkImage_getTexture">getTexture</a> | Deprecated. |
-| <a href="#SkImage_getTextureHandle">getTextureHandle</a> | Returns GPU reference to <a href="#Image">Image</a> as texture. |
-| <a href="#SkImage_height">height</a> | Returns pixel row count. |
-| <a href="#SkImage_isAlphaOnly">isAlphaOnly</a> | Returns if pixels represent a transparency mask. |
-| <a href="#SkImage_isLazyGenerated">isLazyGenerated</a> | Returns if <a href="#Image">Image</a> is created as needed. |
-| <a href="#SkImage_isOpaque">isOpaque</a> | Returns if <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> is <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>. |
-| <a href="#SkImage_isTextureBacked">isTextureBacked</a> | Returns if <a href="#Image">Image</a> was created from <a href="undocumented#GPU_Texture">GPU Texture</a>. |
-| <a href="#SkImage_isValid">isValid</a> | Returns if <a href="#Image">Image</a> can draw to <a href="undocumented#Raster_Surface">Raster Surface</a> or <a href="undocumented#GPU_Context">GPU Context</a>. |
-| <a href="#SkImage_makeColorSpace">makeColorSpace</a> | Creates <a href="#Image">Image</a> matching <a href="undocumented#Color_Space">Color Space</a> if possible. |
-| <a href="#SkImage_makeNonTextureImage">makeNonTextureImage</a> | Creates <a href="#Image">Image</a> without dependency on <a href="undocumented#GPU_Texture">GPU Texture</a>. |
-| <a href="#SkImage_makeRasterImage">makeRasterImage</a> | Creates <a href="#Image">Image</a> compatible with <a href="undocumented#Raster_Surface">Raster Surface</a> if possible. |
-| <a href="#SkImage_makeShader">makeShader</a> | Creates <a href="undocumented#Shader">Shader</a>, <a href="SkPaint_Reference#Paint">Paint</a> element that can tile <a href="#Image">Image</a>. |
-| <a href="#SkImage_makeSubset">makeSubset</a> | Creates <a href="#Image">Image</a> containing part of original. |
-| <a href="#SkImage_makeTextureImage">makeTextureImage</a> | Creates <a href="#Image">Image</a> matching <a href="undocumented#Color_Space">Color Space</a> if possible. |
-| <a href="#SkImage_makeWithFilter">makeWithFilter</a> | Creates filtered, clipped <a href="#Image">Image</a>. |
-| <a href="#SkImage_peekPixels">peekPixels</a> | Returns <a href="SkPixmap_Reference#Pixmap">Pixmap</a> if possible. |
-| <a href="#SkImage_readPixels">readPixels</a> | Copies and converts pixels. |
-| <a href="#SkImage_refColorSpace">refColorSpace</a> | Returns <a href="#Info">Image Info</a> <a href="undocumented#Color_Space">Color Space</a>. |
-| <a href="#SkImage_refEncodedData">refEncodedData</a> | Returns <a href="#Image">Image</a> encoded in <a href="undocumented#SkData">SkData</a> if present. |
-| <a href="#SkImage_scalePixels">scalePixels</a> | Scales and converts one <a href="#Image">Image</a> to another. |
-| <a href="#SkImage_toString">toString</a> | Converts <a href="#Image">Image</a> to machine readable form. |
-| <a href="#SkImage_uniqueID">uniqueID</a> | Identifier for <a href="#Image">Image</a>. |
-| <a href="#SkImage_width">width</a> | Returns pixel column count. |
+| <a href="#SkImage_MakeBackendTextureFromSkImage">MakeBackendTextureFromSkImage</a> | creates <a href="undocumented#GPU_Texture">GPU Texture</a> from <a href="#Image">Image</a> |
+| <a href="#SkImage_MakeCrossContextFromEncoded">MakeCrossContextFromEncoded</a> | creates <a href="#Image">Image</a> from encoded data, and uploads to GPU |
+| <a href="#SkImage_MakeCrossContextFromPixmap">MakeCrossContextFromPixmap</a> | creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixmap</a>, and uploads to GPU |
+| <a href="#SkImage_MakeFromAHardwareBuffer">MakeFromAHardwareBuffer</a> | creates <a href="#Image">Image</a> from Android hardware buffer |
+| <a href="#SkImage_MakeFromBitmap">MakeFromBitmap</a> | creates <a href="#Image">Image</a> from <a href="SkBitmap_Reference#Bitmap">Bitmap</a>, sharing or copying pixels |
+| <a href="#SkImage_MakeFromEncoded">MakeFromEncoded</a> | creates <a href="#Image">Image</a> from encoded data |
+| <a href="#SkImage_MakeFromGenerator">MakeFromGenerator</a> | creates <a href="#Image">Image</a> from a stream of data |
+| <a href="#SkImage_MakeFromNV12TexturesCopy">MakeFromNV12TexturesCopy</a> | creates <a href="#Image">Image</a> from <a href="undocumented#YUV_ColorSpace">YUV ColorSpace</a> data in two planes |
+| <a href="#SkImage_MakeFromPicture">MakeFromPicture</a> | creates <a href="#Image">Image</a> from <a href="undocumented#Picture">Picture</a> |
+| <a href="#SkImage_MakeFromRaster">MakeFromRaster</a> | creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixmap</a>, with release |
+| <a href="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a> | creates <a href="#Image">Image</a> from <a href="undocumented#YUV_ColorSpace">YUV ColorSpace</a> data in three planes |
+| <a href="#SkImage_MakeRasterCopy">MakeRasterCopy</a> | creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixmap</a> and copied pixels |
+| <a href="#SkImage_MakeRasterData">MakeRasterData</a> | creates <a href="#Image">Image</a> from <a href="#Info">Image Info</a> and shared pixels |
+| <a href="#SkImage_alphaType">alphaType</a> | returns <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> |
+| <a href="#SkImage_asLegacyBitmap">asLegacyBitmap</a> | returns as <a href="undocumented#Raster_Bitmap">Raster Bitmap</a> |
+| <a href="#SkImage_bounds">bounds</a> | returns <a href="#SkImage_width">width</a> and <a href="#SkImage_height">height</a> as Rectangle |
+| <a href="#SkImage_colorSpace">colorSpace</a> | returns <a href="undocumented#Color_Space">Color Space</a> |
+| <a href="#SkImage_dimensions">dimensions</a> | returns <a href="#SkImage_width">width</a> and <a href="#SkImage_height">height</a> |
+| <a href="#SkImage_encodeToData">encodeToData</a> | returns encoded <a href="#Image">Image</a> as <a href="undocumented#SkData">SkData</a> |
+| <a href="#SkImage_getTextureHandle">getTextureHandle</a> | returns GPU reference to <a href="#Image">Image</a> as texture |
+| <a href="#SkImage_height">height</a> | returns pixel row count |
+| <a href="#SkImage_isAlphaOnly">isAlphaOnly</a> | returns if pixels represent a transparency mask |
+| <a href="#SkImage_isLazyGenerated">isLazyGenerated</a> | returns if <a href="#Image">Image</a> is created as needed |
+| <a href="#SkImage_isOpaque">isOpaque</a> | returns if <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> is <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a> |
+| <a href="#SkImage_isTextureBacked">isTextureBacked</a> | returns if <a href="#Image">Image</a> was created from <a href="undocumented#GPU_Texture">GPU Texture</a> |
+| <a href="#SkImage_isValid">isValid</a> | returns if <a href="#Image">Image</a> can draw to <a href="undocumented#Raster_Surface">Raster Surface</a> or <a href="undocumented#GPU_Context">GPU Context</a> |
+| <a href="#SkImage_makeColorSpace">makeColorSpace</a> | creates <a href="#Image">Image</a> matching <a href="undocumented#Color_Space">Color Space</a> if possible |
+| <a href="#SkImage_makeNonTextureImage">makeNonTextureImage</a> | creates <a href="#Image">Image</a> without dependency on <a href="undocumented#GPU_Texture">GPU Texture</a> |
+| <a href="#SkImage_makeRasterImage">makeRasterImage</a> | creates <a href="#Image">Image</a> compatible with <a href="undocumented#Raster_Surface">Raster Surface</a> if possible |
+| <a href="#SkImage_makeShader">makeShader</a> | creates <a href="undocumented#Shader">Shader</a>, <a href="SkPaint_Reference#Paint">Paint</a> element that can tile <a href="#Image">Image</a> |
+| <a href="#SkImage_makeSubset">makeSubset</a> | creates <a href="#Image">Image</a> containing part of original |
+| <a href="#SkImage_makeTextureImage">makeTextureImage</a> | creates <a href="#Image">Image</a> matching <a href="undocumented#Color_Space">Color Space</a> if possible |
+| <a href="#SkImage_makeWithFilter">makeWithFilter</a> | creates filtered, clipped <a href="#Image">Image</a> |
+| <a href="#SkImage_peekPixels">peekPixels</a> | returns <a href="SkPixmap_Reference#Pixmap">Pixmap</a> if possible |
+| <a href="#SkImage_readPixels">readPixels</a> | copies and converts pixels |
+| <a href="#SkImage_refColorSpace">refColorSpace</a> | returns <a href="#Info">Image Info</a> <a href="undocumented#Color_Space">Color Space</a> |
+| <a href="#SkImage_refEncodedData">refEncodedData</a> | returns <a href="#Image">Image</a> encoded in <a href="undocumented#SkData">SkData</a> if present |
+| <a href="#SkImage_scalePixels">scalePixels</a> | scales and converts one <a href="#Image">Image</a> to another |
+| <a href="#SkImage_toString">toString</a> | converts <a href="#Image">Image</a> to machine readable form |
+| <a href="#SkImage_uniqueID">uniqueID</a> | identifier for <a href="#Image">Image</a> |
+| <a href="#SkImage_width">width</a> | returns pixel column count |
<a name="SkImage_MakeRasterCopy"></a>
## MakeRasterCopy
@@ -390,7 +385,7 @@ Creates <a href="#Image">Image</a> from <a href="#SkImage_MakeFromEncoded_encode
otherwise, <a href="#SkImage_MakeFromEncoded_subset">subset</a> must be contained by image bounds.
<a href="#Image">Image</a> is returned if format of the <a href="#SkImage_MakeFromEncoded_encoded">encoded</a> data is recognized and supported.
-Recognized formats vary by platfrom.
+Recognized formats vary by platform.
### Parameters
@@ -424,28 +419,6 @@ static sk_sp&lt;SkImage&gt; MakeFromTexture(GrContext* context, const GrBackendT
sk_sp&lt;SkColorSpace&gt; colorSpace)
</pre>
-Deprecated.
-
-### Parameters
-
-<table> <tr> <td><a name="SkImage_MakeFromTexture_context"> <code><strong>context </strong></code> </a></td> <td>
-<a href="undocumented#GPU_Context">GPU Context</a></td>
- </tr> <tr> <td><a name="SkImage_MakeFromTexture_backendTexture"> <code><strong>backendTexture </strong></code> </a></td> <td>
-texture residing on GPU</td>
- </tr> <tr> <td><a name="SkImage_MakeFromTexture_origin"> <code><strong>origin </strong></code> </a></td> <td>
-one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>, <a href="undocumented#GrSurfaceOrigin">kTopLeft GrSurfaceOrigin</a></td>
- </tr> <tr> <td><a name="SkImage_MakeFromTexture_alphaType"> <code><strong>alphaType </strong></code> </a></td> <td>
-one of: <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>,
-<a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnpremul SkAlphaType</a></td>
- </tr> <tr> <td><a name="SkImage_MakeFromTexture_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
-range of colors; may be nullptr</td>
- </tr>
-</table>
-
-### Return Value
-
-created <a href="#Image">Image</a>, or nullptr
-
---
<a name="SkImage_MakeFromTexture_2"></a>
@@ -458,32 +431,6 @@ static sk_sp&lt;SkImage&gt; MakeFromTexture(GrContext* context, const GrBackendT
ReleaseContext releaseContext)
</pre>
-Deprecated.
-
-### Parameters
-
-<table> <tr> <td><a name="SkImage_MakeFromTexture_2_context"> <code><strong>context </strong></code> </a></td> <td>
-<a href="undocumented#GPU_Context">GPU Context</a></td>
- </tr> <tr> <td><a name="SkImage_MakeFromTexture_2_backendTexture"> <code><strong>backendTexture </strong></code> </a></td> <td>
-texture residing on GPU</td>
- </tr> <tr> <td><a name="SkImage_MakeFromTexture_2_origin"> <code><strong>origin </strong></code> </a></td> <td>
-one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>, <a href="undocumented#GrSurfaceOrigin">kTopLeft GrSurfaceOrigin</a></td>
- </tr> <tr> <td><a name="SkImage_MakeFromTexture_2_alphaType"> <code><strong>alphaType </strong></code> </a></td> <td>
-one of: <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>,
-<a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnpremul SkAlphaType</a></td>
- </tr> <tr> <td><a name="SkImage_MakeFromTexture_2_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
-range of colors; may be nullptr</td>
- </tr> <tr> <td><a name="SkImage_MakeFromTexture_2_textureReleaseProc"> <code><strong>textureReleaseProc </strong></code> </a></td> <td>
-function called when texture can be released</td>
- </tr> <tr> <td><a name="SkImage_MakeFromTexture_2_releaseContext"> <code><strong>releaseContext </strong></code> </a></td> <td>
-state passed to <a href="#SkImage_MakeFromTexture_2_textureReleaseProc">textureReleaseProc</a></td>
- </tr>
-</table>
-
-### Return Value
-
-created <a href="#Image">Image</a>, or nullptr
-
---
<a name="SkImage_MakeFromTexture_3"></a>
@@ -624,7 +571,7 @@ moving resources between contexts.
</tr> <tr> <td><a name="SkImage_MakeCrossContextFromEncoded_data"> <code><strong>data </strong></code> </a></td> <td>
<a href="#Image">Image</a> to decode</td>
</tr> <tr> <td><a name="SkImage_MakeCrossContextFromEncoded_buildMips"> <code><strong>buildMips </strong></code> </a></td> <td>
-create <a href="#Image">Image</a> as <a href="undocumented#Mip_Map">Mip Map</a> if true</td>
+create <a href="#Image">Image</a> as Mip_Map if true</td>
</tr> <tr> <td><a name="SkImage_MakeCrossContextFromEncoded_dstColorSpace"> <code><strong>dstColorSpace </strong></code> </a></td> <td>
range of colors of matching <a href="SkSurface_Reference#Surface">Surface</a> on GPU</td>
</tr>
@@ -677,7 +624,7 @@ Recognized GPU formats vary by platform and GPU back-end.
</tr> <tr> <td><a name="SkImage_MakeCrossContextFromPixmap_pixmap"> <code><strong>pixmap </strong></code> </a></td> <td>
<a href="#Info">Image Info</a>, pixel address, and row bytes</td>
</tr> <tr> <td><a name="SkImage_MakeCrossContextFromPixmap_buildMips"> <code><strong>buildMips </strong></code> </a></td> <td>
-create <a href="#Image">Image</a> as <a href="undocumented#Mip_Map">Mip Map</a> if true</td>
+create <a href="#Image">Image</a> as Mip_Map if true</td>
</tr> <tr> <td><a name="SkImage_MakeCrossContextFromPixmap_dstColorSpace"> <code><strong>dstColorSpace </strong></code> </a></td> <td>
range of colors of matching <a href="SkSurface_Reference#Surface">Surface</a> on GPU</td>
</tr>
@@ -708,32 +655,6 @@ static sk_sp&lt;SkImage&gt; MakeFromAdoptedTexture(GrContext* context,
sk_sp&lt;SkColorSpace&gt; colorSpace = nullptr)
</pre>
-Deprecated.
-
-### Parameters
-
-<table> <tr> <td><a name="SkImage_MakeFromAdoptedTexture_context"> <code><strong>context </strong></code> </a></td> <td>
-<a href="undocumented#GPU_Context">GPU Context</a></td>
- </tr> <tr> <td><a name="SkImage_MakeFromAdoptedTexture_backendTexture"> <code><strong>backendTexture </strong></code> </a></td> <td>
-texture residing on GPU</td>
- </tr> <tr> <td><a name="SkImage_MakeFromAdoptedTexture_surfaceOrigin"> <code><strong>surfaceOrigin </strong></code> </a></td> <td>
-one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>, <a href="undocumented#GrSurfaceOrigin">kTopLeft GrSurfaceOrigin</a></td>
- </tr> <tr> <td><a name="SkImage_MakeFromAdoptedTexture_alphaType"> <code><strong>alphaType </strong></code> </a></td> <td>
-one of: <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>,
-<a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnpremul SkAlphaType</a></td>
- </tr> <tr> <td><a name="SkImage_MakeFromAdoptedTexture_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
-range of colors; may be nullptr</td>
- </tr>
-</table>
-
-### Return Value
-
-created <a href="#Image">Image</a>, or nullptr
-
-### See Also
-
-<a href="#SkImage_MakeFromTexture">MakeFromTexture</a><sup><a href="#SkImage_MakeFromTexture_2">[2]</a></sup><sup><a href="#SkImage_MakeFromTexture_3">[3]</a></sup><sup><a href="#SkImage_MakeFromTexture_4">[4]</a></sup> <a href="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a><sup><a href="#SkImage_MakeFromYUVTexturesCopy_2">[2]</a></sup>
-
---
<a name="SkImage_MakeFromAdoptedTexture_2"></a>
@@ -800,7 +721,7 @@ static sk_sp&lt;SkImage&gt; MakeFromYUVTexturesCopy(GrContext* context, SkYUVCol
Creates <a href="#Image">Image</a> from copy of <a href="#SkImage_MakeFromYUVTexturesCopy_yuvTextureHandles">yuvTextureHandles</a>, an array of textures on GPU.
<a href="#SkImage_MakeFromYUVTexturesCopy_yuvTextureHandles">yuvTextureHandles</a> contain pixels for YUV planes of <a href="#Image">Image</a>.
-<a href="#SkImage_MakeFromYUVTexturesCopy_yuvSizes">yuvSizes</a> conain dimensions for each pixel plane. Dimensions must be greater than
+<a href="#SkImage_MakeFromYUVTexturesCopy_yuvSizes">yuvSizes</a> contain dimensions for each pixel plane. Dimensions must be greater than
zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has the dimensions
<a href="#SkImage_MakeFromYUVTexturesCopy_yuvSizes">yuvSizes</a>[0]. <a href="#SkImage_MakeFromYUVTexturesCopy_yuvColorSpace">yuvColorSpace</a> describes how YUV colors convert to RGB colors.
@@ -809,8 +730,8 @@ zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has
<table> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_context"> <code><strong>context </strong></code> </a></td> <td>
<a href="undocumented#GPU_Context">GPU Context</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_yuvColorSpace"> <code><strong>yuvColorSpace </strong></code> </a></td> <td>
-one of: <a href="undocumented#YUV_ColorSpace">kJPEG SkYUVColorSpace</a>, <a href="undocumented#YUV_ColorSpace">kRec601 SkYUVColorSpace</a>,
-<a href="undocumented#YUV_ColorSpace">kRec709 SkYUVColorSpace</a></td>
+one of: <a href="SkImageInfo_Reference#SkYUVColorSpace">kJPEG SkYUVColorSpace</a>, <a href="SkImageInfo_Reference#SkYUVColorSpace">kRec601 SkYUVColorSpace</a>,
+<a href="SkImageInfo_Reference#SkYUVColorSpace">kRec709 SkYUVColorSpace</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_yuvTextureHandles"> <code><strong>yuvTextureHandles </strong></code> </a></td> <td>
array of YUV textures on GPU</td>
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_yuvSizes"> <code><strong>yuvSizes </strong></code> </a></td> <td>
@@ -844,7 +765,7 @@ static sk_sp&lt;SkImage&gt; MakeFromYUVTexturesCopy(GrContext* context, SkYUVCol
Creates <a href="#Image">Image</a> from copy of <a href="#SkImage_MakeFromYUVTexturesCopy_2_yuvTextureHandles">yuvTextureHandles</a>, an array of textures on GPU.
<a href="#SkImage_MakeFromYUVTexturesCopy_2_yuvTextureHandles">yuvTextureHandles</a> contain pixels for YUV planes of <a href="#Image">Image</a>.
-<a href="#SkImage_MakeFromYUVTexturesCopy_2_yuvSizes">yuvSizes</a> conain dimensions for each pixel plane. Dimensions must be greater than
+<a href="#SkImage_MakeFromYUVTexturesCopy_2_yuvSizes">yuvSizes</a> contain dimensions for each pixel plane. Dimensions must be greater than
zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has the dimensions
<a href="#SkImage_MakeFromYUVTexturesCopy_2_yuvSizes">yuvSizes</a>[0]. <a href="#SkImage_MakeFromYUVTexturesCopy_2_yuvColorSpace">yuvColorSpace</a> describes how YUV colors convert to RGB colors.
@@ -853,8 +774,8 @@ zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has
<table> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_2_context"> <code><strong>context </strong></code> </a></td> <td>
<a href="undocumented#GPU_Context">GPU Context</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_2_yuvColorSpace"> <code><strong>yuvColorSpace </strong></code> </a></td> <td>
-one of: <a href="undocumented#YUV_ColorSpace">kJPEG SkYUVColorSpace</a>, <a href="undocumented#YUV_ColorSpace">kRec601 SkYUVColorSpace</a>,
-<a href="undocumented#YUV_ColorSpace">kRec709 SkYUVColorSpace</a></td>
+one of: <a href="SkImageInfo_Reference#SkYUVColorSpace">kJPEG SkYUVColorSpace</a>, <a href="SkImageInfo_Reference#SkYUVColorSpace">kRec601 SkYUVColorSpace</a>,
+<a href="SkImageInfo_Reference#SkYUVColorSpace">kRec709 SkYUVColorSpace</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_2_yuvTextureHandles"> <code><strong>yuvTextureHandles </strong></code> </a></td> <td>
array of YUV textures on GPU</td>
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_2_yuvSizes"> <code><strong>yuvSizes </strong></code> </a></td> <td>
@@ -891,7 +812,7 @@ Creates <a href="#Image">Image</a> from copy of <a href="#SkImage_MakeFromNV12Te
<a href="#SkImage_MakeFromNV12TexturesCopy_nv12TextureHandles">nv12TextureHandles</a>[0] contains pixels for YUV_Component_Y plane.
<a href="#SkImage_MakeFromNV12TexturesCopy_nv12TextureHandles">nv12TextureHandles</a>[1] contains pixels for YUV_Component_U plane,
followed by pixels for YUV_Component_V plane.
-<a href="#SkImage_MakeFromNV12TexturesCopy_nv12Sizes">nv12Sizes</a> conain dimensions for each pixel plane. Dimensions must be greater than
+<a href="#SkImage_MakeFromNV12TexturesCopy_nv12Sizes">nv12Sizes</a> contain dimensions for each pixel plane. Dimensions must be greater than
zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has the dimensions
<a href="#SkImage_MakeFromNV12TexturesCopy_nv12Sizes">nv12Sizes</a>[0]. <a href="#SkImage_MakeFromNV12TexturesCopy_yuvColorSpace">yuvColorSpace</a> describes how YUV colors convert to RGB colors.
@@ -900,8 +821,8 @@ zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has
<table> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_context"> <code><strong>context </strong></code> </a></td> <td>
<a href="undocumented#GPU_Context">GPU Context</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_yuvColorSpace"> <code><strong>yuvColorSpace </strong></code> </a></td> <td>
-one of: <a href="undocumented#YUV_ColorSpace">kJPEG SkYUVColorSpace</a>, <a href="undocumented#YUV_ColorSpace">kRec601 SkYUVColorSpace</a>,
-<a href="undocumented#YUV_ColorSpace">kRec709 SkYUVColorSpace</a></td>
+one of: <a href="SkImageInfo_Reference#SkYUVColorSpace">kJPEG SkYUVColorSpace</a>, <a href="SkImageInfo_Reference#SkYUVColorSpace">kRec601 SkYUVColorSpace</a>,
+<a href="SkImageInfo_Reference#SkYUVColorSpace">kRec709 SkYUVColorSpace</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_nv12TextureHandles"> <code><strong>nv12TextureHandles </strong></code> </a></td> <td>
array of YUV textures on GPU</td>
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_nv12Sizes"> <code><strong>nv12Sizes </strong></code> </a></td> <td>
@@ -937,7 +858,7 @@ Creates <a href="#Image">Image</a> from copy of <a href="#SkImage_MakeFromNV12Te
<a href="#SkImage_MakeFromNV12TexturesCopy_2_nv12TextureHandles">nv12TextureHandles</a>[0] contains pixels for YUV_Component_Y plane.
<a href="#SkImage_MakeFromNV12TexturesCopy_2_nv12TextureHandles">nv12TextureHandles</a>[1] contains pixels for YUV_Component_U plane,
followed by pixels for YUV_Component_V plane.
-<a href="#SkImage_MakeFromNV12TexturesCopy_2_nv12Sizes">nv12Sizes</a> conain dimensions for each pixel plane. Dimensions must be greater than
+<a href="#SkImage_MakeFromNV12TexturesCopy_2_nv12Sizes">nv12Sizes</a> contain dimensions for each pixel plane. Dimensions must be greater than
zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has the dimensions
<a href="#SkImage_MakeFromNV12TexturesCopy_2_nv12Sizes">nv12Sizes</a>[0]. <a href="#SkImage_MakeFromNV12TexturesCopy_2_yuvColorSpace">yuvColorSpace</a> describes how YUV colors convert to RGB colors.
@@ -946,8 +867,8 @@ zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has
<table> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_2_context"> <code><strong>context </strong></code> </a></td> <td>
<a href="undocumented#GPU_Context">GPU Context</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_2_yuvColorSpace"> <code><strong>yuvColorSpace </strong></code> </a></td> <td>
-one of: <a href="undocumented#YUV_ColorSpace">kJPEG SkYUVColorSpace</a>, <a href="undocumented#YUV_ColorSpace">kRec601 SkYUVColorSpace</a>,
-<a href="undocumented#YUV_ColorSpace">kRec709 SkYUVColorSpace</a></td>
+one of: <a href="SkImageInfo_Reference#SkYUVColorSpace">kJPEG SkYUVColorSpace</a>, <a href="SkImageInfo_Reference#SkYUVColorSpace">kRec601 SkYUVColorSpace</a>,
+<a href="SkImageInfo_Reference#SkYUVColorSpace">kRec709 SkYUVColorSpace</a></td>
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_2_nv12TextureHandles"> <code><strong>nv12TextureHandles </strong></code> </a></td> <td>
array of YUV textures on GPU</td>
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_2_nv12Sizes"> <code><strong>nv12Sizes </strong></code> </a></td> <td>
@@ -1076,6 +997,24 @@ created <a href="#Image">Image</a>, or nullptr
---
+## <a name="Property"></a> Property
+
+| name | description |
+| --- | --- |
+| <a href="#SkImage_alphaType">alphaType</a> | returns <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> |
+| <a href="#SkImage_bounds">bounds</a> | returns <a href="#SkImage_width">width</a> and <a href="#SkImage_height">height</a> as Rectangle |
+| <a href="#SkImage_colorSpace">colorSpace</a> | returns <a href="undocumented#Color_Space">Color Space</a> |
+| <a href="#SkImage_dimensions">dimensions</a> | returns <a href="#SkImage_width">width</a> and <a href="#SkImage_height">height</a> |
+| <a href="#SkImage_height">height</a> | returns pixel row count |
+| <a href="#SkImage_isAlphaOnly">isAlphaOnly</a> | returns if pixels represent a transparency mask |
+| <a href="#SkImage_isLazyGenerated">isLazyGenerated</a> | returns if <a href="#Image">Image</a> is created as needed |
+| <a href="#SkImage_isOpaque">isOpaque</a> | returns if <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> is <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a> |
+| <a href="#SkImage_isTextureBacked">isTextureBacked</a> | returns if <a href="#Image">Image</a> was created from <a href="undocumented#GPU_Texture">GPU Texture</a> |
+| <a href="#SkImage_isValid">isValid</a> | returns if <a href="#Image">Image</a> can draw to <a href="undocumented#Raster_Surface">Raster Surface</a> or <a href="undocumented#GPU_Context">GPU Context</a> |
+| <a href="#SkImage_refColorSpace">refColorSpace</a> | returns <a href="#Info">Image Info</a> <a href="undocumented#Color_Space">Color Space</a> |
+| <a href="#SkImage_uniqueID">uniqueID</a> | identifier for <a href="#Image">Image</a> |
+| <a href="#SkImage_width">width</a> | returns pixel column count |
+
<a name="SkImage_width"></a>
## width
@@ -1471,8 +1410,6 @@ true if <a href="#Image">Image</a> has direct access to pixels
GrTexture* getTexture() const
</pre>
-Deprecated.
-
---
<a name="SkImage_isTextureBacked"></a>
@@ -1895,6 +1832,12 @@ encoded <a href="#Image">Image</a>, or nullptr
---
+## <a name="Utility"></a> Utility
+
+| name | description |
+| --- | --- |
+| <a href="#SkImage_toString">toString</a> | converts <a href="#Image">Image</a> to machine readable form |
+
<a name="SkImage_toString"></a>
## toString
@@ -2005,7 +1948,7 @@ sk_sp&lt;SkImage&gt; makeNonTextureImage() const
</pre>
Returns <a href="SkImage_Reference#Raster_Image">Raster Image</a> or <a href="#Lazy_Image">Lazy Image</a>. Copies <a href="#Image">Image</a> backed by <a href="undocumented#GPU_Texture">GPU Texture</a> into
-CPU memory if needed. Returns original <a href="#Image">Image</a> if unencoded in <a href="undocumented#Raster_Bitmap">Raster Bitmap</a>,
+CPU memory if needed. Returns original <a href="#Image">Image</a> if decoded in <a href="undocumented#Raster_Bitmap">Raster Bitmap</a>,
or if encoded in a stream.
Returns nullptr if backed by <a href="undocumented#GPU_Texture">GPU Texture</a> and copy fails.
@@ -2032,7 +1975,7 @@ sk_sp&lt;SkImage&gt; makeRasterImage() const
</pre>
Returns <a href="SkImage_Reference#Raster_Image">Raster Image</a>. Copies <a href="#Image">Image</a> backed by <a href="undocumented#GPU_Texture">GPU Texture</a> into CPU memory,
-or decodes <a href="#Image">Image</a> from <a href="#Lazy_Image">Lazy Image</a>. Returns original <a href="#Image">Image</a> if unencoded in
+or decodes <a href="#Image">Image</a> from <a href="#Lazy_Image">Lazy Image</a>. Returns original <a href="#Image">Image</a> if decoded in
<a href="undocumented#Raster_Bitmap">Raster Bitmap</a>.
Returns nullptr if copy, decode, or pixel read fails.
@@ -2107,63 +2050,7 @@ By translating canvas by returned <a href="#SkImage_makeWithFilter_offset">offse
---
# <a name="SkImage_DeferredTextureImageUsageParams"></a> Struct SkImage::DeferredTextureImageUsageParams
-Used only by Chrome; to be deprecated.
-
-<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
-struct <a href="#SkImage_DeferredTextureImageUsageParams_DeferredTextureImageUsageParams">DeferredTextureImageUsageParams</a> {
-<a href="#SkImage_DeferredTextureImageUsageParams_DeferredTextureImageUsageParams">DeferredTextureImageUsageParams(const SkMatrix matrix, const SkFilterQuality quality,
-int preScaleMipLevel)</a>;
-<a href="SkMatrix_Reference#SkMatrix">SkMatrix</a> <a href="#SkImage_DeferredTextureImageUsageParams_fMatrix">fMatrix</a>;
-<a href="undocumented#SkFilterQuality">SkFilterQuality</a> <a href="#SkImage_DeferredTextureImageUsageParams_fQuality">fQuality</a>;
-int <a href="#SkImage_DeferredTextureImageUsageParams_fPreScaleMipLevel">fPreScaleMipLevel</a>;
-};</pre>
-
-<a name="SkImage_DeferredTextureImageUsageParams_fMatrix"> <code><strong>SkMatrix fMatrix</strong></code> </a>
-
-<a name="SkImage_DeferredTextureImageUsageParams_fQuality"> <code><strong>SkFilterQuality fQuality</strong></code> </a>
-
-<a name="SkImage_DeferredTextureImageUsageParams_fPreScaleMipLevel"> <code><strong>int fPreScaleMipLevel</strong></code> </a>
-
-<a name="SkImage_DeferredTextureImageUsageParams_DeferredTextureImageUsageParams"></a>
-## DeferredTextureImageUsageParams
-
-<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
-DeferredTextureImageUsageParams(const SkMatrix matrix, const SkFilterQuality quality,
- int preScaleMipLevel)
-</pre>
-
-### Parameters
-
-<table> <tr> <td><a name="SkImage_DeferredTextureImageUsageParams_DeferredTextureImageUsageParams_matrix"> <code><strong>matrix </strong></code> </a></td> <td>
-incomplete</td>
- </tr> <tr> <td><a name="SkImage_DeferredTextureImageUsageParams_DeferredTextureImageUsageParams_quality"> <code><strong>quality </strong></code> </a></td> <td>
-incomplete</td>
- </tr> <tr> <td><a name="SkImage_DeferredTextureImageUsageParams_DeferredTextureImageUsageParams_preScaleMipLevel"> <code><strong>preScaleMipLevel </strong></code> </a></td> <td>
-incomplete</td>
- </tr>
-</table>
-
-### Return Value
-
-incomplete
-
-### Example
-
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
-
-### See Also
-
-incomplete
-
----
-
-### Example
-
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
-
-### See Also
-
-incomplete
+soonUsed only by Chrome.
<a name="SkImage_getDeferredTextureImageData"></a>
## getDeferredTextureImageData
@@ -2175,64 +2062,7 @@ size_t getDeferredTextureImageData(const GrContextThreadSafeProxy& contextThread
SkColorType dstColorType = kN32_SkColorType) const
</pre>
-Used only by Chrome; to be deprecated.
-
-This method allows clients to capture the data necessary to turn a <a href="#SkImage">SkImage</a> into a texture-
-backed image. If the original image is codec-backed this will decode into a format optimized
-for the context represented by the proxy. This method is thread safe with respect to the
-<a href="undocumented#GrContext">GrContext</a> whence the proxy came. Clients allocate and manage the storage of the deferred
-texture data and control its lifetime. No cleanup is required, thus it is safe to simply free
-the memory out from under the data.
-
-The same method is used both for getting the size necessary for pre-uploaded texture data
-and for retrieving the data. The params array represents the set of draws over which to
-optimize the pre-upload data.
-
-When called with a null <a href="#SkImage_getDeferredTextureImageData_buffer">buffer</a> this returns the size that the client must allocate in order
-to create deferred texture data for this image (or zero if this is an inappropriate
-candidate). The <a href="#SkImage_getDeferredTextureImageData_buffer">buffer</a> allocated by the client should be 8 byte aligned.
-
-When <a href="#SkImage_getDeferredTextureImageData_buffer">buffer</a> is not null this fills in the deferred texture data for this image in the
-provided <a href="#SkImage_getDeferredTextureImageData_buffer">buffer</a> (assuming this is an appropriate candidate image and the <a href="#SkImage_getDeferredTextureImageData_buffer">buffer</a> is
-appropriately aligned). Upon success the size written is returned, otherwise 0.
-
-<a href="#SkImage_getDeferredTextureImageData_dstColorSpace">dstColorSpace</a> is the <a href="undocumented#Color_Space">Color Space</a> of the surface where this texture will ultimately be used.
-If the method determines that mip-maps are needed, this helps determine the correct strategy
-for building them (gamma-correct or not).
-
-<a href="#SkImage_getDeferredTextureImageData_dstColorType">dstColorType</a> is the color type of the surface where this texture will ultimately be used.
-This determines the format with which the image will be uploaded to the GPU. If <a href="#SkImage_getDeferredTextureImageData_dstColorType">dstColorType</a>
-does not support <a href="undocumented#Color_Space">Color Space</a> (low bit depth types such as <a href="SkImageInfo_Reference#SkColorType">kARGB 4444 SkColorType</a>),
-then <a href="#SkImage_getDeferredTextureImageData_dstColorSpace">dstColorSpace</a> must be null.
-
-### Parameters
-
-<table> <tr> <td><a name="SkImage_getDeferredTextureImageData_contextThreadSafeProxy"> <code><strong>contextThreadSafeProxy </strong></code> </a></td> <td>
-thread safe GPU context</td>
- </tr> <tr> <td><a name="SkImage_getDeferredTextureImageData_deferredTextureImageUsageParams"> <code><strong>deferredTextureImageUsageParams </strong></code> </a></td> <td>
-array of <a href="#Image">Image</a> transformations</td>
- </tr> <tr> <td><a name="SkImage_getDeferredTextureImageData_paramCnt"> <code><strong>paramCnt </strong></code> </a></td> <td>
-entries in <a href="#SkImage_getDeferredTextureImageData_deferredTextureImageUsageParams">deferredTextureImageUsageParams</a> array</td>
- </tr> <tr> <td><a name="SkImage_getDeferredTextureImageData_buffer"> <code><strong>buffer </strong></code> </a></td> <td>
-storage for <a href="undocumented#GPU_Texture">GPU Texture</a> data, or nullptr</td>
- </tr> <tr> <td><a name="SkImage_getDeferredTextureImageData_dstColorSpace"> <code><strong>dstColorSpace </strong></code> </a></td> <td>
-<a href="SkSurface_Reference#Surface">Surface</a> <a href="undocumented#Color_Space">Color Space</a>, or nullptr</td>
- </tr> <tr> <td><a name="SkImage_getDeferredTextureImageData_dstColorType"> <code><strong>dstColorType </strong></code> </a></td> <td>
-<a href="SkSurface_Reference#Surface">Surface</a> <a href="SkImageInfo_Reference#Color_Type">Color Type</a></td>
- </tr>
-</table>
-
-### Return Value
-
-size of storage for <a href="undocumented#GPU_Texture">GPU Texture</a> data
-
-### Example
-
-<div><fiddle-embed name="31d224ac4d22ba60221c565f9a12ad50" gpu="true"></fiddle-embed></div>
-
-### See Also
-
-<a href="#SkImage_MakeFromDeferredTextureImageData">MakeFromDeferredTextureImageData</a>
+soonUsed only by Chrome.
---
@@ -2244,34 +2074,7 @@ static sk_sp&lt;SkImage&gt; MakeFromDeferredTextureImageData(GrContext* context,
SkBudgeted budgeted)
</pre>
-Used only by Chrome; to be deprecated.
-
-Returns a texture-backed image from <a href="#SkImage_MakeFromDeferredTextureImageData_data">data</a> produced in <a href="#SkImage_getDeferredTextureImageData">SkImage::getDeferredTextureImageData</a>.
-The <a href="#SkImage_MakeFromDeferredTextureImageData_context">context</a> must be the <a href="#SkImage_MakeFromDeferredTextureImageData_context">context</a> that provided the proxy passed to
-<a href="#SkImage_getDeferredTextureImageData">getDeferredTextureImageData</a>.
-
-### Parameters
-
-<table> <tr> <td><a name="SkImage_MakeFromDeferredTextureImageData_context"> <code><strong>context </strong></code> </a></td> <td>
-<a href="undocumented#GPU_Context">GPU Context</a></td>
- </tr> <tr> <td><a name="SkImage_MakeFromDeferredTextureImageData_data"> <code><strong>data </strong></code> </a></td> <td>
-incomplete</td>
- </tr> <tr> <td><a name="SkImage_MakeFromDeferredTextureImageData_budgeted"> <code><strong>budgeted </strong></code> </a></td> <td>
-incomplete</td>
- </tr>
-</table>
-
-### Return Value
-
-incomplete
-
-### Example
-
-<div><fiddle-embed name="882e8e0103048009a25cfc20400492f7"></fiddle-embed></div>
-
-### See Also
-
-incomplete
+soonUsed only by Chrome.
---
@@ -2297,8 +2100,8 @@ If <a href="#SkImage_MakeBackendTextureFromSkImage_image">image</a> is both text
reference was transferred using std::move(): <a href="#SkImage_MakeBackendTextureFromSkImage_image">image</a> is returned in <a href="#SkImage_MakeBackendTextureFromSkImage_backendTexture">backendTexture</a>
without conversion or making a copy.
-If the <a href="#SkImage">SkImage</a> is not texture backed, this function will generate a texture with the <a href="#SkImage_MakeBackendTextureFromSkImage_image">image</a>'s
-contents and return that.
+If <a href="#Image">Image</a> is not texture backed, this function returns texture with <a href="#Image">Image</a>
+contents.
### Parameters
diff --git a/site/user/api/SkMatrix_Reference.md b/site/user/api/SkMatrix_Reference.md
index bcfa5412c0..9563cc568f 100644
--- a/site/user/api/SkMatrix_Reference.md
+++ b/site/user/api/SkMatrix_Reference.md
@@ -5,14 +5,14 @@ SkMatrix Reference
## <a name="Overview"></a> Overview
-## <a name="Subtopics"></a> Subtopics
+## <a name="Subtopic"></a> Subtopic
| name | description |
| --- | --- |
-| Constants | enum and enum class, const values |
-| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkMatrix_Reference#SkMatrix">SkMatrix</a> |
-| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
-| <a href="#Operators">Operators</a> | operator overloading methods |
+| Constant | enum and enum class, const values |
+| <a href="#Constructor">Constructor</a> | functions that construct <a href="SkMatrix_Reference#SkMatrix">SkMatrix</a> |
+| <a href="#Member_Function">Member Function</a> | static functions and member methods |
+| <a href="#Operator">Operator</a> | operator overloading methods |
# <a name="SkMatrix"></a> Class SkMatrix
<a href="#Matrix">Matrix</a> holds a 3x3 matrix for transforming coordinates. This allows mapping
@@ -27,25 +27,49 @@ initializes all <a href="#Matrix">Matrix</a> elements with the corresponding map
<a href="#Matrix">Matrix</a> includes a hidden variable that classifies the type of matrix to
improve performance. <a href="#Matrix">Matrix</a> is not thread safe unless <a href="#SkMatrix_getType">getType</a> is called first.
-## <a name="Constructors"></a> Constructors
+## <a name="Constructor"></a> Constructor
| name | description |
| --- | --- |
+| I | returns a reference to a const identity <a href="#Matrix">Matrix</a> |
+| <a href="#SkMatrix_InvalidMatrix">InvalidMatrix</a> | returns a reference to a const invalid <a href="#Matrix">Matrix</a> |
| <a href="#SkMatrix_MakeAll">MakeAll</a> | constructs all nine values |
| <a href="#SkMatrix_MakeRectToRect">MakeRectToRect</a> | constructs from source <a href="SkRect_Reference#Rect">Rect</a> to destination <a href="SkRect_Reference#Rect">Rect</a> |
| <a href="#SkMatrix_MakeScale">MakeScale</a> | constructs from scale in x and y |
+| | <a href="#SkMatrix_MakeScale">MakeScale</a> |
| <a href="#SkMatrix_MakeTrans">MakeTrans</a> | constructs from translate in x and y |
+| <a href="#SkMatrix_SetAffineIdentity">SetAffineIdentity</a> | sets 3x2 array to identity |
+| <a href="#SkMatrix_asAffine">asAffine</a> | copies to 3x2 array |
+| <a href="#SkMatrix_reset">reset</a> | sets <a href="#Matrix">Matrix</a> to identity |
+| <a href="#SkMatrix_setAffine">setAffine</a> | sets left two columns |
+| <a href="#SkMatrix_setConcat">setConcat</a> | sets to <a href="#Matrix">Matrix</a> parameter multiplied by <a href="#Matrix">Matrix</a> parameter |
+| <a href="#SkMatrix_setIdentity">setIdentity</a> | sets <a href="#Matrix">Matrix</a> to identity |
+| <a href="#SkMatrix_setRSXform">setRSXform</a> | sets to rotate, scale, and translate |
+| <a href="#SkMatrix_setRotate">setRotate</a> | sets to rotate about a point |
+| | <a href="#SkMatrix_setRotate">setRotate</a> |
+| <a href="#SkMatrix_setScale">setScale</a> | sets to scale about a point |
+| | <a href="#SkMatrix_setScale">setScale</a> |
+| <a href="#SkMatrix_setScaleTranslate">setScaleTranslate</a> | sets to scale and translate |
+| <a href="#SkMatrix_setSinCos">setSinCos</a> | sets to rotate and scale about a point |
+| | <a href="#SkMatrix_setSinCos">setSinCos</a> |
+| <a href="#SkMatrix_setSkew">setSkew</a> | sets to skew about a point |
+| | <a href="#SkMatrix_setSkew">setSkew</a> |
+| <a href="#SkMatrix_setTranslate">setTranslate</a> | sets to translate in x and y |
+| | <a href="#SkMatrix_setTranslate">setTranslate</a> |
-## <a name="Operators"></a> Operators
+## <a name="Operator"></a> Operator
| name | description |
| --- | --- |
+| <a href="#SkMatrix_Concat">Concat</a> | returns the concatenation of <a href="#Matrix">Matrix</a> pair |
+| <a href="#SkMatrix_cheapEqualTo">cheapEqualTo</a> | compares <a href="#Matrix">Matrix</a> pair using memcmp() |
+| <a href="#SkMatrix_invert">invert</a> | returns inverse, if possible |
| <a href="#SkMatrix_notequal_operator">operator!=(const SkMatrix& a, const SkMatrix& b)</a> | returns true if members are unequal |
| <a href="#SkMatrix_equal_operator">operator==(const SkMatrix& a, const SkMatrix& b)</a> | returns true if members are equal |
| <a href="#SkMatrix_array1_operator">operator[](int index)</a> | returns writable reference to <a href="#Matrix">Matrix</a> value |
| <a href="#SkMatrix_array_operator">operator[](int index) const</a> | returns <a href="#Matrix">Matrix</a> value |
-## <a name="Member_Functions"></a> Member Functions
+## <a name="Member_Function"></a> Member Function
| name | description |
| --- | --- |
@@ -351,6 +375,37 @@ after setPolyToPoly: kTranslate_Mask kScale_Mask kAffine_Mask kPerspective_Mask
+## <a name="Property"></a> Property
+
+| name | description |
+| --- | --- |
+| <a href="#SkMatrix_decomposeScale">decomposeScale</a> | separates scale if possible |
+| <a href="#SkMatrix_fixedStepInX">fixedStepInX</a> | returns step in x for a position in y |
+| <a href="#SkMatrix_get">get</a> | returns one of nine <a href="#Matrix">Matrix</a> values |
+| <a href="#SkMatrix_get9">get9</a> | returns all nine <a href="#Matrix">Matrix</a> values |
+| <a href="#SkMatrix_getMaxScale">getMaxScale</a> | returns maximum scaling, if possible |
+| <a href="#SkMatrix_getMinMaxScales">getMinMaxScales</a> | returns minimum and maximum scaling, if possible |
+| <a href="#SkMatrix_getMinScale">getMinScale</a> | returns minimum scaling, if possible |
+| <a href="#SkMatrix_getPerspX">getPerspX</a> | returns input x perspective factor |
+| <a href="#SkMatrix_getPerspY">getPerspY</a> | returns input y perspective factor |
+| <a href="#SkMatrix_getScaleX">getScaleX</a> | returns horizontal scale factor |
+| <a href="#SkMatrix_getScaleY">getScaleY</a> | returns vertical scale factor |
+| <a href="#SkMatrix_getSkewX">getSkewX</a> | returns horizontal skew factor |
+| <a href="#SkMatrix_getSkewY">getSkewY</a> | returns vertical skew factor |
+| <a href="#SkMatrix_getTranslateX">getTranslateX</a> | returns horizontal translation |
+| <a href="#SkMatrix_getTranslateY">getTranslateY</a> | returns vertical translation |
+| <a href="#SkMatrix_getType">getType</a> | returns transform complexity |
+| <a href="#SkMatrix_hasPerspective">hasPerspective</a> | returns if transform includes perspective |
+| <a href="#SkMatrix_isFinite">isFinite</a> | returns if all <a href="#Matrix">Matrix</a> values are not infinity, NaN |
+| <a href="#SkMatrix_isFixedStepInX">isFixedStepInX</a> | returns if transformation supports fixed step in x |
+| <a href="#SkMatrix_isIdentity">isIdentity</a> | returns if matrix equals the identity <a href="#Matrix">Matrix</a> |
+| <a href="#SkMatrix_isScaleTranslate">isScaleTranslate</a> | returns if transform is limited to scale and translate |
+| <a href="#SkMatrix_isSimilarity">isSimilarity</a> | returns if transform is limited to square scale and rotation |
+| <a href="#SkMatrix_isTranslate">isTranslate</a> | returns if transform is limited to translate |
+| <a href="#SkMatrix_preservesAxisAlignment">preservesAxisAlignment</a> | returns if mapping restricts to 90 degree multiples and mirroring |
+| <a href="#SkMatrix_preservesRightAngles">preservesRightAngles</a> | returns if mapped 90 angle remains 90 degrees |
+| <a href="#SkMatrix_rectStaysRect">rectStaysRect</a> | returns if mapped <a href="SkRect_Reference#Rect">Rect</a> can be represented by another <a href="SkRect_Reference#Rect">Rect</a> |
+
<a name="SkMatrix_getType"></a>
## getType
@@ -1190,6 +1245,41 @@ after dirty cache: x = 66
---
+## <a name="Set"></a> Set
+
+| name | description |
+| --- | --- |
+| <a href="#SkMatrix_postConcat">postConcat</a> | post-multiplies <a href="#Matrix">Matrix</a> by <a href="#Matrix">Matrix</a> parameter |
+| <a href="#SkMatrix_postIDiv">postIDiv</a> | post-multiplies <a href="#Matrix">Matrix</a> by inverse scale |
+| <a href="#SkMatrix_postRotate">postRotate</a> | post-multiplies <a href="#Matrix">Matrix</a> by rotation |
+| | <a href="#SkMatrix_postRotate">postRotate</a> |
+| <a href="#SkMatrix_postScale">postScale</a> | post-multiplies <a href="#Matrix">Matrix</a> by scale |
+| | <a href="#SkMatrix_postScale">postScale</a> |
+| <a href="#SkMatrix_postSkew">postSkew</a> | post-multiplies <a href="#Matrix">Matrix</a> by skew |
+| | <a href="#SkMatrix_postSkew">postSkew</a> |
+| <a href="#SkMatrix_postTranslate">postTranslate</a> | post-multiplies <a href="#Matrix">Matrix</a> by translation |
+| <a href="#SkMatrix_preConcat">preConcat</a> | pre-multiplies <a href="#Matrix">Matrix</a> by <a href="#Matrix">Matrix</a> parameter |
+| <a href="#SkMatrix_preRotate">preRotate</a> | pre-multiplies <a href="#Matrix">Matrix</a> by rotation |
+| | <a href="#SkMatrix_preRotate">preRotate</a> |
+| <a href="#SkMatrix_preScale">preScale</a> | pre-multiplies <a href="#Matrix">Matrix</a> by scale |
+| | <a href="#SkMatrix_preScale">preScale</a> |
+| <a href="#SkMatrix_preSkew">preSkew</a> | pre-multiplies <a href="#Matrix">Matrix</a> by skew |
+| | <a href="#SkMatrix_preSkew">preSkew</a> |
+| <a href="#SkMatrix_preTranslate">preTranslate</a> | pre-multiplies <a href="#Matrix">Matrix</a> by translation |
+| <a href="#SkMatrix_set">set</a> | sets one value |
+| <a href="#SkMatrix_set9">set9</a> | sets all values from <a href="#Scalar">Scalar</a> array |
+| <a href="#SkMatrix_setAll">setAll</a> | sets all values from parameters |
+| <a href="#SkMatrix_setPerspX">setPerspX</a> | sets input x perspective factor |
+| <a href="#SkMatrix_setPerspY">setPerspY</a> | sets input y perspective factor |
+| <a href="#SkMatrix_setPolyToPoly">setPolyToPoly</a> | sets to map one to four points to an equal array of points |
+| <a href="#SkMatrix_setRectToRect">setRectToRect</a> | sets to map one <a href="SkRect_Reference#Rect">Rect</a> to another |
+| <a href="#SkMatrix_setScaleX">setScaleX</a> | sets horizontal scale factor |
+| <a href="#SkMatrix_setScaleY">setScaleY</a> | sets vertical scale factor |
+| <a href="#SkMatrix_setSkewX">setSkewX</a> | sets horizontal skew factor |
+| <a href="#SkMatrix_setSkewY">setSkewY</a> | sets vertical skew factor |
+| <a href="#SkMatrix_setTranslateX">setTranslateX</a> | sets horizontal translation |
+| <a href="#SkMatrix_setTranslateY">setTranslateY</a> | sets vertical translation |
+
<a name="SkMatrix_set"></a>
## set
@@ -3202,6 +3292,25 @@ ScaleX: 2 SkewY: 5 SkewX: 3 ScaleY: 6 TransX: 4 TransY: 7
---
+## <a name="Transform"></a> Transform
+
+| name | description |
+| --- | --- |
+| <a href="#SkMatrix_mapHomogeneousPoints">mapHomogeneousPoints</a> | maps <a href="undocumented#Point3">Point3</a> array |
+| <a href="#SkMatrix_mapPoints">mapPoints</a> | maps <a href="SkPoint_Reference#Point">Point</a> array |
+| | <a href="#SkMatrix_mapPoints">mapPoints</a> |
+| <a href="#SkMatrix_mapRadius">mapRadius</a> | returns mean radius of mapped <a href="undocumented#Circle">Circle</a> |
+| <a href="#SkMatrix_mapRect">mapRect</a> | returns bounds of mapped <a href="SkRect_Reference#Rect">Rect</a> |
+| | <a href="#SkMatrix_mapRect">mapRect</a> |
+| <a href="#SkMatrix_mapRectScaleTranslate">mapRectScaleTranslate</a> | returns bounds of mapped <a href="SkRect_Reference#Rect">Rect</a> |
+| <a href="#SkMatrix_mapRectToQuad">mapRectToQuad</a> | maps <a href="SkRect_Reference#Rect">Rect</a> to <a href="SkPoint_Reference#Point">Point</a> array |
+| <a href="#SkMatrix_mapVector">mapVector</a> | maps <a href="SkPoint_Reference#Vector">Vector</a> |
+| | <a href="#SkMatrix_mapVector">mapVector</a> |
+| <a href="#SkMatrix_mapVectors">mapVectors</a> | maps <a href="SkPoint_Reference#Vector">Vector</a> array |
+| | <a href="#SkMatrix_mapVectors">mapVectors</a> |
+| <a href="#SkMatrix_mapXY">mapXY</a> | maps <a href="SkPoint_Reference#Point">Point</a> |
+| | <a href="#SkMatrix_mapXY">mapXY</a> |
+
<a name="SkMatrix_mapPoints"></a>
## mapPoints
@@ -3954,7 +4063,7 @@ contains NaN, even if the other <a href="#Matrix">Matrix</a> also contains NaN.
### Return Value
-true if m and <a href="#Matrix">Matrix</a> are numerically equal
+true if <a href="#Matrix">Matrix</a> <a href="#SkMatrix_equal_operator_a">a</a> and <a href="#Matrix">Matrix</a> <a href="#SkMatrix_equal_operator_b">b</a> are numerically equal
### Example
@@ -3996,7 +4105,7 @@ contains NaN, even if the other <a href="#Matrix">Matrix</a> also contains NaN.
### Return Value
-true if m and <a href="#Matrix">Matrix</a> are numerically not equal
+true if <a href="#Matrix">Matrix</a> <a href="#SkMatrix_notequal_operator_a">a</a> and <a href="#Matrix">Matrix</a> <a href="#SkMatrix_notequal_operator_b">b</a> are numerically not equal
### Example
@@ -4008,6 +4117,14 @@ true if m and <a href="#Matrix">Matrix</a> are numerically not equal
---
+## <a name="Utility"></a> Utility
+
+| name | description |
+| --- | --- |
+| <a href="#SkMatrix_dirtyMatrixTypeCache">dirtyMatrixTypeCache</a> | sets internal cache to unknown state |
+| <a href="#SkMatrix_dump">dump</a> | sends text representation using floats to standard output |
+| <a href="#SkMatrix_toString">toString</a> | converts <a href="#Matrix">Matrix</a> to machine readable form |
+
<a name="SkMatrix_dump"></a>
## dump
diff --git a/site/user/api/SkPaint_Reference.md b/site/user/api/SkPaint_Reference.md
index 1f9d6236fe..635142d06a 100644
--- a/site/user/api/SkPaint_Reference.md
+++ b/site/user/api/SkPaint_Reference.md
@@ -5,16 +5,16 @@ SkPaint Reference
## <a name="Overview"></a> Overview
-## <a name="Subtopics"></a> Subtopics
+## <a name="Subtopic"></a> Subtopic
| name | description |
| --- | --- |
-| <a href="#Classes_and_Structs">Classes and Structs</a> | embedded struct and class members |
-| <a href="#Constants">Constants</a> | enum and enum class, const values |
-| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkPaint_Reference#SkPaint">SkPaint</a> |
-| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
-| <a href="#Operators">Operators</a> | operator overloading methods |
-| <a href="#Related_Functions">Related Functions</a> | similar methods grouped together |
+| <a href="#Class_or_Struct">Class or Struct</a> | embedded struct and class members |
+| <a href="#Constant">Constant</a> | enum and enum class, const values |
+| <a href="#Constructor">Constructor</a> | functions that construct <a href="SkPaint_Reference#SkPaint">SkPaint</a> |
+| <a href="#Member_Function">Member Function</a> | static functions and member methods |
+| <a href="#Operator">Operator</a> | operator overloading methods |
+| <a href="#Related_Function">Related Function</a> | similar methods grouped together |
# <a name="SkPaint"></a> Class SkPaint
<a href="#Paint">Paint</a> controls options applied when drawing and measuring. <a href="#Paint">Paint</a> collects all
@@ -43,7 +43,7 @@ is set in <a href="#Paint">Paint</a>.
Multiple colors are drawn either by using multiple paints or with objects like
<a href="undocumented#Shader">Shader</a> attached to <a href="#Paint">Paint</a>.
-## <a name="Related_Functions"></a> Related Functions
+## <a name="Related_Function"></a> Related Function
| name | description |
| --- | --- |
@@ -93,7 +93,7 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#Typeface_Methods">Typeface Methods</a> | get and set <a href="undocumented#Typeface">Typeface</a> |
| <a href="#Vertical_Text">Vertical Text</a> | orient text from top to bottom |
-## <a name="Constants"></a> Constants
+## <a name="Constant"></a> Constant
| name | description |
| --- | --- |
@@ -102,19 +102,18 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_Flags">Flags</a> | values described by bits and masks |
| <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_ReserveFlags">ReserveFlags</a> | values described by bits and masks |
| <a href="#SkPaint_Style">Style</a> | stroke, fill, or both |
| <a href="#SkPaint_TextEncoding">TextEncoding</a> | character or glyph encoded size |
| _anonymous | number of <a href="#SkPaint_Style">Style</a> defines |
| _anonymous_2 | number of <a href="#Text_Align">Text Align</a> values |
-## <a name="Classes_and_Structs"></a> Classes and Structs
+## <a name="Class_or_Struct"></a> Class or Struct
| name | description |
| --- | --- |
| <a href="#SkPaint_FontMetrics">FontMetrics</a> | values computed by <a href="undocumented#Font_Manager">Font Manager</a> using <a href="undocumented#Typeface">Typeface</a> |
-## <a name="Constructors"></a> Constructors
+## <a name="Constructor"></a> Constructor
| name | description |
| --- | --- |
@@ -123,7 +122,7 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_copy_const_SkPaint">SkPaint(const SkPaint& paint)</a> | makes a shallow copy |
| <a href="#SkPaint_destructor">~SkPaint()</a> | decreases <a href="undocumented#Reference_Count">Reference Count</a> of owned objects |
-## <a name="Operators"></a> Operators
+## <a name="Operator"></a> Operator
| name | description |
| --- | --- |
@@ -132,7 +131,7 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_copy_operator">operator=(const SkPaint& paint)</a> | makes a shallow copy |
| <a href="#SkPaint_equal_operator">operator==(const SkPaint& a, const SkPaint& b)</a> | compares paints for equality |
-## <a name="Member_Functions"></a> Member Functions
+## <a name="Member_Function"></a> Member Function
| name | description |
| --- | --- |
@@ -158,7 +157,6 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_getHash">getHash</a> | returns a shallow hash for equality checks |
| <a href="#SkPaint_getHinting">getHinting</a> | returns <a href="#SkPaint_Hinting">Hinting</a>, glyph outline adjustment level |
| <a href="#SkPaint_getImageFilter">getImageFilter</a> | returns <a href="undocumented#Image_Filter">Image Filter</a>, alter pixels; blur |
-| <a href="#SkPaint_getLooper">getLooper</a> | deprecated |
| <a href="#SkPaint_getMaskFilter">getMaskFilter</a> | returns <a href="undocumented#Mask_Filter">Mask Filter</a>, alterations to <a href="undocumented#Mask_Alpha">Mask Alpha</a> |
| <a href="#SkPaint_getPathEffect">getPathEffect</a> | returns <a href="undocumented#Path_Effect">Path Effect</a>, modifications to path geometry; dashing |
| <a href="#SkPaint_getPosTextHIntercepts">getPosTextHIntercepts</a> | returns where lines intersect horizontally positioned text; underlines |
@@ -220,7 +218,6 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_setImageFilter">setImageFilter</a> | sets <a href="undocumented#Image_Filter">Image Filter</a>, alter pixels; blur |
| <a href="#SkPaint_setLCDRenderText">setLCDRenderText</a> | sets or clears <a href="SkPaint_Reference#LCD_Text">LCD Text</a> |
| <a href="#SkPaint_setLinearText">setLinearText</a> | converts to <a href="SkPath_Reference#Path">Path</a> before draw or measure |
-| <a href="#SkPaint_setLooper">setLooper</a> | deprecated |
| <a href="#SkPaint_setMaskFilter">setMaskFilter</a> | sets <a href="undocumented#Mask_Filter">Mask Filter</a>, alterations to <a href="undocumented#Mask_Alpha">Mask Alpha</a> |
| <a href="#SkPaint_setPathEffect">setPathEffect</a> | sets <a href="undocumented#Path_Effect">Path Effect</a>, modifications to path geometry; dashing |
| <a href="#SkPaint_setShader">setShader</a> | sets <a href="undocumented#Shader">Shader</a>, multiple drawing colors; gradients |
@@ -857,6 +854,8 @@ multiple settings at once.
## <a name="SkPaint_ReserveFlags"></a> Enum SkPaint::ReserveFlags
+soonOnly valid for Android framework.
+
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
enum <a href="#SkPaint_ReserveFlags">ReserveFlags</a> {
<a href="#SkPaint_kUnderlineText_ReserveFlag">kUnderlineText ReserveFlag</a> = 0x08,
@@ -867,18 +866,13 @@ enum <a href="#SkPaint_ReserveFlags">ReserveFlags</a> {
<table>
<tr>
- <td><a name="SkPaint_kUnderlineText_ReserveFlag"> <code><strong>SkPaint::kUnderlineText_ReserveFlag </strong></code> </a></td><td>0x0008</td><td>mask for underline text</td>
+ <td><a name="SkPaint_kUnderlineText_ReserveFlag"> <code><strong>SkPaint::kUnderlineText_ReserveFlag </strong></code> </a></td><td>0x0008</td><td>soon</td>
</tr>
<tr>
- <td><a name="SkPaint_kStrikeThruText_ReserveFlag"> <code><strong>SkPaint::kStrikeThruText_ReserveFlag </strong></code> </a></td><td>0x0010</td><td>mask for strike-thru text</td>
+ <td><a name="SkPaint_kStrikeThruText_ReserveFlag"> <code><strong>SkPaint::kStrikeThruText_ReserveFlag </strong></code> </a></td><td>0x0010</td><td>soon</td>
</tr>
-</table>
-
-### See Also
-
-<a href="#Flags">Flags</a> <a href="#SkPaint_getFlags">getFlags</a>
-
+</table>
<a name="SkPaint_getFlags"></a>
## getFlags
@@ -3555,14 +3549,6 @@ draw looper unique: false
SkDrawLooper* getLooper() const
</pre>
-Deprecated.
-
-(see bug.skia.org/6259)
-
-### Return Value
-
-<a href="undocumented#Draw_Looper">Draw Looper</a> if previously set, nullptr otherwise
-
---
<a name="SkPaint_setDrawLooper"></a>
@@ -3598,20 +3584,8 @@ iterates through drawing one or more time, altering <a href="#Paint">Paint</a></
void setLooper(sk_sp&lt;SkDrawLooper&gt; drawLooper)
</pre>
-Deprecated.
-
-(see bug.skia.org/6259)
-
-### Parameters
-
-<table> <tr> <td><a name="SkPaint_setLooper_drawLooper"> <code><strong>drawLooper </strong></code> </a></td> <td>
-sets <a href="undocumented#Draw_Looper">Draw Looper</a> to <a href="#SkPaint_setLooper_drawLooper">drawLooper</a></td>
- </tr>
-
---
-</table>
-
## <a name="Text_Align"></a> Text Align
## <a name="SkPaint_Align"></a> Enum SkPaint::Align
diff --git a/site/user/api/SkPath_Reference.md b/site/user/api/SkPath_Reference.md
index 142ec36ae7..2b3aecf28a 100644
--- a/site/user/api/SkPath_Reference.md
+++ b/site/user/api/SkPath_Reference.md
@@ -5,16 +5,16 @@ SkPath Reference
## <a name="Overview"></a> Overview
-## <a name="Subtopics"></a> Subtopics
+## <a name="Subtopic"></a> Subtopic
| name | description |
| --- | --- |
-| <a href="#Classes_and_Structs">Classes and Structs</a> | embedded struct and class members |
-| <a href="#Constants">Constants</a> | enum and enum class, const values |
-| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkPath_Reference#SkPath">SkPath</a> |
-| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
-| <a href="#Operators">Operators</a> | operator overloading methods |
-| <a href="#Related_Functions">Related Functions</a> | similar methods grouped together |
+| <a href="#Class_or_Struct">Class or Struct</a> | embedded struct and class members |
+| <a href="#Constant">Constant</a> | enum and enum class, const values |
+| <a href="#Constructor">Constructor</a> | functions that construct <a href="SkPath_Reference#SkPath">SkPath</a> |
+| <a href="#Member_Function">Member Function</a> | static functions and member methods |
+| <a href="#Operator">Operator</a> | operator overloading methods |
+| <a href="#Related_Function">Related Function</a> | similar methods grouped together |
<a href="#Path">Path</a> contains <a href="#Line">Lines</a> and <a href="#Curve">Curves</a> which can be stroked or filled. <a href="#Contour">Contour</a> is
composed of a series of connected <a href="#Line">Lines</a> and <a href="#Curve">Curves</a>. <a href="#Path">Path</a> may contain zero,
one, or more <a href="#Contour">Contours</a>.
@@ -103,25 +103,29 @@ overlapping contours.
Internally, <a href="#Path">Path</a> lazily computes metrics likes bounds and convexity. Call
<a href="#SkPath_updateBoundsCache">SkPath::updateBoundsCache</a> to make <a href="#Path">Path</a> thread safe.
-## <a name="Related_Functions"></a> Related Functions
+## <a name="Related_Function"></a> Related Function
| name | description |
| --- | --- |
| <a href="#Arc">Arc</a> | part of <a href="undocumented#Oval">Oval</a> or <a href="undocumented#Circle">Circle</a> |
+| <a href="#Build">Build</a> | adds points and verbs to path |
| <a href="#Conic">Conic</a> | conic section defined by three points and a weight |
| <a href="#SkPath_Convexity">Convexity</a> | if <a href="#Path">Path</a> is concave or convex |
| <a href="#Cubic">Cubic</a> | Bezier_Curve described by third-order polynomial |
| <a href="#SkPath_Direction">Direction</a> | <a href="#Path">Path</a> contour orientation |
| <a href="#Fill_Type">Fill Type</a> | <a href="#Path">Path</a> fill rule, normal and inverted |
| <a href="#Generation_ID">Generation ID</a> | value reflecting contents change |
+| <a href="#Interpolate">Interpolate</a> | weighted average of <a href="#Path">Path</a> pair |
| <a href="#Last_Point">Last Point</a> | final <a href="SkPoint_Reference#Point">Point</a> in <a href="#Contour">Contour</a> |
| <a href="#Point_Array">Point Array</a> | end points and control points for lines and curves |
| <a href="#Quad">Quad</a> | Bezier_Curve described by second-order polynomial |
+| <a href="#Utility">Utility</a> | rarely called management functions |
| <a href="#SkPath_Verb">Verb</a> | line and curve type |
| <a href="#Verb_Array">Verb Array</a> | line and curve type for points |
+| <a href="#Volatile">Volatile</a> | caching attribute |
| Weight | strength of <a href="#Conic">Conic</a> control <a href="SkPoint_Reference#Point">Point</a> |
-## <a name="Constants"></a> Constants
+## <a name="Constant"></a> Constant
| name | description |
| --- | --- |
@@ -133,30 +137,33 @@ Internally, <a href="#Path">Path</a> lazily computes metrics likes bounds and co
| <a href="#SkPath_SegmentMask">SegmentMask</a> | returns <a href="#SkPath_Verb">Verb</a> types in <a href="#Path">Path</a> |
| <a href="#SkPath_Verb">Verb</a> | controls how <a href="#Path">Path</a> <a href="#Point">Points</a> are interpreted |
-## <a name="Classes_and_Structs"></a> Classes and Structs
+## <a name="Class_or_Struct"></a> Class or Struct
| name | description |
| --- | --- |
| <a href="#SkPath_Iter">Iter</a> | <a href="#Path">Path</a> data iterator |
| <a href="#SkPath_RawIter">RawIter</a> | <a href="#Path">Path</a> raw data iterator |
-## <a name="Constructors"></a> Constructors
+## <a name="Constructor"></a> Constructor
| name | description |
| --- | --- |
| <a href="#SkPath_empty_constructor">SkPath()</a> | constructs with default values |
| <a href="#SkPath_copy_const_SkPath">SkPath(const SkPath& path)</a> | makes a shallow copy |
+| <a href="#SkPath_reset">reset</a> | removes <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, and <a href="#Weight">Weights</a>; frees memory |
+| <a href="#SkPath_rewind">rewind</a> | removes <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, and <a href="#Weight">Weights</a>, keeping memory |
| <a href="#SkPath_destructor">~SkPath()</a> | decreases <a href="undocumented#Reference_Count">Reference Count</a> of owned objects |
-## <a name="Operators"></a> Operators
+## <a name="Operator"></a> Operator
| name | description |
| --- | --- |
| <a href="#SkPath_notequal_operator">operator!=(const SkPath& a, const SkPath& b)</a> | compares paths for inequality |
| <a href="#SkPath_copy_operator">operator=(const SkPath& path)</a> | makes a shallow copy |
| <a href="#SkPath_equal_operator">operator==(const SkPath& a, const SkPath& b)</a> | compares paths for equality |
+| <a href="#SkPath_swap">swap</a> | exchanges <a href="#Path">Path</a> pair |
-## <a name="Member_Functions"></a> Member Functions
+## <a name="Member_Function"></a> Member Function
| name | description |
| --- | --- |
@@ -213,7 +220,6 @@ Internally, <a href="#Path">Path</a> lazily computes metrics likes bounds and co
| <a href="#SkPath_lineTo">lineTo</a> | appends <a href="undocumented#Line">Line</a> |
| <a href="#SkPath_moveTo">moveTo</a> | starts <a href="#Contour">Contour</a> |
| <a href="#SkPath_offset">offset</a> | translates <a href="#Point_Array">Point Array</a> |
-| <a href="#SkPath_pathRefIsValid">pathRefIsValid</a> | to be deprecated |
| <a href="#SkPath_quadTo">quadTo</a> | appends <a href="#Quad">Quad</a> |
| <a href="#SkPath_rArcTo">rArcTo</a> | appends <a href="#Arc">Arc</a> relative to <a href="#Last_Point">Last Point</a> |
| <a href="#SkPath_rConicTo">rConicTo</a> | appends <a href="#Conic">Conic</a> relative to <a href="#Last_Point">Last Point</a> |
@@ -228,13 +234,11 @@ Internally, <a href="#Path">Path</a> lazily computes metrics likes bounds and co
| <a href="#SkPath_serialize">serialize</a> | copies data to buffer |
| <a href="#SkPath_setConvexity">setConvexity</a> | sets if geometry is convex to avoid future computation |
| <a href="#SkPath_setFillType">setFillType</a> | sets <a href="#Fill_Type">Fill Type</a>: winding, even-odd, inverse |
-| <a href="#SkPath_setIsConvex">setIsConvex</a> | deprecated |
| <a href="#SkPath_setIsVolatile">setIsVolatile</a> | sets if <a href="undocumented#Device">Device</a> should not cache |
| <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="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 |
@@ -589,6 +593,31 @@ convexity !=
---
+## <a name="Property"></a> Property
+
+| name | description |
+| --- | --- |
+| <a href="#SkPath_IsCubicDegenerate">IsCubicDegenerate</a> | returns if <a href="#Cubic">Cubic</a> is very small |
+| <a href="#SkPath_IsInverseFillType">IsInverseFillType</a> | returns if <a href="#Fill_Type">Fill Type</a> represents outside geometry |
+| <a href="#SkPath_IsLineDegenerate">IsLineDegenerate</a> | returns if <a href="undocumented#Line">Line</a> is very small |
+| <a href="#SkPath_IsQuadDegenerate">IsQuadDegenerate</a> | returns if <a href="#Quad">Quad</a> is very small |
+| <a href="#SkPath_computeTightBounds">computeTightBounds</a> | returns extent of geometry |
+| <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="SkPoint_Reference#Point">Point</a> is in fill area |
+| <a href="#SkPath_getBounds">getBounds</a> | returns maximum and minimum of <a href="#Point_Array">Point Array</a> |
+| <a href="#SkPath_getLastPt">getLastPt</a> | returns <a href="#Last_Point">Last Point</a> |
+| <a href="#SkPath_isEmpty">isEmpty</a> | returns if verb count is zero |
+| <a href="#SkPath_isFinite">isFinite</a> | returns if all <a href="SkPoint_Reference#Point">Point</a> values are finite |
+| <a href="#SkPath_isInterpolatable">isInterpolatable</a> | returns if pair contains equal counts of <a href="#Verb_Array">Verb Array</a> and <a href="#Weight">Weights</a> |
+| <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="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="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 name="SkPath_isInterpolatable"></a>
## isInterpolatable
@@ -632,6 +661,12 @@ paths are interpolatable
---
+## <a name="Interpolate"></a> Interpolate
+
+| name | description |
+| --- | --- |
+| <a href="#SkPath_interpolate">interpolate</a> | interpolates between <a href="#Path">Path</a> pair |
+
<a name="SkPath_interpolate"></a>
## interpolate
@@ -639,7 +674,7 @@ paths are interpolatable
bool interpolate(const SkPath& ending, SkScalar weight, SkPath* out) const
</pre>
-Interpolate between <a href="#Path">Paths</a> with <a href="#Point_Array">Point Array</a> of equal size.
+<a href="#Interpolate">Interpolate</a> between <a href="#Path">Paths</a> with <a href="#Point_Array">Point Array</a> of equal size.
Copy <a href="#Verb_Array">Verb Array</a> and <a href="#Weight">Weights</a> to <a href="#SkPath_interpolate_out">out</a>, and set <a href="#SkPath_interpolate_out">out</a> <a href="#Point_Array">Point Array</a> to a weighted
average of this <a href="#Point_Array">Point Array</a> and <a href="#SkPath_interpolate_ending">ending</a> <a href="#Point_Array">Point Array</a>, using the formula:
(<a href="#Path">Path</a> <a href="SkPoint_Reference#Point">Point</a> * <a href="#SkPath_interpolate_weight">weight</a>) + <a href="#SkPath_interpolate_ending">ending</a> <a href="SkPoint_Reference#Point">Point</a> * (1 - <a href="#SkPath_interpolate_weight">weight</a>).
@@ -685,9 +720,7 @@ true if <a href="#Path">Paths</a> contain same number of <a href="#Point">Points
bool unique() const
</pre>
-### Return Value
-
-true if <a href="#Path">Path</a> has one owner
+soonOnly valid for Android framework.
---
@@ -1029,11 +1062,7 @@ true if <a href="#Convexity">Convexity</a> stored or computed is <a href="#SkPat
void setIsConvex(bool isConvex)
</pre>
-Deprecated. Use <a href="#SkPath_setConvexity">setConvexity</a>.
-
-### See Also
-
-<a href="#Convexity">Convexity</a> <a href="#SkPath_setConvexity">setConvexity</a> <a href="#SkPath_getConvexity">getConvexity</a>
+Use <a href="#SkPath_setConvexity">setConvexity</a>.
---
@@ -1315,6 +1344,12 @@ volatile by default is false
---
+## <a name="Volatile"></a> Volatile
+
+| name | description |
+| --- | --- |
+| <a href="#SkPath_setIsVolatile">setIsVolatile</a> | sets if <a href="undocumented#Device">Device</a> should not cache |
+
<a name="SkPath_setIsVolatile"></a>
## setIsVolatile
@@ -1843,6 +1878,23 @@ rotated circle bounds = 14.6447, 9.64466, 85.3553, 80.3553
---
+## <a name="Utility"></a> Utility
+
+| name | description |
+| --- | --- |
+| <a href="#SkPath_ConvertConicToQuads">ConvertConicToQuads</a> | approximates <a href="#Conic">Conic</a> with <a href="#Quad">Quad</a> array |
+| <a href="#SkPath_ConvertToNonInverseFillType">ConvertToNonInverseFillType</a> | returns <a href="#Fill_Type">Fill Type</a> representing inside geometry |
+| <a href="#SkPath_dump_2">dump</a> | sends text representation using floats to standard output |
+| | dump |
+| <a href="#SkPath_dumpHex">dumpHex</a> | sends text representation using hexadecimal to standard output |
+| <a href="#SkPath_getSegmentMasks">getSegmentMasks</a> | returns types in <a href="#Verb_Array">Verb Array</a> |
+| <a href="#SkPath_incReserve">incReserve</a> | reserves space for additional data |
+| <a href="#SkPath_readFromMemory">readFromMemory</a> | Initializes from buffer |
+| <a href="#SkPath_serialize">serialize</a> | copies data to buffer |
+| <a href="#SkPath_setLastPt">setLastPt</a> | replaces <a href="#Last_Point">Last Point</a> |
+| <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 |
+
<a name="SkPath_updateBoundsCache"></a>
## updateBoundsCache
@@ -1986,6 +2038,40 @@ number of additional <a href="#Point">Points</a> to allocate</td>
---
+## <a name="Build"></a> Build
+
+| name | description |
+| --- | --- |
+| <a href="#SkPath_addArc">addArc</a> | adds one <a href="#Contour">Contour</a> containing <a href="#Arc">Arc</a> |
+| <a href="#SkPath_addCircle">addCircle</a> | adds one <a href="#Contour">Contour</a> containing <a href="undocumented#Circle">Circle</a> |
+| <a href="#SkPath_addOval">addOval</a> | adds one <a href="#Contour">Contour</a> containing <a href="undocumented#Oval">Oval</a> |
+| | <a href="#SkPath_addOval">addOval</a> |
+| <a href="#SkPath_addPath">addPath</a> | adds contents of <a href="#Path">Path</a> |
+| | <a href="#SkPath_addPath">addPath</a> |
+| | <a href="#SkPath_addPath">addPath</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_addRRect">addRRect</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_addRect">addRect</a> |
+| | <a href="#SkPath_addRect">addRect</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_addRoundRect">addRoundRect</a> |
+| <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_cubicTo">cubicTo</a> | appends <a href="#Cubic">Cubic</a> |
+| <a href="#SkPath_lineTo">lineTo</a> | appends <a href="undocumented#Line">Line</a> |
+| | <a href="#SkPath_lineTo">lineTo</a> |
+| <a href="#SkPath_moveTo">moveTo</a> | starts <a href="#Contour">Contour</a> |
+| | <a href="#SkPath_moveTo">moveTo</a> |
+| <a href="#SkPath_rArcTo">rArcTo</a> | appends <a href="#Arc">Arc</a> relative to <a href="#Last_Point">Last Point</a> |
+| <a href="#SkPath_rConicTo">rConicTo</a> | appends <a href="#Conic">Conic</a> relative to <a href="#Last_Point">Last Point</a> |
+| <a href="#SkPath_rCubicTo">rCubicTo</a> | appends <a href="#Cubic">Cubic</a> relative to <a href="#Last_Point">Last Point</a> |
+| <a href="#SkPath_rLineTo">rLineTo</a> | appends <a href="undocumented#Line">Line</a> relative to <a href="#Last_Point">Last Point</a> |
+| <a href="#SkPath_rMoveTo">rMoveTo</a> | starts <a href="#Contour">Contour</a> relative to <a href="#Last_Point">Last Point</a> |
+| <a href="#SkPath_rQuadTo">rQuadTo</a> | appends <a href="#Quad">Quad</a> relative to <a href="#Last_Point">Last Point</a> |
+| <a href="#SkPath_reverseAddPath">reverseAddPath</a> | adds contents of <a href="#Path">Path</a> back to front |
+
<a name="SkPath_moveTo"></a>
## moveTo
@@ -3973,6 +4059,15 @@ overwritten, translated copy of <a href="#Path">Path</a>; may be nullptr</td>
---
+## <a name="Transform"></a> Transform
+
+| name | description |
+| --- | --- |
+| <a href="#SkPath_offset">offset</a> | translates <a href="#Point_Array">Point Array</a> |
+| | offset |
+| <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> |
+| | transform |
+
<a name="SkPath_offset_2"></a>
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
@@ -4007,7 +4102,7 @@ offset added to <a href="#Point_Array">Point Array</a> y coordinates</td>
void transform(const SkMatrix& matrix, SkPath* dst) const
</pre>
-Transform <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, and weight by <a href="#SkPath_transform_matrix">matrix</a>.
+<a href="#Transform">Transform</a> <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, and weight by <a href="#SkPath_transform_matrix">matrix</a>.
transform may change <a href="#Verb">Verbs</a> and increase their number.
Transformed <a href="#Path">Path</a> replaces <a href="#SkPath_transform_dst">dst</a>; if <a href="#SkPath_transform_dst">dst</a> is nullptr, original data
is replaced.
@@ -4037,7 +4132,7 @@ overwritten, transformed copy of <a href="#Path">Path</a>; may be nullptr</td>
void transform(const SkMatrix& matrix)
</pre>
-Transform <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, and weight by <a href="#SkPath_transform_2_matrix">matrix</a>.
+<a href="#Transform">Transform</a> <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, and weight by <a href="#SkPath_transform_2_matrix">matrix</a>.
transform may change <a href="#Verb">Verbs</a> and increase their number.
<a href="#Path">Path</a> is replaced by transformed data.
@@ -4555,6 +4650,8 @@ Setting <a href="#Fill_Type">Fill Type</a> does not change <a href="#Generation_
Each time the path is modified, a different <a href="#Generation_ID">Generation ID</a> will be returned.
+<a href="#Fill_Type">Fill Type</a> does affect <a href="#Generation_ID">Generation ID</a> on Android framework.
+
### Return Value
non-zero, globally unique value
@@ -4604,13 +4701,7 @@ true if <a href="#Path">Path</a> data is consistent
bool pathRefIsValid() const
</pre>
-Returns if <a href="#Path">Path</a> data is consistent.
-
-To be deprecated soon.
-
-### Return Value
-
-true if <a href="#Path">Path</a> data is consistent
+soon
---
@@ -5110,6 +5201,11 @@ peek Done == verb Done
</fiddle-embed></div>
+StdOut isn't really volatile, it just produces the wrong result.
+A simple fix changes the output of hairlines and needs to be
+investigated to see if the change is correct or not.
+https://skia-review.googlesource.com/c/21340/
+
### See Also
<a href="#SkPath_RawIter_next">next</a>
diff --git a/site/user/api/SkPixmap_Reference.md b/site/user/api/SkPixmap_Reference.md
index ed044b05c0..97753c3bbd 100644
--- a/site/user/api/SkPixmap_Reference.md
+++ b/site/user/api/SkPixmap_Reference.md
@@ -5,13 +5,13 @@ SkPixmap Reference
## <a name="Overview"></a> Overview
-## <a name="Subtopics"></a> Subtopics
+## <a name="Subtopic"></a> Subtopic
| name | description |
| --- | --- |
-| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkPixmap_Reference#SkPixmap">SkPixmap</a> |
-| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
-| <a href="#Related_Functions">Related Functions</a> | similar methods grouped together |
+| <a href="#Constructor">Constructor</a> | functions that construct <a href="SkPixmap_Reference#SkPixmap">SkPixmap</a> |
+| <a href="#Member_Function">Member Function</a> | static functions and member methods |
+| <a href="#Related_Function">Related Function</a> | similar methods grouped together |
# <a name="SkPixmap"></a> Class SkPixmap
<a href="#Pixmap">Pixmap</a> provides a utility to pair <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> with pixels and row bytes.
@@ -25,7 +25,7 @@ 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#Pixel_Ref">Pixel Ref</a>
to manage pixel memory; <a href="undocumented#Pixel_Ref">Pixel Ref</a> is safe across threads.
-## <a name="Related_Functions"></a> Related Functions
+## <a name="Related_Function"></a> Related Function
| name | description |
| --- | --- |
@@ -36,14 +36,14 @@ to manage pixel memory; <a href="undocumented#Pixel_Ref">Pixel Ref</a> is safe a
| <a href="#Writable_Address">Writable Address</a> | returns writable pixels |
| <a href="#Writer">Writer</a> | copy to pixel values |
-## <a name="Constructors"></a> Constructors
+## <a name="Constructor"></a> Constructor
| name | description |
| --- | --- |
| <a href="#SkPixmap_empty_constructor">SkPixmap()</a> | constructs with default values |
| <a href="#SkPixmap_const_SkImageInfo_const_star">SkPixmap(const SkImageInfo& info, const void* addr, size t rowBytes)</a> | constructs from <a href="SkImageInfo_Reference#Image_Info">Image Info</a>, pixels |
-## <a name="Member_Functions"></a> Member Functions
+## <a name="Member_Function"></a> Member Function
| name | description |
| --- | --- |
@@ -285,40 +285,7 @@ is not unique
bool SK_WARN_UNUSED_RESULT reset(const SkMask& mask)
</pre>
-Sets width, height, pixel address, and row bytes to <a href="undocumented#Mask">Mask</a> properties, if <a href="undocumented#Mask">Mask</a>
-format is <a href="#SkMask_kA8_Format">SkMask::kA8 Format</a>; and returns true. Otherwise sets width, height,
-row bytes to zero; pixel address to nullptr; <a href="SkImageInfo_Reference#SkColorType">SkColorType</a> to <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>;
-and <a href="SkImageInfo_Reference#SkAlphaType">SkAlphaType</a> to <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a>; and returns false.
-
-Failing to read the return value generates a compile time warning.
-
-### Parameters
-
-<table> <tr> <td><a name="SkPixmap_reset_3_mask"> <code><strong>mask </strong></code> </a></td> <td>
-<a href="undocumented#Mask">Mask</a> containing pixels and dimensions</td>
- </tr>
-</table>
-
-### Return Value
-
-true if set to <a href="undocumented#Mask">Mask</a> properties
-
-### Example
-
-<div><fiddle-embed name="379761a97bd7a116638a34eb3e80bf0d">
-
-#### Example Output
-
-~~~~
-success: true width: 2 height: 2
-success: false width: 0 height: 0
-~~~~
-
-</fiddle-embed></div>
-
-### See Also
-
-<a href="undocumented#Mask">Mask</a> <a href="#SkPixmap_reset">reset</a><sup><a href="#SkPixmap_reset_2">[2]</a></sup><sup><a href="#SkPixmap_reset_3">[3]</a></sup>
+soon
---
diff --git a/site/user/api/SkPoint_Reference.md b/site/user/api/SkPoint_Reference.md
index 6e831a0c20..a7f759a206 100644
--- a/site/user/api/SkPoint_Reference.md
+++ b/site/user/api/SkPoint_Reference.md
@@ -5,38 +5,26 @@ SkPoint Reference
## <a name="Overview"></a> Overview
-## <a name="Subtopics"></a> Subtopics
+## <a name="Subtopic"></a> Subtopic
| name | description |
| --- | --- |
-| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkPoint_Reference#SkPoint">SkPoint</a> |
-| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
-| <a href="#Members">Members</a> | member values |
-| <a href="#Operators">Operators</a> | operator overloading methods |
+| <a href="#Constructor">Constructor</a> | functions that construct <a href="SkPoint_Reference#SkPoint">SkPoint</a> |
+| <a href="#Member_Function">Member Function</a> | static functions and member methods |
+| <a href="#Member">Member</a> | member values |
+| <a href="#Operator">Operator</a> | operator overloading methods |
+| <a href="#Related_Function">Related Function</a> | similar methods grouped together |
# <a name="SkPoint"></a> Struct SkPoint
+<a href="#SkPoint">SkPoint</a> holds two 32 bit floating point coordinates.
-## <a name="Constructors"></a> Constructors
+## <a name="Related_Function"></a> Related Function
| name | description |
| --- | --- |
-| <a href="#SkPoint_Make">Make</a> | constructs from <a href="undocumented#SkScalar">SkScalar</a> inputs |
+| <a href="#SkPoint_Offset">Offset</a> | moves sides |
-## <a name="Operators"></a> Operators
-
-| name | description |
-| --- | --- |
-| <a href="#SkPoint_notequal_operator">operator!=(const SkPoint& a, const SkPoint& b)</a> | returns true if <a href="#Point">Point</a> are unequal |
-| <a href="#SkPoint_multiply_operator">operator*(SkScalar scale) const</a> | returns <a href="#Point">Point</a> multiplied by scale |
-| <a href="#SkPoint_multiplyby_operator">operator*=(SkScalar scale)</a> | multiplies <a href="#Point">Point</a> by scale factor |
-| <a href="#SkPoint_add_operator">operator+(const SkPoint& a, const SkVector& b)</a> | returns <a href="#Point">Point</a> offset by <a href="SkPoint_Reference#Vector">Vector</a> |
-| <a href="#SkPoint_addto_operator">operator+=(const SkVector& v)</a> | adds <a href="SkPoint_Reference#Vector">Vector</a> to <a href="#Point">Point</a> |
-| <a href="#SkPoint_minus_operator">operator-() const</a> | reverses sign of <a href="#Point">Point</a> |
-| <a href="#SkPoint_subtract_operator">operator-(const SkPoint& a, const SkPoint& b)</a> | returns <a href="SkPoint_Reference#Vector">Vector</a> between <a href="#Point">Points</a> |
-| <a href="#SkPoint_subtractfrom_operator">operator-=(const SkVector& v)</a> | subtracts <a href="SkPoint_Reference#Vector">Vector</a> from <a href="#Point">Point</a> |
-| <a href="#SkPoint_equal_operator">operator==(const SkPoint& a, const SkPoint& b)</a> | returns true if <a href="#Point">Point</a> are equal |
-
-## <a name="Member_Functions"></a> Member Functions
+## <a name="Member_Function"></a> Member Function
| name | description |
| --- | --- |
@@ -66,7 +54,7 @@ SkPoint Reference
| <a href="#SkPoint_x">x</a> | returns <a href="#SkPoint_fX">fX</a> |
| <a href="#SkPoint_y">y</a> | returns <a href="#SkPoint_fY">fY</a> |
-## <a name="Members"></a> Members
+## <a name="Member"></a> Member
| name | description |
| --- | --- |
@@ -83,6 +71,12 @@ infinities and NaN.
y-axis value used by both <a href="#Point">Point</a> and <a href="SkPoint_Reference#Vector">Vector</a>. May contain any value, including
infinities and NaN.
+## <a name="Constructor"></a> Constructor
+
+| name | description |
+| --- | --- |
+| <a href="#SkPoint_Make">Make</a> | constructs from <a href="undocumented#SkScalar">SkScalar</a> inputs |
+
<a name="SkPoint_Make"></a>
## Make
@@ -123,6 +117,19 @@ all equal
---
+## <a name="Property"></a> Property
+
+| name | description |
+| --- | --- |
+| <a href="#SkPoint_Distance">Distance</a> | returns straight-line distance between points |
+| <a href="#SkPoint_Length">Length</a> | returns straight-line distance to origin |
+| <a href="#SkPoint_distanceToOrigin">distanceToOrigin</a> | returns straight-line distance to origin |
+| <a href="#SkPoint_isFinite">isFinite</a> | returns true if no member is infinite or NaN |
+| <a href="#SkPoint_isZero">isZero</a> | returns true if both members equal zero |
+| <a href="#SkPoint_length">length</a> | returns straight-line distance to origin |
+| <a href="#SkPoint_x">x</a> | returns <a href="#SkPoint_fX">fX</a> |
+| <a href="#SkPoint_y">y</a> | returns <a href="#SkPoint_fY">fY</a> |
+
<a name="SkPoint_x"></a>
## x
@@ -217,6 +224,19 @@ pt.isZero() == true
---
+## <a name="Set"></a> Set
+
+| name | description |
+| --- | --- |
+| <a href="#SkPoint_iset">iset</a> | sets to integer input |
+| | iset |
+| <a href="#SkPoint_normalize">normalize</a> | sets length to one, preserving direction |
+| <a href="#SkPoint_set">set</a> | sets to <a href="undocumented#SkScalar">SkScalar</a> input |
+| <a href="#SkPoint_setAbs">setAbs</a> | sets sign of both members to positive |
+| <a href="#SkPoint_setLength">setLength</a> | sets straight-line distance to origin |
+| | <a href="#SkPoint_setLength">setLength</a> |
+| <a href="#SkPoint_setNormalize">setNormalize</a> | sets length to one, in direction of (x, y) |
+
<a name="SkPoint_set"></a>
## set
@@ -360,6 +380,17 @@ pt: nan, -nan abs: nan, nan
---
+## <a name="Offset"></a> Offset
+
+| name | description |
+| --- | --- |
+| <a href="#SkPoint_Normalize">Normalize</a> | sets length to one, and returns prior length |
+| <a href="#SkPoint_Offset">Offset</a> | translates <a href="#Point">Point</a> array |
+| | <a href="#SkPoint_Offset">Offset</a> |
+| <a href="#SkPoint_offset">offset</a> | translates <a href="#Point">Point</a> |
+| <a href="#SkPoint_scale">scale</a> | multiplies <a href="#Point">Point</a> by scale factor |
+| | scale |
+
<a name="SkPoint_Offset"></a>
## Offset
@@ -631,6 +662,26 @@ true if (x, y) length is not zero or nearly zero
---
+## <a name="Operator"></a> Operator
+
+| name | description |
+| --- | --- |
+| <a href="#SkPoint_CrossProduct">CrossProduct</a> | returns cross product |
+| <a href="#SkPoint_DotProduct">DotProduct</a> | returns dot product |
+| <a href="#SkPoint_cross">cross</a> | returns cross product |
+| <a href="#SkPoint_dot">dot</a> | returns dot product |
+| <a href="#SkPoint_equals">equals</a> | returns true if <a href="#Point">Points</a> are equal |
+| <a href="#SkPoint_negate">negate</a> | reverses the sign of both members |
+| <a href="#SkPoint_notequal_operator">operator!=(const SkPoint& a, const SkPoint& b)</a> | returns true if <a href="#Point">Point</a> are unequal |
+| <a href="#SkPoint_multiply_operator">operator*(SkScalar scale) const</a> | returns <a href="#Point">Point</a> multiplied by scale |
+| <a href="#SkPoint_multiplyby_operator">operator*=(SkScalar scale)</a> | multiplies <a href="#Point">Point</a> by scale factor |
+| <a href="#SkPoint_add_operator">operator+(const SkPoint& a, const SkVector& b)</a> | returns <a href="#Point">Point</a> offset by <a href="SkPoint_Reference#Vector">Vector</a> |
+| <a href="#SkPoint_addto_operator">operator+=(const SkVector& v)</a> | adds <a href="SkPoint_Reference#Vector">Vector</a> to <a href="#Point">Point</a> |
+| <a href="#SkPoint_minus_operator">operator-() const</a> | reverses sign of <a href="#Point">Point</a> |
+| <a href="#SkPoint_subtract_operator">operator-(const SkPoint& a, const SkPoint& b)</a> | returns <a href="SkPoint_Reference#Vector">Vector</a> between <a href="#Point">Points</a> |
+| <a href="#SkPoint_subtractfrom_operator">operator-=(const SkVector& v)</a> | subtracts <a href="SkPoint_Reference#Vector">Vector</a> from <a href="#Point">Point</a> |
+| <a href="#SkPoint_equal_operator">operator==(const SkPoint& a, const SkPoint& b)</a> | returns true if <a href="#Point">Point</a> are equal |
+
<a name="SkPoint_scale"></a>
## scale
@@ -1243,9 +1294,9 @@ static SkScalar CrossProduct(const SkVector& a, const SkVector& b)
Returns the cross product of <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_CrossProduct_a">a</a> and <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_CrossProduct_b">b</a>.
-<a href="#SkPoint_CrossProduct_a">a</a> and <a href="#SkPoint_CrossProduct_b">b</a> form three-dimensional vectors with z equal to zero. The cross product
-is <a href="#SkPoint_CrossProduct_a">a</a> three-dimensional vector with x and y equal to zero. The cross product z
-term equals the returned value.
+<a href="#SkPoint_CrossProduct_a">a</a> and <a href="#SkPoint_CrossProduct_b">b</a> form three-dimensional vectors with z-axis value equal to zero. The
+cross product is <a href="#SkPoint_CrossProduct_a">a</a> three-dimensional vector with x-axis and y-axis values equal
+to zero. The cross product z-axis component is returned.
### Parameters
@@ -1279,9 +1330,9 @@ SkScalar cross(const SkVector& vec) const
Returns the cross product of <a href="SkPoint_Reference#Vector">Vector</a> and <a href="#SkPoint_cross_vec">vec</a>.
-<a href="SkPoint_Reference#Vector">Vector</a> and <a href="#SkPoint_cross_vec">vec</a> form three-dimensional vectors with z equal to zero. The
-cross product is a three-dimensional vector with x and y equal to zero.
-The cross product z term equals the returned value.
+<a href="SkPoint_Reference#Vector">Vector</a> and <a href="#SkPoint_cross_vec">vec</a> form three-dimensional vectors with z-axis value equal to zero.
+The cross product is a three-dimensional vector with x-axis and y-axis values
+equal to zero. The cross product z-axis component is returned.
### Parameters
diff --git a/site/user/api/SkRect_Reference.md b/site/user/api/SkRect_Reference.md
index d6aea67c64..2db62a5454 100644
--- a/site/user/api/SkRect_Reference.md
+++ b/site/user/api/SkRect_Reference.md
@@ -5,15 +5,15 @@ SkRect Reference
## <a name="Overview"></a> Overview
-## <a name="Subtopics"></a> Subtopics
+## <a name="Subtopic"></a> Subtopic
| name | description |
| --- | --- |
-| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkRect_Reference#SkRect">SkRect</a> |
-| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
-| <a href="#Members">Members</a> | member values |
-| <a href="#Operators">Operators</a> | operator overloading methods |
-| <a href="#Related_Functions">Related Functions</a> | similar methods grouped together |
+| <a href="#Constructor">Constructor</a> | functions that construct <a href="SkRect_Reference#SkRect">SkRect</a> |
+| <a href="#Member_Function">Member Function</a> | static functions and member methods |
+| <a href="#Member">Member</a> | member values |
+| <a href="#Operator">Operator</a> | operator overloading methods |
+| <a href="#Related_Function">Related Function</a> | similar methods grouped together |
# <a name="SkRect"></a> Struct SkRect
<a href="#SkRect">SkRect</a> holds four <a href="undocumented#SkScalar">SkScalar</a> coordinates describing the upper and
@@ -25,31 +25,23 @@ its top, it is considered empty.
<a href="#SkRect">SkRect</a> can be constructed from int values to avoid compiler warnings that
integer input cannot convert to <a href="undocumented#SkScalar">SkScalar</a> without loss of precision.
-## <a name="Related_Functions"></a> Related Functions
+## <a name="Related_Function"></a> Related Function
| name | description |
| --- | --- |
| <a href="#As_Points">As Points</a> | conversion to and from <a href="#Point">Points</a> |
| <a href="#From_Integers">From Integers</a> | set <a href="#Scalar">Scalar</a> values from integer input |
-| <a href="#Inset_Outset_Offset">Inset Outset Offset</a> | moves sides |
-| <a href="#Intersection">Intersection</a> | set to shared bounds |
-| <a href="#Join">Join</a> | set to union of bounds |
-| <a href="#Properties">Properties</a> | side values, center, validity |
| <a href="#Rounding">Rounding</a> | adjust to integer bounds |
-| <a href="#Set">Set</a> | replaces all values |
-| <a href="#Sorting">Sorting</a> | orders sides |
-## <a name="Member_Functions"></a> Member Functions
+## <a name="Member_Function"></a> Member Function
| name | description |
| --- | --- |
| <a href="#SkRect_Intersects">Intersects</a> | returns true if areas overlap |
| <a href="#SkRect_Make">Make</a> | constructs from <a href="undocumented#ISize">ISize</a> returning (0, 0, width, height) |
| <a href="#SkRect_MakeEmpty">MakeEmpty</a> | constructs from bounds of (0, 0, 0, 0) |
-| <a href="#SkRect_MakeFromIRect">MakeFromIRect</a> | deprecated |
| <a href="#SkRect_MakeIWH">MakeIWH</a> | constructs from int input returning (0, 0, width, height) |
| <a href="#SkRect_MakeLTRB">MakeLTRB</a> | constructs from <a href="undocumented#SkScalar">SkScalar</a> left, top, right, bottom |
-| <a href="#SkRect_MakeLargest">MakeLargest</a> | deprecated |
| <a href="#SkRect_MakeSize">MakeSize</a> | constructs from <a href="undocumented#Size">Size</a> returning (0, 0, width, height) |
| <a href="#SkRect_MakeWH">MakeWH</a> | constructs from <a href="undocumented#SkScalar">SkScalar</a> input returning (0, 0, width, height) |
| <a href="#SkRect_MakeXYWH">MakeXYWH</a> | constructs from <a href="undocumented#SkScalar">SkScalar</a> input returning (x, y, width, height) |
@@ -98,7 +90,7 @@ integer input cannot convert to <a href="undocumented#SkScalar">SkScalar</a> wit
| <a href="#SkRect_x">x</a> | returns bounds left |
| <a href="#SkRect_y">y</a> | returns bounds top |
-## <a name="Members"></a> Members
+## <a name="Member"></a> Member
| name | description |
| --- | --- |
@@ -127,16 +119,14 @@ horizontal values when sorted. When equal to or less than <a href="#SkRect_fLeft
May contain any value, including infinities and NaN. The larger of the
vertical values when sorted. When equal to or less than <a href="#SkRect_fTop">fTop</a>, <a href="#Rect">Rect</a> is empty.
-## <a name="Constructors"></a> Constructors
+## <a name="Constructor"></a> Constructor
| name | description |
-| --- | --- |
+| --- | --- |
| <a href="#SkRect_Make">Make</a> | constructs from <a href="undocumented#ISize">ISize</a> returning (0, 0, width, height) |
| <a href="#SkRect_MakeEmpty">MakeEmpty</a> | constructs from bounds of (0, 0, 0, 0) |
-| <a href="#SkRect_MakeFromIRect">MakeFromIRect</a> | deprecated |
| <a href="#SkRect_MakeIWH">MakeIWH</a> | constructs from int input returning (0, 0, width, height) |
| <a href="#SkRect_MakeLTRB">MakeLTRB</a> | constructs from <a href="undocumented#SkScalar">SkScalar</a> left, top, right, bottom |
-| <a href="#SkRect_MakeLargest">MakeLargest</a> | deprecated |
| <a href="#SkRect_MakeSize">MakeSize</a> | constructs from <a href="undocumented#Size">Size</a> returning (0, 0, width, height) |
| <a href="#SkRect_MakeWH">MakeWH</a> | constructs from <a href="undocumented#SkScalar">SkScalar</a> input returning (0, 0, width, height) |
| <a href="#SkRect_MakeXYWH">MakeXYWH</a> | constructs from <a href="undocumented#SkScalar">SkScalar</a> input returning (x, y, width, height) |
@@ -411,23 +401,6 @@ rect: -10, 35, 5, 60 isEmpty: false
static SkRect SK_WARN_UNUSED_RESULT MakeFromIRect(const SkIRect& irect)
</pre>
-Deprecated.
-
-### Parameters
-
-<table> <tr> <td><a name="SkRect_MakeFromIRect_irect"> <code><strong>irect </strong></code> </a></td> <td>
-integer rect</td>
- </tr>
-</table>
-
-### Return Value
-
-<a href="#SkRect_MakeFromIRect_irect">irect</a> as <a href="#SkRect">SkRect</a>
-
-### See Also
-
-<a href="#SkRect_Make">Make</a><sup><a href="#SkRect_Make_2">[2]</a></sup>
-
---
<a name="SkRect_Make"></a>
@@ -500,13 +473,17 @@ integer unsorted bounds</td>
---
-## <a name="Properties"></a> Properties
+## <a name="Property"></a> Property
| name | description |
-| --- | --- |
+| --- | --- |
+| <a href="#SkRect_asScalars">asScalars</a> | returns pointer to members as array |
| <a href="#SkRect_bottom">bottom</a> | returns larger bounds in y, if sorted |
| <a href="#SkRect_centerX">centerX</a> | returns midpoint in x |
| <a href="#SkRect_centerY">centerY</a> | returns midpoint in y |
+| <a href="#SkRect_dump_2">dump</a> | sends text representation to standard output using floats |
+| | dump |
+| <a href="#SkRect_dumpHex">dumpHex</a> | sends text representation to standard output using hexadecimal |
| <a href="#SkRect_height">height</a> | returns span in y |
| <a href="#SkRect_isEmpty">isEmpty</a> | returns true if width or height are zero or negative |
| <a href="#SkRect_isFinite">isFinite</a> | returns true if no member is infinite or NaN |
@@ -955,10 +932,10 @@ left: 2e+38 right: 3e+38 centerX: inf safe mid x: 2.5e+38
---
-## <a name="Operators"></a> Operators
+## <a name="Operator"></a> Operator
| name | description |
-| --- | --- |
+| --- | --- |
| <a href="#SkRect_notequal_operator">operator!=(const SkRect& a, const SkRect& b)</a> | returns true if members are unequal |
| <a href="#SkRect_equal_operator">operator==(const SkRect& a, const SkRect& b)</a> | returns true if members are equal |
@@ -1056,7 +1033,7 @@ test with NaN is not equal to itself
## <a name="As_Points"></a> As Points
| name | description |
-| --- | --- |
+| --- | --- |
| <a href="#SkRect_setBounds">setBounds</a> | sets to upper and lower limits of <a href="SkPoint_Reference#Point">Point</a> array |
| <a href="#SkRect_setBoundsCheck">setBoundsCheck</a> | sets to upper and lower limits of <a href="SkPoint_Reference#Point">Point</a> array |
| <a href="#SkRect_toQuad">toQuad</a> | returns four corners as <a href="SkPoint_Reference#Point">Point</a> |
@@ -1193,14 +1170,8 @@ added: nan, 8 count: 4 rect: 0, 0, 0, 0 success: false
## <a name="Set"></a> Set
| name | description |
-| --- | --- |
-| <a href="#SkRect_iset">iset</a> | sets to int input (left, top, right, bottom) |
-| <a href="#SkRect_isetWH">isetWH</a> | sets to int input (0, 0, width, height) |
+| --- | --- |
| <a href="#SkRect_set">set</a> | sets to <a href="undocumented#SkScalar">SkScalar</a> input (left, top, right, bottom) and others |
-| | void <a href="#SkRect_set">set(const SkIRect& src)</a> |
-| | void <a href="#SkRect_set_2">set(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom)</a> |
-| | void <a href="#SkRect_set_3">set(const SkPoint pts[], int count)</a> |
-| | void <a href="#SkRect_set_4">set(const SkPoint& p0, const SkPoint& p1)</a> |
| <a href="#SkRect_setEmpty">setEmpty</a> | sets to (0, 0, 0, 0) |
| <a href="#SkRect_setLTRB">setLTRB</a> | sets to <a href="undocumented#SkScalar">SkScalar</a> input (left, top, right, bottom) |
| <a href="#SkRect_setWH">setWH</a> | sets to <a href="undocumented#SkScalar">SkScalar</a> input (0, 0, width, height) |
@@ -1514,7 +1485,7 @@ rect: -15, 0, 0, 25 isEmpty: false
## <a name="From_Integers"></a> From Integers
| name | description |
-| --- | --- |
+| --- | --- |
| <a href="#SkRect_iset">iset</a> | sets to int input (left, top, right, bottom) |
| <a href="#SkRect_isetWH">isetWH</a> | sets to int input (0, 0, width, height) |
@@ -1604,14 +1575,9 @@ rect2: {0, 0, 1, 2}
## <a name="Inset_Outset_Offset"></a> Inset Outset Offset
| name | description |
-| --- | --- |
+| --- | --- |
| <a href="#SkRect_inset">inset</a> | moves the sides symmetrically about the center |
-| <a href="#SkRect_makeInset">makeInset</a> | constructs from sides moved symmetrically about the center |
-| <a href="#SkRect_makeOffset">makeOffset</a> | constructs from translated sides |
-| <a href="#SkRect_makeOutset">makeOutset</a> | constructs from sides moved symmetrically about the center |
| <a href="#SkRect_offset">offset</a> | translates sides without changing width and height |
-| | void <a href="#SkRect_offset">offset(SkScalar dx, SkScalar dy)</a> |
-| | void <a href="#SkRect_offset_2">offset(const SkPoint& delta)</a> |
| <a href="#SkRect_offsetTo">offsetTo</a> | translates to (x, y) without changing width and height |
| <a href="#SkRect_outset">outset</a> | moves the sides symmetrically about the center |
@@ -1965,18 +1931,11 @@ The intersection is only meaningful if the resulting <a href="#Rect">Rect</a> is
describes an area: <a href="#SkRect_fLeft">fLeft</a> is less than <a href="#SkRect_fRight">fRight</a>, and <a href="#SkRect_fTop">fTop</a> is less than <a href="#SkRect_fBottom">fBottom</a>.
| name | description |
-| --- | --- |
+| --- | --- |
| <a href="#SkRect_Intersects">Intersects</a> | returns true if areas overlap |
| <a href="#SkRect_contains">contains</a> | returns true if points are equal or inside |
-| | bool <a href="#SkRect_contains">contains(const SkRect& r)</a> const |
-| | bool <a href="#SkRect_contains_2">contains(const SkIRect& r)</a> const |
| <a href="#SkRect_intersect">intersect</a> | sets to shared area; returns true if not empty |
-| | bool <a href="#SkRect_intersect_2">intersect(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom)</a> |
-| | bool <a href="#SkRect_intersect">intersect(const SkRect& r)</a> |
-| | bool <a href="#SkRect_intersect_3">intersect(const SkRect& a, const SkRect& b)</a> |
| <a href="#SkRect_intersects">intersects</a> | returns true if areas overlap |
-| | bool <a href="#SkRect_intersects">intersects(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom)</a> const |
-| | bool <a href="#SkRect_intersects_2">intersects(const SkRect& r)</a> const |
<a name="SkRect_contains"></a>
## contains
@@ -2329,10 +2288,8 @@ intersection
## <a name="Join"></a> Join
| name | description |
-| --- | --- |
+| --- | --- |
| <a href="#SkRect_join">join</a> | sets to union of bounds |
-| | void <a href="#SkRect_join">join(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom)</a> |
-| | void <a href="#SkRect_join_2">join(const SkRect& r)</a> |
| <a href="#SkRect_joinNonEmptyArg">joinNonEmptyArg</a> | sets to union of bounds, asserting that argument is not empty |
| <a href="#SkRect_joinPossiblyEmptyRect">joinPossiblyEmptyRect</a> | sets to union of bounds. Skips empty check for both |
@@ -2498,15 +2455,10 @@ sorted: 10, 0, 55, 100
## <a name="Rounding"></a> Rounding
| name | description |
-| --- | --- |
+| --- | --- |
| <a href="#SkRect_round_2">round</a> | sets members to nearest integer value |
-| | void <a href="#SkRect_round">round(SkIRect* dst)</a> const |
-| | <a href="SkIRect_Reference#SkIRect">SkIRect</a> <a href="#SkRect_round_2">round</a> const |
| <a href="#SkRect_roundIn">roundIn</a> | sets members to nearest integer value towards opposite |
| <a href="#SkRect_roundOut">roundOut</a> | sets members to nearest integer value away from opposite |
-| | void <a href="#SkRect_roundOut">roundOut(SkIRect* dst)</a> const |
-| | void <a href="#SkRect_roundOut_2">roundOut(SkRect* dst)</a> const |
-| | <a href="SkIRect_Reference#SkIRect">SkIRect</a> <a href="#SkRect_roundOut_3">roundOut</a> const |
<a name="SkRect_round"></a>
## round
@@ -2712,8 +2664,7 @@ round: 30, 50, 41, 61
## <a name="Sorting"></a> Sorting
| name | description |
-| --- | --- |
-| <a href="#SkRect_makeSorted">makeSorted</a> | constructs, ordering sides from smaller to larger |
+| --- | --- |
| <a href="#SkRect_sort">sort</a> | orders sides from smaller to larger |
<a name="SkRect_sort"></a>
@@ -2924,12 +2875,5 @@ rect is equal to copy
static SkRect SK_WARN_UNUSED_RESULT MakeLargest()
</pre>
-Returns constructed <a href="#SkRect">SkRect</a> setting left and top to most negative finite value, and
-setting right and bottom to most positive finite value.
-
-### Return Value
-
-bounds (<a href="undocumented#SK_ScalarMin">SK ScalarMin</a>, <a href="undocumented#SK_ScalarMin">SK ScalarMin</a>, <a href="undocumented#SK_ScalarMax">SK ScalarMax</a>, <a href="undocumented#SK_ScalarMax">SK ScalarMax</a>)
-
---
diff --git a/site/user/api/SkSurface_Reference.md b/site/user/api/SkSurface_Reference.md
index 1195fd886b..e5419b3367 100644
--- a/site/user/api/SkSurface_Reference.md
+++ b/site/user/api/SkSurface_Reference.md
@@ -5,13 +5,14 @@ SkSurface Reference
## <a name="Overview"></a> Overview
-## <a name="Subtopics"></a> Subtopics
+## <a name="Subtopic"></a> Subtopic
| name | description |
| --- | --- |
-| Constants | enum and enum class, const values |
-| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkSurface_Reference#SkSurface">SkSurface</a> |
-| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
+| Constant | enum and enum class, const values |
+| <a href="#Constructor">Constructor</a> | functions that construct <a href="SkSurface_Reference#SkSurface">SkSurface</a> |
+| <a href="#Member_Function">Member Function</a> | static functions and member methods |
+| <a href="#Related_Function">Related Function</a> | similar methods grouped together |
# <a name="SkSurface"></a> Class SkSurface
<a href="#SkSurface">SkSurface</a> is responsible for managing the pixels that a canvas draws into. The pixels can be
@@ -21,23 +22,14 @@ surface-><a href="#SkSurface_getCanvas">getCanvas</a> to use that canvas (but do
<a href="#SkSurface">SkSurface</a> always has non-zero dimensions. If there is a request for a new surface, and either
of the requested dimensions are zero, then nullptr will be returned.
-## <a name="Constructors"></a> Constructors
+## <a name="Related_Function"></a> Related Function
| name | description |
| --- | --- |
-| <a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a> | creates <a href="#Surface">Surface</a> from GPU memory buffer |
-| <a href="#SkSurface_MakeFromBackendTexture">MakeFromBackendTexture</a> | creates <a href="#Surface">Surface</a> from GPU-backed texture |
-| <a href="#SkSurface_MakeFromBackendTextureAsRenderTarget">MakeFromBackendTextureAsRenderTarget</a> | creates <a href="#Surface">Surface</a> from GPU-backed texture |
-| <a href="#SkSurface_MakeNull">MakeNull</a> | creates <a href="#Surface">Surface</a> without backing pixels |
-| <a href="#SkSurface_MakeRaster">MakeRaster</a> | creates <a href="#Surface">Surface</a> from <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> |
-| <a href="#SkSurface_MakeRasterDirect">MakeRasterDirect</a> | creates <a href="#Surface">Surface</a> from <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a> |
-| <a href="#SkSurface_MakeRasterDirectReleaseProc">MakeRasterDirectReleaseProc</a> | creates <a href="#Surface">Surface</a> from <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a> |
-| <a href="#SkSurface_MakeRasterN32Premul">MakeRasterN32Premul</a> | creates <a href="#Surface">Surface</a> from width, height matching output |
-| <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a> | creates <a href="#Surface">Surface</a> pointing to new GPU memory buffer |
-| <a href="#SkSurface_makeImageSnapshot">makeImageSnapshot</a> | creates <a href="SkImage_Reference#Image">Image</a> capturing <a href="#Surface">Surface</a> contents |
-| <a href="#SkSurface_makeSurface">makeSurface</a> | creates a compatible <a href="#Surface">Surface</a> |
+| <a href="#Miscellaneous">Miscellaneous</a> | other functions |
+| <a href="#Pixels">Pixels</a> | functions with pixel access |
-## <a name="Member_Functions"></a> Member Functions
+## <a name="Member_Function"></a> Member Function
| name | description |
| --- | --- |
@@ -50,7 +42,7 @@ of the requested dimensions are zero, then nullptr will be returned.
| <a href="#SkSurface_MakeRasterDirectReleaseProc">MakeRasterDirectReleaseProc</a> | creates <a href="#Surface">Surface</a> from <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a> |
| <a href="#SkSurface_MakeRasterN32Premul">MakeRasterN32Premul</a> | creates <a href="#Surface">Surface</a> from width, height matching output |
| <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a> | creates <a href="#Surface">Surface</a> pointing to new GPU memory buffer |
-| <a href="#SkSurface_characterize">characterize</a> | sets <a href="#Characterization">Surface Characterization</a> for threaded pre-processing |
+| <a href="#SkSurface_characterize">characterize</a> | sets <a href="#Characterization">Surface Characterization</a> for threaded GPU processing |
| <a href="#SkSurface_draw">draw</a> | draws <a href="#Surface">Surface</a> contents to canvas |
| <a href="#SkSurface_flush">flush</a> | resolve pending I/O |
| <a href="#SkSurface_flushAndSignalSemaphores">flushAndSignalSemaphores</a> | resolve pending I/O, and signal |
@@ -63,12 +55,33 @@ of the requested dimensions are zero, then nullptr will be returned.
| <a href="#SkSurface_makeSurface">makeSurface</a> | creates a compatible <a href="#Surface">Surface</a> |
| <a href="#SkSurface_notifyContentWillChange">notifyContentWillChange</a> | notifies that contents will be changed outside of Skia |
| <a href="#SkSurface_peekPixels">peekPixels</a> | copies <a href="#Surface">Surface</a> parameters to <a href="SkPixmap_Reference#Pixmap">Pixmap</a> |
-| <a href="#SkSurface_prepareForExternalIO">prepareForExternalIO</a> | to be deprecated |
| <a href="#SkSurface_props">props</a> | returns <a href="#Properties">Surface Properties</a> |
| <a href="#SkSurface_readPixels">readPixels</a> | copies <a href="SkRect_Reference#Rect">Rect</a> of pixels |
| <a href="#SkSurface_wait">wait</a> | rause commands until signaled |
| <a href="#SkSurface_width">width</a> | returns pixel column count |
+## <a name="Constructor"></a> Constructor
+
+| name | description |
+| --- | --- |
+| <a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a> | creates <a href="#Surface">Surface</a> from GPU memory buffer |
+| | <a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a> |
+| <a href="#SkSurface_MakeFromBackendTexture">MakeFromBackendTexture</a> | creates <a href="#Surface">Surface</a> from GPU-backed texture |
+| | <a href="#SkSurface_MakeFromBackendTexture">MakeFromBackendTexture</a> |
+| <a href="#SkSurface_MakeFromBackendTextureAsRenderTarget">MakeFromBackendTextureAsRenderTarget</a> | creates <a href="#Surface">Surface</a> from GPU-backed texture |
+| | <a href="#SkSurface_MakeFromBackendTextureAsRenderTarget">MakeFromBackendTextureAsRenderTarget</a> |
+| <a href="#SkSurface_MakeNull">MakeNull</a> | creates <a href="#Surface">Surface</a> without backing pixels |
+| <a href="#SkSurface_MakeRaster">MakeRaster</a> | creates <a href="#Surface">Surface</a> from <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> |
+| | <a href="#SkSurface_MakeRaster">MakeRaster</a> |
+| <a href="#SkSurface_MakeRasterDirect">MakeRasterDirect</a> | creates <a href="#Surface">Surface</a> from <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a> |
+| <a href="#SkSurface_MakeRasterDirectReleaseProc">MakeRasterDirectReleaseProc</a> | creates <a href="#Surface">Surface</a> from <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a> |
+| <a href="#SkSurface_MakeRasterN32Premul">MakeRasterN32Premul</a> | creates <a href="#Surface">Surface</a> from width, height matching output |
+| <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a> | creates <a href="#Surface">Surface</a> pointing to new GPU memory buffer |
+| | <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a> |
+| | <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a> |
+| <a href="#SkSurface_makeImageSnapshot">makeImageSnapshot</a> | creates <a href="SkImage_Reference#Image">Image</a> capturing <a href="#Surface">Surface</a> contents |
+| <a href="#SkSurface_makeSurface">makeSurface</a> | creates a compatible <a href="#Surface">Surface</a> |
+
<a name="SkSurface_MakeRasterDirect"></a>
## MakeRasterDirect
@@ -87,7 +100,7 @@ info contains <a href="SkImageInfo_Reference#Color_Type">Color Type</a> and <a h
<a href="#SkSurface_MakeRasterDirect_rowBytes">rowBytes</a> is large enough to contain info width <a href="#SkSurface_MakeRasterDirect_pixels">pixels</a> of <a href="SkImageInfo_Reference#Color_Type">Color Type</a>.
<a href="undocumented#Pixel">Pixel</a> buffer size should be info height times computed <a href="#SkSurface_MakeRasterDirect_rowBytes">rowBytes</a>.
-Pixels are not initialized.
+<a href="#Pixels">Pixels</a> are not initialized.
To access <a href="#SkSurface_MakeRasterDirect_pixels">pixels</a> after drawing, call <a href="#SkSurface_flush">flush</a> or <a href="#SkSurface_peekPixels">peekPixels</a>.
### Parameters
@@ -150,7 +163,7 @@ info contains <a href="SkImageInfo_Reference#Color_Type">Color Type</a> and <a h
<a href="#SkSurface_MakeRasterDirectReleaseProc_rowBytes">rowBytes</a> is large enough to contain info width <a href="#SkSurface_MakeRasterDirectReleaseProc_pixels">pixels</a> of <a href="SkImageInfo_Reference#Color_Type">Color Type</a>.
<a href="undocumented#Pixel">Pixel</a> buffer size should be info height times computed <a href="#SkSurface_MakeRasterDirectReleaseProc_rowBytes">rowBytes</a>.
-Pixels are not initialized.
+<a href="#Pixels">Pixels</a> are not initialized.
To access <a href="#SkSurface_MakeRasterDirectReleaseProc_pixels">pixels</a> after drawing, call <a href="#SkSurface_flush">flush</a> or <a href="#SkSurface_peekPixels">peekPixels</a>.
### Parameters
@@ -802,9 +815,9 @@ static sk_sp&lt;SkSurface&gt; MakeRenderTarget(GrContext* context, SkBudgeted bu
bool shouldCreateWithMips = false)
</pre>
-Returns offscreen <a href="#Surface">Surface</a> on GPU indicated by <a href="#SkSurface_MakeRenderTarget_context">context</a>. Allocates memory for
+Returns <a href="#Surface">Surface</a> on GPU indicated by <a href="#SkSurface_MakeRenderTarget_context">context</a>. Allocates memory for
pixels, based on the width, height, and <a href="SkImageInfo_Reference#Color_Type">Color Type</a> in ImageInfo. <a href="#SkSurface_MakeRenderTarget_budgeted">budgeted</a>
-selects whether allocation for offscreen pixels is tracked by <a href="#SkSurface_MakeRenderTarget_context">context</a>. <a href="#SkSurface_MakeRenderTarget_imageInfo">imageInfo</a>
+selects whether allocation for pixels is tracked by <a href="#SkSurface_MakeRenderTarget_context">context</a>. <a href="#SkSurface_MakeRenderTarget_imageInfo">imageInfo</a>
describes the pixel format in <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, and transparency in
<a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, and color matching in <a href="undocumented#Color_Space">Color Space</a>.
@@ -815,7 +828,7 @@ maximum supported count.
<a href="#SkSurface_MakeRenderTarget_surfaceOrigin">surfaceOrigin</a> pins either the top-left or the bottom-left corner to the origin.
-<a href="#SkSurface_MakeRenderTarget_shouldCreateWithMips">shouldCreateWithMips</a> hints that <a href="SkImage_Reference#Image">Image</a> returned by <a href="#SkSurface_makeImageSnapshot">makeImageSnapshot</a> is <a href="undocumented#Mip_Map">Mip Map</a>.
+<a href="#SkSurface_MakeRenderTarget_shouldCreateWithMips">shouldCreateWithMips</a> hints that <a href="SkImage_Reference#Image">Image</a> returned by <a href="#SkSurface_makeImageSnapshot">makeImageSnapshot</a> is Mip_Map.
If SK_SUPPORT_GPU is defined as zero, has no effect and returns nullptr.
@@ -836,7 +849,7 @@ one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>,
LCD striping orientation and setting for device independent
fonts; may be nullptr</td>
</tr> <tr> <td><a name="SkSurface_MakeRenderTarget_shouldCreateWithMips"> <code><strong>shouldCreateWithMips </strong></code> </a></td> <td>
-hint that <a href="#Surface">Surface</a> will host <a href="undocumented#Mip_Map">Mip Map</a> images</td>
+hint that <a href="#Surface">Surface</a> will host Mip_Map images</td>
</tr>
</table>
@@ -862,9 +875,9 @@ static sk_sp&lt;SkSurface&gt; MakeRenderTarget(GrContext* context, SkBudgeted bu
const SkSurfaceProps* props)
</pre>
-Returns offscreen <a href="#Surface">Surface</a> on GPU indicated by <a href="#SkSurface_MakeRenderTarget_2_context">context</a>. Allocates memory for
+Returns <a href="#Surface">Surface</a> on GPU indicated by <a href="#SkSurface_MakeRenderTarget_2_context">context</a>. Allocates memory for
pixels, based on the width, height, and <a href="SkImageInfo_Reference#Color_Type">Color Type</a> in ImageInfo. <a href="#SkSurface_MakeRenderTarget_2_budgeted">budgeted</a>
-selects whether allocation for offscreen pixels is tracked by <a href="#SkSurface_MakeRenderTarget_2_context">context</a>. <a href="#SkSurface_MakeRenderTarget_2_imageInfo">imageInfo</a>
+selects whether allocation for pixels is tracked by <a href="#SkSurface_MakeRenderTarget_2_context">context</a>. <a href="#SkSurface_MakeRenderTarget_2_imageInfo">imageInfo</a>
describes the pixel format in <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, and transparency in
<a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, and color matching in <a href="undocumented#Color_Space">Color Space</a>.
@@ -899,7 +912,7 @@ fonts; may be nullptr</td>
### Example
<div><fiddle-embed name="640321e8ecfb3f9329f3bc6e1f02485f" gpu="true" cpu="true"><div>LCD text takes advantage of raster striping to improve resolution. Only one of
-the four combinations is correct, depending on whether the monitor's LCD is
+the four combinations is correct, depending on whether monitor LCD striping is
horizontal or vertical, and whether the order of the stripes is red blue green
or red green blue.</div></fiddle-embed></div>
@@ -916,9 +929,9 @@ static sk_sp&lt;SkSurface&gt; MakeRenderTarget(GrContext* context, SkBudgeted bu
const SkImageInfo& imageInfo)
</pre>
-Returns offscreen <a href="#Surface">Surface</a> on GPU indicated by <a href="#SkSurface_MakeRenderTarget_3_context">context</a>. Allocates memory for
+Returns <a href="#Surface">Surface</a> on GPU indicated by <a href="#SkSurface_MakeRenderTarget_3_context">context</a>. Allocates memory for
pixels, based on the width, height, and <a href="SkImageInfo_Reference#Color_Type">Color Type</a> in ImageInfo. <a href="#SkSurface_MakeRenderTarget_3_budgeted">budgeted</a>
-selects whether allocation for offscreen pixels is tracked by <a href="#SkSurface_MakeRenderTarget_3_context">context</a>. <a href="#SkSurface_MakeRenderTarget_3_imageInfo">imageInfo</a>
+selects whether allocation for pixels is tracked by <a href="#SkSurface_MakeRenderTarget_3_context">context</a>. <a href="#SkSurface_MakeRenderTarget_3_imageInfo">imageInfo</a>
describes the pixel format in <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, and transparency in
<a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, and color matching in <a href="undocumented#Color_Space">Color Space</a>.
@@ -992,6 +1005,18 @@ surf->makeImageSnapshot() == nullptr
---
+## <a name="Property"></a> Property
+
+| name | description |
+| --- | --- |
+| <a href="#SkSurface_generationID">generationID</a> | returns unique ID |
+| <a href="#SkSurface_getCanvas">getCanvas</a> | returns <a href="SkCanvas_Reference#Canvas">Canvas</a> that draws into <a href="#Surface">Surface</a> |
+| <a href="#SkSurface_getRenderTargetHandle">getRenderTargetHandle</a> | returns the GPU reference to render target |
+| <a href="#SkSurface_getTextureHandle">getTextureHandle</a> | returns the GPU reference to texture |
+| <a href="#SkSurface_height">height</a> | returns pixel row count |
+| <a href="#SkSurface_props">props</a> | returns <a href="#Properties">Surface Properties</a> |
+| <a href="#SkSurface_width">width</a> | returns pixel column count |
+
<a name="SkSurface_width"></a>
## width
@@ -1116,6 +1141,12 @@ enum <a href="#SkSurface_ContentChangeMode">ContentChangeMode</a> {
+## <a name="Miscellaneous"></a> Miscellaneous
+
+| name | description |
+| --- | --- |
+| <a href="#SkSurface_notifyContentWillChange">notifyContentWillChange</a> | notifies that contents will be changed outside of Skia |
+
<a name="SkSurface_notifyContentWillChange"></a>
## notifyContentWillChange
@@ -1174,16 +1205,13 @@ static const <a href="#SkSurface_BackendHandleAccess">BackendHandleAccess</a> <a
<td><a name="SkSurface_kDiscardWrite_BackendHandleAccess"> <code><strong>SkSurface::kDiscardWrite_BackendHandleAccess </strong></code> </a></td><td>2</td><td>Caller must overwrite the entire back-end object.</td>
</tr>
<tr>
- <td><a name="SkSurface_kFlushRead_TextureHandleAccess"> <code><strong>SkSurface::kFlushRead_TextureHandleAccess </strong></code> </a></td><td>0</td><td>Deprecated.
-</td>
+ <td><a name="SkSurface_kFlushRead_TextureHandleAccess"> <code><strong>SkSurface::kFlushRead_TextureHandleAccess </strong></code> </a></td><td>0</td><td></td>
</tr>
<tr>
- <td><a name="SkSurface_kFlushWrite_TextureHandleAccess"> <code><strong>SkSurface::kFlushWrite_TextureHandleAccess </strong></code> </a></td><td>1</td><td>Deprecated.
-</td>
+ <td><a name="SkSurface_kFlushWrite_TextureHandleAccess"> <code><strong>SkSurface::kFlushWrite_TextureHandleAccess </strong></code> </a></td><td>1</td><td></td>
</tr>
<tr>
- <td><a name="SkSurface_kDiscardWrite_TextureHandleAccess"> <code><strong>SkSurface::kDiscardWrite_TextureHandleAccess </strong></code> </a></td><td>2</td><td>Deprecated.
-</td>
+ <td><a name="SkSurface_kDiscardWrite_TextureHandleAccess"> <code><strong>SkSurface::kDiscardWrite_TextureHandleAccess </strong></code> </a></td><td>2</td><td></td>
</tr>
</table>
@@ -1360,6 +1388,17 @@ are not captured. <a href="SkImage_Reference#Image">Image</a> allocation is acco
---
+## <a name="Pixels"></a> Pixels
+
+| name | description |
+| --- | --- |
+| <a href="#SkSurface_draw">draw</a> | draws <a href="#Surface">Surface</a> contents to canvas |
+| | draw |
+| <a href="#SkSurface_peekPixels">peekPixels</a> | copies <a href="#Surface">Surface</a> parameters to <a href="SkPixmap_Reference#Pixmap">Pixmap</a> |
+| <a href="#SkSurface_readPixels">readPixels</a> | copies <a href="SkRect_Reference#Rect">Rect</a> of pixels |
+| | <a href="#SkSurface_readPixels">readPixels</a> |
+| | <a href="#SkSurface_readPixels">readPixels</a> |
+
<a name="SkSurface_draw"></a>
## draw
@@ -1444,7 +1483,7 @@ Destination <a href="SkRect_Reference#Rect">Rect</a> corners are (0, 0) and (<a
Copies each readable pixel intersecting both rectangles, without scaling,
converting to <a href="#SkSurface_readPixels_dst">dst</a>.colorType() and <a href="#SkSurface_readPixels_dst">dst</a>.alphaType() if required.
-Pixels are readable when <a href="#Surface">Surface</a> is raster, or backed by a GPU.
+<a href="#Pixels">Pixels</a> are readable when <a href="#Surface">Surface</a> is raster, or backed by a GPU.
The destination pixel storage must be allocated by the caller.
@@ -1500,7 +1539,7 @@ Destination <a href="SkRect_Reference#Rect">Rect</a> corners are (0, 0) and (<a
Copies each readable pixel intersecting both rectangles, without scaling,
converting to <a href="#SkSurface_readPixels_2_dstInfo">dstInfo</a>.colorType() and <a href="#SkSurface_readPixels_2_dstInfo">dstInfo</a>.alphaType() if required.
-Pixels are readable when <a href="#Surface">Surface</a> is raster, or backed by a GPU.
+<a href="#Pixels">Pixels</a> are readable when <a href="#Surface">Surface</a> is raster, or backed by a GPU.
The destination pixel storage must be allocated by the caller.
@@ -1562,7 +1601,7 @@ Destination <a href="SkRect_Reference#Rect">Rect</a> corners are (0, 0) and (bit
Copies each readable pixel intersecting both rectangles, without scaling,
converting to bitmap.colorType() and bitmap.alphaType() if required.
-Pixels are readable when <a href="#Surface">Surface</a> is raster, or backed by a GPU.
+<a href="#Pixels">Pixels</a> are readable when <a href="#Surface">Surface</a> is raster, or backed by a GPU.
The destination pixel storage must be allocated by the caller.
@@ -1644,10 +1683,19 @@ surf.props(): kRGB_H_SkPixelGeometry
void prepareForExternalIO()
</pre>
-To be deprecated.
+soon
---
+## <a name="Utility"></a> Utility
+
+| name | description |
+| --- | --- |
+| <a href="#SkSurface_characterize">characterize</a> | sets <a href="#Characterization">Surface Characterization</a> for threaded GPU processing |
+| <a href="#SkSurface_flush">flush</a> | resolve pending I/O |
+| <a href="#SkSurface_flushAndSignalSemaphores">flushAndSignalSemaphores</a> | resolve pending I/O, and signal |
+| <a href="#SkSurface_wait">wait</a> | rause commands until signaled |
+
<a name="SkSurface_flush"></a>
## flush
@@ -1761,7 +1809,7 @@ bool characterize(SkSurfaceCharacterization* characterization) const
</pre>
Initializes <a href="#Characterization">Surface Characterization</a> that can be used to perform GPU back-end
-pre-processing in a separate thread. Typically this is used to divide drawing
+processing in a separate thread. Typically this is used to divide drawing
into multiple tiles. DeferredDisplayListRecorder records the drawing commands
for each tile.
diff --git a/site/user/api/catalog.htm b/site/user/api/catalog.htm
index 9157d0da4c..86f5e579ef 100644
--- a/site/user/api/catalog.htm
+++ b/site/user/api/catalog.htm
@@ -2464,13 +2464,6 @@
"name": "SkPixmap::reset()",
"stdout": "width: 25 height: 35 color: kRGBA_8888_SkColorType alpha: kOpaque_SkAlphaType\\nwidth: 0 height: 0 color: kUnknown_SkColorType alpha: kUnknown_SkAlphaType\\n"
},
- "SkPixmap_reset_3": {
- "code": "void draw(SkCanvas* canvas) {\n const int width = 2;\n const int height = 2;\n uint8_t bytes[] = { 0, 1, 2, 3, 4, 5, 6, 7 };\n SkMask mask;\n mask.fFormat = SkMask::kA8_Format;\n mask.fBounds = {0, 0, width, height};\n mask.fImage = bytes;\n mask.fRowBytes = (width + 7) >> 3;\n SkPixmap pixmap;\n bool success = pixmap.reset(mask);\n SkDebugf(\"success: %s width: %d height: %d\\n\", success ? \"true \" : \"false\",\n pixmap.width(), pixmap.height()); \n mask.fFormat = SkMask::kBW_Format;\n success = pixmap.reset(mask);\n SkDebugf(\"success: %s width: %d height: %d\\n\", success ? \"true \" : \"false\",\n pixmap.width(), pixmap.height());\n}",
- "hash": "379761a97bd7a116638a34eb3e80bf0d",
- "file": "SkPixmap_Reference",
- "name": "SkPixmap::reset_3",
- "stdout": "success: true width: 2 height: 2\\nsuccess: false width: 0 height: 0\\n"
- },
"SkPixmap_rowBytes": {
"code": "void draw(SkCanvas* canvas) {\n SkPixmap badPixmap = {SkImageInfo::MakeA8(4, 4), nullptr, 2};\n SkPixmap okPixmap = {SkImageInfo::MakeA8(4, 4), nullptr, 8};\n for (auto& pixmap : { badPixmap, okPixmap } ) {\n SkDebugf(\"rowBytes: %d minRowBytes: %d\\n\", pixmap.rowBytes(), \n pixmap.info().minRowBytes());\n }\n}",
"hash": "da5e1f7f49891d3805a5a6103a000eff",
@@ -3637,14 +3630,6 @@
"file": "SkBitmap_Reference",
"name": "SkBitmap::getBounds_2"
},
- "SkBitmap_installMaskPixels": {
- "code": "void draw(SkCanvas* canvas) {\n uint8_t storage[][5] = {{ 0xCA, 0xDA, 0xCA, 0xC9, 0xA3 },\n { 0xAC, 0xA8, 0x89, 0x47, 0x87 },\n { 0x4B, 0x25, 0x25, 0x25, 0x46 },\n { 0x90, 0x81, 0x25, 0x41, 0x33 },\n { 0x75, 0x55, 0x44, 0x20, 0x00 }};\n SkMask mask;\n mask.fImage = storage[0];\n mask.fBounds = SkIRect::MakeWH(5, 5);\n mask.fRowBytes = 5;\n mask.fFormat = SkMask::kA8_Format;\n SkBitmap bitmap;\n bitmap.installMaskPixels(mask);\n canvas->scale(10, 10);\n canvas->drawBitmap(bitmap, 0, 0);\n storage[2][2] = 0xFF;\n bitmap.installMaskPixels(mask);\n canvas->drawBitmap(bitmap, 10, 0);\n}",
- "width": 256,
- "height": 64,
- "hash": "b0456fc063ca467ccecf2105160a3d1d",
- "file": "SkBitmap_Reference",
- "name": "SkBitmap::installMaskPixels"
-},
"SkBitmap_installPixels_2": {
"code": "void draw(SkCanvas* canvas) {\n SkRandom random;\n SkBitmap bitmap;\n const int width = 8;\n const int height = 8;\n uint32_t pixels[width * height];\n for (unsigned x = 0; x < width * height; ++x) {\n pixels[x] = random.nextU();\n }\n SkImageInfo info = SkImageInfo::MakeN32(width, height, kUnpremul_SkAlphaType);\n if (bitmap.installPixels(info, pixels, info.minRowBytes())) {\n canvas->scale(32, 32);\n canvas->drawBitmap(bitmap, 0, 0);\n }\n}\n",
"width": 256,
@@ -4965,22 +4950,6 @@
"file": "SkImageInfo_Reference",
"name": "SkImageInfo::width()"
},
- "SkImage_DeferredTextureImageUsageParams": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
- "width": 256,
- "height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
- "file": "SkImage_Reference",
- "name": "SkImage::DeferredTextureImageUsageParams"
-},
- "SkImage_DeferredTextureImageUsageParams_DeferredTextureImageUsageParams": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
- "width": 256,
- "height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
- "file": "SkImage_Reference",
- "name": "SkImage::DeferredTextureImageUsageParams::DeferredTextureImageUsageParams"
-},
"SkImage_LegacyBitmapMode": {
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
"width": 256,
@@ -5029,14 +4998,6 @@
"file": "SkImage_Reference",
"name": "SkImage::MakeFromBitmap"
},
- "SkImage_MakeFromDeferredTextureImageData": {
- "code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
- "width": 256,
- "height": 256,
- "hash": "882e8e0103048009a25cfc20400492f7",
- "file": "SkImage_Reference",
- "name": "SkImage::MakeFromDeferredTextureImageData"
-},
"SkImage_MakeFromEncoded": {
"code": "void draw(SkCanvas* canvas) {\n int x = 0;\n for (int quality : { 100, 50, 10, 1} ) {\n sk_sp<SkData> encodedData = image->encodeToData(SkEncodedImageFormat::kJPEG, quality);\n sk_sp<SkImage> image = SkImage::MakeFromEncoded(encodedData);\n canvas->drawImage(image, x, 0);\n x += 64;\n }\n}",
"width": 256,
@@ -5141,14 +5102,6 @@
"file": "SkImage_Reference",
"name": "SkImage::encodeToData_2"
},
- "SkImage_getDeferredTextureImageData": {
- "code": "void draw(SkCanvas* canvas) {\n GrContext* context = canvas->getGrContext();\n if (!context) {\n return;\n }\n sk_sp<GrContextThreadSafeProxy> proxy(context->threadSafeProxy());\n auto params = SkImage::DeferredTextureImageUsageParams(SkMatrix::MakeScale(2, 2),\n kNone_SkFilterQuality, 0);\n SkColorSpace* colorSpace = canvas->imageInfo().colorSpace();\n size_t requiredMemoryInBytes = image->getDeferredTextureImageData(\n *proxy, &params, 1, nullptr, colorSpace);\n std::vector<uint8_t> memory;\n memory.resize(requiredMemoryInBytes);\n image->getDeferredTextureImageData(*proxy, &params, 1, memory.data(), colorSpace);\n sk_sp<SkImage> uploadedEncodedImage = SkImage::MakeFromDeferredTextureImageData(\n context, memory.data(), SkBudgeted::kNo);\n canvas->scale(2, 2);\n canvas->drawImage(uploadedEncodedImage, 10, 10);\n}",
- "width": 256,
- "height": 256,
- "hash": "31d224ac4d22ba60221c565f9a12ad50",
- "file": "SkImage_Reference",
- "name": "SkImage::getDeferredTextureImageData"
-},
"SkImage_getTextureHandle": {
"code": "void draw(SkCanvas* canvas) {\n GrContext* context = canvas->getGrContext();\n if (!context) {\n return;\n }\n SkPaint paint;\n paint.setAntiAlias(true);\n SkString str;\n int y = -10;\n for (auto origin : { kTopLeft_GrSurfaceOrigin, kBottomLeft_GrSurfaceOrigin } ) {\n sk_sp<SkImage> srcImage(SkImage::MakeFromTexture(context,\n backEndTexture, origin, kPremul_SkAlphaType, nullptr));\n GrSurfaceOrigin readBackOrigin;\n GrBackendObject readBackHandle = srcImage->getTextureHandle(false, &readBackOrigin);\n str.printf(\"readBackHandle: 0x%x\", readBackHandle);\n canvas->drawString(str, 5, y += 30, paint);\n canvas->drawImage(srcImage, 80, y += 10);\n str.printf(\"origin: k%s_GrSurfaceOrigin\", readBackOrigin ? \"BottomLeft\" : \"TopLeft\");\n canvas->drawString(str, 5, y += srcImage->height() + 10, paint);\n }\n}",
"width": 256,
diff --git a/site/user/api/usingBookmaker.md b/site/user/api/usingBookmaker.md
index d516c1d030..bd76f85f47 100644
--- a/site/user/api/usingBookmaker.md
+++ b/site/user/api/usingBookmaker.md
@@ -20,12 +20,15 @@ documentation to be deprecated as well.
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
# void someMethodThatIsNowDeprecated()
-
#Deprecated
-##
+##</pre>
-##
-</pre>
+Use
+
+<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
+## soon</pre>
+
+if the change is soon to be deprecated.
To regenerate the documentation, follow the <a href="#Installing">Installing</a> and <a href="#Regenerate">Regenerate</a> steps below.
diff --git a/tools/bookmaker/bookmaker.cpp b/tools/bookmaker/bookmaker.cpp
index 0de8a46f3a..9d5a2782f3 100644
--- a/tools/bookmaker/bookmaker.cpp
+++ b/tools/bookmaker/bookmaker.cpp
@@ -248,7 +248,6 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
case MarkType::kDescription:
case MarkType::kStdOut:
// may be one-liner
- case MarkType::kBug:
case MarkType::kNoExample:
case MarkType::kParam:
case MarkType::kReturn:
@@ -285,7 +284,6 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
}
// not one-liners
case MarkType::kCode:
- case MarkType::kDeprecated:
case MarkType::kExample:
case MarkType::kExperimental:
case MarkType::kFormula:
@@ -344,7 +342,9 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
// always treated as one-liners (can't detect misuse easily)
case MarkType::kAlias:
case MarkType::kAnchor:
+ case MarkType::kBug:
case MarkType::kDefine:
+ case MarkType::kDeprecated:
case MarkType::kDuration:
case MarkType::kFile:
case MarkType::kHeight:
@@ -361,6 +361,7 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
case MarkType::kTime:
case MarkType::kVolatile:
case MarkType::kWidth:
+ // todo : add check disallowing children?
if (hasEnd && MarkType::kAnchor != markType && MarkType::kLine != markType) {
return this->reportError<bool>("one liners omit end element");
} else if (!hasEnd && MarkType::kAnchor == markType) {
@@ -415,7 +416,15 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
definition->fContentEnd = text->fContentEnd;
definition->fTerminator = fChar;
definition->fChildren.emplace_back(text);
- }
+ } else if (MarkType::kDeprecated == markType) {
+ this->skipSpace();
+ fParent->fDeprecated = true;
+ fParent->fToBeDeprecated = this->skipExact("soon");
+ this->skipSpace();
+ if ('\n' != this->peek()) {
+ return this->reportError<bool>("unexpected text after #Deprecated");
+ }
+ }
break;
case MarkType::kExternal:
(void) this->collectExternals(); // FIXME: detect errors in external defs?
@@ -1250,6 +1259,20 @@ TextParser::TextParser(const Definition* definition) :
definition->fLineCount) {
}
+string TextParser::ReportFilename(string file) {
+ string fullName;
+#ifdef SK_BUILD_FOR_WIN
+ TCHAR pathChars[MAX_PATH];
+ DWORD pathLen = GetCurrentDirectory(MAX_PATH, pathChars);
+ for (DWORD index = 0; index < pathLen; ++index) {
+ fullName += pathChars[index] == (char)pathChars[index] ? (char)pathChars[index] : '?';
+ }
+ fullName += '\\';
+#endif
+ fullName += file;
+ return fullName;
+}
+
void TextParser::reportError(const char* errorStr) const {
this->reportWarning(errorStr);
SkDebugf(""); // convenient place to set a breakpoint
@@ -1265,17 +1288,8 @@ void TextParser::reportWarning(const char* errorStr) const {
spaces -= lineLen;
lineLen = err.lineLength();
}
- string fileName;
-#ifdef SK_BUILD_FOR_WIN
- TCHAR pathChars[MAX_PATH];
- DWORD pathLen = GetCurrentDirectory(MAX_PATH, pathChars);
- for (DWORD index = 0; index < pathLen; ++index) {
- fileName += pathChars[index] == (char)pathChars[index] ? (char)pathChars[index] : '?';
- }
- fileName += '\\';
-#endif
- fileName += fFileName;
- SkDebugf("\n%s(%zd): error: %s\n", fileName.c_str(), err.fLineCount, errorStr);
+ string fullName = this->ReportFilename(fFileName);
+ SkDebugf("\n%s(%zd): error: %s\n", fullName.c_str(), err.fLineCount, errorStr);
if (0 == lineLen) {
SkDebugf("[blank line]\n");
} else {
@@ -1476,7 +1490,6 @@ vector<string> BmhParser::typeName(MarkType markType, bool* checkEnd) {
this->skipNoName();
break;
case MarkType::kCode:
- case MarkType::kDeprecated:
case MarkType::kDescription:
case MarkType::kDoxygen:
case MarkType::kExperimental:
@@ -1498,6 +1511,7 @@ vector<string> BmhParser::typeName(MarkType markType, bool* checkEnd) {
case MarkType::kBug: // fixme: expect number
case MarkType::kDefine:
case MarkType::kDefinedBy:
+ case MarkType::kDeprecated:
case MarkType::kDuration:
case MarkType::kFile:
case MarkType::kHeight:
diff --git a/tools/bookmaker/bookmaker.h b/tools/bookmaker/bookmaker.h
index 65e8f1562a..96372756a1 100644
--- a/tools/bookmaker/bookmaker.h
+++ b/tools/bookmaker/bookmaker.h
@@ -390,6 +390,7 @@ public:
}
void reportError(const char* errorStr) const;
+ static string ReportFilename(string file);
void reportWarning(const char* errorStr) const;
template <typename T> T reportError(const char* errorStr) const {
@@ -841,6 +842,7 @@ public:
bool exampleToScript(string* result, ExampleOptions ) const;
string extractText(TrimExtract trimExtract) const;
string fiddleName() const;
+ const Definition* findClone(string match) const;
string formatFunction() const;
const Definition* hasChild(MarkType markType) const;
bool hasMatch(const string& name) const;
@@ -919,9 +921,11 @@ public:
Type fType = Type::kNone;
bool fClone = false;
bool fCloned = false;
+ bool fDeprecated = false;
bool fOperatorConst = false;
bool fPrivate = false;
bool fShort = false;
+ bool fToBeDeprecated = false;
bool fMemberStart = false;
bool fAnonymous = false;
mutable bool fVisited = false;
@@ -2034,15 +2038,15 @@ public:
bool buildReferences(const char* docDir, const char* mdOutDirOrFile);
bool buildStatus(const char* docDir, const char* mdOutDir);
- static constexpr const char* kClassesAndStructs = "Classes_and_Structs";
- static constexpr const char* kConstants = "Constants";
- static constexpr const char* kConstructors = "Constructors";
- static constexpr const char* kMemberFunctions = "Member_Functions";
- static constexpr const char* kMembers = "Members";
- static constexpr const char* kOperators = "Operators";
+ static constexpr const char* kClassesAndStructs = "Class_or_Struct";
+ static constexpr const char* kConstants = "Constant";
+ static constexpr const char* kConstructors = "Constructor";
+ static constexpr const char* kMemberFunctions = "Member_Function";
+ static constexpr const char* kMembers = "Member";
+ static constexpr const char* kOperators = "Operator";
static constexpr const char* kOverview = "Overview";
- static constexpr const char* kRelatedFunctions = "Related_Functions";
- static constexpr const char* kSubtopics = "Subtopics";
+ static constexpr const char* kRelatedFunctions = "Related_Function";
+ static constexpr const char* kSubtopics = "Subtopic";
private:
enum class TableState {
@@ -2051,6 +2055,16 @@ private:
kColumn,
};
+ struct TableContents {
+ TableContents()
+ : fShowClones(false) {
+ }
+
+ string fDescription;
+ vector<const Definition*> fMembers;
+ bool fShowClones;
+ };
+
string addReferences(const char* start, const char* end, BmhParser::Resolvable );
bool buildRefFromFile(const char* fileName, const char* outDir);
bool checkParamReturnBody(const Definition* def) const;
@@ -2068,8 +2082,11 @@ private:
bool parseFromFile(const char* path) override { return true; }
void populateTables(const Definition* def);
- vector<const Definition*>& populator(const char* key) {
- return fPopulators.find(key)->second.fMembers;
+ TableContents& populator(const char* key) {
+ auto entry = fPopulators.find(key);
+ // FIXME: this should have been detected earlier
+ SkASSERT(fPopulators.end() != entry);
+ return entry->second;
}
void reset() override {
@@ -2103,14 +2120,9 @@ private:
void resolveOut(const char* start, const char* end, BmhParser::Resolvable );
void rowOut(const char * name, const string& description);
- void subtopicOut(vector<const Definition*>& data);
+ void subtopicOut(const TableContents& tableContents);
void subtopicsOut();
- struct TableContents {
- string fDescription;
- vector<const Definition*> fMembers;
- };
-
unordered_map<string, TableContents> fPopulators;
vector<const Definition*> fClassStack;
diff --git a/tools/bookmaker/definition.cpp b/tools/bookmaker/definition.cpp
index 7885c6301c..757169b1a9 100644
--- a/tools/bookmaker/definition.cpp
+++ b/tools/bookmaker/definition.cpp
@@ -560,6 +560,7 @@ bool Definition::exampleToScript(string* result, ExampleOptions exampleOptions)
break;
case MarkType::kToDo:
break;
+ case MarkType::kBug:
case MarkType::kMarkChar:
case MarkType::kPlatform:
// ignore for now
@@ -1014,6 +1015,22 @@ string Definition::fiddleName() const {
return fFiddle.substr(start, end - start);
}
+const Definition* Definition::findClone(string match) const {
+ for (auto child : fChildren) {
+ if (!child->fClone) {
+ continue;
+ }
+ if (match == child->fName) {
+ return child;
+ }
+ auto inner = child->findClone(match);
+ if (inner) {
+ return inner;
+ }
+ }
+ return nullptr;
+}
+
const Definition* Definition::hasChild(MarkType markType) const {
for (auto iter : fChildren) {
if (markType == iter->fMarkType) {
diff --git a/tools/bookmaker/includeWriter.cpp b/tools/bookmaker/includeWriter.cpp
index ba93d3e615..77baca0016 100644
--- a/tools/bookmaker/includeWriter.cpp
+++ b/tools/bookmaker/includeWriter.cpp
@@ -53,6 +53,13 @@ void IncludeWriter::descriptionOut(const Definition* def) {
commentStart = prop->fTerminator;
break;
case MarkType::kDeprecated:
+ SkASSERT(def->fDeprecated);
+ if (def->fToBeDeprecated) {
+ this->writeString("To be deprecated soon.");
+ } else {
+ this->writeString("Deprecated.");
+ }
+ this->lfcr();
case MarkType::kPrivate:
commentLen = (int) (prop->fStart - commentStart);
if (commentLen > 0) {
@@ -62,6 +69,9 @@ void IncludeWriter::descriptionOut(const Definition* def) {
}
}
commentStart = prop->fContentStart;
+ if (def->fToBeDeprecated) {
+ commentStart += 4; // skip over "soon" // FIXME: this is awkward
+ }
commentLen = (int) (prop->fContentEnd - commentStart);
if (commentLen > 0) {
this->writeBlockIndent(commentLen, commentStart);
@@ -159,7 +169,7 @@ void IncludeWriter::descriptionOut(const Definition* def) {
break;
}
}
- SkASSERT(wroteCode || (commentLen > 0 && commentLen < 1500));
+ SkASSERT(wroteCode || (commentLen > 0 && commentLen < 1500) || def->fDeprecated);
if (commentLen > 0) {
this->rewriteBlock(commentLen, commentStart, Phrase::kNo);
}
@@ -440,23 +450,35 @@ void IncludeWriter::enumMembersOut(const RootDefinition* root, Definition& child
commentEnd = currentEnumItem->fContentEnd;
}
TextParser enumComment(fFileName, commentStart, commentEnd, currentEnumItem->fLineCount);
+ bool isDeprecated = false;
if (enumComment.skipToLineStart()) { // skip const value
commentStart = enumComment.fChar;
commentLen = (int) (commentEnd - commentStart);
} else {
- const Definition* privateDef = currentEnumItem->fChildren[0];
- SkASSERT(MarkType::kPrivate == privateDef->fMarkType);
- commentStart = privateDef->fContentStart;
- commentLen = (int) (privateDef->fContentEnd - privateDef->fContentStart);
+ const Definition* childDef = currentEnumItem->fChildren[0];
+ isDeprecated = MarkType::kDeprecated == childDef->fMarkType;
+ if (MarkType::kPrivate == childDef->fMarkType || isDeprecated) {
+ commentStart = childDef->fContentStart;
+ if (currentEnumItem->fToBeDeprecated) {
+ SkASSERT(isDeprecated);
+ commentStart += 4; // skip over "soon" // FIXME: this is awkward
+ }
+ commentLen = (int) (childDef->fContentEnd - commentStart);
+ }
}
// FIXME: may assert here if there's no const value
// should have detected and errored on that earlier when enum fContentStart was set
- SkASSERT(commentLen > 0 && commentLen < 1000);
+ SkASSERT((commentLen > 0 && commentLen < 1000) || isDeprecated);
if (!currentEnumItem->fShort) {
this->writeCommentHeader();
fIndent += 4;
- bool wroteLineFeed = Wrote::kLF ==
- this->rewriteBlock(commentLen, commentStart, Phrase::kNo);
+ bool wroteLineFeed = false;
+ if (isDeprecated) {
+ this->writeString(currentEnumItem->fToBeDeprecated
+ ? "To be deprecated soon." : "Deprecated.");
+ }
+ wroteLineFeed = Wrote::kLF ==
+ this->rewriteBlock(commentLen, commentStart, Phrase::kNo);
fIndent -= 4;
if (wroteLineFeed || fColumn > 100 - 3 /* space * / */ ) {
this->lfcr();
diff --git a/tools/bookmaker/mdOut.cpp b/tools/bookmaker/mdOut.cpp
index b51bb8d77e..7bc70af669 100644
--- a/tools/bookmaker/mdOut.cpp
+++ b/tools/bookmaker/mdOut.cpp
@@ -975,9 +975,6 @@ void MdOut::markTypeOut(Definition* def) {
if (kSubtopics == name) {
this->subtopicsOut();
} else {
- SkASSERT(kClassesAndStructs == name || kConstants == name || kConstructors == name
- || kMemberFunctions == name || kMembers == name || kOperators == name
- || kRelatedFunctions == name);
this->subtopicOut(this->populator(name.c_str()));
}
} break;
@@ -1187,17 +1184,20 @@ void MdOut::mdHeaderOutLF(int depth, int lf) {
void MdOut::populateTables(const Definition* def) {
const Definition* csParent = this->csParent();
for (auto child : def->fChildren) {
+ if (string::npos != child->fName.find("Rect_Set")) {
+ SkDebugf("");
+ }
if (MarkType::kTopic == child->fMarkType || MarkType::kSubtopic == child->fMarkType) {
bool legacyTopic = fPopulators.end() != fPopulators.find(child->fName);
if (!legacyTopic && child->fName != kOverview) {
- this->populator(kRelatedFunctions).push_back(child);
+ this->populator(kRelatedFunctions).fMembers.push_back(child);
}
this->populateTables(child);
continue;
}
if (child->isStructOrClass()) {
if (fClassStack.size() > 0) {
- this->populator(kClassesAndStructs).push_back(child);
+ this->populator(kClassesAndStructs).fMembers.push_back(child);
}
fClassStack.push_back(child);
this->populateTables(child);
@@ -1205,11 +1205,11 @@ void MdOut::populateTables(const Definition* def) {
continue;
}
if (MarkType::kEnum == child->fMarkType || MarkType::kEnumClass == child->fMarkType) {
- this->populator(kConstants).push_back(child);
+ this->populator(kConstants).fMembers.push_back(child);
continue;
}
if (MarkType::kMember == child->fMarkType) {
- this->populator(kMembers).push_back(child);
+ this->populator(kMembers).fMembers.push_back(child);
continue;
}
if (MarkType::kMethod != child->fMarkType) {
@@ -1220,17 +1220,26 @@ void MdOut::populateTables(const Definition* def) {
}
if (Definition::MethodType::kConstructor == child->fMethodType
|| Definition::MethodType::kDestructor == child->fMethodType) {
- this->populator(kConstructors).push_back(child);
+ this->populator(kConstructors).fMembers.push_back(child);
continue;
}
if (Definition::MethodType::kOperator == child->fMethodType) {
- this->populator(kOperators).push_back(child);
+ this->populator(kOperators).fMembers.push_back(child);
continue;
}
- this->populator(kMemberFunctions).push_back(child);
+ this->populator(kMemberFunctions).fMembers.push_back(child);
if (csParent && (0 == child->fName.find(csParent->fName + "::Make")
|| 0 == child->fName.find(csParent->fName + "::make"))) {
- this->populator(kConstructors).push_back(child);
+ this->populator(kConstructors).fMembers.push_back(child);
+ continue;
+ }
+ for (auto item : child->fChildren) {
+ if (MarkType::kIn == item->fMarkType) {
+ string name(item->fContentStart, item->fContentEnd - item->fContentStart);
+ fPopulators[name].fMembers.push_back(child);
+ fPopulators[name].fShowClones = true;
+ break;
+ }
}
}
}
@@ -1331,7 +1340,7 @@ void MdOut::subtopicsOut() {
this->rowOut("---", "---");
for (auto item : { kClassesAndStructs, kConstants, kConstructors, kMemberFunctions,
kMembers, kOperators, kRelatedFunctions } ) {
- for (auto entry : this->populator(item)) {
+ for (auto entry : this->populator(item).fMembers) {
if (entry->csParent() == csParent) {
string description = fPopulators.find(item)->second.fDescription;
if (kConstructors == item) {
@@ -1344,7 +1353,8 @@ void MdOut::subtopicsOut() {
}
}
-void MdOut::subtopicOut(vector<const Definition*>& data) {
+void MdOut::subtopicOut(const TableContents& tableContents) {
+ const auto& data = tableContents.fMembers;
const Definition* csParent = this->csParent();
SkASSERT(csParent);
fRoot = csParent->asRoot();
@@ -1360,6 +1370,9 @@ void MdOut::subtopicOut(vector<const Definition*>& data) {
items[name] = entry;
}
for (auto entry : items) {
+ if (entry.second->fDeprecated) {
+ continue;
+ }
const Definition* oneLiner = nullptr;
for (auto child : entry.second->fChildren) {
if (MarkType::kLine == child->fMarkType) {
@@ -1367,8 +1380,30 @@ void MdOut::subtopicOut(vector<const Definition*>& data) {
break;
}
}
+ if (!oneLiner) {
+ SkDebugf("");
+ }
SkASSERT(oneLiner);
this->rowOut(entry.first.c_str(), string(oneLiner->fContentStart,
oneLiner->fContentEnd - oneLiner->fContentStart));
+ if (string::npos != entry.second->fName.find("SkRect::set")) {
+ SkDebugf("");
+ }
+ if (tableContents.fShowClones && entry.second->fCloned) {
+ int cloneNo = 2;
+ string builder = entry.second->fName;
+ if ("()" == builder.substr(builder.length() - 2)) {
+ builder = builder.substr(0, builder.length() - 2);
+ }
+ builder += '_';
+ do {
+ string match = builder + to_string(cloneNo);
+ auto child = csParent->findClone(match);
+ if (!child) {
+ break;
+ }
+ this->rowOut("", child->methodName());
+ } while (++cloneNo);
+ }
}
}
diff --git a/tools/bookmaker/selfCheck.cpp b/tools/bookmaker/selfCheck.cpp
index fd8ef59fa1..3392945a9f 100644
--- a/tools/bookmaker/selfCheck.cpp
+++ b/tools/bookmaker/selfCheck.cpp
@@ -7,11 +7,12 @@
#include "bookmaker.h"
+#ifdef SK_BUILD_FOR_WIN
+#include <windows.h>
+#endif
// Check that mutiple like-named methods are under one Subtopic
-// Check that all subtopics are in table of contents
-
// Check that SeeAlso reference each other
// Would be nice to check if other classes have 'create' methods that are included
@@ -33,27 +34,10 @@ public:
return fBmhParser.reportError<bool>("expected root topic");
}
fRoot = topicDef->asRoot();
- if (!this->checkMethodSummary()) {
- return false;
- }
- if (!this->checkMethodSubtopic()) {
- return false;
- }
- if (!this->checkSubtopicSummary()) {
- return false;
- }
- if (!this->checkConstructorsSummary()) {
- return false;
- }
- if (!this->checkOperatorsSummary()) {
- return false;
- }
if (!this->checkSeeAlso()) {
return false;
}
- if (!this->checkCreators()) {
- return false;
- }
+ // report functions that are not covered by related hierarchy
if (!this->checkRelatedFunctions()) {
return false;
}
@@ -62,164 +46,8 @@ public:
}
protected:
- // Check that all constructors are in a table of contents
- // should be 'creators' instead of constructors?
- bool checkConstructorsSummary() {
- for (auto& rootChild : fRoot->fChildren) {
- if (!rootChild->isStructOrClass()) {
- continue;
- }
- auto& cs = rootChild;
- auto constructors = this->findTopic("Constructors", Optional::kYes);
- if (constructors && MarkType::kSubtopic != constructors->fMarkType) {
- return constructors->reportError<bool>("expected #Subtopic Constructors");
- }
- vector<string> constructorEntries;
- if (constructors) {
- if (!this->collectEntries(constructors, &constructorEntries)) {
- return false;
- }
- }
- // mark corresponding methods as visited (may be more than one per entry)
- for (auto& csChild : cs->fChildren) {
- if (MarkType::kMethod != csChild->fMarkType) {
- // only check methods for now
- continue;
- }
- string name;
- if (!this->childName(csChild, &name)) {
- return false;
- }
- string returnType;
- if (Definition::MethodType::kConstructor != csChild->fMethodType &&
- Definition::MethodType::kDestructor != csChild->fMethodType) {
- string makeCheck = name.substr(0, 4);
- if ("Make" != makeCheck && "make" != makeCheck) {
- continue;
- }
- // for now, assume return type of interest is first word to start Sk
- string search(csChild->fStart, csChild->fContentStart - csChild->fStart);
- auto end = search.find(makeCheck);
- if (string::npos == end) {
- return csChild->reportError<bool>("expected Make in content");
- }
- search = search.substr(0, end);
- if (string::npos == search.find(cs->fName)) {
- // if return value doesn't match current struct or class, look in
- // returned struct / class instead
- auto sk = search.find("Sk");
- if (string::npos != sk) {
- // todo: build class name, find it, search for match in its overview
- continue;
- }
- }
- }
- if (constructorEntries.end() ==
- std::find(constructorEntries.begin(), constructorEntries.end(), name)) {
- return csChild->reportError<bool>("missing constructor in Constructors");
- }
- }
- }
- return true;
- }
-
- bool checkCreators() {
- return true;
- }
-
- bool checkMethodSubtopic() {
- return true;
- }
-
- // Check that summary contains all methods
- bool checkMethodSummary() {
- // look for struct or class in fChildren
- const Definition* cs = this->classOrStruct();
- if (!cs) {
- return true; // topics may not have included classes or structs
- }
- auto memberFunctions = this->findTopic("Member_Functions", Optional::kNo);
- if (MarkType::kSubtopic != memberFunctions->fMarkType) {
- return memberFunctions->reportError<bool>("expected #Subtopic Member_Functions");
- }
- vector<string> methodEntries; // build map of overview entries
- if (!this->collectEntries(memberFunctions, &methodEntries)) {
- return false;
- }
- // mark corresponding methods as visited (may be more than one per entry)
- for (auto& csChild : cs->fChildren) {
- if (MarkType::kMethod != csChild->fMarkType) {
- // only check methods for now
- continue;
- }
- if (Definition::MethodType::kConstructor == csChild->fMethodType) {
- continue;
- }
- if (Definition::MethodType::kDestructor == csChild->fMethodType) {
- continue;
- }
- if (Definition::MethodType::kOperator == csChild->fMethodType) {
- continue;
- }
- string name;
- if (!this->childName(csChild, &name)) {
- return false;
- }
- if (methodEntries.end() ==
- std::find(methodEntries.begin(), methodEntries.end(), name)) {
- return csChild->reportError<bool>("missing method in Member_Functions");
- }
- }
- return true;
- }
-
- // Check that all operators are in a table of contents
- bool checkOperatorsSummary() {
- const Definition* cs = this->classOrStruct();
- if (!cs) {
- return true; // topics may not have included classes or structs
- }
- const Definition* operators = this->findTopic("Operators", Optional::kYes);
- if (operators && MarkType::kSubtopic != operators->fMarkType) {
- return operators->reportError<bool>("expected #Subtopic Operators");
- }
- vector<string> operatorEntries;
- if (operators) {
- if (!this->collectEntries(operators, &operatorEntries)) {
- return false;
- }
- }
- for (auto& csChild : cs->fChildren) {
- if (Definition::MethodType::kOperator != csChild->fMethodType) {
- continue;
- }
- string name;
- if (!this->childName(csChild, &name)) {
- return false;
- }
- bool found = false;
- for (auto str : operatorEntries) {
- if (string::npos != str.find(name)) {
- found = true;
- break;
- }
- }
- if (!found) {
- return csChild->reportError<bool>("missing operator in Operators");
- }
- }
- return true;
- }
bool checkRelatedFunctions() {
- auto related = this->findTopic("Related_Functions", Optional::kYes);
- if (!related) {
- return true;
- }
- vector<string> relatedEntries;
- if (!this->collectEntries(related, &relatedEntries)) {
- return false;
- }
const Definition* cs = this->classOrStruct();
vector<string> methodNames;
if (cs) {
@@ -243,36 +71,28 @@ protected:
// since format of clones is in flux, defer this check for now
continue;
}
-
- SkASSERT(string::npos != csChild->fName.find(prefix));
- string name = csChild->fName.substr(csChild->fName.find(prefix));
- methodNames.push_back(name);
- }
- }
- vector<string> trim = methodNames;
- for (auto entryName : relatedEntries) {
- auto entryDef = this->findTopic(entryName, Optional::kNo);
- if (!entryDef) {
-
- }
- vector<string> entries;
- this->collectEntries(entryDef, &entries);
- for (auto entry : entries) {
- auto it = std::find(methodNames.begin(), methodNames.end(), entry);
- if (it == methodNames.end()) {
- return cs->reportError<bool>("missing method");
- }
- it = std::find(trim.begin(), trim.end(), entry);
- if (it != trim.end()) {
- using std::swap;
- swap(*it, trim.back());
- trim.pop_back();
- }
+ bool containsMarkTypeIn = csChild->fDeprecated; // no markup for deprecated
+ for (auto child : csChild->fChildren) {
+ if (MarkType::kIn == child->fMarkType) {
+ containsMarkTypeIn = true;
+ break;
+ }
+ }
+ if (!containsMarkTypeIn) {
+#ifdef SK_BUILD_FOR_WIN
+ /* SkDebugf works in both visual studio and git shell, but
+ in git shell output is not piped to grep.
+ printf does not generate output in visual studio, but
+ does in git shell and can be piped.
+ */
+ if (IsDebuggerPresent()) {
+ SkDebugf("No #In: %s\n", csChild->fName.c_str());
+ } else
+#endif
+ printf("No #In: %s\n", csChild->fName.c_str());
+ }
}
}
- if (trim.size() > 0) {
- return cs->reportError<bool>("extra method");
- }
return true;
}
@@ -280,81 +100,6 @@ protected:
return true;
}
- bool checkSubtopicSummary() {
- const auto& cs = this->classOrStruct();
- if (!cs) {
- return true;
- }
- auto overview = this->findOverview(cs);
- if (!overview) {
- return false;
- }
- const Definition* subtopics = this->findTopic("Subtopics", Optional::kNo);
- if (MarkType::kSubtopic != subtopics->fMarkType) {
- return subtopics->reportError<bool>("expected #Subtopic Subtopics");
- }
- const Definition* relatedFunctions = this->findTopic("Related_Functions", Optional::kYes);
- if (relatedFunctions && MarkType::kSubtopic != relatedFunctions->fMarkType) {
- return relatedFunctions->reportError<bool>("expected #Subtopic Related_Functions");
- }
- vector<string> subtopicEntries;
- if (!this->collectEntries(subtopics, &subtopicEntries)) {
- return false;
- }
- if (relatedFunctions && !this->collectEntries(relatedFunctions, &subtopicEntries)) {
- return false;
- }
- for (auto& csChild : cs->fChildren) {
- if (MarkType::kSubtopic != csChild->fMarkType) {
- continue;
- }
- string name;
- if (!this->childName(csChild, &name)) {
- return false;
- }
- bool found = false;
- for (auto str : subtopicEntries) {
- if (string::npos != str.find(name)) {
- found = true;
- break;
- }
- }
- if (!found) {
- return csChild->reportError<bool>("missing SubTopic in SubTopics");
- }
- }
- return true;
- }
-
- bool childName(const Definition* def, string* name) {
- auto start = def->fName.find_last_of(':');
- start = string::npos == start ? 0 : start + 1;
- *name = def->fName.substr(start);
- if (def->fClone) {
- auto lastUnderline = name->find_last_of('_');
- if (string::npos == lastUnderline) {
- return def->reportError<bool>("expect _ in name");
- }
- if (lastUnderline + 1 >= name->length()) {
- return def->reportError<bool>("expect char after _ in name");
- }
- for (auto index = lastUnderline + 1; index < name->length(); ++index) {
- if (!isdigit((*name)[index])) {
- return def->reportError<bool>("expect digit after _ in name");
- }
- }
- *name = name->substr(0, lastUnderline);
- bool allLower = true;
- for (auto ch : *name) {
- allLower &= (bool) islower(ch);
- }
- if (allLower) {
- *name += "()";
- }
- }
- return true;
- }
-
const Definition* classOrStruct() {
for (auto& rootChild : fRoot->fChildren) {
if (rootChild->isStructOrClass()) {
@@ -364,102 +109,11 @@ protected:
return nullptr;
}
- static const Definition* overview_def(const Definition* parent) {
- Definition* overview = nullptr;
- if (parent) {
- for (auto& csChild : parent->fChildren) {
- if ("Overview" == csChild->fName) {
- if (overview) {
- return csChild->reportError<const Definition*>("expected only one Overview");
- }
- overview = csChild;
- }
- }
- }
- return overview;
- }
-
- const Definition* findOverview(const Definition* parent) {
- // expect Overview as Topic in every main class or struct
- const Definition* overview = overview_def(parent);
- const Definition* parentOverview = parent ? overview_def(parent->fParent) : nullptr;
- if (overview && parentOverview) {
- return overview->reportError<const Definition*>("expected only one Overview 2");
- }
- overview = overview ? overview : parentOverview;
- if (!overview) {
- return parent->reportError<const Definition*>("missing #Topic Overview");
- }
- return overview;
- }
-
enum class Optional {
kNo,
kYes,
};
- const Definition* findTopic(string name, Optional optional) {
- string undashed = name;
- std::replace(undashed.begin(), undashed.end(), '-', '_');
- string topicKey = fRoot->fName + '_' + undashed;
- auto topicKeyIter = fBmhParser.fTopicMap.find(topicKey);
- if (fBmhParser.fTopicMap.end() == topicKeyIter) {
- // TODO: remove this and require member functions outside of overview
- topicKey = fRoot->fName + "_Overview_" + undashed; // legacy form for now
- topicKeyIter = fBmhParser.fTopicMap.find(topicKey);
- if (fBmhParser.fTopicMap.end() == topicKeyIter) {
- if (Optional::kNo == optional) {
- return fRoot->reportError<Definition*>("missing subtopic");
- }
- return nullptr;
- }
- }
- return topicKeyIter->second;
- }
-
- bool collectEntries(const Definition* entries, vector<string>* strings) {
- const Definition* table = nullptr;
- for (auto& child : entries->fChildren) {
- if (MarkType::kTable == child->fMarkType && child->fName == entries->fName) {
- table = child;
- break;
- }
- }
- if (!table) {
- return entries->reportError<bool>("missing #Table in Overview Subtopic");
- }
- bool expectLegend = true;
- string prior = " "; // expect entries to be alphabetical
- for (auto& row : table->fChildren) {
- if (MarkType::kLegend == row->fMarkType) {
- if (!expectLegend) {
- return row->reportError<bool>("expect #Legend only once");
- }
- // todo: check if legend format matches table's rows' format
- expectLegend = false;
- } else if (expectLegend) {
- return row->reportError<bool>("expect #Legend first");
- }
- if (MarkType::kRow != row->fMarkType) {
- continue; // let anything through for now; can tighten up in the future
- }
- // expect column 0 to point to function name
- Definition* column0 = row->fChildren[0];
- string name = string(column0->fContentStart,
- column0->fContentEnd - column0->fContentStart);
- if (prior > name) {
- return row->reportError<bool>("expect alphabetical order");
- }
- if (prior == name) {
- return row->reportError<bool>("expect unique names");
- }
- // todo: error if name is all lower case and doesn't end in ()
- strings->push_back(name);
- prior = name;
- }
- return true;
- }
-
private:
const BmhParser& fBmhParser;
RootDefinition* fRoot;
diff --git a/tools/bookmaker/spellCheck.cpp b/tools/bookmaker/spellCheck.cpp
index 0daa4602ad..efc79ca528 100644
--- a/tools/bookmaker/spellCheck.cpp
+++ b/tools/bookmaker/spellCheck.cpp
@@ -53,7 +53,6 @@ private:
INHERITED::resetCommon();
fMethod = nullptr;
fRoot = nullptr;
- fTableState = TableState::kNone;
fInCode = false;
fInConst = false;
fInFormula = false;
@@ -74,7 +73,7 @@ private:
const BmhParser& fBmhParser;
Definition* fMethod;
RootDefinition* fRoot;
- TableState fTableState;
+ int fLocalLine;
bool fInCode;
bool fInConst;
bool fInDescription;
@@ -136,10 +135,6 @@ bool SpellCheck::check(Definition* def) {
fLineCount = def->fLineCount;
string printable = def->printableName();
const char* textStart = def->fContentStart;
- if (MarkType::kParam != def->fMarkType && MarkType::kConst != def->fMarkType &&
- MarkType::kPrivate != def->fMarkType && TableState::kNone != fTableState) {
- fTableState = TableState::kNone;
- }
switch (def->fMarkType) {
case MarkType::kAlias:
break;
@@ -159,12 +154,6 @@ bool SpellCheck::check(Definition* def) {
break;
case MarkType::kConst: {
fInConst = true;
- if (TableState::kNone == fTableState) {
- fTableState = TableState::kRow;
- }
- if (TableState::kRow == fTableState) {
- fTableState = TableState::kColumn;
- }
this->wordCheck(def->fName);
const char* lineEnd = strchr(textStart, '\n');
this->wordCheck(lineEnd - textStart, textStart);
@@ -204,8 +193,12 @@ bool SpellCheck::check(Definition* def) {
break;
case MarkType::kImage:
break;
+ case MarkType::kIn:
+ break;
case MarkType::kLegend:
break;
+ case MarkType::kLine:
+ break;
case MarkType::kLink:
break;
case MarkType::kList:
@@ -225,7 +218,6 @@ bool SpellCheck::check(Definition* def) {
if (!def->isClone() && Definition::MethodType::kOperator != def->fMethodType) {
this->wordCheck(method_name);
}
- fTableState = TableState::kNone;
fMethod = def;
} break;
case MarkType::kNoExample:
@@ -233,12 +225,6 @@ bool SpellCheck::check(Definition* def) {
case MarkType::kOutdent:
break;
case MarkType::kParam: {
- if (TableState::kNone == fTableState) {
- fTableState = TableState::kRow;
- }
- if (TableState::kRow == fTableState) {
- fTableState = TableState::kColumn;
- }
TextParser paramParser(def->fFileName, def->fStart, def->fContentStart,
def->fLineCount);
paramParser.skipWhiteSpace();
@@ -254,6 +240,8 @@ bool SpellCheck::check(Definition* def) {
} break;
case MarkType::kPlatform:
break;
+ case MarkType::kPopulate:
+ break;
case MarkType::kPrivate:
break;
case MarkType::kReturn:
@@ -262,6 +250,8 @@ bool SpellCheck::check(Definition* def) {
break;
case MarkType::kSeeAlso:
break;
+ case MarkType::kSet:
+ break;
case MarkType::kStdOut: {
fInStdOut = true;
TextParser code(def);
@@ -336,8 +326,6 @@ bool SpellCheck::check(Definition* def) {
case MarkType::kConst:
fInConst = false;
case MarkType::kParam:
- SkASSERT(TableState::kColumn == fTableState);
- fTableState = TableState::kRow;
break;
case MarkType::kReturn:
case MarkType::kSeeAlso:
@@ -390,6 +378,7 @@ void SpellCheck::leafCheck(const char* start, const char* end) {
const char* wordStart = nullptr;
const char* wordEnd = nullptr;
const char* possibleEnd = nullptr;
+ fLocalLine = 0;
do {
if (wordStart && wordEnd) {
if (!allLower || (!inQuotes && '\"' != lastCh && !inParens
@@ -457,6 +446,9 @@ void SpellCheck::leafCheck(const char* start, const char* end) {
allLower = false;
case '-': // note that dash doesn't clear allLower
break;
+ case '\n':
+ ++fLocalLine;
+ // fall through
default:
wordEnd = chPtr;
break;
@@ -492,7 +484,8 @@ void SpellCheck::report(SkCommandLineFlags::StringArray report) {
continue;
}
if (iter.second.fCount == 1) {
- SkDebugf("%s(%d): %s\n", iter.second.fFile.c_str(), iter.second.fLine,
+ string fullName = this->ReportFilename(iter.second.fFile);
+ SkDebugf("%s(%d): %s\n", fullName.c_str(), iter.second.fLine,
iter.first.c_str());
}
}
@@ -562,7 +555,8 @@ void SpellCheck::report(SkCommandLineFlags::StringArray report) {
break;
}
if (check.compare(mispelled) == 0) {
- SkDebugf("%s(%d): %s\n", iter.second.fFile.c_str(), iter.second.fLine,
+ string fullName = this->ReportFilename(iter.second.fFile);
+ SkDebugf("%s(%d): %s\n", fullName.c_str(), iter.second.fLine,
iter.first.c_str());
if (report.count() == ++index) {
break;
@@ -651,9 +645,12 @@ void SpellCheck::wordCheck(const string& str) {
if (mappy.end() != iter) {
iter->second.fCount += 1;
} else {
+ if ("offscreen" == str) {
+ SkDebugf("");
+ }
CheckEntry* entry = &mappy[str];
entry->fFile = fFileName;
- entry->fLine = fLineCount;
+ entry->fLine = fLineCount + fLocalLine;
entry->fCount = 1;
}
}