aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2018-02-06 09:41:53 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-06 15:20:25 +0000
commit4855f78dd16ad50003ec537c98062e24a831cd45 (patch)
tree9566730a4f8416078131a0dc8255aecdeb9e3bf3 /docs
parent2aa5bab573cff2d9bfb40f7af6014a93bf2d4fda (diff)
fix bookmaker nightly
- mark the interfaces that use SkMask as deprecated - add more autogenerated subtopics - make subtopic names singular, avoiding collision with Skia names - simplify #Deprecated and #Bug tags - add "#Deprecated soon" to note things to be deprecated - fix some spelling errors - refresh web docs - add self-check functionality to find methods outside subtopics TBR=caryclark@google.com Docs-Preview: https://skia.org/?cl=102150 Bug: skia:6898 Change-Id: I0e742a56d49dccd4409bb68eed9167c8ad7611ce Reviewed-on: https://skia-review.googlesource.com/102150 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'docs')
-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
17 files changed, 749 insertions, 1055 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.