Check every word in docs
This enables checking all text to see if it
either represents a valid reference or is a
word in docs/spelling.txt . Expressions are
checked for validity as well.
There are a few shortcuts (marked with TODO):
- typedefs aren't resolved, so cheats are
added for SkVector and SkIVector.
- operator overload detection is incomplete
- constructor detection is incomplete
- formula definitions aren't detected
Found and fixed a bunch of spelling, usage,
and incorrect or obsolete references.
A few comment changes are needed in
include/core to get this to work, mostly
centered around recent SkPaint/SkFont edits.
TBR=reed@google.com
Docs-Preview: https://skia.org/?cl=167541
Bug: skia:
Change-Id: I2e0d5990105c5a8482b0c0d3e50fd0b330996dd6
Reviewed-on: https://skia-review.googlesource.com/c/167541
Reviewed-by: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
diff --git a/docs/SkAutoCanvasRestore_Reference.bmh b/docs/SkAutoCanvasRestore_Reference.bmh
index 2247c9b..30acdc4 100644
--- a/docs/SkAutoCanvasRestore_Reference.bmh
+++ b/docs/SkAutoCanvasRestore_Reference.bmh
@@ -12,7 +12,7 @@
#Method SkAutoCanvasRestore(SkCanvas* canvas, bool doSave)
-#Line # preserves Canvas save count ##
+#Line # restores Canvas when out of scope ##
#Populate
#Example
diff --git a/docs/SkBitmap_Reference.bmh b/docs/SkBitmap_Reference.bmh
index 43d33d2..7a44af5 100644
--- a/docs/SkBitmap_Reference.bmh
+++ b/docs/SkBitmap_Reference.bmh
@@ -1165,31 +1165,31 @@
Sets width, height, Alpha_Type, Color_Type, Color_Space, and optional
rowBytes. Frees pixels, and returns true if successful.
-imageInfo.alphaType may be altered to a value permitted by imageInfo.colorSpace.
-If imageInfo.colorType is kUnknown_SkColorType, imageInfo.alphaType is
+imageInfo.alphaType() may be altered to a value permitted by imageInfo.colorSpace().
+If imageInfo.colorType() is kUnknown_SkColorType, imageInfo.alphaType() is
set to kUnknown_SkAlphaType.
-If imageInfo.colorType is kAlpha_8_SkColorType and imageInfo.alphaType is
-kUnpremul_SkAlphaType, imageInfo.alphaType is replaced by kPremul_SkAlphaType.
-If imageInfo.colorType is kRGB_565_SkColorType or kGray_8_SkColorType,
-imageInfo.alphaType is set to kOpaque_SkAlphaType.
-If imageInfo.colorType is kARGB_4444_SkColorType, kRGBA_8888_SkColorType,
-kBGRA_8888_SkColorType, or kRGBA_F16_SkColorType: imageInfo.alphaType remains
+If imageInfo.colorType() is kAlpha_8_SkColorType and imageInfo.alphaType() is
+kUnpremul_SkAlphaType, imageInfo.alphaType() is replaced by kPremul_SkAlphaType.
+If imageInfo.colorType() is kRGB_565_SkColorType or kGray_8_SkColorType,
+imageInfo.alphaType() is set to kOpaque_SkAlphaType.
+If imageInfo.colorType() is kARGB_4444_SkColorType, kRGBA_8888_SkColorType,
+kBGRA_8888_SkColorType, or kRGBA_F16_SkColorType: imageInfo.alphaType() remains
unchanged.
-rowBytes must equal or exceed imageInfo.minRowBytes. If imageInfo.colorSpace is
+rowBytes must equal or exceed imageInfo.minRowBytes(). If imageInfo.colorSpace() is
kUnknown_SkColorType, rowBytes is ignored and treated as zero; for all other
-Color_Space values, rowBytes of zero is treated as imageInfo.minRowBytes.
+Color_Space values, rowBytes of zero is treated as imageInfo.minRowBytes().
Calls reset() and returns false if:
#List
# rowBytes exceeds 31 bits ##
# imageInfo.width() is negative ##
# imageInfo.height() is negative ##
-# rowBytes is positive and less than imageInfo.width() times imageInfo.bytesPerPixel ##
+# rowBytes is positive and less than imageInfo.width() times imageInfo.bytesPerPixel() ##
##
#Param imageInfo contains width, height, Alpha_Type, Color_Type, Color_Space ##
-#Param rowBytes imageInfo.minRowBytes or larger; or zero ##
+#Param rowBytes imageInfo.minRowBytes() or larger; or zero ##
#Return true if Image_Info set successfully ##
@@ -2012,7 +2012,7 @@
#Line # returns Alpha normalized from zero to one ##
Looks up the pixel at (x,y) and return its alpha component, normalized to [0..1].
-This is roughly equivalent to #Formula # SkGetColorA(getColor()) ##, but can be more efficent
+This is roughly equivalent to #Formula # SkGetColorA(getColor()) ##, but can be more efficient
(and more precise if the pixels store more than 8 bits per component).
#Param x column index, zero or greater, and less than width() ##
@@ -2247,15 +2247,15 @@
Returns true if pixels are copied. Returns false if:
#List
# dstInfo has no address ##
-# dstRowBytes is less than dstInfo.minRowBytes ##
+# dstRowBytes is less than dstInfo.minRowBytes() ##
# Pixel_Ref is nullptr ##
##
Pixels are copied only if pixel conversion is possible. If Bitmap colorType is
-kGray_8_SkColorType, or kAlpha_8_SkColorType; dstInfo.colorType must match.
-If Bitmap colorType is kGray_8_SkColorType, dstInfo.colorSpace must match.
-If Bitmap alphaType is kOpaque_SkAlphaType, dstInfo.alphaType must
-match. If Bitmap colorSpace is nullptr, dstInfo.colorSpace must match. Returns
+kGray_8_SkColorType, or kAlpha_8_SkColorType; dstInfo.colorType() must match.
+If Bitmap colorType is kGray_8_SkColorType, dstInfo.colorSpace() must match.
+If Bitmap alphaType is kOpaque_SkAlphaType, dstInfo.alphaType() must
+match. If Bitmap colorSpace is nullptr, dstInfo.colorSpace() must match. Returns
false if pixel conversion is not possible.
srcX and srcY may be negative to copy only top or left of source. Returns
@@ -2310,11 +2310,11 @@
does not exceed Bitmap (width(), height()).
dst specifies width, height, Color_Type, Alpha_Type, Color_Space, pixel storage,
-and row bytes of destination. dst.rowBytes specifics the gap from one destination
+and row bytes of destination. dst.rowBytes() specifics the gap from one destination
row to the next. Returns true if pixels are copied. Returns false if:
#List
# dst pixel storage equals nullptr ##
-# dst.rowBytes is less than SkImageInfo::minRowBytes ##
+# dst.rowBytes() is less than SkImageInfo::minRowBytes() ##
# Pixel_Ref is nullptr ##
##
@@ -2366,11 +2366,11 @@
does not exceed Bitmap (width(), height()).
dst specifies width, height, Color_Type, Alpha_Type, Color_Space, pixel storage,
-and row bytes of destination. dst.rowBytes specifics the gap from one destination
+and row bytes of destination. dst.rowBytes() specifics the gap from one destination
row to the next. Returns true if pixels are copied. Returns false if:
#List
# dst pixel storage equals nullptr ##
-# dst.rowBytes is less than SkImageInfo::minRowBytes ##
+# dst.rowBytes() is less than SkImageInfo::minRowBytes() ##
# Pixel_Ref is nullptr ##
##
@@ -2416,11 +2416,11 @@
(src.width(), src.height()).
src specifies width, height, Color_Type, Alpha_Type, Color_Space, pixel storage,
-and row bytes of source. src.rowBytes specifics the gap from one source
+and row bytes of source. src.rowBytes() specifics the gap from one source
row to the next. Returns true if pixels are copied. Returns false if:
#List
# src pixel storage equals nullptr ##
-# src.rowBytes is less than SkImageInfo::minRowBytes ##
+# src.rowBytes() is less than SkImageInfo::minRowBytes() ##
# Pixel_Ref is nullptr ##
##
@@ -2475,11 +2475,11 @@
(src.width(), src.height()).
src specifies width, height, Color_Type, Alpha_Type, Color_Space, pixel storage,
-and row bytes of source. src.rowBytes specifics the gap from one source
+and row bytes of source. src.rowBytes() specifics the gap from one source
row to the next. Returns true if pixels are copied. Returns false if:
#List
# src pixel storage equals nullptr ##
-# src.rowBytes is less than SkImageInfo::minRowBytes ##
+# src.rowBytes() is less than SkImageInfo::minRowBytes() ##
# Pixel_Ref is nullptr ##
##
diff --git a/docs/SkCanvas_Reference.bmh b/docs/SkCanvas_Reference.bmh
index 125b659..11eb24c 100644
--- a/docs/SkCanvas_Reference.bmh
+++ b/docs/SkCanvas_Reference.bmh
@@ -94,7 +94,7 @@
void draw(SkCanvas* ) {
const int width = 3;
const int height = 3;
- SkPMColor pixels[height][width]; // allocate a 3x3 Premultiplied bitmap on the stack
+ SkPMColor pixels[height][width]; // allocate a 3 by 3 Premultiplied bitmap on the stack
// create a SkCanvas backed by a raster device, and delete it when the
// function goes out of scope.
std::unique_ptr<SkCanvas> canvas = SkCanvas::MakeRasterDirectN32(
@@ -446,7 +446,7 @@
#NoExample
##
-#SeeAlso peekPixels SkSurface::flush() GrContext::flush() SkSurface::prepareForExternalIO GrContext::abandonContext()
+#SeeAlso peekPixels SkSurface::flush GrContext::flush SkSurface::prepareForExternalIO GrContext::abandonContext
##
@@ -3042,7 +3042,7 @@
}
##
-#SeeAlso DrawRRect drawRect drawDRRect drawPath drawCircle drawOval drawPoint
+#SeeAlso drawRRect drawRect drawDRRect drawPath drawCircle drawOval drawPoint
##
@@ -4015,7 +4015,7 @@
# ------------------------------------------------------------------------------
#Enum QuadAAFlags
-#Line # don't use this ##
+#Line # do not use this ##
#Code
#Populate
##
@@ -4055,7 +4055,7 @@
# ------------------------------------------------------------------------------
#Struct ImageSetEntry
-#Line # don't use this ##
+#Line # do not use this ##
#Code
#Populate
@@ -4095,7 +4095,7 @@
##
#In Draw_Image
#In Draw
-#Line # draws a set a of images (don't call this) ##
+#Line # draws a set a of images; do not call this ##
Draws a set of images. Do not use this method.
@@ -4637,7 +4637,7 @@
##
#ToDo can patch use image filter? ##
-#SeeAlso SeeAlso drawVertices drawPicture
+#SeeAlso drawVertices drawPicture
##
@@ -4694,7 +4694,7 @@
##
#ToDo can patch use image filter? ##
-#SeeAlso SeeAlso drawVertices drawPicture
+#SeeAlso drawVertices drawPicture
##
diff --git a/docs/SkColor4f_Reference.bmh b/docs/SkColor4f_Reference.bmh
index 2fc02cc..d6e997e 100644
--- a/docs/SkColor4f_Reference.bmh
+++ b/docs/SkColor4f_Reference.bmh
@@ -17,7 +17,7 @@
fA Alpha is may be greater or smaller than fG green, fB blue, or fR red.
SkColor4f is shorthand for Unpremultiplied SkRGBA4f.
-Components are connnected if defined with kPremul_SkAlphaType;
+Components are connected if defined with kPremul_SkAlphaType;
fA Alpha is equal to or larger than fG green, fB blue, and fR red. The values
stored in fG, fB, and fR combine the color component with the Alpha component.
diff --git a/docs/SkColor_Reference.bmh b/docs/SkColor_Reference.bmh
index 82f6d60..e3efad4 100644
--- a/docs/SkColor_Reference.bmh
+++ b/docs/SkColor_Reference.bmh
@@ -714,7 +714,7 @@
# ------------------------------------------------------------------------------
-#Subtopic PMColor
+#Subtopic PM_Color
#Line # color components premultiplied by Alpha ##
#Typedef uint32_t SkPMColor
@@ -735,7 +735,7 @@
#Method SkPMColor SkPreMultiplyARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
#In Functions
-#Line # converts Unpremultiplied ARGB to Premultiplied PMColor ##
+#Line # converts Unpremultiplied ARGB to Premultiplied PM_Color ##
Returns a SkPMColor value from Unpremultiplied 8-bit component values.
@@ -768,9 +768,9 @@
#Method SkPMColor SkPreMultiplyColor(SkColor c)
#In Functions
-#Line # converts Unpremultiplied Color to Premultiplied PMColor ##
+#Line # converts Unpremultiplied Color to Premultiplied PM_Color ##
-Returns PMColor closest to Color c. Multiplies c RGB components by the c Alpha,
+Returns PM_Color closest to Color c. Multiplies c RGB components by the c Alpha,
and arranges the bytes to match the format of kN32_SkColorType.
#Param c Unpremultiplied ARGB Color ##
@@ -800,6 +800,6 @@
#Method ##
-#Subtopic PMColor ##
+#Subtopic PM_Color ##
#Topic Color ##
diff --git a/docs/SkIRect_Reference.bmh b/docs/SkIRect_Reference.bmh
index 3bbfd68..b308f53 100644
--- a/docs/SkIRect_Reference.bmh
+++ b/docs/SkIRect_Reference.bmh
@@ -828,7 +828,7 @@
IRects intersect when they enclose a common area. To intersect, each of the pair
must describe area; fLeft is less than fRight, and fTop is less than fBottom;
-empty() returns false. The intersection of IRect pair can be described by:
+SkIRect::isEmpty() returns false. The intersection of IRect pair can be described by:
#Formula # (max(a.fLeft, b.fLeft), max(a.fTop, b.fTop),
min(a.fRight, b.fRight), min(a.fBottom, b.fBottom)) ##.
diff --git a/docs/SkImageInfo_Reference.bmh b/docs/SkImageInfo_Reference.bmh
index 800ba39..bf425d7 100644
--- a/docs/SkImageInfo_Reference.bmh
+++ b/docs/SkImageInfo_Reference.bmh
@@ -420,7 +420,7 @@
the drawn result is undefined.
If paired with kUnpremul_SkAlphaType: alpha, blue, green, and red components
- may have any value. There may be a performance penalty with Unpremultipled
+ may have any value. There may be a performance penalty with Unpremultiplied
pixels.
If paired with kOpaque_SkAlphaType: all alpha component values are at the maximum;
@@ -469,7 +469,7 @@
the drawn result is undefined.
If paired with kUnpremul_SkAlphaType: alpha, red, green, and blue components
- may have any value. There may be a performance penalty with Unpremultipled
+ may have any value. There may be a performance penalty with Unpremultiplied
pixels.
If paired with kOpaque_SkAlphaType: all alpha component values are at the maximum;
@@ -1024,7 +1024,7 @@
#Populate
##
-Describes pixel dimensions and encoding. Bitmap, Image, PixMap, and Surface
+Describes pixel dimensions and encoding. Bitmap, Image, Pixmap, and Surface
can be created from Image_Info. Image_Info can be retrieved from Bitmap and
Pixmap, but not from Image and Surface. For example, Image and Surface
implementations may defer pixel depth, so may not completely specify Image_Info.
diff --git a/docs/SkImage_Reference.bmh b/docs/SkImage_Reference.bmh
index 7c2d350..9a68740 100644
--- a/docs/SkImage_Reference.bmh
+++ b/docs/SkImage_Reference.bmh
@@ -1158,16 +1158,16 @@
destination. dstRowBytes specifics the gap from one destination row to the next.
Returns true if pixels are copied. Returns false if:
#List
-# dstInfo.addr() equals nullptr ##
-# dstRowBytes is less than dstInfo.minRowBytes ##
+# dstInfo has no address ##
+# dstRowBytes is less than dstInfo.minRowBytes() ##
# Pixel_Ref is nullptr ##
##
Pixels are copied only if pixel conversion is possible. If Image Color_Type is
-kGray_8_SkColorType, or kAlpha_8_SkColorType; dstInfo.colorType must match.
-If Image Color_Type is kGray_8_SkColorType, dstInfo.colorSpace must match.
-If Image Alpha_Type is kOpaque_SkAlphaType, dstInfo.alphaType must
-match. If Image Color_Space is nullptr, dstInfo.colorSpace must match. Returns
+kGray_8_SkColorType, or kAlpha_8_SkColorType; dstInfo.colorType() must match.
+If Image Color_Type is kGray_8_SkColorType, dstInfo.colorSpace() must match.
+If Image Alpha_Type is kOpaque_SkAlphaType, dstInfo.alphaType() must
+match. If Image Color_Space is nullptr, dstInfo.colorSpace() must match. Returns
false if pixel conversion is not possible.
srcX and srcY may be negative to copy only top or left of source. Returns
@@ -1221,19 +1221,19 @@
does not exceed Image (width(), height()).
dst specifies width, height, Color_Type, Alpha_Type, Color_Space, pixel storage,
-and row bytes of destination. dst.rowBytes specifics the gap from one destination
+and row bytes of destination. dst.rowBytes() specifics the gap from one destination
row to the next. Returns true if pixels are copied. Returns false if:
#List
# dst pixel storage equals nullptr ##
-# dst.rowBytes is less than SkImageInfo::minRowBytes ##
+# dst.rowBytes() is less than SkImageInfo::minRowBytes ##
# Pixel_Ref is nullptr ##
##
Pixels are copied only if pixel conversion is possible. If Image Color_Type is
-kGray_8_SkColorType, or kAlpha_8_SkColorType; dst.colorType must match.
-If Image Color_Type is kGray_8_SkColorType, dst.colorSpace must match.
-If Image Alpha_Type is kOpaque_SkAlphaType, dst.alphaType must
-match. If Image Color_Space is nullptr, dst.colorSpace must match. Returns
+kGray_8_SkColorType, or kAlpha_8_SkColorType; dst.colorType() must match.
+If Image Color_Type is kGray_8_SkColorType, dst.colorSpace() must match.
+If Image Alpha_Type is kOpaque_SkAlphaType, dst.alphaType() must
+match. If Image Color_Space is nullptr, dst.colorSpace() must match. Returns
false if pixel conversion is not possible.
srcX and srcY may be negative to copy only top or left of source. Returns
@@ -1734,7 +1734,7 @@
}
##
-#SeeAlso isTextureBacked MakeNonTextureImage
+#SeeAlso isTextureBacked makeNonTextureImage
#Method ##
@@ -1758,7 +1758,7 @@
}
##
-#SeeAlso MakeFromPixture MakeFromTexture
+#SeeAlso MakeFromPicture MakeFromTexture
#Method ##
diff --git a/docs/SkMatrix_Reference.bmh b/docs/SkMatrix_Reference.bmh
index 17ceab5..0b98658 100644
--- a/docs/SkMatrix_Reference.bmh
+++ b/docs/SkMatrix_Reference.bmh
@@ -8,7 +8,7 @@
#Populate
##
-Matrix holds a 3x3 matrix for transforming coordinates. This allows mapping
+Matrix holds a 3 by 3 matrix for transforming coordinates. This allows mapping
Points and Vectors with translation, scaling, skewing, rotation, and
perspective.
@@ -24,7 +24,7 @@
#Method static SkMatrix MakeScale(SkScalar sx, SkScalar sy)
#In Constructors
-#Line # constructs from scale in x and y ##
+#Line # constructs from scale on x-axis and y-axis ##
#Populate
#Example
@@ -56,7 +56,7 @@
#Method static SkMatrix MakeTrans(SkScalar dx, SkScalar dy)
#In Constructors
-#Line # constructs from translate in x and y ##
+#Line # constructs from translate on x-axis and y-axis ##
#Populate
#Example
@@ -108,7 +108,7 @@
#Populate
##
-Enum of bit fields for mask returned by getType.
+Enumeration of bit fields for mask returned by getType.
Used to identify the complexity of Matrix, to optimize performance.
#Const kIdentity_Mask 0
@@ -121,7 +121,7 @@
##
#Const kScale_Mask 2
#Line # scale Matrix ##
-set if Matrix has x or y scale
+set if Matrix scales x-axis or y-axis
##
#Const kAffine_Mask 4
#Line # skew or rotate Matrix ##
@@ -1129,7 +1129,7 @@
#Method void setTranslate(SkScalar dx, SkScalar dy)
#In Constructors
#In Set
-#Line # sets to translate in x and y ##
+#Line # sets to translate on x-axis and y-axis ##
#Populate
#Example
@@ -1722,8 +1722,8 @@
#In Set
#In Operators
#Line # post-multiplies Matrix by inverse scale ##
-Sets Matrix to Matrix constructed from scaling by #Formula # (1/divx, 1/divy) ##,
-about pivot point (px, py), multiplied by Matrix.
+Sets Matrix to Matrix constructed from scaling by (1/divx, 1/divy),
+multiplied by Matrix.
Returns false if either divx or divy is zero.
@@ -1753,8 +1753,8 @@
| 0 0 1 | | P Q R | | P Q R |
##
-#Param divx integer divisor for inverse scale in x ##
-#Param divy integer divisor for inverse scale in y ##
+#Param divx integer divisor for inverse scale on x-axis ##
+#Param divy integer divisor for inverse scale on y-axis ##
#Return true on successful scale ##
@@ -1902,10 +1902,10 @@
how Matrix maps to the side or center of the destination Rect.
#Const kFill_ScaleToFit 0
-#Line # scales in x and y to fill destination Rect ##
- Computes Matrix that scales in x and y independently, so that source Rect is
- mapped to completely fill destination Rect. The aspect ratio of source Rect
- may change.
+#Line # scales about x-axis and y-axis to fill destination Rect ##
+ Computes Matrix that scales about x-axis and y-axis independently, so that
+ source Rect is mapped to completely fill destination Rect. The aspect ratio
+ of source Rect may change.
##
#Const kStart_ScaleToFit 1
#Line # scales and aligns to left and top ##
@@ -2603,7 +2603,7 @@
# ------------------------------------------------------------------------------
#Method bool isFixedStepInX() const
#In Property
-#Line # returns if transformation supports fixed step in x ##
+#Line # returns if transformation supports fixed step on x-axis ##
#Populate
#Example
@@ -2645,7 +2645,7 @@
#Method SkVector fixedStepInX(SkScalar y) const
#In Property
-#Line # returns step in x for a position in y ##
+#Line # returns step on x-axis for a position on y-axis ##
#Populate
#Example
@@ -2941,7 +2941,7 @@
##
##
-#SeeAlso SeeAlso getType
+#SeeAlso getType
##
diff --git a/docs/SkMemoryStream_Reference.bmh b/docs/SkMemoryStream_Reference.bmh
index 3f0d4fb..3bcbe67 100644
--- a/docs/SkMemoryStream_Reference.bmh
+++ b/docs/SkMemoryStream_Reference.bmh
@@ -29,7 +29,8 @@
#In Constructors
#Line # incomplete ##
-We allocate (and free) the memory. Write to it via getMemoryBase()
+Allocates memory for stream data. Call getMemoryBase() to access allocated
+memory.
#Param length incomplete ##
diff --git a/docs/SkPaint_Reference.bmh b/docs/SkPaint_Reference.bmh
index b9cd32c..a21183c 100644
--- a/docs/SkPaint_Reference.bmh
+++ b/docs/SkPaint_Reference.bmh
@@ -319,23 +319,23 @@
to 26.6 fractional pixels.
##
#Const kSlight_Hinting 1
-#Line # minimal modification to improve constrast ##
- Modifies glyph outlines minimally to improve constrast.
+#Line # minimal modification to improve contrast ##
+ Modifies glyph outlines minimally to improve contrast.
With FreeType, this is equivalent in spirit to the
FT_LOAD_TARGET_LIGHT value supplied to FT_Load_Glyph. It chooses a
lighter hinting algorithm for non-monochrome modes.
Generated Glyphs may be fuzzy but better resemble their original shape.
##
#Const kNormal_Hinting 2
-#Line # glyph outlines modified to improve constrast ##
- Modifies glyph outlines to improve constrast. This is the default.
+#Line # glyph outlines modified to improve contrast ##
+ Modifies glyph outlines to improve contrast. This is the default.
With FreeType, this supplies FT_LOAD_TARGET_NORMAL to FT_Load_Glyph,
choosing the default hinting algorithm, which is optimized for standard
gray-level rendering.
##
#Const kFull_Hinting 3
-#Line # modifies glyph outlines for maximum constrast ##
- Modifies glyph outlines for maximum constrast. With FreeType, this selects
+#Line # modifies glyph outlines for maximum contrast ##
+ Modifies glyph outlines for maximum contrast. With FreeType, this selects
FT_LOAD_TARGET_LCD or FT_LOAD_TARGET_LCD_V if kLCDRenderText_Flag is set.
FT_LOAD_TARGET_LCD is a variant of FT_LOAD_TARGET_NORMAL optimized for
horizontally decimated LCD displays; FT_LOAD_TARGET_LCD_V is a
@@ -3284,30 +3284,8 @@
##
-
-#Method SkRect getFontBounds() const
-
-#In Font_Metrics
-#Line # returns union all glyph bounds ##
-#Populate
-
-#Example
- SkPaint paint;
- SkFontMetrics fm;
- paint.getFontMetrics(&fm);
- SkRect fb = paint.getFontBounds();
- SkDebugf("metrics bounds = { %g, %g, %g, %g }\n", fm.fXMin, fm.fTop, fm.fXMax, fm.fBottom );
- SkDebugf("font bounds = { %g, %g, %g, %g }\n", fb.fLeft, fb.fTop, fb.fRight, fm.fBottom );
-
- #StdOut
- metrics bounds = { -12.2461, -14.7891, 21.5215, 5.55469 }
- font bounds = { -12.2461, -14.7891, 21.5215, 5.55469 }
- ##
-##
-
-##
-
#Subtopic Font_Metrics ##
+
# ------------------------------------------------------------------------------
#Method int textToGlyphs(const void* text, size_t byteLength,
@@ -3780,6 +3758,28 @@
#Subtopic Text_Intercepts ##
# ------------------------------------------------------------------------------
+#Method SkRect getFontBounds() const
+
+#In Font_Metrics
+#Line # returns union all glyph bounds ##
+#Populate
+
+#Example
+ SkPaint paint;
+ SkPaint::FontMetrics fm;
+ paint.getFontMetrics(&fm);
+ SkRect fb = paint.getFontBounds();
+ SkDebugf("metrics bounds = { %g, %g, %g, %g }\n", fm.fXMin, fm.fTop, fm.fXMax, fm.fBottom );
+ SkDebugf("font bounds = { %g, %g, %g, %g }\n", fb.fLeft, fb.fTop, fb.fRight, fm.fBottom );
+
+ #StdOut
+ metrics bounds = { -12.2461, -14.7891, 21.5215, 5.55469 }
+ font bounds = { -12.2461, -14.7891, 21.5215, 5.55469 }
+ ##
+##
+
+##
+
#Method bool nothingToDraw() const
#In Utility
#Line # returns true if Paint prevents all drawing ##
@@ -3844,9 +3844,9 @@
(to be made private)
##
- Only call this if canComputeFastBounds returned true. This takes a
- raw rectangle (the raw bounds of a shape), and adjusts it for stylistic
- effects in the paint (e.g. stroking). If needed, it uses the storage
+ Only call if canComputeFastBounds returned true. This takes a
+ raw rectangle, the raw bounds of a shape; and adjusts it for stylistic
+ effects in the paint, such as stroking. If needed, it uses the storage
parameter. It returns the adjusted bounds that can then be used
for SkCanvas::quickReject tests.
diff --git a/docs/SkPath_Reference.bmh b/docs/SkPath_Reference.bmh
index 0f96086..abb7758 100644
--- a/docs/SkPath_Reference.bmh
+++ b/docs/SkPath_Reference.bmh
@@ -314,7 +314,7 @@
#Example
#Description
-Rewind removes Verb_Array but leaves storage; since storage is not compared,
+rewind() removes Verb_Array but leaves storage; since storage is not compared,
Path pair are equivalent.
##
void draw(SkCanvas* canvas) {
@@ -1284,7 +1284,7 @@
Point_Array contains Points satisfying the allocated Points for
each Verb in Verb_Array. For instance, Path containing one Contour with Line
-and Quad is described by Verb_Array: Verb::kMoveTo, Verb::kLineTo, Verb::kQuadTo; and
+and Quad is described by Verb_Array: kMove_Verb, kLine_Verb, kQuad_Verb; and
one Point for move, one Point for Line, two Points for Quad; totaling four Points.
Point_Array may be read directly from Path with getPoints, or inspected with
@@ -1862,7 +1862,7 @@
#Alias Quadratic_Beziers ##
#Line # curve described by second-order polynomial ##
-Quad describes a quadratic Bezier, a second-order curve identical to a section
+Quad describes a Quadratic_Bezier, a second-order curve identical to a section
of a parabola. Quad begins at a start Point, curves towards a control Point,
and then curves to an end Point.
@@ -1996,8 +1996,9 @@
# ------------------------------------------------------------------------------
#Subtopic Conic
-#Line # conic section defined by three points and a weight ##
+#Alias Conic ##
#Alias Conics ##
+#Line # conic section defined by three points and a weight ##
Conic describes a conical section: a piece of an ellipse, or a piece of a
parabola, or a piece of a hyperbola. Conic begins at a start Point,
@@ -2365,12 +2366,12 @@
arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, bool forceMoveTo)
describes Arc as a piece of Oval, beginning at start angle, sweeping clockwise or counterclockwise,
which may continue Contour or start a new one. This construction is similar to PostScript and
-HTML_Canvas arcs. Variation addArc always starts new Contour. Canvas::drawArc draws without
+HTML_Canvas arcs. Variation addArc always starts new Contour. SkCanvas::drawArc draws without
requiring Path.
arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar radius)
-describes Arc as tangent to the line (x0, y0), (x1, y1) and tangent to the line (x1, y1), (x2, y2)
-where (x0, y0) is the last Point added to Path. This construction is similar to PostScript and
+describes Arc as tangent to the line segment from last Point added to Path to (x1, y1); and tangent
+to the line segment from (x1, y1) to (x2, y2). This construction is similar to PostScript and
HTML_Canvas arcs.
arcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc, Direction sweep,
@@ -2390,7 +2391,7 @@
#List
# <sup>1</sup> arcTo(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle, bool forceMoveTo) ##
-# <sup>2</sup> parameter sets force MoveTo ##
+# <sup>2</sup> parameter adds move to first point ##
# <sup>3</sup> start angle must be multiple of 90 degrees ##
# <sup>4</sup> arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar radius) ##
# <sup>5</sup> arcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc,
@@ -2663,8 +2664,10 @@
};
##
-Four Oval parts with radii (rx, ry) start at last Path Point and ends at (x, y).
-ArcSize and Direction select one of the four Oval parts.
+Four axis-aligned Ovals with the same height and width intersect a pair of Points.
+ArcSize and Direction select one of the four Ovals, by choosing the larger or smaller
+arc between the Points; and by choosing the arc Direction, clockwise
+or counterclockwise.
#Const kSmall_ArcSize 0
#Line # smaller of Arc pair ##
@@ -2772,8 +2775,8 @@
Appends Arc to Path, relative to last Path Point. Arc is implemented by one or
more Conic, weighted to describe part of Oval with radii (rx, ry) rotated by
-xAxisRotate degrees. Arc curves from last Path Point (x0, y0) to end Point:
-#Formula # (x0 + dx, y0 + dy) ##, choosing one of four possible routes: clockwise or
+xAxisRotate degrees. Arc curves from last Path Point to relative end Point
+(dx, dy), choosing one of four possible routes: clockwise or
counterclockwise, and smaller or larger. If Path is empty, the start Arc Point
is (0, 0).
@@ -2913,7 +2916,6 @@
#In Utility
#Line # returns Fill_Type representing inside geometry ##
Returns equivalent Fill_Type representing Path fill inside its bounds.
-.
#Table
#Legend
@@ -3463,7 +3465,7 @@
uniformly until the corners fit. If either radius of a corner is less than or
equal to zero, both are treated as zero.
-After appending, Path may be empty, or may contain: Rect, Oval, or RoundRect.
+After appending, Path may be empty, or may contain: Rect, Oval, or Round_Rect.
#Param rect bounds of Round_Rect ##
#Param radii array of 8 SkScalar values, a radius pair for each corner ##
@@ -3661,7 +3663,7 @@
#Line # add line if prior Contour is not closed ##
If destination is closed or empty, start a new Contour. If destination
is not empty, add Line from Last_Point to added Path first Point. Skip added
- Path initial kMove_Verb, then append remining Verbs, Points, and Conic_Weights.
+ Path initial kMove_Verb, then append remaining Verbs, Points, and Conic_Weights.
##
#Example
diff --git a/docs/SkPixmap_Reference.bmh b/docs/SkPixmap_Reference.bmh
index 551b8e3..1b38cc3 100644
--- a/docs/SkPixmap_Reference.bmh
+++ b/docs/SkPixmap_Reference.bmh
@@ -352,7 +352,7 @@
##
##
-#SeeAlso width() ImageInfo::height()
+#SeeAlso width SkImageInfo::height
##
@@ -689,7 +689,7 @@
#Line # returns Alpha normalized from zero to one ##
Looks up the pixel at (x,y) and return its alpha component, normalized to [0..1].
-This is roughly equivalent to #Formula # SkGetColorA(getColor()) ##, but can be more efficent
+This is roughly equivalent to #Formula # SkGetColorA(getColor()) ##, but can be more efficient
(and more precise if the pixels store more than 8 bits per component).
#Param x column index, zero or greater, and less than width() ##
@@ -1276,13 +1276,13 @@
dstInfo specifies width, height, Color_Type, Alpha_Type, and
Color_Space of destination. dstRowBytes specifics the gap from one destination
row to the next. Returns true if pixels are copied. Returns false if
-dstInfo.addr() equals nullptr, or dstRowBytes is less than dstInfo.minRowBytes.
+dstInfo has no address, or dstRowBytes is less than dstInfo.minRowBytes().
Pixels are copied only if pixel conversion is possible. If Pixmap colorType is
-kGray_8_SkColorType, or kAlpha_8_SkColorType; dstInfo.colorType must match.
-If Pixmap colorType is kGray_8_SkColorType, dstInfo.colorSpace must match.
-If Pixmap alphaType is kOpaque_SkAlphaType, dstInfo.alphaType must
-match. If Pixmap colorSpace is nullptr, dstInfo.colorSpace must match. Returns
+kGray_8_SkColorType, or kAlpha_8_SkColorType; dstInfo.colorType() must match.
+If Pixmap colorType is kGray_8_SkColorType, dstInfo.colorSpace() must match.
+If Pixmap alphaType is kOpaque_SkAlphaType, dstInfo.alphaType() must
+match. If Pixmap colorSpace is nullptr, dstInfo.colorSpace() must match. Returns
false if pixel conversion is not possible.
srcX and srcY may be negative to copy only top or left of source. Returns
@@ -1331,14 +1331,14 @@
Copies a Rect of pixels to dst. Copy starts at (srcX, srcY), and does not
exceed Pixmap (width(), height()). dst specifies width, height, Color_Type,
Alpha_Type, and Color_Space of destination. Returns true if pixels are copied.
-Returns false if dst.addr() equals nullptr, or dst.rowBytes is less than
+Returns false if dst.addr() equals nullptr, or dst.rowBytes() is less than
dst SkImageInfo::minRowBytes.
Pixels are copied only if pixel conversion is possible. If Pixmap colorType is
-kGray_8_SkColorType, or kAlpha_8_SkColorType; dst.info().colorType must match.
-If Pixmap colorType is kGray_8_SkColorType, dst.info().colorSpace must match.
-If Pixmap alphaType is kOpaque_SkAlphaType, dst.info().alphaType must
-match. If Pixmap colorSpace is nullptr, dst.info().colorSpace must match. Returns
+kGray_8_SkColorType, or kAlpha_8_SkColorType; dst.info().colorType() must match.
+If Pixmap colorType is kGray_8_SkColorType, dst.info().colorSpace() must match.
+If Pixmap alphaType is kOpaque_SkAlphaType, dst.info().alphaType() must
+match. If Pixmap colorSpace is nullptr, dst.info().colorSpace() must match. Returns
false if pixel conversion is not possible.
srcX and srcY may be negative to copy only top or left of source. Returns
diff --git a/docs/SkRRect_Reference.bmh b/docs/SkRRect_Reference.bmh
index f46562a..2136984 100644
--- a/docs/SkRRect_Reference.bmh
+++ b/docs/SkRRect_Reference.bmh
@@ -528,7 +528,7 @@
##
##
-#SeeAlso SkRect.height width getBounds
+#SeeAlso SkRect::height width getBounds
#Method ##
@@ -1181,7 +1181,7 @@
#Const kSizeInMemory 48
#Line # storage space for Round_Rect ##
-Space required to serialize SkRRect into a buffer. Always a multiple of four.
+Space required to write the contents of SkRRect into a buffer; always a multiple of four.
#Const ##
diff --git a/docs/SkRect_Reference.bmh b/docs/SkRect_Reference.bmh
index 4e78168..a776adc 100644
--- a/docs/SkRect_Reference.bmh
+++ b/docs/SkRect_Reference.bmh
@@ -1221,7 +1221,7 @@
Rects intersect when they enclose a common area. To intersect, each of the pair
must describe area; fLeft is less than fRight, and fTop is less than fBottom;
-empty() returns false. The intersection of Rect pair can be described by:
+isEmpty() returns false. The intersection of Rect pair can be described by:
#Formula # (max(a.fLeft, b.fLeft), max(a.fTop, b.fTop),
min(a.fRight, b.fRight), min(a.fBottom, b.fBottom)) ##.
diff --git a/docs/SkStream_Reference.bmh b/docs/SkStream_Reference.bmh
index 7e1312f..a927639 100644
--- a/docs/SkStream_Reference.bmh
+++ b/docs/SkStream_Reference.bmh
@@ -349,7 +349,7 @@
#In incomplete
#Line # incomplete ##
-Duplicates this stream. If this cannot be done, returns NULL.
+Duplicates this stream. If this cannot be done, returns nullptr.
The returned stream will be positioned at the beginning of its data.
#Return incomplete ##
@@ -368,7 +368,7 @@
#In incomplete
#Line # incomplete ##
-Duplicates this stream. If this cannot be done, returns NULL.
+Duplicates this stream. If this cannot be done, returns nullptr.
The returned stream will be positioned the same as this stream.
#Return incomplete ##
@@ -503,8 +503,11 @@
#In incomplete
#Line # incomplete ##
-Returns the starting address for the data. If this cannot be done, returns NULL.
+Returns the starting address for the data. If this cannot be done, returns nullptr.
+
+#Private
TODO: replace with virtual const SkData* getData()
+##
#Return incomplete ##
diff --git a/docs/SkSurface_Reference.bmh b/docs/SkSurface_Reference.bmh
index dacd00f..ee2e93f 100644
--- a/docs/SkSurface_Reference.bmh
+++ b/docs/SkSurface_Reference.bmh
@@ -8,9 +8,11 @@
##
SkSurface is responsible for managing the pixels that a canvas draws into. The pixels can be
-allocated either in CPU memory (a raster surface) or on the GPU (a GrRenderTarget surface).
+allocated either in CPU memory, if a raster surface; or on the GPU, for a GrRenderTarget surface.
SkSurface takes care of allocating a SkCanvas that will draw into the surface. Call
-surface->getCanvas() to use that canvas (but don't delete it, it is owned by the surface).
+surface->getCanvas() to use that canvas. The caller should not delete the returned canvas;
+it is owned by surface.
+
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.
@@ -1001,7 +1003,7 @@
Source Rect corners are (srcX, srcY) and Surface (width(), height()).
Destination Rect corners are (0, 0) and (bitmap.width(), bitmap.height()).
Copies each readable pixel intersecting both rectangles, without scaling,
-converting to bitmap.colorType() and bitmap.alphaType() if required.
+converting to dst.colorType() and dst.alphaType() if required.
Pixels are readable when Surface is raster, or backed by a GPU.
@@ -1062,7 +1064,7 @@
#Formula # (dstX + Surface width(), dstY + Surface height()) ##.
Copies each readable pixel intersecting both rectangles, without scaling,
-converting to Surface colorType() and Surface alphaType() if required.
+converting to Surface SkColorType and SkAlphaType if required.
#Param src storage for pixels to copy to Surface ##
#Param dstX x-axis position relative to Surface to begin copy; may be negative ##
@@ -1100,7 +1102,7 @@
#Formula # (dstX + Surface width(), dstY + Surface height()) ##.
Copies each readable pixel intersecting both rectangles, without scaling,
-converting to Surface colorType() and Surface alphaType() if required.
+converting to Surface SkColorType and SkAlphaType if required.
#Param src storage for pixels to copy to Surface ##
#Param dstX x-axis position relative to Surface to begin copy; may be negative ##
diff --git a/docs/SkTextBlobBuilder_Reference.bmh b/docs/SkTextBlobBuilder_Reference.bmh
index 306ac06..9ca937d 100644
--- a/docs/SkTextBlobBuilder_Reference.bmh
+++ b/docs/SkTextBlobBuilder_Reference.bmh
@@ -124,76 +124,12 @@
# ------------------------------------------------------------------------------
-#Method const RunBuffer& allocRun(const SkPaint& font, int count, SkScalar x, SkScalar y,
- const SkRect* bounds = nullptr)
-#In Allocator
-#Line # returns writable glyph buffer at Point ##
-
-Returns run with storage for Glyphs. Caller must write count Glyphs to
-RunBuffer.glyphs before next call to FontBlobBuilder.
-
-RunBuffer.utf8text, and RunBuffer.clusters should be ignored.
-
-Glyphs share Paint_Font_Metrics in font, including: #paint_font_metrics#.
-
-Glyphs are positioned on a baseline at (x, y), using font Paint_Font_Metrics to
-determine their relative placement.
-
-bounds defines an optional bounding box, used to suppress drawing when Text_Blob
-bounds does not intersect Surface bounds. If bounds is nullptr, Text_Blob bounds
-is computed from (x, y) and RunBuffer.glyphs Paint_Font_Metrics.
-
-#Param font Paint used for this run ##
-#Param count number of glyphs ##
-#Param x horizontal offset within the blob ##
-#Param y vertical offset within the blob ##
-#Param bounds optional run bounding box ##
-
-#Return writable glyph buffer ##
-
-#Example
-#Height 60
- SkTextBlobBuilder builder;
- SkPaint paint, glyphPaint;
- glyphPaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
- const SkTextBlobBuilder::RunBuffer& run = builder.allocRun(glyphPaint, 5, 20, 20);
- paint.textToGlyphs("hello", 5, run.glyphs);
- canvas->drawRect({20, 20, 30, 30}, paint);
- canvas->drawTextBlob(builder.make(), 20, 20, paint);
-##
-
-#SeeAlso allocRunPosH allocRunPos
-
-#Method ##
-
-# ------------------------------------------------------------------------------
-
#Method const RunBuffer& allocRun(const SkFont& font, int count, SkScalar x, SkScalar y,
const SkRect* bounds = nullptr)
#In Allocator
#Line # returns writable glyph buffer at Point ##
-Returns run with storage for Glyphs. Caller must write count Glyphs to
-RunBuffer.glyphs before next call to FontBlobBuilder.
-
-RunBuffer.utf8text, and RunBuffer.clusters should be ignored.
-
-Glyphs share Paint_Font_Metrics in font, including: #paint_font_metrics#.
-
-Glyphs are positioned on a baseline at (x, y), using font Paint_Font_Metrics to
-determine their relative placement.
-
-bounds defines an optional bounding box, used to suppress drawing when Text_Blob
-bounds does not intersect Surface bounds. If bounds is nullptr, Text_Blob bounds
-is computed from (x, y) and RunBuffer.glyphs Paint_Font_Metrics.
-
-#Param font Font used for this run ##
-#Param count number of glyphs ##
-#Param x horizontal offset within the blob ##
-#Param y vertical offset within the blob ##
-#Param bounds optional run bounding box ##
-
-#Return writable glyph buffer ##
+#Populate
#Example
#Height 60
@@ -212,77 +148,12 @@
# ------------------------------------------------------------------------------
-#Method const RunBuffer& allocRunPosH(const SkPaint& font, int count, SkScalar y,
- const SkRect* bounds = nullptr)
-#In Allocator
-#Line # returns writable glyph and x-axis position buffers ##
-
-Returns run with storage for Glyphs and positions along baseline. Caller must
-write count Glyphs to RunBuffer.glyphs, and count Scalars to RunBuffer.pos;
-before next call to FontBlobBuilder.
-
-RunBuffer.utf8text, and RunBuffer.clusters should be ignored.
-
-Glyphs share Paint_Font_Metrics in font, including: #paint_font_metrics#.
-
-Glyphs are positioned on a baseline at y, using x-axis positions written by
-caller to RunBuffer.pos.
-
-bounds defines an optional bounding box, used to suppress drawing when Text_Blob
-bounds does not intersect Surface bounds. If bounds is nullptr, Text_Blob bounds
-is computed from y, RunBuffer.pos, and RunBuffer.glyphs Paint_Font_Metrics.
-
-#Param font Paint used for this run ##
-#Param count number of Glyphs ##
-#Param y vertical offset within the blob ##
-#Param bounds optional run bounding box ##
-
-#Return writable glyph buffer and x-axis position buffer ##
-
-#Example
-#Height 60
- SkTextBlobBuilder builder;
- SkPaint paint, glyphPaint;
- glyphPaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
- const SkTextBlobBuilder::RunBuffer& run = builder.allocRunPosH(glyphPaint, 5, 20);
- paint.textToGlyphs("hello", 5, run.glyphs);
- SkScalar positions[] = {0, 10, 20, 40, 80};
- memcpy(run.pos, positions, sizeof(positions));
- canvas->drawTextBlob(builder.make(), 20, 20, paint);
-##
-
-#SeeAlso allocRunPos allocRun
-
-#Method ##
-
-# ------------------------------------------------------------------------------
-
#Method const RunBuffer& allocRunPosH(const SkFont& font, int count, SkScalar y,
const SkRect* bounds = nullptr)
#In Allocator
#Line # returns writable glyph and x-axis position buffers ##
-Returns run with storage for Glyphs and positions along baseline. Caller must
-write count Glyphs to RunBuffer.glyphs, and count Scalars to RunBuffer.pos;
-before next call to FontBlobBuilder.
-
-RunBuffer.utf8text, and RunBuffer.clusters should be ignored.
-
-Glyphs share Paint_Font_Metrics in font, including: #paint_font_metrics#.
-
-Glyphs are positioned on a baseline at y, using x-axis positions written by
-caller to RunBuffer.pos.
-
-bounds defines an optional bounding box, used to suppress drawing when Text_Blob
-bounds does not intersect Surface bounds. If bounds is nullptr, Text_Blob bounds
-is computed from y, RunBuffer.pos, and RunBuffer.glyphs Paint_Font_Metrics.
-
-#Param font Font used for this run ##
-#Param count number of Glyphs ##
-#Param y vertical offset within the blob ##
-#Param bounds optional run bounding box ##
-
-#Return writable glyph buffer and x-axis position buffer ##
+#Populate
#Example
#Height 60
@@ -302,75 +173,12 @@
# ------------------------------------------------------------------------------
-#Method const RunBuffer& allocRunPos(const SkPaint& font, int count,
- const SkRect* bounds = nullptr)
-#In Allocator
-#Line # returns writable glyph and Point buffers ##
-
-Returns run with storage for Glyphs and Point positions. Caller must
-write count Glyphs to RunBuffer.glyphs, and count Points to RunBuffer.pos;
-before next call to FontBlobBuilder.
-
-RunBuffer.utf8text, and RunBuffer.clusters should be ignored.
-
-Glyphs share Paint_Font_Metrics in font, including: #paint_font_metrics#.
-
-Glyphs are positioned using Points written by caller to RunBuffer.pos, using
-two Scalar values for each Point.
-
-bounds defines an optional bounding box, used to suppress drawing when Text_Blob
-bounds does not intersect Surface bounds. If bounds is nullptr, Text_Blob bounds
-is computed from RunBuffer.pos, and RunBuffer.glyphs Paint_Font_Metrics.
-
-#Param font Paint used for this run ##
-#Param count number of Glyphs ##
-#Param bounds optional run bounding box ##
-
-#Return writable glyph buffer and Point buffer ##
-
-#Example
-#Height 90
- SkTextBlobBuilder builder;
- SkPaint paint, font;
- font.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
- const SkTextBlobBuilder::RunBuffer& run = builder.allocRunPos(font, 5);
- paint.textToGlyphs("hello", 5, run.glyphs);
- SkPoint positions[] = {{0, 0}, {10, 10}, {20, 20}, {40, 40}, {80, 80}};
- memcpy(run.pos, positions, sizeof(positions));
- canvas->drawTextBlob(builder.make(), 20, 20, paint);
-##
-
-#SeeAlso allocRunPosH allocRun
-
-#Method ##
-
-# ------------------------------------------------------------------------------
-
#Method const RunBuffer& allocRunPos(const SkFont& font, int count,
const SkRect* bounds = nullptr)
#In Allocator
#Line # returns writable glyph and Point buffers ##
-Returns run with storage for Glyphs and Point positions. Caller must
-write count Glyphs to RunBuffer.glyphs, and count Points to RunBuffer.pos;
-before next call to FontBlobBuilder.
-
-RunBuffer.utf8text, and RunBuffer.clusters should be ignored.
-
-Glyphs share Paint_Font_Metrics in font, including: #paint_font_metrics#.
-
-Glyphs are positioned using Points written by caller to RunBuffer.pos, using
-two Scalar values for each Point.
-
-bounds defines an optional bounding box, used to suppress drawing when Text_Blob
-bounds does not intersect Surface bounds. If bounds is nullptr, Text_Blob bounds
-is computed from RunBuffer.pos, and RunBuffer.glyphs Paint_Font_Metrics.
-
-#Param font Font used for this run ##
-#Param count number of Glyphs ##
-#Param bounds optional run bounding box ##
-
-#Return writable glyph buffer and Point buffer ##
+#Populate
#Example
#Height 90
@@ -388,6 +196,27 @@
#Method ##
+# ------------------------------------------------------------------------------
+
+#Method const RunBuffer& allocRun(const SkPaint& font, int count, SkScalar x, SkScalar y,
+ const SkRect* bounds = nullptr)
+#Deprecated
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method const RunBuffer& allocRunPosH(const SkPaint& font, int count, SkScalar y,
+ const SkRect* bounds = nullptr)
+#Deprecated
+#Method ##
+
+# ------------------------------------------------------------------------------
+
+#Method const RunBuffer& allocRunPos(const SkPaint& font, int count,
+ const SkRect* bounds = nullptr)
+#Deprecated
+#Method ##
+
#Class SkTextBlobBuilder ##
#Topic Text_Blob_Builder ##
diff --git a/docs/SkTextBlob_Reference.bmh b/docs/SkTextBlob_Reference.bmh
index 54908de..f727457 100644
--- a/docs/SkTextBlob_Reference.bmh
+++ b/docs/SkTextBlob_Reference.bmh
@@ -122,7 +122,7 @@
canvas->drawTextBlob(blob, 20, 20, canvasPaint);
##
-#SeeAlso MakeFromString TextBlobBuilder
+#SeeAlso MakeFromString SkTextBlobBuilder
##
@@ -157,7 +157,7 @@
canvas->drawTextBlob(blob, 20, 20, canvasPaint);
##
-#SeeAlso MakeFromText TextBlobBuilder
+#SeeAlso MakeFromText SkTextBlobBuilder
##
diff --git a/docs/spelling.txt b/docs/spelling.txt
index 68ab57e..5d9075e 100644
--- a/docs/spelling.txt
+++ b/docs/spelling.txt
@@ -2,7 +2,7 @@
accompanying account accounted achieved acronym across active actual actually add added adding
additional additionally address addressable adds adjacent adjusted adjusting adjustment
adjustments adjusts advance advances advantage advantages affect affected affecting affects
-after again agree agrees algorithms align aligned alignment aligns alike all allocate
+after again agree agrees algorithm algorithms align aligned alignment aligns alike all allocate
allocated allocates allocating allocation allocations allow allowed allowing allows
along also alter altered altering alternating alternative alters although altogether
always among amount an anchor and angle angles animating animation annotate annotation annotations
@@ -11,24 +11,24 @@
approximation are area argument arguments arithmetic arms arrangement arranges array arrays
arrow artifacts as ascending ascent aspect assert asserts assigned assigning assignment
associate associated associates associating assumed asynchronous asynchronously at
-attach attached attempt attributes auxiliary available average averaged avoid avoiding
-away axes axis
+attach attached attempt attribute attributes auxiliary available average averaged averages
+avoid avoiding away axes axis axis-aligned
back back-end backed background backing balance balancing banding bare base based baseline
be bearing because become becomes been before begin beginning begins behaves behavior being below
-beneath best better between bevel beveled beyond binary bit bits black bleed bleeding
-bleeds blend blended blending blends blobs blue blur blurred blurs bold bone bordered both
+beneath best better between bevel beveled beyond binary bit bit-field bits black bleed bleeding
+bleeds blend blended blending blends blob blobs blue blur blurred blurs bold bone bordered both
bottom bottom-left bottom-right boundaries bounded bounding bounds box brace-delimited
breaking brightened brighter brightness brush buffer bug bugs build builder building builds
built but butt by byte bytes
-cache cached caches caching calculation call callback called caller calling calls can
-cannot cap capabilities capacity caps captured captures capturing care case cases cast
+cache cached caches caching calculation call callback called caller calling calls can
+cannot canonical cap capabilities capacity caps captured captures capturing care case cases cast
casts cause causes center centered centers change changed changes changing channel channels
char character characteristics characters check checked checkerboard checkerboards
checking checks choice choose chooses choosing chosen circular clamped class classifies
clean cleans clear cleared clearing clears client clip clipped clipping clips clock
-clockwise close closed closely closest clusters code codec codes collapse collects colored
+clockwise close closed closely closes closest clusters code codec codes collapse collects colored
colors column columns combination combinations combine combined combines combining comma
command commands commas common commonly communicates compact compare compared compares comparison
compatibility compatible compile compiled compiler complete completely completes complex
@@ -36,10 +36,10 @@
compressed computation computations compute computed computes computing concatenated
concatenates concatenation concave concert condensed condition configuration conical
connect connected connecting connects consecutive conservative conservatively
-consideration considered consistent consists const containers constant constants constrained
+consideration considered considers consistent consists const constant constants constrained
constraint
construct constructed constructing construction constructions constructor constructs
-consumption contain contained container containing containment contains content contents
+consumption contain contained container containers containing containment contains content contents
context contexts contextual contiguous continue continues continuing continuous contrast
contribute contributing contribution control controls convenience conveniences conversion
convert converted converting converts convex convexity coordinate coordinates copied copies
@@ -47,47 +47,51 @@
corrupting
cosine could count counterclockwise counts coverage covered covering covers crash
create created creates creating creator criteria critical cross cull culled culling
-cumulatively current curvature curving custom
+cumulatively current curvature curving custom cyan
-darken darker dashed dashes dashing debug decimal decode decoded decoders decodes decoding
-decomposed decomposing decrease decreased decreases decreasing decrements default defaults
+dark darken darkening darker dashed dashes dashing debug decimal decimated declaring
+decode decoded decoders decodes decoding
+decomposed decomposes decomposing decrease decreased decreases decreasing decrements default defaults
defer deferred
defers define defined defines defining definition deform deformations degenerate degree
degrees delete deleted deletes deleting dependent depending depends deprecated depth
descent describe described describes describing description descriptions descriptor
designate desired destination destinations destruct destructed details detected determine
-determined determines devices diagonally diameter did differ difference different
+determined determines devices diagonal diagonally diameter did differ difference different
differently differing differs digits dilates dimension dimensional dimensionless
dimensions direct direction directly directory disable disabled disabling discard
-discarded discarding discards discrete display displayed distance distinct distribute
+discarded discarding discards discrete display displayed displays distance distinct distribute
distributed dither dithering divide divided divides dividing division divisions divisor do
document-based documentation documenting does done dot dotted double down downgrading
-downscale downward draw drawing drawn draws due duplicate duplicating during dynamically
+downscale downward draw drawing drawn draws due duplicate duplicates duplicating during dynamically
each early easier edge edges edited editing effect effectively effects efficient
-efficiently eight either element elements eliminate ellipse elliptical else embedded
+efficiently eight either element elements eliminate ellipse ellipses elliptical else embedded
empty enabled enables encapsulating enclose enclosed enclosing encode encoded encoder
encoders encodes encoding encompasses end ending ends engine engines enlarge enough
-ensure ensuring entire entries entry environment equal equaling equality equally equals
+ensure ensuring entire entries entry enumeration environment equal equaling equality equally equals
equivalent equivalents erases erroneously error evaluated even even-numbered even-odd
evenly eventually ever every exact exactly exaggerates examined example exceed exceeds
exceptions excess exchanged exchanges exchanging exclude excluded exclusive executing
-execution exhausted existing expanded expansion expected expecting explicitly exponent
-exposed expression extend extended extends extensive extent extra extract eye
+execution exhausted existing expanded expansion expected expecting explicit explicitly exponent
+exposed expression extend extended extends extension extensive extent extra extract eye
face faces factor factored factors fail failing fails failure fake fall false far fast faster fastest
favor feature features fewer fidelity field fields figure file fill filled filling fills
-filter filtered filtering filters final finalized find fine finite first fit fits five fix
+filter filtered filtering filters final finalized finally find fine finite first fit fits
+fitted five fix
fixed flag flags flattening flexibility float floating floats flow flush flushed flushes
followed following follows fonts for force forced form format formats formed former forming
forms formula found four fourth fractional fragment frame frames framework free freed
-freedom frees fringing from front full fully function functionality functions further future
+freedom frees fringing from front full fully function functionality functions further future
+fuzzy
gamma gamut gap gaps general generate generated generates generator generic geometric geometrically
geometries geometry get gets gigabyte gigabytes given gives global globally go goes
-good gradient gradients graphics gray greater green grid grows guarantee guaranteed guard
+good gradient gradients graphics gray gray-level greater greatest green grid grows guarantee
+guaranteed guard
-had hairline hairlines half halved hand handle handling hands happens hard hardware has hash
+had hairline hairlines half half-precision halved hand handle handling hands happens hard hardware has hash
hashes have heap height help helper helpers helpful here hexadecimal hidden hierarchical
high higher highest hint hinted hinting hints hit hitting hold holding holds hole holes
horizontal horizontally host hosts hour how however hue hyperbola hyperbolic
@@ -96,16 +100,17 @@
ignore ignored ignores ignoring illegal image-generator images immediate immediately
immutable imperceptible implement implementation implementations implemented implementing
implements implicitly improve improves improving in inaccessible include included includes
-including incompatible inconsistent incorrect incorrectly increase increased increases
-increasing increment incremented increments indefinitely independent independently index indicated
+including incompatible incomplete inconsistent incorrect incorrectly increase increased increases
+increasing increment incremented increments indefinitely independent independently index indicated
+indicates
indicating indices indistinguishable individual individually inefficient infinite infinities
infinity
influence info inform information initial initialize initialized initializes initializing
initially inline inner input insert inserts inset insets inside inspected installed instance
-instantaneous instantiation instantiated instantiations instead instruct instructs integer integers
-integral
-intensity intercepted intercepts interchangeably interface interleaved interleaving
-intermediate internal internally interpolate interpolated interpolation interpret
+instantaneous instantiated instantiation instantiations instead instruct instructs integer integers
+integral intensity intercepted intercepts interchangeably interface interior
+interleaved interleaving
+intermediate internal internally interpolate interpolated interpolates interpolation interpret
interpreted interrupted interruption intersect intersected intersecting intersection
intersections intersects interval into introduces introducing invalid invalidate inverse
inversely inverted investigated invoked irregular is issues issuing it italic items iterate iterated
@@ -117,13 +122,13 @@
large largely larger largest last late later layout lazily leading least leave leaves
leaving left left-aligned left-bottom left-top leftmost legacy legal length lengthens
-lengths less lessens lesser lets letters level levels lifetime lighten lighter lightness
-lightweight like likes limit limitation limited limits linear linearity list local locally
+lengths less lessens lesser lets letters level levels lifetime light lighten lighter lightness
+lightweight like likes limit limitation limited limits linear linearity list loaded local locally
located locates location locations logical longer look looks lookup loop loops lose loss
lost low lower lower-case lower-left lowest luminosity
-made magnified magnitude magnitudes main maintained maintains major make makes making manage
-managed manages managing mandrill manipulating many map mapped mapping mappings
+made magenta magnified magnitude magnitudes main maintained maintains major make makes making manage
+managed manager manages managing mandrill manipulating many map mapped mapping mappings
maps mark marked marking marks mashup mask masked masks match matches matching mathematically
maximum may maybe mean
meaning meaningful means measurable measure measured measures measuring mechanism meet
@@ -131,38 +136,40 @@
mimics minimally minimum minor minus minute mirrors mismatched misnamed missing
miter mode modes modification modifications modified modifier modifies modify
modifying modulate modulated modulo monitor monitors more most mostly move moved
-moves moving multiple multiple-pass multiplied multiplier multiplies multiply
+moves moving multiple multiple-pass multiplied multiplier multipliers multiplies multiply
multiplying must muted
name named names narrower narrowing narrows native near nearby nearly necessarily necessary
need needed needs negative nested never new newly next nibble nine no non-homogeneous
+non-monochrome non-rectangular
non-square non-volatile non-zero none nor normal normalize normalized normally not
-note nothing noticeable now null null-terminated number numbers numeric numerically
+note nothing noticeable notifies now null null-terminated number numbers numeric numerically
object objects oblique obtain occupies odd of off offers offset offsets often on
on-demand once one only onto opacity opaque opaqueness open opened operand operate operates
-operation operations operator operators opposite optimal optimally optimizations
+operating operation operations operator operators opposite optimal optimally optimizations
optimize optimized option optional optionally options or order ordered organization
organizes orient orientation origin original origins other others otherwise out outcome outer
outline outlines output outset outsets outside outstanding over overall overdraw
overflow overflows overhead overlap overlapping overlaps overlaying overlays overridden
-override overrides overriding overwriting overwritten own owned owner owners ownership
+override overrides overriding overwrite overwriting overwritten own owned owner owners ownership
owning
-pack packed packing padding paints pair paired pairs parabola parabolic parallel
-parameter parameters parsed parsing part partial partially parts pass passed passing past
+pack packed packing padding painted paints pair paired pairs parabola parabolic parallel
+parameter parameters parsed parsing part partial partially parts pass passed passes passing past
pattern patterns peek peeked peeking pen penalty pending per perception perform performance
-performed performing performs permit permits permitted perpendicular perspective perspective-scale
+performed performing performs permit permits permitted permitting
+perpendicular perspective perspective-scale
perspective-x perspective-y physical piece pieces pin pinned pins pipeline pivot
pixel-based pixels place placeholder placement places plane planes platform platform-specific
platforms play playback played plus pointer pointers pointing polygon polygonal polynomial
pop port portion position positioned positioning positions positive positives possible
-possibly potentially power practice preceded preceding precision predefined predictable
+possibly potentially power practice preceded preceding precise precision predefined predictable
predicted prepare present preserve preserved preserves preserving pressure prevent
prevents previous previously primarily primitives printed prior private process processed
processes processing processors produce produces product progressively promoted promoting
properties proportion proportional proportionally proportionately provide provided
-provides providing pt pulled punches purposes put
+provides providing pt public pulled punches purposes put
quadratic quality quantity quarter quick quickly
@@ -176,57 +183,61 @@
rendered rendering repeated repeatedly replace replaced replacement replaces replacing replays
replicate replicated replicates report reports represent representation representations
representative represented representing represents request requested requests require
-required requirements requires requiring reserve reset resets reside residing resolution
+required requirements requires requiring resemble reserve reserved
+reset resets reside residing resolution
resolves resource resources respect respects responsible restore restored restores restoring
restrict restricted restriction restrictive restricts result resulting results retain
retained retains retrieve retrieved retrieves retroactive return returned returning returns
-reused reveals reverse reversed reverses revert right right-bottom right-top rightmost root
+reused reveals reverse reversed reverses revert rewinds right right-bottom right-top rightmost root
rotate rotate-x rotate-y rotated rotates rotating rotation roughly round rounded
rounding rounds route routes routines row rows rule rules run runs
safe safely safer same sample sampled samples sampling satisfies satisfy satisfying
saturation savable save saved saves scale scale-x scale-y scaled scales scaling scan
-scene scope second second-order section sections see seek segment segments select
+scene scope screen second second-order section sections see seek seeks segment segments select
selecting selectively selector selects semaphore semaphores sensitive sent separate separately
sequence serial serialized series service set sets setting settings shadow shadows
shallow shape shapes shaping share shareable shared shares sharing sharp shear shift
shifts short shorter shorthand should show shows shrink shrinks side sides sign signal
-signaled signed signs similar similarity simple simplify since single single-pass singly
+signaled signed signs similar similarity simple simplifies
+simplify simply since single single-pass singly
six sized sizes skew skewing skews skip skipped skips slant slightly slow slower slowest
-small smaller smallest smart smooth smoother so soft sole solely solid solution some
+small smaller smallest smart smooth smoother snapshot so soft sole solely solid solution some
sometimes soon sort sorted sorts source space spaced spacing span spanned spans special
-specialization specializations specializes specific specification specifics specified
-specifies specify specifying speed speeds square squared squares stack stage stages
+specialization specializations specialized specializes specific specification specifics specified
+specifies specify specifying speed speeds spirit square squared squares stack stage stages
standard standards stands start started starting starts state states stationary stay
stays std step steps still stock stop stops storage store stored stores storing straight
straight-line streams strength stretched strictly strikeout strings stripe stripes
-striping stroke stroked strokes stroking struct style stylistic sub-pixel subclass
-submitting subsequent subsequently subset substitution subtle subtract subtracted
+striping stroke stroked strokes stroking struct studio style stylistic sub-pixel subclass
+submitting subsequent subsequently subset substitution subtle subtract subtracted subtracts
succeed succeeded succeeds success successful successfully successive such sufficient
suggests sum summing supplied supplies supply supplying support supported supports
suppress surrogate swapped swaps sweep sweeping sweeps switches symbol symmetrically
synchronous system
-tables take taken takes taking taller tangent tangents target targets techniques temporary
+tables take taken takes taking taller tangent tangents target targets techniques
+television temporary
ten terminate terminated test tested tests textual textures than that the their them then
there therefore these they thick thickness thin thinner thinnest third third-order this
those though thought thread threads three three-dimensional through thus tight tile
tiles tiling time times
to together toggled too top top-left top-right total totaling touches towards tracked tracks
-trades trading traditional transferred transfers transform transformation transformations
+trades trading traditional transferred transferring transfers transform transformation transformations
transformed transforming transforms transition transitions translate translated translates
translating translation translucent transparency transparent travel traveled treat treated
treating treats triangle trigger triggered triggers trivial true try turned turns twice two
two-dimensional type types typically typographic
unaffected unaltered unchanged unchanging uncompressed undefined under underline
-underlines underlying unequal uniform uniformly uninitialized union unions unique
-unit unknown unless unlike unlikely unmodified unrelated unsigned unsorted until
+underlines underlying unequal unfilled uniform uniformly uninitialized union unions unique
+unit unknown unless unlike unlikely unmodified unrelated unsigned unsorted unsuccessful until
untouched unused up update updates upload uploaded upper upper-case upper-left upright upward
usage use used useful user uses using utility
-valid validate validated validity value values variable variant variants varies vary
-varying verb version vertical vertically very via video views virtual visible visibly visual
+valid validate validated validity value values variable variant variants variation
+varies various vary
+varying verb verify version vertical vertically very via video views virtual visible visibly visual
visually volatile
wait waited waiting warning warnings was way ways wedge weight weighted well well-defined
@@ -235,8 +246,8 @@
word words work works world would wrap wrapped wraps writable write writes writing
written wrong
-x-axis x-coordinate
+x-axis x-coordinate x-radii
-y-axis y-coordinate
+y-axis y-coordinate y-radii yellow
z-axis zero zeroed zeroes zoom
diff --git a/docs/undocumented.bmh b/docs/undocumented.bmh
index 1bb21e6..694d9b2 100644
--- a/docs/undocumented.bmh
+++ b/docs/undocumented.bmh
@@ -2,7 +2,7 @@
#External
DirectWrite TrueType Windows Linux Android iOS __ANDROID_API__ AHardwareBuffer
FreeType FreeType-based Harfbuzz
- LCD RGB sRGB BGR RGBA ARGB YUV YUVA SDTV HDTV
+ LCD RGB sRGB BGR RGBA ARGB YUV YUVA HSV SDTV HDTV
Unicode Unicode5 UTF-8 UTF-16 UTF-32 ASCII Unichar
API
BMP GIF HEIF ICO JPEG PNG WBMP WebP
@@ -11,16 +11,17 @@
PDF XPS
RFC
NaN NaNs
- U16CPU int int8_t int16_t int32_t int64_t uint8_t uint16_t uint32_t uint64_t size_t
+ bool U16CPU int int8_t int16_t int32_t int64_t uint8_t uint16_t uint32_t uint64_t size_t
nullptr
malloc() calloc() assert() std::move()
- C C++ SIZE_MAX C_FILE
+ C C++ SIZE_MAX C_FILE FILE
CSS HTML
- affine destructor multitexturing representable subclasses descenders grayscale kerning unhinted
+ affine destructor multitexturing representable subclasses descender descenders grayscale kerning
+ unhinted
+
+ Sa Da Sc Dc 0xAARRGGBB # temporary until figure out what to do
- Sa Da Sc Dc max min # temporary until figure out what to do
-
- SkUserConfig # not external, but still thinking about how markup refers to this
+ SkUserConfig.h # not external, but still thinking about how markup refers to this
SkXXX.h # ditto
SkXXX_Reference # ditto
Skia # ditto
@@ -534,6 +535,8 @@
#Topic GPU_Context
#Substitute GPU context
#Class GrContext
+#Method void abandonContext()
+##
#Method void flush()
##
##
@@ -602,10 +605,17 @@
#Topic ##
# to be in Topic Math
- #Method float sqrt(float x)
- # this permits using sqrt(x) in documentation
+ #Method Luminosity(dstColor)
+ # this permits using Luminosity() in documentation
##
- #Method static inline bool sk_64_isS32(int64_t value)
+ #Method Saturation(dstColor)
+ # this permits using Saturation() in documentation
+ ##
+ #Method SetLuminosity(srcSaturation, dstLuminosity)
+ # this permits using SetLuminosity() in documentation
+ ##
+ #Method SetSaturation(srcSaturation, dstSaturation)
+ # this permits using SetSaturation() in documentation
##
#Method SkIntToScalar(x)
##
@@ -625,6 +635,23 @@
##
#Method template <typename D, typename S> inline bool SkTFitsIn(S s)
##
+ #Method float abs(float x)
+ # this permits using abs(x) in documentation
+ ##
+ #Method float max(float x)
+ # this permits using max(x) in documentation
+ ##
+ #Method float min(float x)
+ # this permits using max(x) in documentation
+ ##
+ #Method float sizeof(float x)
+ # this permits using sizeof(x) in documentation
+ ##
+ #Method float sqrt(float x)
+ # this permits using sqrt(x) in documentation
+ ##
+ #Method static inline bool sk_64_isS32(int64_t value)
+ ##
# end of Topic Math
#Topic Meta_Data
diff --git a/docs/usingBookmaker.bmh b/docs/usingBookmaker.bmh
index d3a07c3..02256a2 100644
--- a/docs/usingBookmaker.bmh
+++ b/docs/usingBookmaker.bmh
@@ -1,13 +1,19 @@
#External
-SkXXX
-docs/SkIRect_Reference
-docs/SkSurface_Reference
-include/core/SkSurface
+SkXXX.md
+SkXXX.bmh
+docs/SkIRect_Reference.bmh
+docs/SkSurface_Reference.bmh
+docs/status.json
+include/core/SkSurface.h
SkSurface.h
+fiddle.json
+fiddleout.json
+status.json
CL
Go
Visual_Studio
Completed InProgress
+skia.org
##
#Topic Bookmaker