give include comments the once over
In preparation for upcoming changes to bookmaker
which validate more include contents, revise
generated files in include/core to fix various
errors.
Fixes include:
- references in comments to other Skia interface elements
- @param names agree with function declarations
- spelling typos
- generic references (e.g. 'x' in place of 'x-axis')
- lines longer than 100 columns
The fix to SkPath::rCubicTo triggered a parallel
fix to SkPath_Reference.bmh; other wed documentation
fixes will be in an upcoming CL.
TBR=reed@google.com
Docs-Preview: https://skia.org/?cl=166680
Bug: skia:
Change-Id: If734696dc64655f1cf40b121a180210c932b1d89
Reviewed-on: https://skia-review.googlesource.com/c/166680
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
diff --git a/docs/SkPath_Reference.bmh b/docs/SkPath_Reference.bmh
index 7011ead..2620669 100644
--- a/docs/SkPath_Reference.bmh
+++ b/docs/SkPath_Reference.bmh
@@ -2762,8 +2762,8 @@
# ------------------------------------------------------------------------------
-#Method SkPath& rCubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
- SkScalar x3, SkScalar y3)
+#Method SkPath& rCubicTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2,
+ SkScalar dx3, SkScalar dy3)
#In Build
#In Cubic
#Line # appends Cubic relative to Last_Point ##
@@ -2780,12 +2780,12 @@
Cubic end is Last_Point plus Vector (dx2, dy2).
Function name stands for "relative cubic to".
- #Param x1 offset from Last_Point to first Cubic control on x-axis ##
- #Param y1 offset from Last_Point to first Cubic control on y-axis ##
- #Param x2 offset from Last_Point to second Cubic control on x-axis ##
- #Param y2 offset from Last_Point to second Cubic control on y-axis ##
- #Param x3 offset from Last_Point to Cubic end on x-axis ##
- #Param y3 offset from Last_Point to Cubic end on y-axis ##
+ #Param dx1 offset from Last_Point to first Cubic control on x-axis ##
+ #Param dy1 offset from Last_Point to first Cubic control on y-axis ##
+ #Param dx2 offset from Last_Point to second Cubic control on x-axis ##
+ #Param dy2 offset from Last_Point to second Cubic control on y-axis ##
+ #Param dx3 offset from Last_Point to Cubic end on x-axis ##
+ #Param dy3 offset from Last_Point to Cubic end on y-axis ##
#Return reference to Path ##
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index a2d4748..978519d 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -420,7 +420,7 @@
- rowBytes is positive and less than imageInfo.width() times imageInfo.bytesPerPixel()
@param imageInfo contains width, height, SkAlphaType, SkColorType, SkColorSpace
- @param rowBytes imageInfo.minRowBytes or larger; or zero
+ @param rowBytes imageInfo.minRowBytes() or larger; or zero
@return true if SkImageInfo set successfully
*/
bool setInfo(const SkImageInfo& imageInfo, size_t rowBytes = 0);
@@ -643,7 +643,7 @@
SkPixelRef containing pixmap.addr() and pixmap.rowBytes().
If SkImageInfo could not be set, or pixmap.rowBytes() is less than
- SkImageInfo::minRowBytes: calls reset(), and returns false.
+ SkImageInfo::minRowBytes(): calls reset(), and returns false.
Otherwise, if pixmap.addr() equals nullptr: sets SkImageInfo, returns true.
@@ -661,7 +661,7 @@
/** Replaces SkPixelRef with pixels, preserving SkImageInfo and rowBytes().
Sets SkPixelRef origin to (0, 0).
- If pixels is nullptr, or if info().colorType equals kUnknown_SkColorType;
+ If pixels is nullptr, or if info().colorType() equals kUnknown_SkColorType;
release reference to SkPixelRef, and set SkPixelRef to nullptr.
Caller is responsible for handling ownership pixel memory for the lifetime
@@ -674,7 +674,7 @@
/** Allocates pixel memory with HeapAllocator, and replaces existing SkPixelRef.
The allocation size is determined by SkImageInfo width, height, and SkColorType.
- Returns false if info().colorType is kUnknown_SkColorType, or allocation fails.
+ Returns false if info().colorType() is kUnknown_SkColorType, or allocation fails.
@return true if the allocation succeeds
*/
@@ -685,7 +685,7 @@
/** Allocates pixel memory with HeapAllocator, and replaces existing SkPixelRef.
The allocation size is determined by SkImageInfo width, height, and SkColorType.
- Aborts if info().colorType is kUnknown_SkColorType, or allocation fails.
+ Aborts if info().colorType() is kUnknown_SkColorType, or allocation fails.
Abort steps may be provided by the user at compile
time by defining SK_ABORT.
*/
@@ -778,7 +778,7 @@
void notifyPixelsChanged() const;
/** Replaces pixel values with c. All pixels contained by bounds() are affected.
- If the colorType() is kGray_8_SkColorType or k565_SkColorType, then alpha
+ If the colorType() is kGray_8_SkColorType or kRGB_565_SkColorType, then alpha
is ignored; RGB is treated as opaque. If colorType() is kAlpha_8_SkColorType,
then RGB is ignored.
@@ -788,7 +788,7 @@
/** Replaces pixel values with unpremultiplied color built from a, r, g, and b.
All pixels contained by bounds() are affected.
- If the colorType() is kGray_8_SkColorType or k565_SkColorType, then a
+ If the colorType() is kGray_8_SkColorType or kRGB_565_SkColorType, then a
is ignored; r, g, and b are treated as opaque. If colorType() is kAlpha_8_SkColorType,
then r, g, and b are ignored.
@@ -804,7 +804,7 @@
/** Replaces pixel values inside area with c. If area does not intersect bounds(),
call has no effect.
- If the colorType() is kGray_8_SkColorType or k565_SkColorType, then alpha
+ If the colorType() is kGray_8_SkColorType or kRGB_565_SkColorType, then alpha
is ignored; RGB is treated as opaque. If colorType() is kAlpha_8_SkColorType,
then RGB is ignored.
@@ -934,7 +934,7 @@
dstInfo specifies width, height, SkColorType, SkAlphaType, and SkColorSpace 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
+ - dstInfo has no address
- dstRowBytes is less than dstInfo.minRowBytes()
- SkPixelRef is nullptr
@@ -966,7 +966,7 @@
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:
- dst pixel storage equals nullptr
- - dst.rowBytes is less than SkImageInfo::minRowBytes
+ - dst.rowBytes is less than SkImageInfo::minRowBytes()
- SkPixelRef is nullptr
Pixels are copied only if pixel conversion is possible. If SkBitmap colorType() is
@@ -994,7 +994,7 @@
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:
- dst pixel storage equals nullptr
- - dst.rowBytes is less than SkImageInfo::minRowBytes
+ - dst.rowBytes is less than SkImageInfo::minRowBytes()
- SkPixelRef is nullptr
Pixels are copied only if pixel conversion is possible. If SkBitmap colorType() is
@@ -1018,7 +1018,7 @@
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:
- src pixel storage equals nullptr
- - src.rowBytes is less than SkImageInfo::minRowBytes
+ - src.rowBytes is less than SkImageInfo::minRowBytes()
- SkPixelRef is nullptr
Pixels are copied only if pixel conversion is possible. If SkBitmap colorType() is
@@ -1046,7 +1046,7 @@
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:
- src pixel storage equals nullptr
- - src.rowBytes is less than SkImageInfo::minRowBytes
+ - src.rowBytes is less than SkImageInfo::minRowBytes()
- SkPixelRef is nullptr
Pixels are copied only if pixel conversion is possible. If SkBitmap colorType() is
diff --git a/include/core/SkBlendMode.h b/include/core/SkBlendMode.h
index cf1cfb2..b62132a 100644
--- a/include/core/SkBlendMode.h
+++ b/include/core/SkBlendMode.h
@@ -58,16 +58,16 @@
/** Returns name of blendMode as null-terminated C string.
@param blendMode one of:
- SkBlendMode::kClear, SkBlendMode::kSrc, SkBlendMode::kDst, SkBlendMode::kSrcOver,
- SkBlendMode::kDstOver, SkBlendMode::kSrcIn, SkBlendMode::kDstIn,
- SkBlendMode::kSrcOut, SkBlendMode::kDstOut, SkBlendMode::kSrcATop,
- SkBlendMode::kDstATop, SkBlendMode::kXor, SkBlendMode::kPlus,
- SkBlendMode::kModulate, SkBlendMode::kScreen, SkBlendMode::kOverlay,
- SkBlendMode::kDarken, SkBlendMode::kLighten, SkBlendMode::kColorDodge,
- SkBlendMode::kColorBurn, SkBlendMode::kHardLight, SkBlendMode::kSoftLight,
- SkBlendMode::kDifference, SkBlendMode::kExclusion, SkBlendMode::kMultiply,
- SkBlendMode::kHue, SkBlendMode::kSaturation, SkBlendMode::kColor,
- SkBlendMode::kLuminosity
+ SkBlendMode::kClear, SkBlendMode::kSrc, SkBlendMode::kDst,
+ SkBlendMode::kSrcOver, SkBlendMode::kDstOver, SkBlendMode::kSrcIn,
+ SkBlendMode::kDstIn, SkBlendMode::kSrcOut, SkBlendMode::kDstOut,
+ SkBlendMode::kSrcATop, SkBlendMode::kDstATop, SkBlendMode::kXor,
+ SkBlendMode::kPlus, SkBlendMode::kModulate, SkBlendMode::kScreen,
+ SkBlendMode::kOverlay, SkBlendMode::kDarken, SkBlendMode::kLighten,
+ SkBlendMode::kColorDodge, SkBlendMode::kColorBurn, SkBlendMode::kHardLight,
+ SkBlendMode::kSoftLight, SkBlendMode::kDifference, SkBlendMode::kExclusion,
+ SkBlendMode::kMultiply, SkBlendMode::kHue, SkBlendMode::kSaturation,
+ SkBlendMode::kColor, SkBlendMode::kLuminosity
@return C string
*/
SK_API const char* SkBlendMode_Name(SkBlendMode blendMode);
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 88de8aa..55e7bf8 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -65,7 +65,7 @@
SkCanvas generated by raster surface draws to memory visible to the CPU.
SkCanvas generated by GPU surface uses Vulkan or OpenGL to draw to the GPU.
- To draw to a document, obtain SkCanvas from svg canvas, document pdf, or SkPictureRecorder.
+ To draw to a document, obtain SkCanvas from SVG canvas, document PDF, or SkPictureRecorder.
SkDocument based SkCanvas and other SkCanvas subclasses reference SkBaseDevice describing the
destination.
@@ -482,8 +482,8 @@
- bitmap pixels are inaccessible; for instance, bitmap wraps a texture.
@param bitmap contains pixels copied to SkCanvas
- @param x offset into SkCanvas writable pixels in x; may be negative
- @param y offset into SkCanvas writable pixels in y; may be negative
+ @param x offset into SkCanvas writable pixels on x-axis; may be negative
+ @param y offset into SkCanvas writable pixels on y-axis; may be negative
@return true if pixels were written to SkCanvas
*/
bool writePixels(const SkBitmap& bitmap, int x, int y);
@@ -632,7 +632,7 @@
@param bounds layer dimensions; may be nullptr
@param paint applied to layer when overlaying prior layer; may be nullptr
@param saveLayerFlags SaveLayerRec options to modify layer
- @return SaveLayerRec with empty backdrop
+ @return SaveLayerRec with empty fBackdrop
*/
SaveLayerRec(const SkRect* bounds, const SkPaint* paint, SaveLayerFlags saveLayerFlags = 0)
: fBounds(bounds)
@@ -756,8 +756,8 @@
This has the effect of moving the drawing by (dx, dy) before transforming
the result with SkMatrix.
- @param dx distance to translate in x
- @param dy distance to translate in y
+ @param dx distance to translate on x-axis
+ @param dy distance to translate on y-axis
*/
void translate(SkScalar dx, SkScalar dy);
@@ -769,8 +769,8 @@
This has the effect of scaling the drawing by (sx, sy) before transforming
the result with SkMatrix.
- @param sx amount to scale in x
- @param sy amount to scale in y
+ @param sx amount to scale on x-axis
+ @param sy amount to scale on y-axis
*/
void scale(SkScalar sx, SkScalar sy);
@@ -1937,7 +1937,7 @@
void drawPosText(const void* text, size_t byteLength, const SkPoint pos[],
const SkPaint& paint);
- /** Draws each glyph in text with its (x, y) origin composed from xpos array and
+ /** Draws each glyph in text with its origin composed from xpos array and
constY, using clip, SkMatrix, and SkPaint paint. The number of entries in xpos array
must match the number of glyphs described by byteLength of text.
@@ -2316,10 +2316,10 @@
void drawDrawable(SkDrawable* drawable, SkScalar x, SkScalar y);
/** Associates SkRect on SkCanvas with an annotation; a key-value pair, where the key is
- a null-terminated utf8 string, and optional value is stored as SkData.
+ a null-terminated UTF-8 string, and optional value is stored as SkData.
Only some canvas implementations, such as recording to SkPicture, or drawing to
- document pdf, use annotations.
+ document PDF, use annotations.
@param rect SkRect extent of canvas to annotate
@param key string used for lookup
@@ -2328,10 +2328,10 @@
void drawAnnotation(const SkRect& rect, const char key[], SkData* value);
/** Associates SkRect on SkCanvas when an annotation; a key-value pair, where the key is
- a null-terminated utf8 string, and optional value is stored as SkData.
+ a null-terminated UTF-8 string, and optional value is stored as SkData.
Only some canvas implementations, such as recording to SkPicture, or drawing to
- document pdf, use annotations.
+ document PDF, use annotations.
@param rect SkRect extent of canvas to annotate
@param key string used for lookup
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index ea9e49d..b76130c 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -145,11 +145,11 @@
*/
static sk_sp<SkImage> MakeFromBitmap(const SkBitmap& bitmap);
- /** Creates SkImage from data returned by imageGenerator. Generated data is owned by SkImage and may not
- be shared or accessed.
+ /** Creates SkImage from data returned by imageGenerator. Generated data is owned by SkImage and
+ may not be shared or accessed.
- subset allows selecting a portion of the full image. Pass nullptr to select the entire image;
- otherwise, subset must be contained by image bounds.
+ subset allows selecting a portion of the full image. Pass nullptr to select the entire
+ image; otherwise, subset must be contained by image bounds.
SkImage is returned if generator data is valid. Valid data parameters vary by type of data
and platform.
@@ -164,8 +164,8 @@
const SkIRect* subset = nullptr);
/** Creates SkImage 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.
+ subset allows selecting a portion of the full image. Pass nullptr to select the entire
+ image; otherwise, subset must be contained by image bounds.
SkImage is returned if format of the encoded data is recognized and supported.
Recognized formats vary by platform.
@@ -191,8 +191,9 @@
@param origin one of: kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin
@param colorType one of:
kUnknown_SkColorType, kAlpha_8_SkColorType, kRGB_565_SkColorType,
- kARGB_4444_SkColorType, kRGBA_8888_SkColorType, kRGB_888x_SkColorType,
- kBGRA_8888_SkColorType, kRGBA_1010102_SkColorType, kRGB_101010x_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
@param alphaType one of:
kUnknown_SkAlphaType, kOpaque_SkAlphaType, kPremul_SkAlphaType,
@@ -221,10 +222,12 @@
@param backendTexture texture residing on GPU
@param origin one of: kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin
@param colorType one of:
- kUnknown_SkColorType, kAlpha_8_SkColorType, 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
+ kUnknown_SkColorType, kAlpha_8_SkColorType,
+ 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
@param alphaType one of:
kUnknown_SkAlphaType, kOpaque_SkAlphaType, kPremul_SkAlphaType,
kUnpremul_SkAlphaType
@@ -310,10 +313,12 @@
@param backendTexture texture residing on GPU
@param surfaceOrigin one of: kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin
@param colorType one of:
- kUnknown_SkColorType, kAlpha_8_SkColorType, 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
+ kUnknown_SkColorType, kAlpha_8_SkColorType,
+ 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
@param alphaType one of:
kUnknown_SkAlphaType, kOpaque_SkAlphaType, kPremul_SkAlphaType,
kUnpremul_SkAlphaType
@@ -334,10 +339,10 @@
@param yuvColorSpace How the YUV values are converted to RGB. One of:
kJPEG_SkYUVColorSpace, kRec601_SkYUVColorSpace,
kRec709_SkYUVColorSpace
- @param yuvTextures array of (up to four) YUVA textures on GPU which contain the,
+ @param yuvaTextures array of (up to four) YUVA textures on GPU which contain the,
possibly interleaved, YUVA planes
- @param yuvaIndices array indicating which texture (in 'yuvaTextures') and channel
- (in the specified texture) maps to each of Y, U, V, and A.
+ @param yuvaIndices array indicating which texture in yuvaTextures, and channel
+ in that texture, maps to each component of YUVA.
@param imageSize size of the resulting image
@param imageOrigin origin of the resulting image. One of: kBottomLeft_GrSurfaceOrigin,
kTopLeft_GrSurfaceOrigin
@@ -359,10 +364,10 @@
@param yuvColorSpace How the YUV values are converted to RGB. One of:
kJPEG_SkYUVColorSpace, kRec601_SkYUVColorSpace,
kRec709_SkYUVColorSpace
- @param yuvTextures array of (up to four) YUVA textures on GPU which contain the,
+ @param yuvaTextures array of (up to four) YUVA textures on GPU which contain the,
possibly interleaved, YUVA planes
- @param yuvaIndices array indicating which texture (in 'yuvaTextures') and channel
- (in the specified texture) maps to each of Y, U, V, and A.
+ @param yuvaIndices array indicating which texture in yuvaTextures, and channel
+ in that texture, maps to each component of YUVA.
@param imageSize size of the resulting image
@param imageOrigin origin of the resulting image. One of: kBottomLeft_GrSurfaceOrigin,
kTopLeft_GrSurfaceOrigin
@@ -384,10 +389,10 @@
@param yuvColorSpace How the YUV values are converted to RGB. One of:
kJPEG_SkYUVColorSpace, kRec601_SkYUVColorSpace,
kRec709_SkYUVColorSpace
- @param yuvTextures array of (up to four) YUVA textures on GPU which contain the,
+ @param yuvaTextures array of (up to four) YUVA textures on GPU which contain the,
possibly interleaved, YUVA planes
- @param yuvaIndices array indicating which texture (in 'yuvaTextures') and channel
- (in the specified texture) maps to each of Y, U, V, and A.
+ @param yuvaIndices array indicating which texture in yuvaTextures, and channel
+ in that texture, maps to each component of YUVA.
@param imageSize size of the resulting image
@param imageOrigin origin of the resulting image. One of: kBottomLeft_GrSurfaceOrigin,
kTopLeft_GrSurfaceOrigin
@@ -511,7 +516,7 @@
sk_sp<SkColorSpace> colorSpace);
#if defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26
- /** (see skbug.com/7447)
+ /** (See Skia bug 7447)
Creates SkImage from Android hardware buffer.
Returned SkImage takes a reference on the buffer.
@@ -795,8 +800,8 @@
filterQuality kNone_SkFilterQuality is fastest, typically implemented with
nearest neighbor filter. kLow_SkFilterQuality is typically implemented with
bilerp filter. kMedium_SkFilterQuality is typically implemented with
- bilerp filter, and Filter_Quality_MipMap when size is reduced.
- kHigh_SkFilterQuality is slowest, typically implemented with Filter_Quality_BiCubic.
+ bilerp filter, and mip-map filter when size is reduced.
+ kHigh_SkFilterQuality is slowest, typically implemented with bicubic filter.
If cachingHint is kAllow_CachingHint, pixels may be retained locally.
If cachingHint is kDisallow_CachingHint, pixels are not added to the local cache.
diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h
index 19990e7..450bcd6 100644
--- a/include/core/SkImageInfo.h
+++ b/include/core/SkImageInfo.h
@@ -461,8 +461,8 @@
@param newColorType one of:
kUnknown_SkColorType, kAlpha_8_SkColorType, 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
+ kBGRA_8888_SkColorType, kRGBA_1010102_SkColorType,
+ kRGB_101010x_SkColorType, kGray_8_SkColorType, kRGBA_F16_SkColorType
@return created SkImageInfo
*/
SkImageInfo makeColorType(SkColorType newColorType) const {
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h
index 733a475..afc0a8f 100644
--- a/include/core/SkMatrix.h
+++ b/include/core/SkMatrix.h
@@ -555,8 +555,8 @@
@param sx horizontal scale factor
@param sy vertical scale factor
- @param px pivot x
- @param py pivot y
+ @param px pivot on x-axis
+ @param py pivot on y-axis
*/
void setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py);
@@ -573,8 +573,8 @@
Positive degrees rotates clockwise.
@param degrees angle of axes relative to upright axes
- @param px pivot x
- @param py pivot y
+ @param px pivot on x-axis
+ @param py pivot on y-axis
*/
void setRotate(SkScalar degrees, SkScalar px, SkScalar py);
@@ -593,8 +593,8 @@
@param sinValue rotation vector x-axis component
@param cosValue rotation vector y-axis component
- @param px pivot x-axis
- @param py pivot y-axis
+ @param px pivot on x-axis
+ @param py pivot on y-axis
*/
void setSinCos(SkScalar sinValue, SkScalar cosValue,
SkScalar px, SkScalar py);
@@ -625,8 +625,8 @@
@param kx horizontal skew factor
@param ky vertical skew factor
- @param px pivot x
- @param py pivot y
+ @param px pivot on x-axis
+ @param py pivot on y-axis
*/
void setSkew(SkScalar kx, SkScalar ky, SkScalar px, SkScalar py);
@@ -699,8 +699,8 @@
@param sx horizontal scale factor
@param sy vertical scale factor
- @param px pivot x
- @param py pivot y
+ @param px pivot on x-axis
+ @param py pivot on y-axis
*/
void preScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py);
@@ -751,8 +751,8 @@
| G H I | | 0 0 1 | | Gc+Hs -Gs+Hc G*dx+H*dy+I |
@param degrees angle of axes relative to upright axes
- @param px pivot x
- @param py pivot y
+ @param px pivot on x-axis
+ @param py pivot on y-axis
*/
void preRotate(SkScalar degrees, SkScalar px, SkScalar py);
@@ -806,8 +806,8 @@
@param kx horizontal skew factor
@param ky vertical skew factor
- @param px pivot x
- @param py pivot y
+ @param px pivot on x-axis
+ @param py pivot on y-axis
*/
void preSkew(SkScalar kx, SkScalar ky, SkScalar px, SkScalar py);
@@ -894,8 +894,8 @@
@param sx horizontal scale factor
@param sy vertical scale factor
- @param px pivot x
- @param py pivot y
+ @param px pivot on x-axis
+ @param py pivot on y-axis
*/
void postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py);
@@ -974,8 +974,8 @@
|0 0 1| |P Q R| | P Q R|
@param degrees angle of axes relative to upright axes
- @param px pivot x
- @param py pivot y
+ @param px pivot on x-axis
+ @param py pivot on y-axis
*/
void postRotate(SkScalar degrees, SkScalar px, SkScalar py);
@@ -1029,8 +1029,8 @@
@param kx horizontal skew factor
@param ky vertical skew factor
- @param px pivot x
- @param py pivot y
+ @param px pivot on x-axis
+ @param py pivot on y-axis
*/
void postSkew(SkScalar kx, SkScalar ky, SkScalar px, SkScalar py);
@@ -1165,9 +1165,9 @@
| 1 0 0 |
| 0 1 0 |
- Affine 3x2 matrices in column major order are used by OpenGL and XPS.
+ Affine 3 by 2 matrices in column major order are used by OpenGL and XPS.
- @param affine storage for 3x2 affine matrix
+ @param affine storage for 3 by 2 affine matrix
*/
static void SetAffineIdentity(SkScalar affine[6]);
@@ -1178,7 +1178,7 @@
If SkMatrix contains perspective, returns false and leaves affine unchanged.
- @param affine storage for 3x2 affine matrix; may be nullptr
+ @param affine storage for 3 by 2 affine matrix; may be nullptr
@return true if SkMatrix does not contain perspective
*/
bool SK_WARN_UNUSED_RESULT asAffine(SkScalar affine[6]) const;
@@ -1195,7 +1195,7 @@
| skew-y scale-y translate-y |
| 0 0 1 |
- @param affine 3x2 affine matrix
+ @param affine 3 by 2 affine matrix
*/
void setAffine(const SkScalar affine[6]);
@@ -1377,7 +1377,7 @@
this->mapVectors(vecs, vecs, count);
}
- /** Maps vector (x, y) to result. Vector is mapped by multiplying by SkMatrix,
+ /** Maps vector (dx, dy) to result. Vector is mapped by multiplying by SkMatrix,
treating SkMatrix translation as zero. Given:
| A B 0 | | dx |
@@ -1399,7 +1399,7 @@
this->mapVectors(result, &vec, 1);
}
- /** Returns vector (x, y) multiplied by SkMatrix, treating SkMatrix translation as zero.
+ /** Returns vector (dx, dy) multiplied by SkMatrix, treating SkMatrix translation as zero.
Given:
| A B 0 | | dx |
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index f064d54..e352059 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -481,7 +481,7 @@
*/
SkColor getColor() const { return fColor4f.toSkColor(); }
- /** Retrieves alpha and RGB, unpmreultiplied, as four floating point values. RGB are
+ /** Retrieves alpha and RGB, unpremultiplied, as four floating point values. RGB are
are extended sRGB values (sRGB gamut, and encoded with the sRGB transfer function).
@return unpremultiplied RGBA
@@ -631,7 +631,7 @@
@param src SkPath read to create a filled version
@param dst resulting SkPath; may be the same as src, but may not be nullptr
@param cullRect optional limit passed to SkPathEffect
- @param resScale if > 1, increase precision, else if (0 < res < 1) reduce precision
+ @param resScale if > 1, increase precision, else if (0 < resScale < 1) reduce precision
to favor speed and size
@return true if the path represents style fill, or false if it represents hairline
*/
@@ -903,31 +903,31 @@
*/
void setTextSize(SkScalar textSize);
- /** Returns text scale x.
+ /** Returns text scale on x-axis.
Default value is 1.
@return text horizontal scale
*/
SkScalar getTextScaleX() const { return fTextScaleX; }
- /** Sets text scale x.
+ /** Sets text scale on x-axis.
Default value is 1.
@param scaleX text horizontal scale
*/
void setTextScaleX(SkScalar scaleX);
- /** Returns text skew x.
+ /** Returns text skew on x-axis.
Default value is zero.
- @return additional shear in x-axis relative to y-axis
+ @return additional shear on x-axis relative to y-axis
*/
SkScalar getTextSkewX() const { return fTextSkewX; }
- /** Sets text skew x.
+ /** Sets text skew on x-axis.
Default value is zero.
- @param skewX additional shear in x-axis relative to y-axis
+ @param skewX additional shear on x-axis relative to y-axis
*/
void setTextSkewX(SkScalar skewX);
@@ -1200,7 +1200,7 @@
}
/** Returns the bytes of text that fit within maxWidth.
- Tthe text fragment fits if its advance width is less than or equal to maxWidth.
+ The text fragment fits if its advance width is less than or equal to maxWidth.
Measures only while the advance is less than or equal to maxWidth.
Returns the advance or the text fragment in measuredWidth if it not nullptr.
Uses SkPaint::TextEncoding to decode text, SkTypeface to get the font metrics,
@@ -1324,8 +1324,8 @@
@param text character codes or glyph indices
@param length number of bytes of text
- @param xpos positions of each glyph in x
- @param constY position of each glyph in y
+ @param xpos positions of each glyph on x-axis
+ @param constY position of each glyph on y-axis
@param bounds lower and upper line parallel to the advance
@param intervals returned intersections; may be nullptr
@return number of intersections; may be zero
@@ -1361,8 +1361,8 @@
and text skew x, but not fake bold or SkPathEffect.
If text size is large, text scale x is one, and text skew x is zero,
- returns the same bounds as SkPaint::FontMetrics { FontMetrics::fXMin,
- FontMetrics::fTop, FontMetrics::fXMax, FontMetrics::fBottom }.
+ returns the same bounds as:
+ { FontMetrics::fXMin, FontMetrics::fTop, FontMetrics::fXMax, FontMetrics::fBottom }.
@return union of bounds of all glyphs
*/
diff --git a/include/core/SkPath.h b/include/core/SkPath.h
index 0f837f5..e58e7b5 100644
--- a/include/core/SkPath.h
+++ b/include/core/SkPath.h
@@ -68,7 +68,7 @@
kCCW_Direction, //!< contour travels counterclockwise
};
- /** Constucts an empty SkPath. By default, SkPath has no verbs, no SkPoint, and no weights.
+ /** Constructs an empty SkPath. By default, SkPath has no verbs, no SkPoint, and no weights.
SkPath::FillType is set to kWinding_FillType.
@return empty SkPath
@@ -289,7 +289,8 @@
*/
bool isOval(SkRect* bounds) const;
- /** Returns true if this path is recognized as a SkRRect (but not an oval/circle or rect).
+ /** Returns true if path is representable as SkRRect.
+ Returns false if path is representable as oval, circle, or SkRect.
rrect receives bounds of SkRRect.
@@ -590,8 +591,8 @@
lineTo() appends kMove_Verb to verb array and (0, 0) to SkPoint array, if needed.
lineTo() then appends kLine_Verb to verb array and (x, y) to SkPoint array.
- @param x end of added line in x
- @param y end of added line in y
+ @param x end of added line on x-axis
+ @param y end of added line on y-axis
@return reference to SkPath
*/
SkPath& lineTo(SkScalar x, SkScalar y);
@@ -631,10 +632,10 @@
then appends kQuad_Verb to verb array; and (x1, y1), (x2, y2)
to SkPoint array.
- @param x1 control SkPoint of quad in x
- @param y1 control SkPoint of quad in y
- @param x2 end SkPoint of quad in x
- @param y2 end SkPoint of quad in y
+ @param x1 control SkPoint of quad on x-axis
+ @param y1 control SkPoint of quad on y-axis
+ @param x2 end SkPoint of quad on x-axis
+ @param y2 end SkPoint of quad on y-axis
@return reference to SkPath
*/
SkPath& quadTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2);
@@ -689,10 +690,10 @@
If w is not finite, appends kLine_Verb twice to verb array, and
(x1, y1), (x2, y2) to SkPoint array.
- @param x1 control SkPoint of conic in x
- @param y1 control SkPoint of conic in y
- @param x2 end SkPoint of conic in x
- @param y2 end SkPoint of conic in y
+ @param x1 control SkPoint of conic on x-axis
+ @param y1 control SkPoint of conic on y-axis
+ @param x2 end SkPoint of conic on x-axis
+ @param y2 end SkPoint of conic on y-axis
@param w weight of added conic
@return reference to SkPath
*/
@@ -759,12 +760,12 @@
then appends kCubic_Verb to verb array; and (x1, y1), (x2, y2), (x3, y3)
to SkPoint array.
- @param x1 first control SkPoint of cubic in x
- @param y1 first control SkPoint of cubic in y
- @param x2 second control SkPoint of cubic in x
- @param y2 second control SkPoint of cubic in y
- @param x3 end SkPoint of cubic in x
- @param y3 end SkPoint of cubic in y
+ @param x1 first control SkPoint of cubic on x-axis
+ @param y1 first control SkPoint of cubic on y-axis
+ @param x2 second control SkPoint of cubic on x-axis
+ @param y2 second control SkPoint of cubic on y-axis
+ @param x3 end SkPoint of cubic on x-axis
+ @param y3 end SkPoint of cubic on y-axis
@return reference to SkPath
*/
SkPath& cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
@@ -799,16 +800,16 @@
Cubic end is last point plus vector (dx2, dy2).
Function name stands for "relative cubic to".
- @param x1 offset from last point to first cubic control on x-axis
- @param y1 offset from last point to first cubic control on y-axis
- @param x2 offset from last point to second cubic control on x-axis
- @param y2 offset from last point to second cubic control on y-axis
- @param x3 offset from last point to cubic end on x-axis
- @param y3 offset from last point to cubic end on y-axis
+ @param dx1 offset from last point to first cubic control on x-axis
+ @param dy1 offset from last point to first cubic control on y-axis
+ @param dx2 offset from last point to second cubic control on x-axis
+ @param dy2 offset from last point to second cubic control on y-axis
+ @param dx3 offset from last point to cubic end on x-axis
+ @param dy3 offset from last point to cubic end on y-axis
@return reference to SkPath
*/
- SkPath& rCubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
- SkScalar x3, SkScalar y3);
+ SkPath& rCubicTo(SkScalar dx1, SkScalar dy1, SkScalar dx2, SkScalar dy2,
+ SkScalar dx3, SkScalar dy3);
/** Appends arc to SkPath. Arc added is part of ellipse
bounded by oval, from startAngle through sweepAngle. Both startAngle and
@@ -829,9 +830,18 @@
/** Appends arc to SkPath, after appending line if needed. Arc is implemented by conic
weighted to describe part of circle. Arc is contained by tangent from
- last SkPath point (x0, y0) to (x1, y1), and tangent from (x1, y1) to (x2, y2). Arc
+ last SkPath point to (x1, y1), and tangent from (x1, y1) to (x2, y2). Arc
is part of circle sized to radius, positioned so it touches both tangent lines.
+ If last Path Point does not start Arc, arcTo appends connecting Line to Path.
+ The length of Vector from (x1, y1) to (x2, y2) does not affect Arc.
+
+ Arc sweep is always less than 180 degrees. If radius is zero, or if
+ tangents are nearly parallel, arcTo appends Line from last Path Point to (x1, y1).
+
+ arcTo appends at most one Line and one conic.
+ arcTo implements the functionality of PostScript arct and HTML Canvas arcTo.
+
@param x1 x-axis value common to pair of tangents
@param y1 y-axis value common to pair of tangents
@param x2 x-axis value end of second tangent
@@ -853,7 +863,7 @@
tangents are nearly parallel, arcTo() appends line from last SkPath SkPoint to p1.
arcTo() appends at most one line and one conic.
- arcTo() implements the functionality of PostScript_Arct and HTML_Canvas_ArcTo.
+ arcTo() implements the functionality of PostScript arct and HTML Canvas arcTo.
@param p1 SkPoint common to pair of tangents
@param p2 end of second tangent
@@ -884,12 +894,12 @@
too small.
arcTo() appends up to four conic curves.
- arcTo() implements the functionality of svg arc, although SVG "sweep-flag" value
- is opposite the integer value of sweep; SVG "sweep-flag" uses 1 for clockwise,
- while kCW_Direction cast to int is zero.
+ arcTo() implements the functionality of SVG arc, although SVG sweep-flag value
+ is opposite the integer value of sweep; SVG sweep-flag uses 1 for clockwise,
+ while kCW_Direction cast to int is zero.
- @param rx radius in x before x-axis rotation
- @param ry radius in y before x-axis rotation
+ @param rx radius on x-axis before x-axis rotation
+ @param ry radius on y-axis before x-axis rotation
@param xAxisRotate x-axis rotation in degrees; positive values are clockwise
@param largeArc chooses smaller or larger arc
@param sweep chooses clockwise or counterclockwise arc
@@ -907,13 +917,13 @@
and smaller or larger.
Arc sweep is always less than 360 degrees. arcTo() appends line to xy if either
- radii are zero, or if last SkPath SkPoint equals (x, y). arcTo() scales radii r to fit
- last SkPath SkPoint and xy if both are greater than zero but too small to describe
+ radii are zero, or if last SkPath SkPoint equals (xy.fX, xy.fY). arcTo() scales radii r to
+ fit last SkPath SkPoint and xy if both are greater than zero but too small to describe
an arc.
arcTo() appends up to four conic curves.
- arcTo() implements the functionality of svg arc, although SVG "sweep-flag" value is
- opposite the integer value of sweep; SVG "sweep-flag" uses 1 for clockwise, while
+ arcTo() implements the functionality of SVG arc, although SVG sweep-flag value is
+ opposite the integer value of sweep; SVG sweep-flag uses 1 for clockwise, while
kCW_Direction cast to int is zero.
@param r radii on axes before x-axis rotation
@@ -930,8 +940,8 @@
/** Appends arc to SkPath, relative to last SkPath SkPoint. 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 SkPath SkPoint (x0, y0) to end SkPoint:
- (x0 + dx, y0 + dy), choosing one of four possible routes: clockwise or
+ xAxisRotate degrees. Arc curves from last SkPath SkPoint to relative end SkPoint:
+ (dx, dy), choosing one of four possible routes: clockwise or
counterclockwise, and smaller or larger. If SkPath is empty, the start arc SkPoint
is (0, 0).
@@ -1046,8 +1056,8 @@
If false, rect and dirs are unchanged.
If true, rect and dirs are written to if not nullptr:
setting rect[0] to outer SkRect, and rect[1] to inner SkRect;
- setting dirs[0] to SkPath::Direction of outer SkRect, and dirs[1] to SkPath::Direction of inner
- SkRect.
+ setting dirs[0] to SkPath::Direction of outer SkRect, and dirs[1] to SkPath::Direction of
+ inner SkRect.
@param rect storage for SkRect pair; may be nullptr
@param dirs storage for SkPath::Direction pair; may be nullptr
@@ -1158,7 +1168,7 @@
corners fit. If rx or ry is less than or equal to zero, addRoundRect() appends
SkRect rect to SkPath.
- After appending, SkPath may be empty, or may contain: SkRect, oval, or RoundRect.
+ After appending, SkPath may be empty, or may contain: SkRect, oval, or SkRRect.
@param rect bounds of SkRRect
@param rx x-axis radius of rounded corners on the SkRRect
@@ -1403,15 +1413,16 @@
class SK_API Iter {
public:
- /** Initializes SkPath::Iter with an empty SkPath. next() on SkPath::Iter returns kDone_Verb.
+ /** Initializes SkPath::Iter with an empty SkPath. next() on SkPath::Iter returns
+ kDone_Verb.
Call setPath to initialize SkPath::Iter at a later time.
@return SkPath::Iter of empty SkPath
*/
Iter();
- /** Sets SkPath::Iter to return elements of verb array, SkPoint array, and conic weight in path.
- If forceClose is true, SkPath::Iter will add kLine_Verb and kClose_Verb after each
+ /** Sets SkPath::Iter to return elements of verb array, SkPoint array, and conic weight in
+ path. If forceClose is true, SkPath::Iter will add kLine_Verb and kClose_Verb after each
open contour. path is not altered.
@param path SkPath to iterate
@@ -1420,8 +1431,8 @@
*/
Iter(const SkPath& path, bool forceClose);
- /** Sets SkPath::Iter to return elements of verb array, SkPoint array, and conic weight in path.
- If forceClose is true, SkPath::Iter will add kLine_Verb and kClose_Verb after each
+ /** Sets SkPath::Iter to return elements of verb array, SkPoint array, and conic weight in
+ path. If forceClose is true, SkPath::Iter will add kLine_Verb and kClose_Verb after each
open contour. path is not altered.
@param path SkPath to iterate
@@ -1530,7 +1541,8 @@
setPath(path);
}
- /** Sets SkPath::Iter to return elements of verb array, SkPoint array, and conic weight in path.
+ /** Sets SkPath::Iter to return elements of verb array, SkPoint array, and conic weight in
+ path.
@param path SkPath to iterate
*/
@@ -1651,14 +1663,14 @@
*/
size_t readFromMemory(const void* buffer, size_t length);
- /** (see skbug.com/1762)
+ /** (See Skia bug 1762.)
Returns a non-zero, globally unique value. A different value is returned
if verb array, SkPoint array, or conic weight changes.
- Setting SkPath::FillType does not change generation id.
+ Setting SkPath::FillType does not change generation identifier.
- Each time the path is modified, a different generation id will be returned.
- SkPath::FillType does affect generation id on Android framework.
+ Each time the path is modified, a different generation identifier will be returned.
+ SkPath::FillType does affect generation identifier on Android framework.
@return non-zero, globally unique value
*/
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index b870235..7ab5392 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -49,9 +49,9 @@
if successful; otherwise, returns nullptr. Fails if data does not permit
constructing valid SkPicture.
- procs.fPictureProc permits supplying a custom function to decode SkPicture.
- If procs.fPictureProc is nullptr, default decoding is used. procs.fPictureCtx
- may be used to provide user context to procs.fPictureProc; procs.fPictureProc
+ procs->fPictureProc permits supplying a custom function to decode SkPicture.
+ If procs->fPictureProc is nullptr, default decoding is used. procs->fPictureCtx
+ may be used to provide user context to procs->fPictureProc; procs->fPictureProc
is called with a pointer to data, data byte length, and user context.
@param stream container for serial data
@@ -65,9 +65,9 @@
if successful; otherwise, returns nullptr. Fails if data does not permit
constructing valid SkPicture.
- procs.fPictureProc permits supplying a custom function to decode SkPicture.
- If procs.fPictureProc is nullptr, default decoding is used. procs.fPictureCtx
- may be used to provide user context to procs.fPictureProc; procs.fPictureProc
+ procs->fPictureProc permits supplying a custom function to decode SkPicture.
+ If procs->fPictureProc is nullptr, default decoding is used. procs->fPictureCtx
+ may be used to provide user context to procs->fPictureProc; procs->fPictureProc
is called with a pointer to data, data byte length, and user context.
@param data container for serial data
@@ -153,9 +153,9 @@
/** Returns storage containing SkData describing SkPicture, using optional custom
encoders.
- procs.fPictureProc permits supplying a custom function to encode SkPicture.
- If procs.fPictureProc is nullptr, default encoding is used. procs.fPictureCtx
- may be used to provide user context to procs.fPictureProc; procs.fPictureProc
+ procs->fPictureProc permits supplying a custom function to encode SkPicture.
+ If procs->fPictureProc is nullptr, default encoding is used. procs->fPictureCtx
+ may be used to provide user context to procs->fPictureProc; procs->fPictureProc
is called with a pointer to SkPicture and user context.
@param procs custom serial data encoders; may be nullptr
@@ -165,9 +165,9 @@
/** Writes picture to stream, using optional custom encoders.
- procs.fPictureProc permits supplying a custom function to encode SkPicture.
- If procs.fPictureProc is nullptr, default encoding is used. procs.fPictureCtx
- may be used to provide user context to procs.fPictureProc; procs.fPictureProc
+ procs->fPictureProc permits supplying a custom function to encode SkPicture.
+ If procs->fPictureProc is nullptr, default encoding is used. procs->fPictureCtx
+ may be used to provide user context to procs->fPictureProc; procs->fPictureProc
is called with a pointer to SkPicture and user context.
@param stream writable serial data stream
diff --git a/include/core/SkPixmap.h b/include/core/SkPixmap.h
index b5f0538..94c7e98 100644
--- a/include/core/SkPixmap.h
+++ b/include/core/SkPixmap.h
@@ -124,7 +124,7 @@
/** Returns width, height, SkAlphaType, SkColorType, and SkColorSpace.
- @return reference to ImageInfo
+ @return reference to SkImageInfo
*/
const SkImageInfo& info() const { return fInfo; }
@@ -541,7 +541,7 @@
dstInfo specifies width, height, SkColorType, SkAlphaType, and
SkColorSpace 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 address equals nullptr, or dstRowBytes is less than dstInfo.minRowBytes().
Pixels are copied only if pixel conversion is possible. If SkPixmap colorType() is
kGray_8_SkColorType, or kAlpha_8_SkColorType; dstInfo.colorType() must match.
@@ -567,7 +567,7 @@
dstInfo specifies width, height, SkColorType, SkAlphaType, and
SkColorSpace 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 address equals nullptr, or dstRowBytes is less than dstInfo.minRowBytes().
Pixels are copied only if pixel conversion is possible. If SkPixmap colorType() is
kGray_8_SkColorType, or kAlpha_8_SkColorType; dstInfo.colorType() must match.
@@ -593,7 +593,7 @@
/** Copies a SkRect of pixels to dst. Copy starts at (srcX, srcY), and does not
exceed SkPixmap (width(), height()). dst specifies width, height, SkColorType,
SkAlphaType, and SkColorSpace 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 address equals nullptr, or dst.rowBytes() is less than
dst SkImageInfo::minRowBytes.
Pixels are copied only if pixel conversion is possible. If SkPixmap colorType() is
@@ -618,7 +618,7 @@
/** Copies pixels inside bounds() to dst. dst specifies width, height, SkColorType,
SkAlphaType, and SkColorSpace 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 address equals nullptr, or dst.rowBytes() is less than
dst SkImageInfo::minRowBytes.
Pixels are copied only if pixel conversion is possible. If SkPixmap colorType() is
@@ -639,7 +639,7 @@
/** Copies SkBitmap to dst, scaling pixels to fit dst.width() and dst.height(), and
converting pixels to match dst.colorType() and dst.alphaType(). Returns true if
- pixels are copied. Returns false if dst.addr() is nullptr, or dst.rowBytes() is
+ pixels are copied. Returns false if dst address is nullptr, or dst.rowBytes() is
less than dst SkImageInfo::minRowBytes.
Pixels are copied only if pixel conversion is possible. If SkPixmap colorType() is
@@ -655,8 +655,8 @@
filterQuality kNone_SkFilterQuality is fastest, typically implemented with
nearest neighbor filter. kLow_SkFilterQuality is typically implemented with
bilerp filter. kMedium_SkFilterQuality is typically implemented with
- bilerp filter, and Filter_Quality_MipMap when size is reduced.
- kHigh_SkFilterQuality is slowest, typically implemented with Filter_Quality_BiCubic.
+ bilerp filter, and mip-map filter when size is reduced.
+ kHigh_SkFilterQuality is slowest, typically implemented with bicubic filter.
@param dst SkImageInfo and pixel address to write to
@param filterQuality one of: kNone_SkFilterQuality, kLow_SkFilterQuality,
diff --git a/include/core/SkPoint.h b/include/core/SkPoint.h
index 827bbd7..1c4768f 100644
--- a/include/core/SkPoint.h
+++ b/include/core/SkPoint.h
@@ -488,9 +488,9 @@
*/
static SkScalar Length(SkScalar x, SkScalar y);
- /** 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;
- otherwise, returns length of vec before vec is scaled.
+ /** 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; otherwise, returns length of vec before vec is scaled.
Returned prior length may be SK_ScalarInfinity if it can not be represented by SkScalar.
diff --git a/include/core/SkRRect.h b/include/core/SkRRect.h
index 0a41fe9..32fbd12 100644
--- a/include/core/SkRRect.h
+++ b/include/core/SkRRect.h
@@ -107,14 +107,14 @@
/** Returns span on the x-axis. This does not check if result fits in 32-bit float;
result may be infinity.
- @return bounds().fRight minus bounds().fLeft
+ @return rect().fRight minus rect().fLeft
*/
SkScalar width() const { return fRect.width(); }
/** Returns span on the y-axis. This does not check if result fits in 32-bit float;
result may be infinity.
- @return bounds().fBottom minus bounds().fTop
+ @return rect().fBottom minus rect().fTop
*/
SkScalar height() const { return fRect.height(); }
@@ -310,7 +310,7 @@
/** Returns true if bounds and radii in a are equal to bounds and radii in b.
a and b are not equal if either contain NaN. a and b are equal if members
- contain zeroes width different signs.
+ contain zeroes with different signs.
@param a SkRect bounds and radii to compare
@param b SkRect bounds and radii to compare
@@ -323,7 +323,7 @@
/** Returns true if bounds and radii in a are not equal to bounds and radii in b.
a and b are not equal if either contain NaN. a and b are equal if members
- contain zeroes width different signs.
+ contain zeroes with different signs.
@param a SkRect bounds and radii to compare
@param b SkRect bounds and radii to compare
diff --git a/include/core/SkRect.h b/include/core/SkRect.h
index d311cce..cf309cd 100644
--- a/include/core/SkRect.h
+++ b/include/core/SkRect.h
@@ -887,7 +887,7 @@
/** Returns average of left edge and right edge. Result does not change if SkRect
is sorted. Result may overflow to infinity if SkRect is far from the origin.
- @return midpoint in x
+ @return midpoint on x-axis
*/
SkScalar centerX() const {
// don't use SkScalarHalf(fLeft + fBottom) as that might overflow before the 0.5
@@ -897,7 +897,7 @@
/** Returns average of top edge and bottom edge. Result does not change if SkRect
is sorted.
- @return midpoint in y
+ @return midpoint on y-axis
*/
SkScalar centerY() const {
// don't use SkScalarHalf(fTop + fBottom) as that might overflow before the 0.5
@@ -908,7 +908,7 @@
equal to the corresponding members in b.
a and b are not equal if either contain NaN. a and b are equal if members
- contain zeroes width different signs.
+ contain zeroes with different signs.
@param a SkRect to compare
@param b SkRect to compare
@@ -922,7 +922,7 @@
equal the corresponding members in b.
a and b are not equal if either contain NaN. a and b are equal if members
- contain zeroes width different signs.
+ contain zeroes with different signs.
@param a SkRect to compare
@param b SkRect to compare
diff --git a/include/core/SkRegion.h b/include/core/SkRegion.h
index 6f8bf34..b353484 100644
--- a/include/core/SkRegion.h
+++ b/include/core/SkRegion.h
@@ -467,10 +467,11 @@
class SK_API Iterator {
public:
- /** Initializes SkRegion::Iterator with an empty SkRegion. done() on SkRegion::Iterator returns true.
+ /** Initializes SkRegion::Iterator with an empty SkRegion. done() on SkRegion::Iterator
+ returns true.
Call reset() to initialized SkRegion::Iterator at a later time.
- @return empty SkRegion ierator
+ @return empty SkRegion iterator
*/
Iterator() : fRgn(nullptr), fDone(true) {}
@@ -549,8 +550,8 @@
*/
void next();
- /** Returns SkIRect element in SkRegion, intersected with clip passed to SkRegion::Cliperator
- constructor. Does not return predictable results if SkRegion
+ /** Returns SkIRect element in SkRegion, intersected with clip passed to
+ SkRegion::Cliperator constructor. Does not return predictable results if SkRegion
is empty.
@return part of SkRegion inside clip as SkIRect
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h
index 46897a4..1936f44 100644
--- a/include/core/SkSurface.h
+++ b/include/core/SkSurface.h
@@ -186,8 +186,9 @@
@param sampleCnt samples per pixel, or 0 to disable full scene anti-aliasing
@param colorType one of:
kUnknown_SkColorType, kAlpha_8_SkColorType, kRGB_565_SkColorType,
- kARGB_4444_SkColorType, kRGBA_8888_SkColorType, kRGB_888x_SkColorType,
- kBGRA_8888_SkColorType, kRGBA_1010102_SkColorType, kRGB_101010x_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
@param colorSpace range of colors; may be nullptr
@param surfaceProps LCD striping orientation and setting for device independent
@@ -217,9 +218,11 @@
@param backendRenderTarget GPU intermediate memory buffer
@param origin one of: kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin
@param colorType one of:
- kUnknown_SkColorType, kAlpha_8_SkColorType, kRGB_565_SkColorType,
- kARGB_4444_SkColorType, kRGBA_8888_SkColorType, kRGB_888x_SkColorType,
- kBGRA_8888_SkColorType, kRGBA_1010102_SkColorType, kRGB_101010x_SkColorType,
+ kUnknown_SkColorType, kAlpha_8_SkColorType,
+ 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
@param colorSpace range of colors
@param surfaceProps LCD striping orientation and setting for device independent
@@ -254,8 +257,9 @@
@param sampleCnt samples per pixel, or 0 to disable full scene anti-aliasing
@param colorType one of:
kUnknown_SkColorType, kAlpha_8_SkColorType, kRGB_565_SkColorType,
- kARGB_4444_SkColorType, kRGBA_8888_SkColorType, kRGB_888x_SkColorType,
- kBGRA_8888_SkColorType, kRGBA_1010102_SkColorType, kRGB_101010x_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
@param colorSpace range of colors; may be nullptr
@param surfaceProps LCD striping orientation and setting for device independent
@@ -271,7 +275,7 @@
const SkSurfaceProps* surfaceProps);
/** Returns SkSurface on GPU indicated by context. Allocates memory for
- pixels, based on the width, height, and SkColorType in ImageInfo. budgeted
+ pixels, based on the width, height, and SkColorType in SkImageInfo. budgeted
selects whether allocation for pixels is tracked by context. imageInfo
describes the pixel format in SkColorType, and transparency in
SkAlphaType, and color matching in SkColorSpace.
@@ -305,7 +309,7 @@
bool shouldCreateWithMips = false);
/** Returns SkSurface on GPU indicated by context. Allocates memory for
- pixels, based on the width, height, and SkColorType in ImageInfo. budgeted
+ pixels, based on the width, height, and SkColorType in SkImageInfo. budgeted
selects whether allocation for pixels is tracked by context. imageInfo
describes the pixel format in SkColorType, and transparency in
SkAlphaType, and color matching in SkColorSpace.
@@ -334,7 +338,7 @@
}
/** Returns SkSurface on GPU indicated by context. Allocates memory for
- pixels, based on the width, height, and SkColorType in ImageInfo. budgeted
+ pixels, based on the width, height, and SkColorType in SkImageInfo. budgeted
selects whether allocation for pixels is tracked by context. imageInfo
describes the pixel format in SkColorType, and transparency in
SkAlphaType, and color matching in SkColorSpace.
@@ -443,7 +447,8 @@
The returned GrBackendTexture should be discarded if the SkSurface is drawn to or deleted.
@param backendHandleAccess one of: kFlushRead_BackendHandleAccess,
- kFlushWrite_BackendHandleAccess, kDiscardWrite_BackendHandleAccess
+ kFlushWrite_BackendHandleAccess,
+ kDiscardWrite_BackendHandleAccess
@return GPU texture reference; invalid on failure
*/
GrBackendTexture getBackendTexture(BackendHandleAccess backendHandleAccess);
@@ -456,7 +461,8 @@
or deleted.
@param backendHandleAccess one of: kFlushRead_BackendHandleAccess,
- kFlushWrite_BackendHandleAccess, kDiscardWrite_BackendHandleAccess
+ kFlushWrite_BackendHandleAccess,
+ kDiscardWrite_BackendHandleAccess
@return GPU render target reference; invalid on failure
*/
GrBackendRenderTarget getBackendRenderTarget(BackendHandleAccess backendHandleAccess);
@@ -697,7 +703,7 @@
/** Initializes SkSurfaceCharacterization that can be used to perform GPU back-end
processing in a separate thread. Typically this is used to divide drawing
- into multiple tiles. DeferredDisplayListRecorder records the drawing commands
+ into multiple tiles. SkDeferredDisplayListRecorder records the drawing commands
for each tile.
Return true if SkSurface supports characterization. raster surface returns false.
diff --git a/include/core/SkTextBlob.h b/include/core/SkTextBlob.h
index 907241c..afef540 100644
--- a/include/core/SkTextBlob.h
+++ b/include/core/SkTextBlob.h
@@ -100,10 +100,10 @@
may be used to provide user context to procs.fTypefaceProc; procs.fTypefaceProc
is called with a pointer to SkTypeface and user context.
- @param procs custom serial data encoders; may be nullptr
- @param memory storage for data
- @param size size of storage
- @return bytes written, or zero if required storage is larger than memory_size
+ @param procs custom serial data encoders; may be nullptr
+ @param memory storage for data
+ @param memory_size size of storage
+ @return bytes written, or zero if required storage is larger than memory_size
*/
size_t serialize(const SkSerialProcs& procs, void* memory, size_t memory_size) const;
diff --git a/site/user/api/SkPath_Reference.md b/site/user/api/SkPath_Reference.md
index 7fd3e10..ee2c38f 100644
--- a/site/user/api/SkPath_Reference.md
+++ b/site/user/api/SkPath_Reference.md
@@ -90,8 +90,8 @@
<a href='#SkPath'>SkPath</a>& <a href='#SkPath_cubicTo'>cubicTo</a>(<a href='undocumented#SkScalar'>SkScalar</a> x1, <a href='undocumented#SkScalar'>SkScalar</a> y1, <a href='undocumented#SkScalar'>SkScalar</a> x2, <a href='undocumented#SkScalar'>SkScalar</a> y2,
<a href='undocumented#SkScalar'>SkScalar</a> x3, <a href='undocumented#SkScalar'>SkScalar</a> y3);
<a href='#SkPath'>SkPath</a>& <a href='#SkPath_cubicTo_2'>cubicTo</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& p1, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& p2, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& p3);
- <a href='#SkPath'>SkPath</a>& <a href='#SkPath_rCubicTo'>rCubicTo</a>(<a href='undocumented#SkScalar'>SkScalar</a> x1, <a href='undocumented#SkScalar'>SkScalar</a> y1, <a href='undocumented#SkScalar'>SkScalar</a> x2, <a href='undocumented#SkScalar'>SkScalar</a> y2,
- <a href='undocumented#SkScalar'>SkScalar</a> x3, <a href='undocumented#SkScalar'>SkScalar</a> y3);
+ <a href='#SkPath'>SkPath</a>& <a href='#SkPath_rCubicTo'>rCubicTo</a>(<a href='undocumented#SkScalar'>SkScalar</a> dx1, <a href='undocumented#SkScalar'>SkScalar</a> dy1, <a href='undocumented#SkScalar'>SkScalar</a> dx2, <a href='undocumented#SkScalar'>SkScalar</a> dy2,
+ <a href='undocumented#SkScalar'>SkScalar</a> dx3, <a href='undocumented#SkScalar'>SkScalar</a> dy3);
<a href='#SkPath'>SkPath</a>& <a href='#SkPath_arcTo'>arcTo</a>(const <a href='SkRect_Reference#SkRect'>SkRect</a>& oval, <a href='undocumented#SkScalar'>SkScalar</a> startAngle, <a href='undocumented#SkScalar'>SkScalar</a> sweepAngle, bool forceMoveTo);
<a href='#SkPath'>SkPath</a>& <a href='#SkPath_arcTo_2'>arcTo</a>(<a href='undocumented#SkScalar'>SkScalar</a> x1, <a href='undocumented#SkScalar'>SkScalar</a> y1, <a href='undocumented#SkScalar'>SkScalar</a> x2, <a href='undocumented#SkScalar'>SkScalar</a> y2, <a href='undocumented#SkScalar'>SkScalar</a> radius);
<a href='#SkPath'>SkPath</a>& <a href='#SkPath_arcTo_3'>arcTo</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> p1, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> p2, <a href='undocumented#SkScalar'>SkScalar</a> radius);
@@ -2743,39 +2743,39 @@
---
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-<a href='#SkPath'>SkPath</a>& <a href='#SkPath_rCubicTo'>rCubicTo</a>(<a href='undocumented#SkScalar'>SkScalar</a> x1, <a href='undocumented#SkScalar'>SkScalar</a> y1, <a href='undocumented#SkScalar'>SkScalar</a> x2, <a href='undocumented#SkScalar'>SkScalar</a> y2, <a href='undocumented#SkScalar'>SkScalar</a> x3, <a href='undocumented#SkScalar'>SkScalar</a> y3)
+<a href='#SkPath'>SkPath</a>& <a href='#SkPath_rCubicTo'>rCubicTo</a>(<a href='undocumented#SkScalar'>SkScalar</a> dx1, <a href='undocumented#SkScalar'>SkScalar</a> dy1, <a href='undocumented#SkScalar'>SkScalar</a> dx2, <a href='undocumented#SkScalar'>SkScalar</a> dy2, <a href='undocumented#SkScalar'>SkScalar</a> dx3, <a href='undocumented#SkScalar'>SkScalar</a> dy3)
</pre>
-Adds <a href='#Cubic'>Cubic</a> from <a href='#Last_Point'>Last Point</a> towards <a href='SkPoint_Reference#Vector'>Vector</a> (dx1, dy1), then towards
-<a href='SkPoint_Reference#Vector'>Vector</a> (dx2, dy2), to <a href='SkPoint_Reference#Vector'>Vector</a> (dx3, dy3).
+Adds <a href='#Cubic'>Cubic</a> from <a href='#Last_Point'>Last Point</a> towards <a href='SkPoint_Reference#Vector'>Vector</a> (<a href='#SkPath_rCubicTo_dx1'>dx1</a>, <a href='#SkPath_rCubicTo_dy1'>dy1</a>), then towards
+<a href='SkPoint_Reference#Vector'>Vector</a> (<a href='#SkPath_rCubicTo_dx2'>dx2</a>, <a href='#SkPath_rCubicTo_dy2'>dy2</a>), to <a href='SkPoint_Reference#Vector'>Vector</a> (<a href='#SkPath_rCubicTo_dx3'>dx3</a>, <a href='#SkPath_rCubicTo_dy3'>dy3</a>).
If <a href='#Path'>Path</a> is empty, or last <a href='#SkPath_Verb'>Verb</a>
is <a href='#SkPath_kClose_Verb'>kClose Verb</a>, <a href='#Last_Point'>Last Point</a> is set to (0, 0) before adding <a href='#Cubic'>Cubic</a>.
Appends <a href='#SkPath_kMove_Verb'>kMove Verb</a> to <a href='#Verb_Array'>Verb Array</a> and (0, 0) to <a href='#Point_Array'>Point Array</a>,
if needed; then appends <a href='#SkPath_kCubic_Verb'>kCubic Verb</a> to <a href='#Verb_Array'>Verb Array</a>; and appends <a href='#Cubic'>Cubic</a>
control and <a href='#Cubic'>Cubic</a> end to <a href='#Point_Array'>Point Array</a>.
-<a href='#Cubic'>Cubic</a> control is <a href='#Last_Point'>Last Point</a> plus <a href='SkPoint_Reference#Vector'>Vector</a> (dx1, dy1).
-<a href='#Cubic'>Cubic</a> end is <a href='#Last_Point'>Last Point</a> plus <a href='SkPoint_Reference#Vector'>Vector</a> (dx2, dy2).
+<a href='#Cubic'>Cubic</a> control is <a href='#Last_Point'>Last Point</a> plus <a href='SkPoint_Reference#Vector'>Vector</a> (<a href='#SkPath_rCubicTo_dx1'>dx1</a>, <a href='#SkPath_rCubicTo_dy1'>dy1</a>).
+<a href='#Cubic'>Cubic</a> end is <a href='#Last_Point'>Last Point</a> plus <a href='SkPoint_Reference#Vector'>Vector</a> (<a href='#SkPath_rCubicTo_dx2'>dx2</a>, <a href='#SkPath_rCubicTo_dy2'>dy2</a>).
Function name stands for "relative cubic to".
### Parameters
-<table> <tr> <td><a name='SkPath_rCubicTo_x1'><code><strong>x1</strong></code></a></td>
+<table> <tr> <td><a name='SkPath_rCubicTo_dx1'><code><strong>dx1</strong></code></a></td>
<td>offset from <a href='#Last_Point'>Last Point</a> to first <a href='#Cubic'>Cubic</a> control on x-axis</td>
</tr>
- <tr> <td><a name='SkPath_rCubicTo_y1'><code><strong>y1</strong></code></a></td>
+ <tr> <td><a name='SkPath_rCubicTo_dy1'><code><strong>dy1</strong></code></a></td>
<td>offset from <a href='#Last_Point'>Last Point</a> to first <a href='#Cubic'>Cubic</a> control on y-axis</td>
</tr>
- <tr> <td><a name='SkPath_rCubicTo_x2'><code><strong>x2</strong></code></a></td>
+ <tr> <td><a name='SkPath_rCubicTo_dx2'><code><strong>dx2</strong></code></a></td>
<td>offset from <a href='#Last_Point'>Last Point</a> to second <a href='#Cubic'>Cubic</a> control on x-axis</td>
</tr>
- <tr> <td><a name='SkPath_rCubicTo_y2'><code><strong>y2</strong></code></a></td>
+ <tr> <td><a name='SkPath_rCubicTo_dy2'><code><strong>dy2</strong></code></a></td>
<td>offset from <a href='#Last_Point'>Last Point</a> to second <a href='#Cubic'>Cubic</a> control on y-axis</td>
</tr>
- <tr> <td><a name='SkPath_rCubicTo_x3'><code><strong>x3</strong></code></a></td>
+ <tr> <td><a name='SkPath_rCubicTo_dx3'><code><strong>dx3</strong></code></a></td>
<td>offset from <a href='#Last_Point'>Last Point</a> to <a href='#Cubic'>Cubic</a> end on x-axis</td>
</tr>
- <tr> <td><a name='SkPath_rCubicTo_y3'><code><strong>y3</strong></code></a></td>
+ <tr> <td><a name='SkPath_rCubicTo_dy3'><code><strong>dy3</strong></code></a></td>
<td>offset from <a href='#Last_Point'>Last Point</a> to <a href='#Cubic'>Cubic</a> end on y-axis</td>
</tr>
</table>