Condense embedded formulas.
Bookmaker delimits formulas and equations to allow
representing variables and symbols without tripping
up reference lookup, spell checking, and comment
generation.
Before, formulas were represented with:
some text
#Formula
(x + y, 0)
##
, and more text
This made it difficult to know when spacing should
be preserved before and after the formula. Now,
formulas are represented with:
some text #Formula # (x + y, 0) ##, and more text
The presence or absence of a space between ## and ,
is now significant (before it was not).
Also, formulas are bracketed by <code> in markdown
generation, so that variables stand out better.
See:
https://skia.org/user/api/SkBlendMode_Reference?cl=152781#Dst_Out
for an example.
Also fixed 100 column offenders and added a code
check to identify them. For the moment, 100 column
offenders are outed with SkDebugf but their presence
does not cause bookmaker to fail.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=152781
Bug: skia:6898
Change-Id: If92a65a234f5d616bf4485984a8d219a6f04821a
Reviewed-on: https://skia-review.googlesource.com/152781
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/SkBitmap_Reference.bmh b/docs/SkBitmap_Reference.bmh
index 433743b..d17dd64 100644
--- a/docs/SkBitmap_Reference.bmh
+++ b/docs/SkBitmap_Reference.bmh
@@ -465,12 +465,8 @@
#Method int width() const
#In Property
#Line # returns pixel column count ##
-Returns pixel count in each row. Should be equal or less than:
-
-#Formula
-rowBytes() / info().bytesPerPixel()
-##
-.
+Returns pixel count in each row. Should be equal or less than
+#Formula # rowBytes() / info().bytesPerPixel() ##.
May be less than pixelRef().width(). Will not exceed pixelRef().width() less
pixelRefOrigin().fX.
@@ -841,11 +837,7 @@
#In Property
#Line # returns interval between rows in bytes ##
Returns row bytes, the interval from one pixel row to the next. Row bytes
-is at least as large as
-#Formula
-width() * info().bytesPerPixel()
-##
-.
+is at least as large as: #Formula # width() * info().bytesPerPixel() ##.
Returns zero if colorType is kUnknown_SkColorType, or if row bytes supplied to
setInfo is not large enough to hold a row of pixels.
@@ -2769,15 +2761,7 @@
srcX and srcY may be negative to copy only top or left of source. Returns
false if width() or height() is zero or negative.
-Returns false if
-#Formula
-abs(srcX) >= Bitmap width()
-##
-, or if
-#Formula
-abs(srcY) >= Bitmap height()
-##
-.
+Returns false if #Formula # abs(srcX) >= Bitmap width() ##, or if #Formula # abs(srcY) >= Bitmap height() ##.
#Param dstInfo destination width, height, Color_Type, Alpha_Type, Color_Space ##
#Param dstPixels destination pixel storage ##
@@ -2844,15 +2828,7 @@
srcX and srcY may be negative to copy only top or left of source. Returns
false if width() or height() is zero or negative.
-Returns false if
-#Formula
-abs(srcX) >= Bitmap width()
-##
-, or if
-#Formula
-abs(srcY) >= Bitmap height()
-##
-.
+Returns false if #Formula # abs(srcX) >= Bitmap width() ##, or if #Formula # abs(srcY) >= Bitmap height() ##.
#Param dst destination Pixmap: Image_Info, pixels, row bytes ##
#Param srcX column index whose absolute value is less than width() ##
@@ -2958,15 +2934,7 @@
dstX and dstY may be negative to copy only top or left of source. Returns
false if width() or height() is zero or negative.
-Returns false if
-#Formula
-abs(dstX) >= Bitmap width()
-##
-, or if
-#Formula
-abs(dstY) >= Bitmap height()
-##
-.
+Returns false if #Formula # abs(dstX) >= Bitmap width() ##, or if #Formula # abs(dstY) >= Bitmap height() ##.
#Param src source Pixmap: Image_Info, pixels, row bytes ##
#Param dstX column index whose absolute value is less than width() ##
diff --git a/docs/SkBlendMode_Reference.bmh b/docs/SkBlendMode_Reference.bmh
index 3e4aa4c..0d475b1 100644
--- a/docs/SkBlendMode_Reference.bmh
+++ b/docs/SkBlendMode_Reference.bmh
@@ -356,11 +356,8 @@
#Subtopic Clear
#Line # makes destination pixels transparent ##
-SkBlendMode::kClear sets destination to:
-#Formula
-[0, 0]
-##
-. Use SkBlendMode::kClear to initialize a buffer to fully transparent pixels when
+SkBlendMode::kClear sets destination to: #Formula # [0, 0] ##.
+Use SkBlendMode::kClear to initialize a buffer to fully transparent pixels when
creating a mask with irregular edges.
#Example
@@ -385,15 +382,9 @@
#Subtopic Src
#Line # replaces destination, ignoring Alpha ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component
-##
-; SkBlendMode::kSrc sets destination to:
-#Formula
-[Sa, Sc]
-##
-. Use SkBlendMode::kSrc to copy one buffer to another. All pixels are copied,
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component;
+SkBlendMode::kSrc sets destination to: #Formula # [Sa, Sc] ##.
+Use SkBlendMode::kSrc to copy one buffer to another. All pixels are copied,
regardless of source and destination Alpha values. As a parameter to
SkCanvas::drawAtlas, selects sprites and ignores colors.
#Example
@@ -418,15 +409,9 @@
#Subtopic Dst
#Line # preserves destination, ignoring source ##
-Given:
-#Formula
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kDst preserves destination set to:
-#Formula
-[Da, Dc]
-##
-. Setting Paint Blend_Mode to SkBlendMode::kDst causes drawing with
+Given: #Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+ SkBlendMode::kDst preserves destination set to: #Formula # [Da, Dc] ##.
+Setting Paint Blend_Mode to SkBlendMode::kDst causes drawing with
Paint to have no effect. As a parameter to SkCanvas::drawAtlas,
selects colors and ignores sprites.
#Example
@@ -442,16 +427,10 @@
#Subtopic Src_Over
#Line # blends source with destination ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kSrcOver replaces destination with:
-#Formula
-[Sa + Da * (1 - Sa), Sc + Dc * (1 - Sa)]
-##
-, drawing source over destination. SkBlendMode::kSrcOver is the default for Paint.
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kSrcOver replaces destination with: #Formula # [Sa + Da * (1 - Sa), Sc + Dc * (1 - Sa)] ##,
+drawing source over destination. SkBlendMode::kSrcOver is the default for Paint.
SkBlendMode::kSrcOver cannot make destination more transparent; the result will
be at least as opaque as the less transparent of source and original destination.
@@ -475,16 +454,10 @@
#Subtopic Dst_Over
#Line # blends destination with source ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kDstOver replaces destination with:
-#Formula
-[Da + Sa * (1 - Da), Dc + Sc * (1 - Da)]
-##
-, drawing destination over source. Has no effect destination if is opaque.
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kDstOver replaces destination with: #Formula # [Da + Sa * (1 - Da), Dc + Sc * (1 - Da)] ##,
+drawing destination over source. Has no effect destination if is opaque.
#Example
SkColor colors[] = { SK_ColorRED, SK_ColorBLUE };
SkPoint horz[] = { { 0, 0 }, { 256, 0 } };
@@ -505,15 +478,10 @@
#Subtopic Src_In
#Line # source trimmed inside destination ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component, Da as destination Alpha
-##
-; SkBlendMode::kSrcIn replaces destination with:
-#Formula
-[Sa * Da, Sc * Da]
-##
-, drawing source with destination opacity.
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha;
+SkBlendMode::kSrcIn replaces destination with: #Formula # [Sa * Da, Sc * Da] ##,
+drawing source with destination opacity.
#Example
SkColor colors[] = { SK_ColorRED, SK_ColorBLUE };
SkPoint horz[] = { { 0, 0 }, { 256, 0 } };
@@ -534,15 +502,10 @@
#Subtopic Dst_In
#Line # destination trimmed by source ##
-Given:
-#Formula
-Sa as source Alpha, Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kDstIn replaces destination with:
-#Formula
-[Da * Sa, Dc * Sa]
-##
-, scaling destination Alpha by source Alpha. Resulting
+Given: #Formula # Sa ## as source Alpha,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kDstIn replaces destination with: #Formula # [Da * Sa, Dc * Sa] ##,
+scaling destination Alpha by source Alpha. Resulting
destination is visible where source is visible.
#Example
SkColor colors[] = { SK_ColorRED, SK_ColorBLUE };
@@ -564,15 +527,10 @@
#Subtopic Src_Out
#Line # source trimmed outside destination ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component, Da as destination Alpha
-##
-; SkBlendMode::kSrcOut replaces destination with:
-#Formula
-[Sa * (1 - Da), Sc * (1 - Da)]
-##
-, drawing source fully where destination Alpha is zero. Is destination
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha;
+SkBlendMode::kSrcOut replaces destination with: #Formula # [Sa * (1 - Da), Sc * (1 - Da)] ##,
+drawing source fully where destination Alpha is zero. Is destination
is opaque, has no effect.
#Example
SkColor colors[] = { SK_ColorRED, SK_ColorBLUE };
@@ -594,15 +552,10 @@
#Subtopic Dst_Out
#Line # destination trimmed outside source ##
-Given:
-#Formula
-Sa as source Alpha, Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kDstOut replaces destination with:
-#Formula
-[Da * (1 - Sa), Dc * (1 - Sa)]
-##
-, scaling destination Alpha by source transparency. Resulting
+Given: #Formula # Sa ## as source Alpha,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kDstOut replaces destination with: #Formula # [Da * (1 - Sa), Dc * (1 - Sa)] ##,
+scaling destination Alpha by source transparency. Resulting
destination is visible where source is transparent. If source is transparent,
has no effect.
#Example
@@ -625,16 +578,10 @@
#Subtopic Src_Atop
#Line # source inside destination over destination ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kSrcATop replaces destination with:
-#Formula
-[Da, Sc * Da + Dc * (1 - Sa)]
-##
-, replacing opaque destination with opaque source. If source or destination
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kSrcATop replaces destination with: #Formula # [Da, Sc * Da + Dc * (1 - Sa)] ##,
+replacing opaque destination with opaque source. If source or destination
is transparent, has no effect.
#Example
SkColor colors[] = { SK_ColorRED, SK_ColorBLUE };
@@ -656,16 +603,10 @@
#Subtopic Dst_Atop
#Line # destination inside source over source ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kDstATop replaces destination with:
-#Formula
-[Sa, Dc * Sa + Sc * (1 - Da)]
-##
-, making destination transparent where source is transparent.
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kDstATop replaces destination with: #Formula # [Sa, Dc * Sa + Sc * (1 - Da)] ##,
+making destination transparent where source is transparent.
#Example
SkColor colors[] = { SK_ColorRED, SK_ColorBLUE };
SkPoint horz[] = { { 0, 0 }, { 256, 0 } };
@@ -686,16 +627,11 @@
#Subtopic Xor
#Line # each of source and destination trimmed outside the other ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kXor replaces destination with:
-#Formula
-[Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa)]
-##
-, exchanging the transparency of the source and destination.
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kXor replaces destination with:
+#Formula # [Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa)] ##,
+exchanging the transparency of the source and destination.
#Example
SkPaint paint;
paint.setBlendMode(SkBlendMode::kXor);
@@ -712,16 +648,10 @@
#Subtopic Plus
#Line # sum of colors ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kPlus replaces destination with:
-#Formula
-[Sa + Da, Sc + Dc]
-##
-, summing the Alpha and Color components.
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kPlus replaces destination with: #Formula # [Sa + Da, Sc + Dc] ##,
+summing the Alpha and Color components.
#Example
canvas->drawColor(SK_ColorBLACK);
SkPaint paint;
@@ -739,16 +669,10 @@
#Subtopic Modulate
#Line # product of Premultiplied colors; darkens destination ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kModulate replaces destination with:
-#Formula
-[Sa * Da, Sc * Dc]
-##
-, scaling Alpha and Color components by the lesser of the values.
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kModulate replaces destination with: #Formula # [Sa * Da, Sc * Dc] ##,
+scaling Alpha and Color components by the lesser of the values.
SkBlendMode::kModulate differs from SkBlendMode::kMultiply in two ways.
SkBlendMode::kModulate like SkBlendMode::kSrcATop alters the destination inside
the destination area, as if the destination Alpha defined the boundaries of a
@@ -787,16 +711,10 @@
#Subtopic Screen
#Line # multiply inverse of pixels, inverting result; brightens destination ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kScreen replaces destination with:
-#Formula
-[Sa + Da - Sa * Da, Sc + Dc - Sc * Dc]
-##
-.
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kScreen replaces destination with: #Formula # [Sa + Da - Sa * Da, Sc + Dc - Sc * Dc] ##.
+
#Example
SkColor colors[] = { SK_ColorRED, SK_ColorBLUE };
SkPoint horz[] = { { 0, 0 }, { 256, 0 } };
@@ -817,17 +735,11 @@
#Subtopic Overlay
#Line # multiply or screen, depending on destination ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kOverlay replaces destination with:
-#Formula
-[Sa + Da - Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa) +
- (2 * Dc <= Da ? 2 * Sc * Dc : Sa * Da - 2 * (Da - Dc) * (Sa - Sc))]
-##
-.
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kOverlay replaces destination with:
+#Formula # [Sa + Da - Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa) +
+ (2 * Dc <= Da ? 2 * Sc * Dc : Sa * Da - 2 * (Da - Dc) * (Sa - Sc))] ##.
#Example
SkColor colors[] = { SK_ColorRED, SK_ColorBLUE };
SkPoint horz[] = { { 0, 0 }, { 256, 0 } };
@@ -848,16 +760,11 @@
#Subtopic Darken
#Line # darker of source and destination ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kDarken replaces destination with:
-#Formula
-[Sa + Da - Sa * Da, Sc + Dc - max(Sc * Da, Dc * Sa)]
-##
-. SkBlendMode::kDarken does not make an image darker; it replaces the destination
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kDarken replaces destination with:
+#Formula # [Sa + Da - Sa * Da, Sc + Dc - max(Sc * Da, Dc * Sa)] ##.
+SkBlendMode::kDarken does not make an image darker; it replaces the destination
component with source if source is darker.
#Example
#Image 3
@@ -874,16 +781,11 @@
#Subtopic Lighten
#Line # lighter of source and destination ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kLighten replaces destination with:
-#Formula
-[Sa + Da - Sa * Da, Sc + Dc - min(Sc * Da, Dc * Sa)]
-##
-. SkBlendMode::kDarken does not make an image lighter; it replaces the destination
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kLighten replaces destination with:
+#Formula # [Sa + Da - Sa * Da, Sc + Dc - min(Sc * Da, Dc * Sa)] ##.
+SkBlendMode::kDarken does not make an image lighter; it replaces the destination
component with source if source is lighter.
#Example
#Image 3
@@ -900,17 +802,12 @@
#Subtopic Color_Dodge
#Line # brighten destination to reflect source ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kColorDodge replaces destination with:
-#Formula
-[Sa + Da - Sa * Da, Dc == 0 ? Sc * (1 - Da) : Sc == Sa ? Sc + Da * (1 - Sa) :
- Sa * min(Da, Dc * Sa / (Sa - Sc)) + Sc * (1 - Da) + Da * (1 - Sa)]
-##
-, making destination brighter to reflect source.
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kColorDodge replaces destination with:
+#Formula # [Sa + Da - Sa * Da, Dc == 0 ? Sc * (1 - Da) : Sc == Sa ? Sc + Da * (1 - Sa) :
+ Sa * min(Da, Dc * Sa / (Sa - Sc)) + Sc * (1 - Da) + Da * (1 - Sa)] ##,
+making destination brighter to reflect source.
#Example
#Image 3
canvas->drawImage(image, 0, 0);
@@ -921,17 +818,12 @@
#Subtopic Color_Burn
#Line # darken destination to reflect source ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kColorBurn replaces destination with:
-#Formula
-[Sa + Da - Sa * Da, Dc == Da ? Dc + Sc * (1 - Da) : Sc == 0 ? Da * (1 - Sa) :
- Sa * (Da - min(Da, (Da - Dc) * Sa / Sc)) + Sc * (1 - Da) + Da * (1 - Sa)]
-##
-, making destination darker to reflect source.
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kColorBurn replaces destination with:
+#Formula # [Sa + Da - Sa * Da, Dc == Da ? Dc + Sc * (1 - Da) : Sc == 0 ? Da * (1 - Sa) :
+ Sa * (Da - min(Da, (Da - Dc) * Sa / Sc)) + Sc * (1 - Da) + Da * (1 - Sa)] ##,
+making destination darker to reflect source.
#Example
#Image 3
canvas->drawImage(image, 0, 0);
@@ -942,17 +834,12 @@
#Subtopic Hard_Light
#Line # multiply or screen, depending on source ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kHardLight replaces destination with:
-#Formula
-[Sa + Da - Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa) +
- 2 * Sc <= Sa ? 2 * Sc * Dc : Sa * Da - 2 * (Da - Dc) * (Sa - Sc)]
-##
-, making destination lighter or darker, depending on source.
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kHardLight replaces destination with:
+#Formula # [Sa + Da - Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa) +
+ 2 * Sc <= Sa ? 2 * Sc * Dc : Sa * Da - 2 * (Da - Dc) * (Sa - Sc)] ##,
+making destination lighter or darker, depending on source.
#Example
#Image 3
canvas->drawImage(image, 0, 0);
@@ -968,19 +855,13 @@
#Subtopic Soft_Light
#Line # lighten or darken, depending on source ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-where m = Da > 0 ? Dc / Da : 0
-##
-; SkBlendMode::kSoftLight replaces destination with:
-#Formula
-[Sa + Da - Sa * Da, Sc / Da + Dc / Sa +
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+where #Formula # m = Da > 0 ? Dc / Da : 0 ##;
+SkBlendMode::kSoftLight replaces destination with: #Formula # [Sa + Da - Sa * Da, Sc / Da + Dc / Sa +
(2 * Sc <= Sa ? Dc * (Sa + (2 * Sc - Sa) * (1 - m)) : Dc * Sa + Da * (2 * Sc - Sa) *
- (4 * Dc <= Da ? (16 * m * m + 4 * m) * (m - 1) + 7 * m : sqrt(m) - m))]\
-##
-, making destination lighter or darker, depending on source.
+ (4 * Dc <= Da ? (16 * m * m + 4 * m) * (m - 1) + 7 * m : sqrt(m) - m))] ##,
+making destination lighter or darker, depending on source.
#Example
#Image 3
const SkColor colors[] = { 0xFFFFFFFF, 0x3FFFFFFF };
@@ -995,16 +876,11 @@
#Subtopic Difference
#Line # subtract darker from lighter with higher contrast ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kDifference replaces destination with:
-#Formula
-[Sa + Da - Sa * Da, Sc + Dc - 2 * min(Sc * Da, Dc * Sa)]
-##
-, replacing destination with lighter less darker.
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kDifference replaces destination with:
+#Formula # [Sa + Da - Sa * Da, Sc + Dc - 2 * min(Sc * Da, Dc * Sa)] ##,
+replacing destination with lighter less darker.
#Example
#Image 5
canvas->drawImage(image, 0, 0);
@@ -1025,16 +901,11 @@
#Subtopic Exclusion
#Line # subtract darker from lighter with lower contrast ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kExclusion replaces destination with:
-#Formula
-[Sa + Da - Sa * Da, Sc + Dc - 2 * Sc * Dc]
-##
-, replacing destination with lighter less darker, ignoring Alpha.
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kExclusion replaces destination with:
+#Formula # [Sa + Da - Sa * Da, Sc + Dc - 2 * Sc * Dc] ##,
+replacing destination with lighter less darker, ignoring Alpha.
#Example
#Image 5
canvas->drawImage(image, 0, 0);
@@ -1055,16 +926,11 @@
#Subtopic Multiply
#Line # multiply source with destination, darkening image ##
-Given:
-#Formula
-Sa as source Alpha, Sc as source Color component,
-Da as destination Alpha, Dc as destination Color component
-##
-; SkBlendMode::kMultiply replaces destination with:
-#Formula
-[Sa + Da - Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa) + Sc * Dc]
-##
-, the product of Unpremultiplied source and destination.
+Given: #Formula # Sa ## as source Alpha, #Formula # Sc ## as source Color component,
+#Formula # Da ## as destination Alpha, #Formula # Dc ## as destination Color component;
+SkBlendMode::kMultiply replaces destination with:
+#Formula # [Sa + Da - Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa) + Sc * Dc] ##,
+the product of Unpremultiplied source and destination.
SkBlendMode::kMultiply makes the image darker.
#Example
#Image 5
@@ -1086,16 +952,11 @@
#Subtopic Hue
#Line # hue of source with saturation and luminosity of destination ##
-Given:
-#Formula
-Sa as source Alpha, S as source Color,
-Da as destination Alpha, D as destination Color
-##
-; SkBlendMode::kHue replaces destination with:
-#Formula
-[Sa + Da - Sa * Da, SetLuminosity(SetSaturation(S, Saturation(D)), Luminosity(D))]
-##
-, source hue, leaving destination luminosity and saturation unchanged.
+Given: #Formula # Sa ## as source Alpha, #Formula # S ## as source Color,
+#Formula # Da ## as destination Alpha, #Formula # D ## as destination Color;
+SkBlendMode::kHue replaces destination with:
+#Formula # [Sa + Da - Sa * Da, SetLuminosity(SetSaturation(S, Saturation(D)), Luminosity(D))] ##,
+source hue, leaving destination luminosity and saturation unchanged.
#Example
#Image 3
canvas->drawImage(image, 0, 0);
@@ -1105,16 +966,11 @@
#Subtopic Saturation
#Line # saturation of source with hue and luminosity of destination ##
-Given:
-#Formula
-Sa as source Alpha, S as source Color,
-Da as destination Alpha, D as destination Color
-##
-; SkBlendMode::kHue replaces destination with:
-#Formula
-[Sa + Da - Sa * Da, SetLuminosity(SetSaturation(D, Saturation(S)), Luminosity(D))]
-##
-, source hue, leaving destination luminosity and saturation unchanged.
+Given: #Formula # Sa ## as source Alpha, #Formula # S ## as source Color,
+#Formula # Da ## as destination Alpha, #Formula # D ## as destination Color;
+SkBlendMode::kHue replaces destination with:
+#Formula # [Sa + Da - Sa * Da, SetLuminosity(SetSaturation(D, Saturation(S)), Luminosity(D))] ##,
+source hue, leaving destination luminosity and saturation unchanged.
#Example
#Image 3
canvas->drawImage(image, 0, 0);
@@ -1124,16 +980,11 @@
#Subtopic Color
#Line # hue and saturation of source with luminosity of destination ##
-Given:
-#Formula
-Sa as source Alpha, S as source Color,
-Da as destination Alpha, D as destination Color
-##
-; SkBlendMode::kColor replaces destination with:
-#Formula
-[Sa + Da - Sa * Da, SetLuminosity(S, Luminosity(D))]
-##
-, source hue and saturation, leaving destination luminosity unchanged.
+Given: #Formula # Sa ## as source Alpha, #Formula # S ## as source Color,
+#Formula # Da ## as destination Alpha, #Formula # D ## as destination Color;
+SkBlendMode::kColor replaces destination with:
+#Formula # [Sa + Da - Sa * Da, SetLuminosity(S, Luminosity(D))] ##,
+source hue and saturation, leaving destination luminosity unchanged.
#Example
#Image 3
canvas->drawImage(image, 0, 0);
@@ -1143,16 +994,11 @@
#Subtopic Luminosity
#Line # luminosity of source with hue and saturation of destination ##
-Given:
-#Formula
-Sa as source Alpha, S as source Color,
-Da as destination Alpha, D as destination Color
-##
-; SkBlendMode::kLuminosity replaces destination with:
-#Formula
-[Sa + Da - Sa * Da, SetLuminosity(D, Luminosity(S))]
-##
-, source luminosity, leaving destination hue and saturation unchanged.
+Given: #Formula # Sa ## as source Alpha, #Formula # S ## as source Color,
+#Formula # Da ## as destination Alpha, #Formula # D ## as destination Color;
+SkBlendMode::kLuminosity replaces destination with:
+#Formula # [Sa + Da - Sa * Da, SetLuminosity(D, Luminosity(S))] ##,
+source luminosity, leaving destination hue and saturation unchanged.
#Example
#Image 3
canvas->drawImage(image, 0, 0);
diff --git a/docs/SkCanvas_Reference.bmh b/docs/SkCanvas_Reference.bmh
index 85faecc..c9ceaab 100644
--- a/docs/SkCanvas_Reference.bmh
+++ b/docs/SkCanvas_Reference.bmh
@@ -4850,11 +4850,7 @@
#Member const RectType* fRectTypes
#Line # array of fill types ##
Optional array of fill types, one per rectangular grid entry:
- array length must be
- #Formula
- (fXCount + 1) * (fYCount + 1)
- ##
- .
+ array length must be #Formula # (fXCount + 1) * (fYCount + 1) ##.
Each RectType is one of: kDefault, kTransparent, kFixedColor.
@@ -4883,11 +4879,7 @@
#Member const SkColor* fColors
#Line # array of colors ##
Optional array of colors, one per rectangular grid entry.
- Array length must be
- #Formula
- (fXCount + 1) * (fYCount + 1)
- ##
- .
+ Array length must be #Formula # (fXCount + 1) * (fYCount + 1) ##.
Array entries correspond to the rectangular grid entries, ascending
left to right, then top to bottom.
diff --git a/docs/SkIPoint_Reference.bmh b/docs/SkIPoint_Reference.bmh
index 2ed3b7b..77c1084 100644
--- a/docs/SkIPoint_Reference.bmh
+++ b/docs/SkIPoint_Reference.bmh
@@ -196,11 +196,7 @@
#Method void operator+=(const SkIVector& v)
#Line # adds IVector to IPoint ##
-Offsets IPoint by IVector v. Sets IPoint to
-#Formula
-(fX + v.fX, fY + v.fY)
-##
-.
+Offsets IPoint by IVector v. Sets IPoint to #Formula # (fX + v.fX, fY + v.fY) ##.
#Param v IVector to add ##
@@ -235,11 +231,7 @@
#Method void operator-=(const SkIVector& v)
#Line # subtracts IVector from IPoint ##
-Subtracts IVector v from IPoint. Sets IPoint to:
-#Formula
-(fX - v.fX, fY - v.fY)
-##
-.
+Subtracts IVector v from IPoint. Sets IPoint to: #Formula # (fX - v.fX, fY - v.fY) ##.
#Param v IVector to subtract ##
@@ -361,11 +353,7 @@
#Method SkIVector operator-(const SkIPoint& a, const SkIPoint& b)
#Line # returns IVector between IPoints ##
-Returns IVector from b to a; computed as
-#Formula
-(a.fX - b.fX, a.fY - b.fY)
-##
-.
+Returns IVector from b to a; computed as #Formula # (a.fX - b.fX, a.fY - b.fY) ##.
Can also be used to subtract IVector from IVector, returning IVector.
@@ -406,10 +394,7 @@
#Line # returns IPoint offset by IVector ##
Returns IPoint resulting from IPoint a offset by IVector b, computed as:
-#Formula
-(a.fX + b.fX, a.fY + b.fY)
-##
-.
+#Formula # (a.fX + b.fX, a.fY + b.fY) ##.
Can also be used to offset IPoint b by IVector a, returning IPoint.
Can also be used to add IVector to IVector, returning IVector.
diff --git a/docs/SkIRect_Reference.bmh b/docs/SkIRect_Reference.bmh
index bcca39e..9c8d292 100644
--- a/docs/SkIRect_Reference.bmh
+++ b/docs/SkIRect_Reference.bmh
@@ -186,12 +186,8 @@
#In Constructor
#Line # constructs from int input returning (x, y, width, height) ##
-Returns constructed IRect set to:
-#Formula
-(x, y, x + w, y + h)
-##
-. Does not validate input;
-w or h may be negative.
+Returns constructed IRect set to: #Formula # (x, y, x + w, y + h) ##.
+Does not validate input; w or h may be negative.
#Param x stored in fLeft ##
#Param y stored in fTop ##
@@ -740,12 +736,8 @@
#In Set
#Line # sets to (x, y, width, height) ##
-Sets IRect to:
-#Formula
-(x, y, x + width, y + height)
-##
-. Does not validate input;
-width or height may be negative.
+Sets IRect to: #Formula # (x, y, x + width, y + height) ##.
+Does not validate input; width or height may be negative.
#Param x stored in fLeft ##
#Param y stored in fTop ##
@@ -1027,12 +1019,8 @@
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:
-
-#Formula
-(max(a.fLeft, b.fLeft), max(a.fTop, b.fTop),
- min(a.fRight, b.fRight), min(a.fBottom, b.fBottom))
-##
-.
+#Formula # (max(a.fLeft, b.fLeft), max(a.fTop, b.fTop),
+ min(a.fRight, b.fRight), min(a.fBottom, b.fBottom)) ##.
The intersection is only meaningful if the resulting IRect is not empty and
describes an area: fLeft is less than fRight, and fTop is less than fBottom.
@@ -1080,18 +1068,10 @@
#In Intersection
#Line # returns true if IPoint (x, y) is equal or inside ##
-Returns true if:
-#Formula
-fLeft <= x < fRight && fTop <= y < fBottom
-##
-.
+Returns true if: #Formula # fLeft <= x < fRight && fTop <= y < fBottom ##.
Returns false if IRect is empty.
-Considers input to describe constructed IRect:
-#Formula
-(x, y, x + 1, y + 1)
-##
-and
+Considers input to describe constructed IRect: #Formula # (x, y, x + 1, y + 1) ## and
returns true if constructed area is completely enclosed by IRect area.
#Param x test IPoint x-coordinate ##
diff --git a/docs/SkImage_Reference.bmh b/docs/SkImage_Reference.bmh
index 39cc4aa..6562a9f 100644
--- a/docs/SkImage_Reference.bmh
+++ b/docs/SkImage_Reference.bmh
@@ -1444,15 +1444,7 @@
srcX and srcY may be negative to copy only top or left of source. Returns
false if width() or height() is zero or negative.
-Returns false if
-#Formula
-abs(srcX) >= Image width()
-##
-, or if
-#Formula
-abs(srcY) >= Image height()
-##
-.
+Returns false if #Formula # abs(srcX) >= Image width() ##, or if #Formula # abs(srcY) >= Image height() ##.
If cachingHint is kAllow_CachingHint, pixels may be retained locally.
If cachingHint is kDisallow_CachingHint, pixels are not added to the local cache.
@@ -1518,15 +1510,7 @@
srcX and srcY may be negative to copy only top or left of source. Returns
false if width() or height() is zero or negative.
-Returns false if
-#Formula
-abs(srcX) >= Image width()
-##
-, or if
-#Formula
-abs(srcY) >= Image height()
-##
-.
+Returns false if #Formula # abs(srcX) >= Image width() ##, or if #Formula # abs(srcY) >= Image height() ##.
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/docs/SkMatrix_Reference.bmh b/docs/SkMatrix_Reference.bmh
index 7a17e42..046d104 100644
--- a/docs/SkMatrix_Reference.bmh
+++ b/docs/SkMatrix_Reference.bmh
@@ -2453,10 +2453,7 @@
#In Set
#In Operator
#Line # post-multiplies Matrix by inverse scale ##
-Sets Matrix to Matrix constructed from scaling by
-#Formula
-(1/divx, 1/divy)
-##
+Sets Matrix to Matrix constructed from scaling by #Formula # (1/divx, 1/divy) ##,
about pivot point (px, py), multiplied by Matrix.
Returns false if either divx or divy is zero.
@@ -4207,14 +4204,9 @@
unchanged if Matrix contains perspective; scale factors are not finite, or
are nearly zero.
-On success
+On success: #Formula # Matrix = scale * Remaining ##.
-#Formula
-Matrix = scale * Remaining
-##
-.
-
-#Param scale axes scaling factors; may be nullptr ##
+#Param scale axes scaling factors; may be nullptr ##
#Param remaining Matrix without scaling; may be nullptr ##
#Return true if scale can be computed ##
diff --git a/docs/SkPaint_Reference.bmh b/docs/SkPaint_Reference.bmh
index a5a62f6..90e2567 100644
--- a/docs/SkPaint_Reference.bmh
+++ b/docs/SkPaint_Reference.bmh
@@ -784,12 +784,7 @@
Dither can be enabled by default by setting SkPaintDefaults_Flags to kDither_Flag
at compile time.
-Some platform implementations may ignore dithering. Set
-
-#Formula
-SK_IGNORE_GPU_DITHER
-##
-
+Some platform implementations may ignore dithering. Set #Formula # SK_IGNORE_GPU_DITHER ##
to ignore Dither on GPU_Surface.
#Example
@@ -2123,11 +2118,8 @@
If the miter at a corner exceeds this limit, kMiter_Join
is replaced with kBevel_Join.
-Miter_Limit can be computed from the corner angle:
-
-#Formula
- miter limit = 1 / sin ( angle / 2 )
-#Formula ##
+Miter_Limit can be computed from the corner angle using:
+#Formula # miter limit = 1 / sin ( angle / 2 ) ##.
Miter_Limit default value is 4.
The default may be changed at compile time by setting SkPaintDefaults_MiterLimit
diff --git a/docs/SkPath_Reference.bmh b/docs/SkPath_Reference.bmh
index 9c77792..fdb755e 100644
--- a/docs/SkPath_Reference.bmh
+++ b/docs/SkPath_Reference.bmh
@@ -658,10 +658,7 @@
Interpolates between Paths with Point_Array of equal size.
Copy Verb_Array and Weights to out, and set out Point_Array to a weighted
average of this Point_Array and ending Point_Array, using the formula:
-#Formula
-(Path Point * weight) + ending Point * (1 - weight)
-##
-.
+#Formula # (Path Point * weight) + ending Point * (1 - weight) ##.
weight is most useful when between zero (ending Point_Array) and
one (this Point_Array); will work with values outside of this
@@ -2599,11 +2596,7 @@
#Example
#Description
-A 90 degree circular arc has the weight
-#Formula
-1 / sqrt(2)
-##
-.
+A 90 degree circular arc has the weight #Formula # 1 / sqrt(2) ##.
##
void draw(SkCanvas* canvas) {
const char* verbNames[] = { "move", "line", "quad", "conic", "cubic", "close", "done" };
@@ -3490,14 +3483,16 @@
#In Build
#In Arc
-Appends Arc to Path. Arc is implemented by one or more Conic weighted to describe part of Oval
-with radii (r.fX, r.fY) rotated by xAxisRotate degrees. Arc curves from last Path Point to
-(xy.fX, xy.fY), choosing one of four possible routes: clockwise or counterclockwise,
+Appends Arc to Path. Arc is implemented by one or more Conic weighted to describe
+part of Oval with radii (r.fX, r.fY) rotated by xAxisRotate degrees. Arc curves
+from last Path Point to (xy.fX, xy.fY), choosing one of four possible routes:
+clockwise or counterclockwise,
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 Path Point equals (x, y). arcTo scales radii r to fit last Path Point and
-xy if both are greater than zero but too small to describe an arc.
+Arc sweep is always less than 360 degrees. arcTo appends Line to xy if either
+radii are zero, or if last Path Point equals (x, y). arcTo scales radii r to fit
+last Path Point 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
@@ -3541,11 +3536,7 @@
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
+#Formula # (x0 + dx, y0 + 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).
@@ -3762,10 +3753,7 @@
Maximum Quad count is 2 to the pow2.
Every third point in array shares last Point of previous Quad and first Point of
next Quad. Maximum pts storage size is given by:
-#Formula
-(1 + 2 * (1 << pow2)) * sizeof(SkPoint)
-##
-.
+#Formula # (1 + 2 * (1 << pow2)) * sizeof(SkPoint) ##.
Returns Quad count used the approximation, which may be smaller
than the number requested.
@@ -4168,11 +4156,7 @@
#Line # adds one Contour containing Circle ##
Adds Circle centered at (x, y) of size radius to Path, appending kMove_Verb,
-four kConic_Verb, and kClose_Verb. Circle begins at:
-#Formula
-(x + radius, y)
-##
-, continuing
+four kConic_Verb, and kClose_Verb. Circle begins at: #Formula # (x + radius, y) ##, continuing
clockwise if dir is kCW_Direction, and counterclockwise if dir is kCCW_Direction.
Has no effect if radius is zero or negative.
diff --git a/docs/SkPixmap_Reference.bmh b/docs/SkPixmap_Reference.bmh
index 051a6a1..9dbb1a5 100644
--- a/docs/SkPixmap_Reference.bmh
+++ b/docs/SkPixmap_Reference.bmh
@@ -322,11 +322,7 @@
#In Image_Info_Access
#Line # returns interval between rows in bytes ##
Returns row bytes, the interval from one pixel row to the next. Row bytes
-is at least as large as:
-#Formula
-width() * info().bytesPerPixel()
-##
-.
+is at least as large as: #Formula # width() * info().bytesPerPixel() ##.
Returns zero if colorType is kUnknown_SkColorType.
It is up to the Bitmap creator to ensure that row bytes is a useful value.
@@ -393,10 +389,7 @@
#Line # returns pixel column count ##
Returns pixel count in each pixel row. Should be equal or less than:
-#Formula
-rowBytes() / info().bytesPerPixel()
-##
-.
+#Formula # rowBytes() / info().bytesPerPixel() ##.
#Return pixel width in Image_Info ##
@@ -1579,14 +1572,7 @@
srcX and srcY may be negative to copy only top or left of source. Returns
false if Pixmap width() or height() is zero or negative. Returns false if:
-#Formula
-abs(srcX) >= Pixmap width()
-##
-, or if
-#Formula
-abs(srcY) >= Pixmap height()
-##
-.
+#Formula # abs(srcX) >= Pixmap width() ##, or if #Formula # abs(srcY) >= Pixmap height() ##.
#Param dstInfo destination width, height, Color_Type, Alpha_Type, Color_Space ##
#Param dstPixels destination pixel storage ##
@@ -1642,14 +1628,7 @@
srcX and srcY may be negative to copy only top or left of source. Returns
false Pixmap width() or height() is zero or negative. Returns false if:
-#Formula
-abs(srcX) >= Pixmap width()
-##
-, or if
-#Formula
-abs(srcY) >= Pixmap height()
-##
-.
+#Formula # abs(srcX) >= Pixmap width() ##, or if #Formula # abs(srcY) >= Pixmap height() ##.
#Param dst Image_Info and pixel address to write to ##
#Param srcX column index whose absolute value is less than width() ##
diff --git a/docs/SkPoint_Reference.bmh b/docs/SkPoint_Reference.bmh
index 598f963..86a7910 100644
--- a/docs/SkPoint_Reference.bmh
+++ b/docs/SkPoint_Reference.bmh
@@ -672,11 +672,7 @@
#Method void operator+=(const SkVector& v)
#Line # adds Vector to Point ##
-Adds Vector v to Point. Sets Point to:
-#Formula
-(fX + v.fX, fY + v.fY)
-##
-.
+Adds Vector v to Point. Sets Point to: #Formula # (fX + v.fX, fY + v.fY) ##.
#Param v Vector to add ##
@@ -706,11 +702,7 @@
#Method void operator-=(const SkVector& v)
#Line # subtracts Vector from Point ##
-Subtracts Vector v from Point. Sets Point to:
-#Formula
-(fX - v.fX, fY - v.fY)
-##
-.
+Subtracts Vector v from Point. Sets Point to: #Formula # (fX - v.fX, fY - v.fY) ##.
#Param v Vector to subtract ##
@@ -773,11 +765,7 @@
#Method SkPoint& operator*=(SkScalar scale)
#Line # multiplies Point by scale factor ##
-Multiplies Point by scale. Sets Point to:
-#Formula
-(fX * scale, fY * scale)
-##
-.
+Multiplies Point by scale. Sets Point to: #Formula # (fX * scale, fY * scale) ##.
#Param scale Scalar to multiply by ##
@@ -923,11 +911,7 @@
#Method SkVector operator-(const SkPoint& a, const SkPoint& b)
#Line # returns Vector between Points ##
-Returns Vector from b to a, computed as
-#Formula
-(a.fX - b.fX, a.fY - b.fY)
-##
-.
+Returns Vector from b to a, computed as #Formula # (a.fX - b.fX, a.fY - b.fY) ##.
Can also be used to subtract Vector from Point, returning Point.
Can also be used to subtract Vector from Vector, returning Vector.
@@ -963,10 +947,7 @@
#Line # returns Point offset by Vector ##
Returns Point resulting from Point a offset by Vector b, computed as:
-#Formula
-(a.fX + b.fX, a.fY + b.fY)
-##
-.
+#Formula # (a.fX + b.fX, a.fY + b.fY) ##.
Can also be used to offset Point b by Vector a, returning Point.
Can also be used to add Vector to Vector, returning Vector.
diff --git a/docs/SkRect_Reference.bmh b/docs/SkRect_Reference.bmh
index e06b943..dce2588 100644
--- a/docs/SkRect_Reference.bmh
+++ b/docs/SkRect_Reference.bmh
@@ -229,12 +229,8 @@
#In Constructor
#Line # constructs from SkScalar input returning (x, y, width, height) ##
-Returns constructed Rect set to
-#Formula
-(x, y, x + w, y + h)
-##
-. Does not validate input;
-w or h may be negative.
+Returns constructed Rect set to #Formula # (x, y, x + w, y + h) ##.
+Does not validate input; w or h may be negative.
#Param x stored in fLeft ##
#Param y stored in fTop ##
@@ -1119,12 +1115,8 @@
#In Set
#Line # sets to SkScalar input (x, y, width, height) ##
-Sets Rect to
-#Formula
-(x, y, x + width, y + height)
-##
-. Does not validate input;
-width or height may be negative.
+Sets Rect to #Formula # (x, y, x + width, y + height) ##.
+Does not validate input; width or height may be negative.
#Param x stored in fLeft ##
#Param y stored in fTop ##
@@ -1507,12 +1499,8 @@
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:
-
-#Formula
-(max(a.fLeft, b.fLeft), max(a.fTop, b.fTop),
- min(a.fRight, b.fRight), min(a.fBottom, b.fBottom))
-##
-.
+#Formula # (max(a.fLeft, b.fLeft), max(a.fTop, b.fTop),
+ min(a.fRight, b.fRight), min(a.fBottom, b.fBottom)) ##.
The intersection is only meaningful if the resulting Rect is not empty and
describes an area: fLeft is less than fRight, and fTop is less than fBottom.
@@ -1949,12 +1937,8 @@
#In Rounding
#Line # sets members to nearest integer value ##
Sets IRect by adding 0.5 and discarding the fractional portion of Rect
-members, using
-#Formula
-(SkScalarRoundToInt(fLeft), SkScalarRoundToInt(fTop),
- SkScalarRoundToInt(fRight), SkScalarRoundToInt(fBottom))
-##
-.
+members, using #Formula # (SkScalarRoundToInt(fLeft), SkScalarRoundToInt(fTop),
+ SkScalarRoundToInt(fRight), SkScalarRoundToInt(fBottom)) ##.
#Param dst storage for IRect ##
@@ -1978,13 +1962,10 @@
#In Rounding
#Line # sets members to nearest integer value away from opposite ##
-Sets IRect by discarding the fractional portion of fLeft and fTop; and
-rounding up fRight and fBottom, using
-#Formula
-(SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop),
- SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom))
-##
-.
+Sets IRect by discarding the fractional portion of fLeft and fTop; and rounding
+up fRight and fBottom, using
+#Formula # (SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop),
+ SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom)) ##.
#Param dst storage for IRect ##
@@ -2007,13 +1988,10 @@
#Method void roundOut(SkRect* dst) const
#In Rounding
-Sets Rect by discarding the fractional portion of fLeft and fTop; and
-rounding up fRight and fBottom, using
-#Formula
-(SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop),
- SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom))
-##
-.
+Sets Rect by discarding the fractional portion of fLeft and fTop; and rounding
+up fRight and fBottom, using
+#Formula # (SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop),
+ SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom)) ##.
#Param dst storage for Rect ##
@@ -2037,14 +2015,10 @@
#In Rounding
#Line # sets members to nearest integer value towards opposite ##
-Sets Rect by rounding up fLeft and fTop; and
-discarding the fractional portion of fRight and fBottom, using
-
-#Formula
-(SkScalarCeilToInt(fLeft), SkScalarCeilToInt(fTop),
- SkScalarFloorToInt(fRight), SkScalarFloorToInt(fBottom))
-##
-.
+Sets Rect by rounding up fLeft and fTop; and discarding the fractional portion
+of fRight and fBottom, using
+#Formula # (SkScalarCeilToInt(fLeft), SkScalarCeilToInt(fTop),
+ SkScalarFloorToInt(fRight), SkScalarFloorToInt(fBottom)) ##.
#Param dst storage for IRect ##
@@ -2068,12 +2042,8 @@
#In Rounding
Returns IRect by adding 0.5 and discarding the fractional portion of Rect
-members, using
-#Formula
-(SkScalarRoundToInt(fLeft), SkScalarRoundToInt(fTop),
- SkScalarRoundToInt(fRight), SkScalarRoundToInt(fBottom))
-##
-.
+members, using #Formula # (SkScalarRoundToInt(fLeft), SkScalarRoundToInt(fTop),
+ SkScalarRoundToInt(fRight), SkScalarRoundToInt(fBottom)) ##.
#Return rounded IRect ##
@@ -2095,13 +2065,10 @@
#Method SkIRect roundOut() const
#In Rounding
-Sets IRect by discarding the fractional portion of fLeft and fTop; and
-rounding up fRight and fBottom, using
-#Formula
-(SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop),
- SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom))
-##
-.
+Sets IRect by discarding the fractional portion of fLeft and fTop; and rounding
+up fRight and fBottom, using
+#Formula # (SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop),
+ SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom)) ##.
#Return rounded IRect ##
diff --git a/docs/SkSurface_Reference.bmh b/docs/SkSurface_Reference.bmh
index 1fc2122..4341934 100644
--- a/docs/SkSurface_Reference.bmh
+++ b/docs/SkSurface_Reference.bmh
@@ -1413,10 +1413,7 @@
Source Rect corners are (0, 0) and (src.width(), src.height()).
Destination Rect corners are (dstX, dstY) and
-#Formula
-(dstX + Surface width(), dstY + Surface height())
-##
-.
+#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.
@@ -1454,10 +1451,7 @@
Source Rect corners are (0, 0) and (src.width(), src.height()).
Destination Rect corners are (dstX, dstY) and
-#Formula
-(dstX + Surface width(), dstY + Surface height())
-##
-.
+#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.
diff --git a/site/user/api/SkBitmap_Reference.md b/site/user/api/SkBitmap_Reference.md
index 543dc99..943f5a2 100644
--- a/site/user/api/SkBitmap_Reference.md
+++ b/site/user/api/SkBitmap_Reference.md
@@ -1047,9 +1047,7 @@
int <a href='#SkBitmap_width'>width</a>() const
</pre>
-Returns pixel count in each row. Should be equal or less than:
-
-<a href='#SkBitmap_rowBytes'>rowBytes</a> / <a href='#SkBitmap_info'>info</a>.<a href='#SkBitmap_bytesPerPixel'>bytesPerPixel</a>.
+Returns pixel count in each row. Should be equal or less than <code><a href='#SkBitmap_rowBytes'>rowBytes</a> / <a href='#SkBitmap_info'>info</a>\.<a href='#SkBitmap_bytesPerPixel'>bytesPerPixel</a></code>.
May be less than <a href='#SkBitmap_pixelRef'>pixelRef</a>.<a href='#SkBitmap_width'>width</a>. Will not exceed <a href='#SkBitmap_pixelRef'>pixelRef</a>.<a href='#SkBitmap_width'>width</a> less
<a href='#SkBitmap_pixelRefOrigin'>pixelRefOrigin</a>.fX.
@@ -1488,7 +1486,7 @@
</pre>
Returns row bytes, the interval from one pixel row to the next. Row bytes
-is at least as large as<a href='#SkBitmap_width'>width</a> * <a href='#SkBitmap_info'>info</a>.<a href='#SkBitmap_bytesPerPixel'>bytesPerPixel</a>.
+is at least as large as: <code><a href='#SkBitmap_width'>width</a> \* <a href='#SkBitmap_info'>info</a>\.<a href='#SkBitmap_bytesPerPixel'>bytesPerPixel</a></code>.
Returns zero if <a href='#SkBitmap_colorType'>colorType</a> is <a href='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a>, or if row bytes supplied to
<a href='#SkBitmap_setInfo'>setInfo</a> is not large enough to hold a row of pixels.
@@ -3639,8 +3637,7 @@
<a href='#SkBitmap_readPixels_srcX'>srcX</a> and <a href='#SkBitmap_readPixels_srcY'>srcY</a> may be negative to copy only top or left of source. Returns
false if <a href='#SkBitmap_width'>width</a> or <a href='#SkBitmap_height'>height</a> is zero or negative.
-Returns false ifabs(srcX) >= <a href='#Bitmap'>Bitmap</a> <a href='#SkBitmap_width'>width</a>,
-or ifabs(srcY) >= <a href='#Bitmap'>Bitmap</a> <a href='#SkBitmap_height'>height</a>.
+Returns false if <code>abs(srcX) >= <a href='#Bitmap'>Bitmap</a> <a href='#SkBitmap_width'>width</a></code>, or if <code>abs(srcY) >= <a href='#Bitmap'>Bitmap</a> <a href='#SkBitmap_height'>height</a></code>.
### Parameters
@@ -3708,8 +3705,7 @@
<a href='#SkBitmap_readPixels_2_srcX'>srcX</a> and <a href='#SkBitmap_readPixels_2_srcY'>srcY</a> may be negative to copy only top or left of source. Returns
false if <a href='#SkBitmap_width'>width</a> or <a href='#SkBitmap_height'>height</a> is zero or negative.
-Returns false ifabs(srcX) >= <a href='#Bitmap'>Bitmap</a> <a href='#SkBitmap_width'>width</a>,
-or ifabs(srcY) >= <a href='#Bitmap'>Bitmap</a> <a href='#SkBitmap_height'>height</a>.
+Returns false if <code>abs(srcX) >= <a href='#Bitmap'>Bitmap</a> <a href='#SkBitmap_width'>width</a></code>, or if <code>abs(srcY) >= <a href='#Bitmap'>Bitmap</a> <a href='#SkBitmap_height'>height</a></code>.
### Parameters
@@ -3820,8 +3816,7 @@
<a href='#SkBitmap_writePixels_dstX'>dstX</a> and <a href='#SkBitmap_writePixels_dstY'>dstY</a> may be negative to copy only top or left of source. Returns
false if <a href='#SkBitmap_width'>width</a> or <a href='#SkBitmap_height'>height</a> is zero or negative.
-Returns false ifabs(dstX) >= <a href='#Bitmap'>Bitmap</a> <a href='#SkBitmap_width'>width</a>,
-or ifabs(dstY) >= <a href='#Bitmap'>Bitmap</a> <a href='#SkBitmap_height'>height</a>.
+Returns false if <code>abs(dstX) >= <a href='#Bitmap'>Bitmap</a> <a href='#SkBitmap_width'>width</a></code>, or if <code>abs(dstY) >= <a href='#Bitmap'>Bitmap</a> <a href='#SkBitmap_height'>height</a></code>.
### Parameters
diff --git a/site/user/api/SkBlendMode_Reference.md b/site/user/api/SkBlendMode_Reference.md
index b00e325..4517095 100644
--- a/site/user/api/SkBlendMode_Reference.md
+++ b/site/user/api/SkBlendMode_Reference.md
@@ -563,9 +563,7 @@
## <a name='Clear'>Clear</a>
-<a href='#SkBlendMode_kClear'>SkBlendMode::kClear</a> sets destination to:
-[0, 0]
-.
+<a href='#SkBlendMode_kClear'>SkBlendMode::kClear</a> sets destination to: <code>\[0, 0\]</code>.
Use <a href='#SkBlendMode_kClear'>SkBlendMode::kClear</a> to initialize a buffer to fully transparent pixels when
creating a mask with irregular edges.
@@ -581,11 +579,8 @@
## <a name='Src'>Src</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component;
-<a href='#SkBlendMode_kSrc'>SkBlendMode::kSrc</a> sets destination to:
-[Sa, Sc]
-.
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component;
+<a href='#SkBlendMode_kSrc'>SkBlendMode::kSrc</a> sets destination to: <code>\[Sa, Sc\]</code>.
Use <a href='#SkBlendMode_kSrc'>SkBlendMode::kSrc</a> to copy one buffer to another. All pixels are copied,
regardless of source and destination <a href='SkColor_Reference#Alpha'>Alpha</a> values. As a parameter to
<a href='SkCanvas_Reference#SkCanvas_drawAtlas'>SkCanvas::drawAtlas</a>, selects sprites and ignores colors.
@@ -602,11 +597,8 @@
## <a name='Dst'>Dst</a>
-Given:
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
-<a href='#SkBlendMode_kDst'>SkBlendMode::kDst</a> preserves destination set to:
-[Da, Dc]
-.
+Given: <code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
+<a href='#SkBlendMode_kDst'>SkBlendMode::kDst</a> preserves destination set to: <code>\[Da, Dc\]</code>.
Setting <a href='SkPaint_Reference#Paint'>Paint</a> <a href='#Blend_Mode'>Blend Mode</a> to <a href='#SkBlendMode_kDst'>SkBlendMode::kDst</a> causes drawing with
<a href='SkPaint_Reference#Paint'>Paint</a> to have no effect. As a parameter to <a href='SkCanvas_Reference#SkCanvas_drawAtlas'>SkCanvas::drawAtlas</a>,
selects colors and ignores sprites.
@@ -617,12 +609,9 @@
## <a name='Src_Over'>Src Over</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
-<a href='#SkBlendMode_kSrcOver'>SkBlendMode::kSrcOver</a> replaces destination with:
-[Sa + Da * (1 - Sa), Sc + Dc * (1 - Sa)]
-,
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
+<a href='#SkBlendMode_kSrcOver'>SkBlendMode::kSrcOver</a> replaces destination with: <code>\[Sa \+ Da \* \(1 \- Sa\), Sc \+ Dc \* \(1 \- Sa\)\]</code>,
drawing source over destination. <a href='#SkBlendMode_kSrcOver'>SkBlendMode::kSrcOver</a> is the default for <a href='SkPaint_Reference#Paint'>Paint</a>.
<a href='#SkBlendMode_kSrcOver'>SkBlendMode::kSrcOver</a> cannot make destination more transparent; the result will
@@ -634,12 +623,9 @@
## <a name='Dst_Over'>Dst Over</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
-<a href='#SkBlendMode_kDstOver'>SkBlendMode::kDstOver</a> replaces destination with:
-[Da + Sa * (1 - Da), Dc + Sc * (1 - Da)]
-,
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
+<a href='#SkBlendMode_kDstOver'>SkBlendMode::kDstOver</a> replaces destination with: <code>\[Da \+ Sa \* \(1 \- Da\), Dc \+ Sc \* \(1 \- Da\)\]</code>,
drawing destination over source. Has no effect destination if is opaque.
### Example
@@ -648,11 +634,9 @@
## <a name='Src_In'>Src In</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component, Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>;
-<a href='#SkBlendMode_kSrcIn'>SkBlendMode::kSrcIn</a> replaces destination with:
-[Sa * Da, Sc * Da]
-,
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>;
+<a href='#SkBlendMode_kSrcIn'>SkBlendMode::kSrcIn</a> replaces destination with: <code>\[Sa \* Da, Sc \* Da\]</code>,
drawing source with destination opacity.
### Example
@@ -661,11 +645,9 @@
## <a name='Dst_In'>Dst In</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
-<a href='#SkBlendMode_kDstIn'>SkBlendMode::kDstIn</a> replaces destination with:
-[Da * Sa, Dc * Sa]
-,
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
+<a href='#SkBlendMode_kDstIn'>SkBlendMode::kDstIn</a> replaces destination with: <code>\[Da \* Sa, Dc \* Sa\]</code>,
scaling destination <a href='SkColor_Reference#Alpha'>Alpha</a> by source <a href='SkColor_Reference#Alpha'>Alpha</a>. Resulting
destination is visible where source is visible.
@@ -675,11 +657,9 @@
## <a name='Src_Out'>Src Out</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component, Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>;
-<a href='#SkBlendMode_kSrcOut'>SkBlendMode::kSrcOut</a> replaces destination with:
-[Sa * (1 - Da), Sc * (1 - Da)]
-,
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>;
+<a href='#SkBlendMode_kSrcOut'>SkBlendMode::kSrcOut</a> replaces destination with: <code>\[Sa \* \(1 \- Da\), Sc \* \(1 \- Da\)\]</code>,
drawing source fully where destination <a href='SkColor_Reference#Alpha'>Alpha</a> is zero. Is destination
is opaque, has no effect.
@@ -689,11 +669,9 @@
## <a name='Dst_Out'>Dst Out</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
-<a href='#SkBlendMode_kDstOut'>SkBlendMode::kDstOut</a> replaces destination with:
-[Da * (1 - Sa), Dc * (1 - Sa)]
-,
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
+<a href='#SkBlendMode_kDstOut'>SkBlendMode::kDstOut</a> replaces destination with: <code>\[Da \* \(1 \- Sa\), Dc \* \(1 \- Sa\)\]</code>,
scaling destination <a href='SkColor_Reference#Alpha'>Alpha</a> by source transparency. Resulting
destination is visible where source is transparent. If source is transparent,
has no effect.
@@ -704,12 +682,9 @@
## <a name='Src_Atop'>Src Atop</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
-<a href='#SkBlendMode_kSrcATop'>SkBlendMode::kSrcATop</a> replaces destination with:
-[Da, Sc * Da + Dc * (1 - Sa)]
-,
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
+<a href='#SkBlendMode_kSrcATop'>SkBlendMode::kSrcATop</a> replaces destination with: <code>\[Da, Sc \* Da \+ Dc \* \(1 \- Sa\)\]</code>,
replacing opaque destination with opaque source. If source or destination
is transparent, has no effect.
@@ -719,12 +694,9 @@
## <a name='Dst_Atop'>Dst Atop</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
-<a href='#SkBlendMode_kDstATop'>SkBlendMode::kDstATop</a> replaces destination with:
-[Sa, Dc * Sa + Sc * (1 - Da)]
-,
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
+<a href='#SkBlendMode_kDstATop'>SkBlendMode::kDstATop</a> replaces destination with: <code>\[Sa, Dc \* Sa \+ Sc \* \(1 \- Da\)\]</code>,
making destination transparent where source is transparent.
### Example
@@ -733,12 +705,10 @@
## <a name='Xor'>Xor</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
<a href='#SkBlendMode_kXor'>SkBlendMode::kXor</a> replaces destination with:
-[Sa + Da - 2 * Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa)]
-,
+<code>\[Sa \+ Da \- 2 \* Sa \* Da, Sc \* \(1 \- Da\) \+ Dc \* \(1 \- Sa\)\]</code>,
exchanging the transparency of the source and destination.
### Example
@@ -747,12 +717,9 @@
## <a name='Plus'>Plus</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
-<a href='#SkBlendMode_kPlus'>SkBlendMode::kPlus</a> replaces destination with:
-[Sa + Da, Sc + Dc]
-,
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
+<a href='#SkBlendMode_kPlus'>SkBlendMode::kPlus</a> replaces destination with: <code>\[Sa \+ Da, Sc \+ Dc\]</code>,
summing the <a href='SkColor_Reference#Alpha'>Alpha</a> and <a href='#Color'>Color</a> components.
### Example
@@ -761,12 +728,9 @@
## <a name='Modulate'>Modulate</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
-<a href='#SkBlendMode_kModulate'>SkBlendMode::kModulate</a> replaces destination with:
-[Sa * Da, Sc * Dc]
-,
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
+<a href='#SkBlendMode_kModulate'>SkBlendMode::kModulate</a> replaces destination with: <code>\[Sa \* Da, Sc \* Dc\]</code>,
scaling <a href='SkColor_Reference#Alpha'>Alpha</a> and <a href='#Color'>Color</a> components by the lesser of the values.
<a href='#SkBlendMode_kModulate'>SkBlendMode::kModulate</a> differs from <a href='#SkBlendMode_kMultiply'>SkBlendMode::kMultiply</a> in two ways.
<a href='#SkBlendMode_kModulate'>SkBlendMode::kModulate</a> like <a href='#SkBlendMode_kSrcATop'>SkBlendMode::kSrcATop</a> alters the destination inside
@@ -785,12 +749,9 @@
## <a name='Screen'>Screen</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
-<a href='#SkBlendMode_kScreen'>SkBlendMode::kScreen</a> replaces destination with:
-[Sa + Da - Sa * Da, Sc + Dc - Sc * Dc]
-.
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
+<a href='#SkBlendMode_kScreen'>SkBlendMode::kScreen</a> replaces destination with: <code>\[Sa \+ Da \- Sa \* Da, Sc \+ Dc \- Sc \* Dc\]</code>.
### Example
@@ -798,13 +759,11 @@
## <a name='Overlay'>Overlay</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
<a href='#SkBlendMode_kOverlay'>SkBlendMode::kOverlay</a> replaces destination with:
-[Sa + Da - Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa) +
-(2 * Dc <= Da ? 2 * Sc * Dc : Sa * Da - 2 * (Da - Dc) * (Sa - Sc))]
-.
+<code>\[Sa \+ Da \- Sa \* Da, Sc \* \(1 \- Da\) \+ Dc \* \(1 \- Sa\) \+
+ \(2 \* Dc <= Da ? 2 \* Sc \* Dc : Sa \* Da \- 2 \* \(Da \- Dc\) \* \(Sa \- Sc\)\)\]</code>.
### Example
@@ -812,12 +771,10 @@
## <a name='Darken'>Darken</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
<a href='#SkBlendMode_kDarken'>SkBlendMode::kDarken</a> replaces destination with:
-[Sa + Da - Sa * Da, Sc + Dc - max(Sc * Da, Dc * Sa)]
-.
+<code>\[Sa \+ Da \- Sa \* Da, Sc \+ Dc \- max\(Sc \* Da, Dc \* Sa\)\]</code>.
<a href='#SkBlendMode_kDarken'>SkBlendMode::kDarken</a> does not make an image darker; it replaces the destination
component with source if source is darker.
@@ -827,12 +784,10 @@
## <a name='Lighten'>Lighten</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
<a href='#SkBlendMode_kLighten'>SkBlendMode::kLighten</a> replaces destination with:
-[Sa + Da - Sa * Da, Sc + Dc - min(Sc * Da, Dc * Sa)]
-.
+<code>\[Sa \+ Da \- Sa \* Da, Sc \+ Dc \- min\(Sc \* Da, Dc \* Sa\)\]</code>.
<a href='#SkBlendMode_kDarken'>SkBlendMode::kDarken</a> does not make an image lighter; it replaces the destination
component with source if source is lighter.
@@ -842,13 +797,11 @@
## <a name='Color_Dodge'>Color Dodge</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
<a href='#SkBlendMode_kColorDodge'>SkBlendMode::kColorDodge</a> replaces destination with:
-[Sa + Da - Sa * Da, Dc == 0 ? Sc * (1 - Da) : Sc == Sa ? Sc + Da * (1 - Sa) :
-Sa * min(Da, Dc * Sa / (Sa - Sc)) + Sc * (1 - Da) + Da * (1 - Sa)]
-,
+<code>\[Sa \+ Da \- Sa \* Da, Dc == 0 ? Sc \* \(1 \- Da\) : Sc == Sa ? Sc \+ Da \* \(1 \- Sa\) :
+ Sa \* min\(Da, Dc \* Sa / \(Sa \- Sc\)\) \+ Sc \* \(1 \- Da\) \+ Da \* \(1 \- Sa\)\]</code>,
making destination brighter to reflect source.
### Example
@@ -857,13 +810,11 @@
## <a name='Color_Burn'>Color Burn</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
<a href='#SkBlendMode_kColorBurn'>SkBlendMode::kColorBurn</a> replaces destination with:
-[Sa + Da - Sa * Da, Dc == Da ? Dc + Sc * (1 - Da) : Sc == 0 ? Da * (1 - Sa) :
-Sa * (Da - min(Da, (Da - Dc) * Sa / Sc)) + Sc * (1 - Da) + Da * (1 - Sa)]
-,
+<code>\[Sa \+ Da \- Sa \* Da, Dc == Da ? Dc \+ Sc \* \(1 \- Da\) : Sc == 0 ? Da \* \(1 \- Sa\) :
+ Sa \* \(Da \- min\(Da, \(Da \- Dc\) \* Sa / Sc\)\) \+ Sc \* \(1 \- Da\) \+ Da \* \(1 \- Sa\)\]</code>,
making destination darker to reflect source.
### Example
@@ -872,13 +823,11 @@
## <a name='Hard_Light'>Hard Light</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
<a href='#SkBlendMode_kHardLight'>SkBlendMode::kHardLight</a> replaces destination with:
-[Sa + Da - Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa) +
-2 * Sc <= Sa ? 2 * Sc * Dc : Sa * Da - 2 * (Da - Dc) * (Sa - Sc)]
-,
+<code>\[Sa \+ Da \- Sa \* Da, Sc \* \(1 \- Da\) \+ Dc \* \(1 \- Sa\) \+
+ 2 \* Sc <= Sa ? 2 \* Sc \* Dc : Sa \* Da \- 2 \* \(Da \- Dc\) \* \(Sa \- Sc\)\]</code>,
making destination lighter or darker, depending on source.
### Example
@@ -887,15 +836,12 @@
## <a name='Soft_Light'>Soft Light</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component
-where m = Da > 0 ? Dc / Da : 0;
-<a href='#SkBlendMode_kSoftLight'>SkBlendMode::kSoftLight</a> replaces destination with:
-[Sa + Da - Sa * Da, Sc / Da + Dc / Sa +
-(2 * Sc <= Sa ? Dc * (Sa + (2 * Sc - Sa) * (1 - m)) : Dc * Sa + Da * (2 * Sc - Sa) *
-(4 * Dc <= Da ? (16 * m * m + 4 * m) * (m - 1) + 7 * m : sqrt(m) - m))]\
-,
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
+where <code>m = Da > 0 ? Dc / Da : 0</code>;
+<a href='#SkBlendMode_kSoftLight'>SkBlendMode::kSoftLight</a> replaces destination with: <code>\[Sa \+ Da \- Sa \* Da, Sc / Da \+ Dc / Sa \+
+ \(2 \* Sc <= Sa ? Dc \* \(Sa \+ \(2 \* Sc \- Sa\) \* \(1 \- m\)\) : Dc \* Sa \+ Da \* \(2 \* Sc \- Sa\) \*
+ \(4 \* Dc <= Da ? \(16 \* m \* m \+ 4 \* m\) \* \(m \- 1\) \+ 7 \* m : sqrt(m) \- m\)\)\]</code>,
making destination lighter or darker, depending on source.
### Example
@@ -904,12 +850,10 @@
## <a name='Difference'>Difference</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
<a href='#SkBlendMode_kDifference'>SkBlendMode::kDifference</a> replaces destination with:
-[Sa + Da - Sa * Da, Sc + Dc - 2 * min(Sc * Da, Dc * Sa)]
-,
+<code>\[Sa \+ Da \- Sa \* Da, Sc \+ Dc \- 2 \* min\(Sc \* Da, Dc \* Sa\)\]</code>,
replacing destination with lighter less darker.
### Example
@@ -918,12 +862,10 @@
## <a name='Exclusion'>Exclusion</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a>,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
<a href='#SkBlendMode_kExclusion'>SkBlendMode::kExclusion</a> replaces destination with:
-[Sa + Da - Sa * Da, Sc + Dc - 2 * Sc * Dc]
-,
+<code>\[Sa \+ Da \- Sa \* Da, Sc \+ Dc \- 2 \* Sc \* Dc\]</code>,
replacing destination with lighter less darker, ignoring <a href='SkColor_Reference#Alpha'>Alpha</a>.
### Example
@@ -932,12 +874,10 @@
## <a name='Multiply'>Multiply</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, Sc as source <a href='#Color'>Color</a> component,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, Dc as destination <a href='#Color'>Color</a> component;
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Sc</code> as source <a href='#Color'>Color</a> component,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>Dc</code> as destination <a href='#Color'>Color</a> component;
<a href='#SkBlendMode_kMultiply'>SkBlendMode::kMultiply</a> replaces destination with:
-[Sa + Da - Sa * Da, Sc * (1 - Da) + Dc * (1 - Sa) + Sc * Dc]
-,
+<code>\[Sa \+ Da \- Sa \* Da, Sc \* \(1 \- Da\) \+ Dc \* \(1 \- Sa\) \+ Sc \* Dc\]</code>,
the product of <a href='undocumented#Unpremultiply'>Unpremultiplied</a> source and destination.
<a href='#SkBlendMode_kMultiply'>SkBlendMode::kMultiply</a> makes the image darker.
@@ -947,12 +887,10 @@
## <a name='Hue'>Hue</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, S as source <a href='#Color'>Color</a>,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, D as destination <a href='#Color'>Color</a>;
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>S</code> as source <a href='#Color'>Color</a>,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>D</code> as destination <a href='#Color'>Color</a>;
<a href='#SkBlendMode_kHue'>SkBlendMode::kHue</a> replaces destination with:
-[Sa + Da - Sa * Da, SetLuminosity(SetSaturation(S, Saturation(D)), <a href='#Luminosity'>Luminosity(D)</a>)]
-,
+<code>\[Sa \+ Da \- Sa \* Da, SetLuminosity(SetSaturation(S, Saturation(D)\), <a href='#Luminosity'>Luminosity(D)</a>\)\]</code>,
source hue, leaving destination luminosity and saturation unchanged.
### Example
@@ -961,12 +899,10 @@
## <a name='Saturation'>Saturation</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, S as source <a href='#Color'>Color</a>,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, D as destination <a href='#Color'>Color</a>;
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>S</code> as source <a href='#Color'>Color</a>,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>D</code> as destination <a href='#Color'>Color</a>;
<a href='#SkBlendMode_kHue'>SkBlendMode::kHue</a> replaces destination with:
-[Sa + Da - Sa * Da, SetLuminosity(SetSaturation(D, Saturation(S)), <a href='#Luminosity'>Luminosity(D)</a>)]
-,
+<code>\[Sa \+ Da \- Sa \* Da, SetLuminosity(SetSaturation(D, Saturation(S)\), <a href='#Luminosity'>Luminosity(D)</a>\)\]</code>,
source hue, leaving destination luminosity and saturation unchanged.
### Example
@@ -975,12 +911,10 @@
## <a name='Color'>Color</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, S as source <a href='#Color'>Color</a>,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, D as destination <a href='#Color'>Color</a>;
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>S</code> as source <a href='#Color'>Color</a>,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>D</code> as destination <a href='#Color'>Color</a>;
<a href='#SkBlendMode_kColor'>SkBlendMode::kColor</a> replaces destination with:
-[Sa + Da - Sa * Da, SetLuminosity(S, Luminosity(D))]
-,
+<code>\[Sa \+ Da \- Sa \* Da, SetLuminosity(S, Luminosity(D)\)\]</code>,
source hue and saturation, leaving destination luminosity unchanged.
### Example
@@ -989,12 +923,10 @@
## <a name='Luminosity'>Luminosity</a>
-Given:
-Sa as source <a href='SkColor_Reference#Alpha'>Alpha</a>, S as source <a href='#Color'>Color</a>,
-Da as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, D as destination <a href='#Color'>Color</a>;
+Given: <code>Sa</code> as source <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>S</code> as source <a href='#Color'>Color</a>,
+<code>Da</code> as destination <a href='SkColor_Reference#Alpha'>Alpha</a>, <code>D</code> as destination <a href='#Color'>Color</a>;
<a href='#SkBlendMode_kLuminosity'>SkBlendMode::kLuminosity</a> replaces destination with:
-[Sa + Da - Sa * Da, SetLuminosity(D, Luminosity(S))]
-,
+<code>\[Sa \+ Da \- Sa \* Da, SetLuminosity(D, Luminosity(S)\)\]</code>,
source luminosity, leaving destination hue and saturation unchanged.
### Example
diff --git a/site/user/api/SkCanvas_Reference.md b/site/user/api/SkCanvas_Reference.md
index 8a23818..43aa216 100644
--- a/site/user/api/SkCanvas_Reference.md
+++ b/site/user/api/SkCanvas_Reference.md
@@ -5589,8 +5589,7 @@
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_Lattice_fRectTypes'><code>fRectTypes</code></a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
Optional array of fill types, one per rectangular grid entry:
-array length must be( <a href='#SkCanvas_Lattice_fXCount'>fXCount</a> + 1) * (<a href='#SkCanvas_Lattice_fYCount'>fYCount</a> + 1)
-.
+array length must be <code>\(<a href='#SkCanvas_Lattice_fXCount'>fXCount</a> \+ 1\) \* \(<a href='#SkCanvas_Lattice_fYCount'>fYCount</a> \+ 1\)</code>.
Each <a href='#SkCanvas_Lattice_RectType'>RectType</a> is one of: <a href='#SkCanvas_Lattice_kDefault'>kDefault</a>, <a href='#SkCanvas_Lattice_kTransparent'>kTransparent</a>, <a href='#SkCanvas_Lattice_kFixedColor'>kFixedColor</a>.
@@ -5627,8 +5626,7 @@
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkCanvas_Lattice_fColors'><code>fColors</code></a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
Optional array of colors, one per rectangular grid entry.
-Array length must be( <a href='#SkCanvas_Lattice_fXCount'>fXCount</a> + 1) * (<a href='#SkCanvas_Lattice_fYCount'>fYCount</a> + 1)
-.
+Array length must be <code>\(<a href='#SkCanvas_Lattice_fXCount'>fXCount</a> \+ 1\) \* \(<a href='#SkCanvas_Lattice_fYCount'>fYCount</a> \+ 1\)</code>.
Array entries correspond to the rectangular grid entries, ascending
left to right, then top to bottom.
diff --git a/site/user/api/SkIPoint_Reference.md b/site/user/api/SkIPoint_Reference.md
index f3e4323..2afd0ba 100644
--- a/site/user/api/SkIPoint_Reference.md
+++ b/site/user/api/SkIPoint_Reference.md
@@ -455,8 +455,7 @@
void <a href='#SkIPoint_addto_operator'>operator+=(const SkIVector& v)</a>
</pre>
-Offsets <a href='#IPoint'>IPoint</a> by <a href='#IVector'>IVector</a> <a href='#SkIPoint_addto_operator_v'>v</a>. Sets <a href='#IPoint'>IPoint</a> to(<a href='#SkIPoint_fX'>fX</a> + <a href='#SkIPoint_addto_operator_v'>v</a>.<a href='#SkIPoint_fX'>fX</a>, <a href='#SkIPoint_fY'>fY</a> + <a href='#SkIPoint_addto_operator_v'>v</a>.<a href='#SkIPoint_fY'>fY</a>)
-.
+Offsets <a href='#IPoint'>IPoint</a> by <a href='#IVector'>IVector</a> <a href='#SkIPoint_addto_operator_v'>v</a>. Sets <a href='#IPoint'>IPoint</a> to <code>\(<a href='#SkIPoint_fX'>fX</a> \+ <a href='#SkIPoint_addto_operator_v'>v</a>\.<a href='#SkIPoint_fX'>fX</a>, <a href='#SkIPoint_fY'>fY</a> \+ <a href='#SkIPoint_addto_operator_v'>v</a>\.<a href='#SkIPoint_fY'>fY</a>\)</code>.
### Parameters
@@ -482,9 +481,7 @@
void <a href='#SkIPoint_subtractfrom_operator'>operator-=(const SkIVector& v)</a>
</pre>
-Subtracts <a href='#IVector'>IVector</a> <a href='#SkIPoint_subtractfrom_operator_v'>v</a> from <a href='#IPoint'>IPoint</a>. Sets <a href='#IPoint'>IPoint</a> to:
-(<a href='#SkIPoint_fX'>fX</a> - <a href='#SkIPoint_subtractfrom_operator_v'>v</a>.<a href='#SkIPoint_fX'>fX</a>, <a href='#SkIPoint_fY'>fY</a> - <a href='#SkIPoint_subtractfrom_operator_v'>v</a>.<a href='#SkIPoint_fY'>fY</a>)
-.
+Subtracts <a href='#IVector'>IVector</a> <a href='#SkIPoint_subtractfrom_operator_v'>v</a> from <a href='#IPoint'>IPoint</a>. Sets <a href='#IPoint'>IPoint</a> to: <code>\(<a href='#SkIPoint_fX'>fX</a> \- <a href='#SkIPoint_subtractfrom_operator_v'>v</a>\.<a href='#SkIPoint_fX'>fX</a>, <a href='#SkIPoint_fY'>fY</a> \- <a href='#SkIPoint_subtractfrom_operator_v'>v</a>\.<a href='#SkIPoint_fY'>fY</a>\)</code>.
### Parameters
@@ -642,8 +639,7 @@
<a href='#SkIVector'>SkIVector</a> <a href='#SkIPoint_subtract_operator'>operator-(const SkIPoint& a, const SkIPoint& b)</a>
</pre>
-Returns <a href='#IVector'>IVector</a> from <a href='#SkIPoint_subtract_operator_b'>b</a> to <a href='#SkIPoint_subtract_operator_a'>a</a>; computed as(<a href='#SkIPoint_subtract_operator_a'>a</a>.<a href='#SkIPoint_fX'>fX</a> - <a href='#SkIPoint_subtract_operator_b'>b</a>.<a href='#SkIPoint_fX'>fX</a>, <a href='#SkIPoint_subtract_operator_a'>a</a>.<a href='#SkIPoint_fY'>fY</a> - <a href='#SkIPoint_subtract_operator_b'>b</a>.<a href='#SkIPoint_fY'>fY</a>)
-.
+Returns <a href='#IVector'>IVector</a> from <a href='#SkIPoint_subtract_operator_b'>b</a> to <a href='#SkIPoint_subtract_operator_a'>a</a>; computed as <code>\(<a href='#SkIPoint_subtract_operator_a'>a</a>\.<a href='#SkIPoint_fX'>fX</a> \- <a href='#SkIPoint_subtract_operator_b'>b</a>\.<a href='#SkIPoint_fX'>fX</a>, <a href='#SkIPoint_subtract_operator_a'>a</a>\.<a href='#SkIPoint_fY'>fY</a> \- <a href='#SkIPoint_subtract_operator_b'>b</a>\.<a href='#SkIPoint_fY'>fY</a>\)</code>.
Can also be used to subtract <a href='#IVector'>IVector</a> from <a href='#IVector'>IVector</a>, returning <a href='#IVector'>IVector</a>.
@@ -679,8 +675,7 @@
</pre>
Returns <a href='#IPoint'>IPoint</a> resulting from <a href='#IPoint'>IPoint</a> <a href='#SkIPoint_add_operator_a'>a</a> offset by <a href='#IVector'>IVector</a> <a href='#SkIPoint_add_operator_b'>b</a>, computed as:
-(<a href='#SkIPoint_add_operator_a'>a</a>.<a href='#SkIPoint_fX'>fX</a> + <a href='#SkIPoint_add_operator_b'>b</a>.<a href='#SkIPoint_fX'>fX</a>, <a href='#SkIPoint_add_operator_a'>a</a>.<a href='#SkIPoint_fY'>fY</a> + <a href='#SkIPoint_add_operator_b'>b</a>.<a href='#SkIPoint_fY'>fY</a>)
-.
+<code>\(<a href='#SkIPoint_add_operator_a'>a</a>\.<a href='#SkIPoint_fX'>fX</a> \+ <a href='#SkIPoint_add_operator_b'>b</a>\.<a href='#SkIPoint_fX'>fX</a>, <a href='#SkIPoint_add_operator_a'>a</a>\.<a href='#SkIPoint_fY'>fY</a> \+ <a href='#SkIPoint_add_operator_b'>b</a>\.<a href='#SkIPoint_fY'>fY</a>\)</code>.
Can also be used to offset <a href='#IPoint'>IPoint</a> <a href='#SkIPoint_add_operator_b'>b</a> by <a href='#IVector'>IVector</a> <a href='#SkIPoint_add_operator_a'>a</a>, returning <a href='#IPoint'>IPoint</a>.
Can also be used to add <a href='#IVector'>IVector</a> to <a href='#IVector'>IVector</a>, returning <a href='#IVector'>IVector</a>.
diff --git a/site/user/api/SkIRect_Reference.md b/site/user/api/SkIRect_Reference.md
index 06e581f..c758d97 100644
--- a/site/user/api/SkIRect_Reference.md
+++ b/site/user/api/SkIRect_Reference.md
@@ -559,11 +559,8 @@
static constexpr <a href='#SkIRect'>SkIRect</a> SK_WARN_UNUSED_RESULT <a href='#SkIRect_MakeXYWH'>MakeXYWH</a>(int32_t x, int32_t y, int32_t w, int32_t h)
</pre>
-Returns constructed <a href='#IRect'>IRect</a> set to:
-(x, y, x + <a href='#SkIRect_MakeXYWH_w'>w</a>, y + <a href='#SkIRect_MakeXYWH_h'>h</a>)
-.
-Does not validate input;
-<a href='#SkIRect_MakeXYWH_w'>w</a> or <a href='#SkIRect_MakeXYWH_h'>h</a> may be negative.
+Returns constructed <a href='#IRect'>IRect</a> set to: <code>\(x, y, x \+ <a href='#SkIRect_MakeXYWH_w'>w</a>, y \+ <a href='#SkIRect_MakeXYWH_h'>h</a>\)</code>.
+Does not validate input; <a href='#SkIRect_MakeXYWH_w'>w</a> or <a href='#SkIRect_MakeXYWH_h'>h</a> may be negative.
### Parameters
@@ -1354,11 +1351,8 @@
void <a href='#SkIRect_setXYWH'>setXYWH</a>(int32_t x, int32_t y, int32_t width, int32_t height)
</pre>
-Sets <a href='#IRect'>IRect</a> to:
-(x, y, x + width, y + height)
-.
-Does not validate input;
-width or height may be negative.
+Sets <a href='#IRect'>IRect</a> to: <code>\(x, y, x \+ width, y \+ height\)</code>.
+Does not validate input; width or height may be negative.
### Parameters
@@ -1776,10 +1770,8 @@
<a href='#IRect'>IRects</a> intersect when they enclose a common area. To intersect, each of the pair
must describe area; <a href='#SkIRect_fLeft'>fLeft</a> is less than <a href='#SkIRect_fRight'>fRight</a>, and <a href='#SkIRect_fTop'>fTop</a> is less than <a href='#SkIRect_fBottom'>fBottom</a>;
empty() returns false. The intersection of <a href='#IRect'>IRect</a> pair can be described by:
-
-(max(a.<a href='#SkIRect_fLeft'>fLeft</a>, b.<a href='#SkIRect_fLeft'>fLeft</a>), max(a.<a href='#SkIRect_fTop'>fTop</a>, b.<a href='#SkIRect_fTop'>fTop</a>),
-min(a.<a href='#SkIRect_fRight'>fRight</a>, b.<a href='#SkIRect_fRight'>fRight</a>), min(a.<a href='#SkIRect_fBottom'>fBottom</a>, b.<a href='#SkIRect_fBottom'>fBottom</a>))
-.
+<code>\(max\(a\.<a href='#SkIRect_fLeft'>fLeft</a>, b\.<a href='#SkIRect_fLeft'>fLeft</a>\), max\(a\.<a href='#SkIRect_fTop'>fTop</a>, b\.<a href='#SkIRect_fTop'>fTop</a>\),
+ min\(a\.<a href='#SkIRect_fRight'>fRight</a>, b\.<a href='#SkIRect_fRight'>fRight</a>\), min\(a\.<a href='#SkIRect_fBottom'>fBottom</a>, b\.<a href='#SkIRect_fBottom'>fBottom</a>\)\)</code>.
The intersection is only meaningful if the resulting <a href='#IRect'>IRect</a> is not empty and
describes an area: <a href='#SkIRect_fLeft'>fLeft</a> is less than <a href='#SkIRect_fRight'>fRight</a>, and <a href='#SkIRect_fTop'>fTop</a> is less than <a href='#SkIRect_fBottom'>fBottom</a>.
@@ -1885,14 +1877,10 @@
bool <a href='#SkIRect_contains'>contains</a>(int32_t x, int32_t y) const
</pre>
-Returns true if:
-<a href='#SkIRect_fLeft'>fLeft</a> <= x < <a href='#SkIRect_fRight'>fRight</a> && <a href='#SkIRect_fTop'>fTop</a> <= y < <a href='#SkIRect_fBottom'>fBottom</a>.
-
+Returns true if: <code><a href='#SkIRect_fLeft'>fLeft</a> <= x < <a href='#SkIRect_fRight'>fRight</a> && <a href='#SkIRect_fTop'>fTop</a> <= y < <a href='#SkIRect_fBottom'>fBottom</a></code>.
Returns false if <a href='#IRect'>IRect</a> is empty.
-Considers input to describe constructed <a href='#IRect'>IRect</a>:
-(x, y, x + 1, y + 1)
-and
+Considers input to describe constructed <a href='#IRect'>IRect</a>: <code>\(x, y, x \+ 1, y \+ 1\)</code> and
returns true if constructed area is completely enclosed by <a href='#IRect'>IRect</a> area.
### Parameters
diff --git a/site/user/api/SkImage_Reference.md b/site/user/api/SkImage_Reference.md
index 61b1507..976993d 100644
--- a/site/user/api/SkImage_Reference.md
+++ b/site/user/api/SkImage_Reference.md
@@ -1981,8 +1981,7 @@
<a href='#SkImage_readPixels_srcX'>srcX</a> and <a href='#SkImage_readPixels_srcY'>srcY</a> may be negative to copy only top or left of source. Returns
false if <a href='#SkImage_width'>width</a> or <a href='#SkImage_height'>height</a> is zero or negative.
-Returns false ifabs(srcX) >= <a href='#Image'>Image</a> <a href='#SkImage_width'>width</a>,
-or ifabs(srcY) >= <a href='#Image'>Image</a> <a href='#SkImage_height'>height</a>.
+Returns false if <code>abs(srcX) >= <a href='#Image'>Image</a> <a href='#SkImage_width'>width</a></code>, or if <code>abs(srcY) >= <a href='#Image'>Image</a> <a href='#SkImage_height'>height</a></code>.
If <a href='#SkImage_readPixels_cachingHint'>cachingHint</a> is <a href='#SkImage_kAllow_CachingHint'>kAllow CachingHint</a>, pixels may be retained locally.
If <a href='#SkImage_readPixels_cachingHint'>cachingHint</a> is <a href='#SkImage_kDisallow_CachingHint'>kDisallow CachingHint</a>, pixels are not added to the local cache.
@@ -2054,8 +2053,7 @@
<a href='#SkImage_readPixels_2_srcX'>srcX</a> and <a href='#SkImage_readPixels_2_srcY'>srcY</a> may be negative to copy only top or left of source. Returns
false if <a href='#SkImage_width'>width</a> or <a href='#SkImage_height'>height</a> is zero or negative.
-Returns false ifabs(srcX) >= <a href='#Image'>Image</a> <a href='#SkImage_width'>width</a>,
-or ifabs(srcY) >= <a href='#Image'>Image</a> <a href='#SkImage_height'>height</a>.
+Returns false if <code>abs(srcX) >= <a href='#Image'>Image</a> <a href='#SkImage_width'>width</a></code>, or if <code>abs(srcY) >= <a href='#Image'>Image</a> <a href='#SkImage_height'>height</a></code>.
If <a href='#SkImage_readPixels_2_cachingHint'>cachingHint</a> is <a href='#SkImage_kAllow_CachingHint'>kAllow CachingHint</a>, pixels may be retained locally.
If <a href='#SkImage_readPixels_2_cachingHint'>cachingHint</a> is <a href='#SkImage_kDisallow_CachingHint'>kDisallow CachingHint</a>, pixels are not added to the local cache.
diff --git a/site/user/api/SkMatrix_Reference.md b/site/user/api/SkMatrix_Reference.md
index b780eb2..e7d9ab2 100644
--- a/site/user/api/SkMatrix_Reference.md
+++ b/site/user/api/SkMatrix_Reference.md
@@ -3635,7 +3635,7 @@
bool <a href='#SkMatrix_postIDiv'>postIDiv</a>(int divx, int divy)
</pre>
-Sets <a href='#Matrix'>Matrix</a> to <a href='#Matrix'>Matrix</a> constructed from scaling by(1/<a href='#SkMatrix_postIDiv_divx'>divx</a>, 1/<a href='#SkMatrix_postIDiv_divy'>divy</a>)
+Sets <a href='#Matrix'>Matrix</a> to <a href='#Matrix'>Matrix</a> constructed from scaling by <code>\(1/<a href='#SkMatrix_postIDiv_divx'>divx</a>, 1/<a href='#SkMatrix_postIDiv_divy'>divy</a>\)</code>,
about pivot point (px, py), multiplied by <a href='#Matrix'>Matrix</a>.
Returns false if either <a href='#SkMatrix_postIDiv_divx'>divx</a> or <a href='#SkMatrix_postIDiv_divy'>divy</a> is zero.
@@ -5491,7 +5491,7 @@
unchanged if <a href='#Matrix'>Matrix</a> contains perspective; <a href='#SkMatrix_decomposeScale_scale'>scale</a> factors are not finite, or
are nearly zero.
-On success<a href='#Matrix'>Matrix</a> = <a href='#SkMatrix_decomposeScale_scale'>scale</a> * Remaining.
+On success: <code><a href='#Matrix'>Matrix</a> = <a href='#SkMatrix_decomposeScale_scale'>scale</a> \* Remaining</code>.
### Parameters
diff --git a/site/user/api/SkPaint_Reference.md b/site/user/api/SkPaint_Reference.md
index f94211a..6c8d5ec 100644
--- a/site/user/api/SkPaint_Reference.md
+++ b/site/user/api/SkPaint_Reference.md
@@ -1743,7 +1743,7 @@
<a href='#Dither'>Dither</a> can be enabled by default by setting <a href='undocumented#SkPaintDefaults_Flags'>SkPaintDefaults Flags</a> to <a href='#SkPaint_kDither_Flag'>kDither Flag</a>
at compile time.
-Some platform implementations may ignore dithering. SetSK_IGNORE_GPU_DITHERto ignore <a href='#Dither'>Dither</a> on <a href='undocumented#GPU_Surface'>GPU Surface</a>.
+Some platform implementations may ignore dithering. Set <code>SK_IGNORE_GPU_DITHER</code>to ignore <a href='#Dither'>Dither</a> on <a href='undocumented#GPU_Surface'>GPU Surface</a>.
### Example
@@ -3073,9 +3073,10 @@
If the miter at a corner exceeds this limit, <a href='#SkPaint_kMiter_Join'>kMiter Join</a>
is replaced with <a href='#SkPaint_kBevel_Join'>kBevel Join</a>.
-<a href='#Miter_Limit'>Miter Limit</a> can be computed from the corner angle:
+<a href='#Miter_Limit'>Miter Limit</a> can be computed from the corner angle using:
+<code>miter limit = 1 / sin \( angle / 2 \)</code>.
-miter limit = 1 / sin ( angle / 2 )<a href='#Miter_Limit'>Miter Limit</a> default value is 4.
+<a href='#Miter_Limit'>Miter Limit</a> default value is 4.
The default may be changed at compile time by setting <a href='undocumented#SkPaintDefaults_MiterLimit'>SkPaintDefaults MiterLimit</a>
in "SkUserConfig.h" or as a define supplied by the build environment.
diff --git a/site/user/api/SkPath_Reference.md b/site/user/api/SkPath_Reference.md
index d9c8753..b455e80 100644
--- a/site/user/api/SkPath_Reference.md
+++ b/site/user/api/SkPath_Reference.md
@@ -1294,8 +1294,7 @@
Interpolates between <a href='#Path'>Paths</a> with <a href='#Point_Array'>Point Array</a> of equal size.
Copy <a href='#Verb_Array'>Verb Array</a> and <a href='#Conic_Weight'>Weights</a> to <a href='#SkPath_interpolate_out'>out</a>, and set <a href='#SkPath_interpolate_out'>out</a> <a href='#Point_Array'>Point Array</a> to a weighted
average of this <a href='#Point_Array'>Point Array</a> and <a href='#SkPath_interpolate_ending'>ending</a> <a href='#Point_Array'>Point Array</a>, using the formula:
-(<a href='#Path'>Path</a> <a href='SkPoint_Reference#Point'>Point</a> * <a href='#SkPath_interpolate_weight'>weight</a>) + <a href='#SkPath_interpolate_ending'>ending</a> <a href='SkPoint_Reference#Point'>Point</a> * (1 - <a href='#SkPath_interpolate_weight'>weight</a>)
-.
+<code>\(<a href='#Path'>Path</a> <a href='SkPoint_Reference#Point'>Point</a> \* <a href='#SkPath_interpolate_weight'>weight</a>\) \+ <a href='#SkPath_interpolate_ending'>ending</a> <a href='SkPoint_Reference#Point'>Point</a> \* \(1 \- <a href='#SkPath_interpolate_weight'>weight</a>\)</code>.
<a href='#SkPath_interpolate_weight'>weight</a> is most useful when between zero (<a href='#SkPath_interpolate_ending'>ending</a> <a href='#Point_Array'>Point Array</a>) and
one (this <a href='#Point_Array'>Point Array</a>); will work with values outside of this
@@ -3323,7 +3322,7 @@
### Example
-<div><fiddle-embed name="e88f554efacfa9f75f270fb1c0add5b4"><div>A 90 degree circular arc has the weight1 / sqrt(2).
+<div><fiddle-embed name="e88f554efacfa9f75f270fb1c0add5b4"><div>A 90 degree circular arc has the weight <code>1 / sqrt(2)</code>.
</div>
#### Example Output
@@ -4034,14 +4033,16 @@
const <a href='SkPoint_Reference#SkPoint'>SkPoint</a> xy)
</pre>
-Appends <a href='#Arc'>Arc</a> to <a href='#Path'>Path</a>. <a href='#Arc'>Arc</a> is implemented by one or more <a href='#Conic'>Conic</a> weighted to describe part of <a href='undocumented#Oval'>Oval</a>
-with radii (<a href='#SkPath_arcTo_5_r'>r</a>.fX, <a href='#SkPath_arcTo_5_r'>r</a>.fY) rotated by <a href='#SkPath_arcTo_5_xAxisRotate'>xAxisRotate</a> degrees. <a href='#Arc'>Arc</a> curves from last <a href='#Path'>Path</a> <a href='SkPoint_Reference#Point'>Point</a> to
-(<a href='#SkPath_arcTo_5_xy'>xy</a>.fX, <a href='#SkPath_arcTo_5_xy'>xy</a>.fY), choosing one of four possible routes: clockwise or counterclockwise,
+Appends <a href='#Arc'>Arc</a> to <a href='#Path'>Path</a>. <a href='#Arc'>Arc</a> is implemented by one or more <a href='#Conic'>Conic</a> weighted to describe
+part of <a href='undocumented#Oval'>Oval</a> with radii (<a href='#SkPath_arcTo_5_r'>r</a>.fX, <a href='#SkPath_arcTo_5_r'>r</a>.fY) rotated by <a href='#SkPath_arcTo_5_xAxisRotate'>xAxisRotate</a> degrees. <a href='#Arc'>Arc</a> curves
+from last <a href='#Path'>Path</a> <a href='SkPoint_Reference#Point'>Point</a> to (<a href='#SkPath_arcTo_5_xy'>xy</a>.fX, <a href='#SkPath_arcTo_5_xy'>xy</a>.fY), choosing one of four possible routes:
+clockwise or counterclockwise,
and smaller or larger.
-<a href='#Arc'>Arc</a> <a href='#SkPath_arcTo_5_sweep'>sweep</a> is always less than 360 degrees. <a href='#SkPath_arcTo'>arcTo</a> appends <a href='undocumented#Line'>Line</a> to <a href='#SkPath_arcTo_5_xy'>xy</a> if either radii are zero,
-or if last <a href='#Path'>Path</a> <a href='SkPoint_Reference#Point'>Point</a> equals (x, y). <a href='#SkPath_arcTo'>arcTo</a> scales radii <a href='#SkPath_arcTo_5_r'>r</a> to fit last <a href='#Path'>Path</a> <a href='SkPoint_Reference#Point'>Point</a> and
-<a href='#SkPath_arcTo_5_xy'>xy</a> if both are greater than zero but too small to describe an arc.
+<a href='#Arc'>Arc</a> <a href='#SkPath_arcTo_5_sweep'>sweep</a> is always less than 360 degrees. <a href='#SkPath_arcTo'>arcTo</a> appends <a href='undocumented#Line'>Line</a> to <a href='#SkPath_arcTo_5_xy'>xy</a> if either
+radii are zero, or if last <a href='#Path'>Path</a> <a href='SkPoint_Reference#Point'>Point</a> equals (x, y). <a href='#SkPath_arcTo'>arcTo</a> scales radii <a href='#SkPath_arcTo_5_r'>r</a> to fit
+last <a href='#Path'>Path</a> <a href='SkPoint_Reference#Point'>Point</a> and <a href='#SkPath_arcTo_5_xy'>xy</a> if both are greater than zero but too small to describe
+an arc.
<a href='#SkPath_arcTo'>arcTo</a> appends up to four <a href='#Conic'>Conic</a> curves.
<a href='#SkPath_arcTo'>arcTo</a> implements the functionality of <a href='undocumented#Arc'>SVG Arc</a>, although <a href='undocumented#SVG'>SVG</a> "<a href='#SkPath_arcTo_5_sweep'>sweep</a>-flag" value is
@@ -4092,10 +4093,7 @@
Appends <a href='#Arc'>Arc</a> to <a href='#Path'>Path</a>, relative to last <a href='#Path'>Path</a> <a href='SkPoint_Reference#Point'>Point</a>. <a href='#Arc'>Arc</a> is implemented by one or
more <a href='#Conic'>Conic</a>, weighted to describe part of <a href='undocumented#Oval'>Oval</a> with radii (<a href='#SkPath_rArcTo_rx'>rx</a>, <a href='#SkPath_rArcTo_ry'>ry</a>) rotated by
<a href='#SkPath_rArcTo_xAxisRotate'>xAxisRotate</a> degrees. <a href='#Arc'>Arc</a> curves from last <a href='#Path'>Path</a> <a href='SkPoint_Reference#Point'>Point</a> (x0, y0) to end <a href='SkPoint_Reference#Point'>Point</a>:
-
-(x0 + <a href='#SkPath_rArcTo_dx'>dx</a>, y0 + <a href='#SkPath_rArcTo_dy'>dy</a>)
-,
-choosing one of four possible routes: clockwise or
+<code>\(x0 \+ <a href='#SkPath_rArcTo_dx'>dx</a>, y0 \+ <a href='#SkPath_rArcTo_dy'>dy</a>\)</code>, choosing one of four possible routes: clockwise or
counterclockwise, and smaller or larger. If <a href='#Path'>Path</a> is empty, the start <a href='#Arc'>Arc</a> <a href='SkPoint_Reference#Point'>Point</a>
is (0, 0).
@@ -4289,7 +4287,7 @@
Maximum <a href='#Quad'>Quad</a> count is 2 to the <a href='#SkPath_ConvertConicToQuads_pow2'>pow2</a>.
Every third point in array shares last <a href='SkPoint_Reference#Point'>Point</a> of previous <a href='#Quad'>Quad</a> and first <a href='SkPoint_Reference#Point'>Point</a> of
next <a href='#Quad'>Quad</a>. Maximum <a href='#SkPath_ConvertConicToQuads_pts'>pts</a> storage size is given by:
-(1 + 2 * (1 << <a href='#SkPath_ConvertConicToQuads_pow2'>pow2</a>)) * sizeof(SkPoint).
+<code>\(1 \+ 2 \* \(1 << <a href='#SkPath_ConvertConicToQuads_pow2'>pow2</a>\)\) \* sizeof(SkPoint)</code>.
Returns <a href='#Quad'>Quad</a> count used the approximation, which may be smaller
than the number requested.
@@ -4665,10 +4663,7 @@
</pre>
Adds <a href='undocumented#Circle'>Circle</a> centered at (<a href='#SkPath_addCircle_x'>x</a>, <a href='#SkPath_addCircle_y'>y</a>) of size <a href='#SkPath_addCircle_radius'>radius</a> to <a href='#Path'>Path</a>, appending <a href='#SkPath_kMove_Verb'>kMove Verb</a>,
-four <a href='#SkPath_kConic_Verb'>kConic Verb</a>, and <a href='#SkPath_kClose_Verb'>kClose Verb</a>. <a href='undocumented#Circle'>Circle</a> begins at:
-(<a href='#SkPath_addCircle_x'>x</a> + <a href='#SkPath_addCircle_radius'>radius</a>, <a href='#SkPath_addCircle_y'>y</a>)
-,
-continuing
+four <a href='#SkPath_kConic_Verb'>kConic Verb</a>, and <a href='#SkPath_kClose_Verb'>kClose Verb</a>. <a href='undocumented#Circle'>Circle</a> begins at: <code>\(<a href='#SkPath_addCircle_x'>x</a> \+ <a href='#SkPath_addCircle_radius'>radius</a>, <a href='#SkPath_addCircle_y'>y</a>\)</code>, continuing
clockwise if <a href='#SkPath_addCircle_dir'>dir</a> is <a href='#SkPath_kCW_Direction'>kCW Direction</a>, and counterclockwise if <a href='#SkPath_addCircle_dir'>dir</a> is <a href='#SkPath_kCCW_Direction'>kCCW Direction</a>.
Has no effect if <a href='#SkPath_addCircle_radius'>radius</a> is zero or negative.
diff --git a/site/user/api/SkPixmap_Reference.md b/site/user/api/SkPixmap_Reference.md
index 2b4f60f..4869b66 100644
--- a/site/user/api/SkPixmap_Reference.md
+++ b/site/user/api/SkPixmap_Reference.md
@@ -514,8 +514,7 @@
</pre>
Returns row bytes, the interval from one pixel row to the next. Row bytes
-is at least as large as:
-<a href='#SkPixmap_width'>width</a> * <a href='#SkPixmap_info'>info</a>.bytesPerPixel().
+is at least as large as: <code><a href='#SkPixmap_width'>width</a> \* <a href='#SkPixmap_info'>info</a>\.bytesPerPixel()</code>.
Returns zero if <a href='#SkPixmap_colorType'>colorType</a> is <a href='SkImageInfo_Reference#kUnknown_SkColorType'>kUnknown_SkColorType</a>.
It is up to the <a href='SkBitmap_Reference#Bitmap'>Bitmap</a> creator to ensure that row bytes is a useful value.
@@ -587,7 +586,7 @@
Returns pixel count in each pixel row. Should be equal or less than:
-<a href='#SkPixmap_rowBytes'>rowBytes</a> / <a href='#SkPixmap_info'>info</a>.bytesPerPixel().
+<code><a href='#SkPixmap_rowBytes'>rowBytes</a> / <a href='#SkPixmap_info'>info</a>\.bytesPerPixel()</code>.
### Return Value
@@ -1896,8 +1895,7 @@
<a href='#SkPixmap_readPixels_2_srcX'>srcX</a> and <a href='#SkPixmap_readPixels_2_srcY'>srcY</a> may be negative to copy only top or left of source. Returns
false if <a href='#Pixmap'>Pixmap</a> <a href='#SkPixmap_width'>width</a> or <a href='#SkPixmap_height'>height</a> is zero or negative. Returns false if:
-abs(srcX) >= <a href='#Pixmap'>Pixmap</a> <a href='#SkPixmap_width'>width</a>,
-or ifabs(srcY) >= <a href='#Pixmap'>Pixmap</a> <a href='#SkPixmap_height'>height</a>.
+<code>abs(srcX) >= <a href='#Pixmap'>Pixmap</a> <a href='#SkPixmap_width'>width</a></code>, or if <code>abs(srcY) >= <a href='#Pixmap'>Pixmap</a> <a href='#SkPixmap_height'>height</a></code>.
### Parameters
@@ -1954,8 +1952,7 @@
<a href='#SkPixmap_readPixels_3_srcX'>srcX</a> and <a href='#SkPixmap_readPixels_3_srcY'>srcY</a> may be negative to copy only top or left of source. Returns
false <a href='#Pixmap'>Pixmap</a> <a href='#SkPixmap_width'>width</a> or <a href='#SkPixmap_height'>height</a> is zero or negative. Returns false if:
-abs(srcX) >= <a href='#Pixmap'>Pixmap</a> <a href='#SkPixmap_width'>width</a>,
-or ifabs(srcY) >= <a href='#Pixmap'>Pixmap</a> <a href='#SkPixmap_height'>height</a>.
+<code>abs(srcX) >= <a href='#Pixmap'>Pixmap</a> <a href='#SkPixmap_width'>width</a></code>, or if <code>abs(srcY) >= <a href='#Pixmap'>Pixmap</a> <a href='#SkPixmap_height'>height</a></code>.
### Parameters
diff --git a/site/user/api/SkPoint_Reference.md b/site/user/api/SkPoint_Reference.md
index 85e49c1..c1c91e7 100644
--- a/site/user/api/SkPoint_Reference.md
+++ b/site/user/api/SkPoint_Reference.md
@@ -1136,9 +1136,7 @@
void <a href='#SkPoint_addto_operator'>operator+=(const SkVector& v)</a>
</pre>
-Adds <a href='#Vector'>Vector</a> <a href='#SkPoint_addto_operator_v'>v</a> to <a href='#Point'>Point</a>. Sets <a href='#Point'>Point</a> to:
-(<a href='#SkPoint_fX'>fX</a> + <a href='#SkPoint_addto_operator_v'>v</a>.<a href='#SkPoint_fX'>fX</a>, <a href='#SkPoint_fY'>fY</a> + <a href='#SkPoint_addto_operator_v'>v</a>.<a href='#SkPoint_fY'>fY</a>)
-.
+Adds <a href='#Vector'>Vector</a> <a href='#SkPoint_addto_operator_v'>v</a> to <a href='#Point'>Point</a>. Sets <a href='#Point'>Point</a> to: <code>\(<a href='#SkPoint_fX'>fX</a> \+ <a href='#SkPoint_addto_operator_v'>v</a>\.<a href='#SkPoint_fX'>fX</a>, <a href='#SkPoint_fY'>fY</a> \+ <a href='#SkPoint_addto_operator_v'>v</a>\.<a href='#SkPoint_fY'>fY</a>\)</code>.
### Parameters
@@ -1164,9 +1162,7 @@
void <a href='#SkPoint_subtractfrom_operator'>operator-=(const SkVector& v)</a>
</pre>
-Subtracts <a href='#Vector'>Vector</a> <a href='#SkPoint_subtractfrom_operator_v'>v</a> from <a href='#Point'>Point</a>. Sets <a href='#Point'>Point</a> to:
-(<a href='#SkPoint_fX'>fX</a> - <a href='#SkPoint_subtractfrom_operator_v'>v</a>.<a href='#SkPoint_fX'>fX</a>, <a href='#SkPoint_fY'>fY</a> - <a href='#SkPoint_subtractfrom_operator_v'>v</a>.<a href='#SkPoint_fY'>fY</a>)
-.
+Subtracts <a href='#Vector'>Vector</a> <a href='#SkPoint_subtractfrom_operator_v'>v</a> from <a href='#Point'>Point</a>. Sets <a href='#Point'>Point</a> to: <code>\(<a href='#SkPoint_fX'>fX</a> \- <a href='#SkPoint_subtractfrom_operator_v'>v</a>\.<a href='#SkPoint_fX'>fX</a>, <a href='#SkPoint_fY'>fY</a> \- <a href='#SkPoint_subtractfrom_operator_v'>v</a>\.<a href='#SkPoint_fY'>fY</a>\)</code>.
### Parameters
@@ -1222,9 +1218,7 @@
<a href='#SkPoint'>SkPoint</a>& <a href='#SkPoint_multiplyby_operator'>operator*=(SkScalar scale)</a>
</pre>
-Multiplies <a href='#Point'>Point</a> by scale. Sets <a href='#Point'>Point</a> to:
-(<a href='#SkPoint_fX'>fX</a> * scale, <a href='#SkPoint_fY'>fY</a> * scale)
-.
+Multiplies <a href='#Point'>Point</a> by scale. Sets <a href='#Point'>Point</a> to: <code>\(<a href='#SkPoint_fX'>fX</a> \* scale, <a href='#SkPoint_fY'>fY</a> \* scale\)</code>.
### Parameters
@@ -1420,8 +1414,7 @@
<a href='#SkVector'>SkVector</a> <a href='#SkPoint_subtract_operator'>operator-(const SkPoint& a, const SkPoint& b)</a>
</pre>
-Returns <a href='#Vector'>Vector</a> from <a href='#SkPoint_subtract_operator_b'>b</a> to <a href='#SkPoint_subtract_operator_a'>a</a>, computed as(<a href='#SkPoint_subtract_operator_a'>a</a>.<a href='#SkPoint_fX'>fX</a> - <a href='#SkPoint_subtract_operator_b'>b</a>.<a href='#SkPoint_fX'>fX</a>, <a href='#SkPoint_subtract_operator_a'>a</a>.<a href='#SkPoint_fY'>fY</a> - <a href='#SkPoint_subtract_operator_b'>b</a>.<a href='#SkPoint_fY'>fY</a>)
-.
+Returns <a href='#Vector'>Vector</a> from <a href='#SkPoint_subtract_operator_b'>b</a> to <a href='#SkPoint_subtract_operator_a'>a</a>, computed as <code>\(<a href='#SkPoint_subtract_operator_a'>a</a>\.<a href='#SkPoint_fX'>fX</a> \- <a href='#SkPoint_subtract_operator_b'>b</a>\.<a href='#SkPoint_fX'>fX</a>, <a href='#SkPoint_subtract_operator_a'>a</a>\.<a href='#SkPoint_fY'>fY</a> \- <a href='#SkPoint_subtract_operator_b'>b</a>\.<a href='#SkPoint_fY'>fY</a>\)</code>.
Can also be used to subtract <a href='#Vector'>Vector</a> from <a href='#Point'>Point</a>, returning <a href='#Point'>Point</a>.
Can also be used to subtract <a href='#Vector'>Vector</a> from <a href='#Vector'>Vector</a>, returning <a href='#Vector'>Vector</a>.
@@ -1458,8 +1451,7 @@
</pre>
Returns <a href='#Point'>Point</a> resulting from <a href='#Point'>Point</a> <a href='#SkPoint_add_operator_a'>a</a> offset by <a href='#Vector'>Vector</a> <a href='#SkPoint_add_operator_b'>b</a>, computed as:
-(<a href='#SkPoint_add_operator_a'>a</a>.<a href='#SkPoint_fX'>fX</a> + <a href='#SkPoint_add_operator_b'>b</a>.<a href='#SkPoint_fX'>fX</a>, <a href='#SkPoint_add_operator_a'>a</a>.<a href='#SkPoint_fY'>fY</a> + <a href='#SkPoint_add_operator_b'>b</a>.<a href='#SkPoint_fY'>fY</a>)
-.
+<code>\(<a href='#SkPoint_add_operator_a'>a</a>\.<a href='#SkPoint_fX'>fX</a> \+ <a href='#SkPoint_add_operator_b'>b</a>\.<a href='#SkPoint_fX'>fX</a>, <a href='#SkPoint_add_operator_a'>a</a>\.<a href='#SkPoint_fY'>fY</a> \+ <a href='#SkPoint_add_operator_b'>b</a>\.<a href='#SkPoint_fY'>fY</a>\)</code>.
Can also be used to offset <a href='#Point'>Point</a> <a href='#SkPoint_add_operator_b'>b</a> by <a href='#Vector'>Vector</a> <a href='#SkPoint_add_operator_a'>a</a>, returning <a href='#Point'>Point</a>.
Can also be used to add <a href='#Vector'>Vector</a> to <a href='#Vector'>Vector</a>, returning <a href='#Vector'>Vector</a>.
diff --git a/site/user/api/SkRect_Reference.md b/site/user/api/SkRect_Reference.md
index 488866d..4a35170 100644
--- a/site/user/api/SkRect_Reference.md
+++ b/site/user/api/SkRect_Reference.md
@@ -679,10 +679,8 @@
static constexpr <a href='#SkRect'>SkRect</a> SK_WARN_UNUSED_RESULT <a href='#SkRect_MakeXYWH'>MakeXYWH</a>(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, <a href='undocumented#SkScalar'>SkScalar</a> w, <a href='undocumented#SkScalar'>SkScalar</a> h)
</pre>
-Returns constructed <a href='#Rect'>Rect</a> set to(x, y, x + <a href='#SkRect_MakeXYWH_w'>w</a>, y + <a href='#SkRect_MakeXYWH_h'>h</a>)
-.
-Does not validate input;
-<a href='#SkRect_MakeXYWH_w'>w</a> or <a href='#SkRect_MakeXYWH_h'>h</a> may be negative.
+Returns constructed <a href='#Rect'>Rect</a> set to <code>\(x, y, x \+ <a href='#SkRect_MakeXYWH_w'>w</a>, y \+ <a href='#SkRect_MakeXYWH_h'>h</a>\)</code>.
+Does not validate input; <a href='#SkRect_MakeXYWH_w'>w</a> or <a href='#SkRect_MakeXYWH_h'>h</a> may be negative.
### Parameters
@@ -1890,10 +1888,8 @@
void <a href='#SkRect_setXYWH'>setXYWH</a>(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, <a href='undocumented#SkScalar'>SkScalar</a> width, <a href='undocumented#SkScalar'>SkScalar</a> height)
</pre>
-Sets <a href='#Rect'>Rect</a> to(x, y, x + width, y + height)
-.
-Does not validate input;
-width or height may be negative.
+Sets <a href='#Rect'>Rect</a> to <code>\(x, y, x \+ width, y \+ height\)</code>.
+Does not validate input; width or height may be negative.
### Parameters
@@ -2449,10 +2445,8 @@
<a href='#Rect'>Rects</a> intersect when they enclose a common area. To intersect, each of the pair
must describe area; <a href='#SkRect_fLeft'>fLeft</a> is less than <a href='#SkRect_fRight'>fRight</a>, and <a href='#SkRect_fTop'>fTop</a> is less than <a href='#SkRect_fBottom'>fBottom</a>;
empty() returns false. The intersection of <a href='#Rect'>Rect</a> pair can be described by:
-
-(max(a.<a href='#SkRect_fLeft'>fLeft</a>, b.<a href='#SkRect_fLeft'>fLeft</a>), max(a.<a href='#SkRect_fTop'>fTop</a>, b.<a href='#SkRect_fTop'>fTop</a>),
-min(a.<a href='#SkRect_fRight'>fRight</a>, b.<a href='#SkRect_fRight'>fRight</a>), min(a.<a href='#SkRect_fBottom'>fBottom</a>, b.<a href='#SkRect_fBottom'>fBottom</a>))
-.
+<code>\(max\(a\.<a href='#SkRect_fLeft'>fLeft</a>, b\.<a href='#SkRect_fLeft'>fLeft</a>\), max\(a\.<a href='#SkRect_fTop'>fTop</a>, b\.<a href='#SkRect_fTop'>fTop</a>\),
+ min\(a\.<a href='#SkRect_fRight'>fRight</a>, b\.<a href='#SkRect_fRight'>fRight</a>\), min\(a\.<a href='#SkRect_fBottom'>fBottom</a>, b\.<a href='#SkRect_fBottom'>fBottom</a>\)\)</code>.
The intersection is only meaningful if the resulting <a href='#Rect'>Rect</a> is not empty and
describes an area: <a href='#SkRect_fLeft'>fLeft</a> is less than <a href='#SkRect_fRight'>fRight</a>, and <a href='#SkRect_fTop'>fTop</a> is less than <a href='#SkRect_fBottom'>fBottom</a>.
@@ -3116,9 +3110,8 @@
</pre>
Sets <a href='SkIRect_Reference#IRect'>IRect</a> by adding 0.5 and discarding the fractional portion of <a href='#Rect'>Rect</a>
-members, using(<a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fLeft)</a>, <a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fTop)</a>,
-<a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fRight)</a>, <a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fBottom)</a>)
-.
+members, using <code>\(<a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fLeft)</a>, <a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fTop)</a>,
+ <a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fRight)</a>, <a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fBottom)</a>\)</code>.
### Parameters
@@ -3152,10 +3145,9 @@
void <a href='#SkRect_roundOut'>roundOut</a>(<a href='SkIRect_Reference#SkIRect'>SkIRect</a>* dst) const
</pre>
-Sets <a href='SkIRect_Reference#IRect'>IRect</a> by discarding the fractional portion of <a href='#SkRect_fLeft'>fLeft</a> and <a href='#SkRect_fTop'>fTop</a>; and
-rounding up <a href='#SkRect_fRight'>fRight</a> and <a href='#SkRect_fBottom'>fBottom</a>, using(<a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fLeft)</a>, <a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fTop)</a>,
-<a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fRight)</a>, <a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fBottom)</a>)
-.
+Sets <a href='SkIRect_Reference#IRect'>IRect</a> by discarding the fractional portion of <a href='#SkRect_fLeft'>fLeft</a> and <a href='#SkRect_fTop'>fTop</a>; and rounding
+up <a href='#SkRect_fRight'>fRight</a> and <a href='#SkRect_fBottom'>fBottom</a>, using <code>\(<a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fLeft)</a>, <a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fTop)</a>,
+ <a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fRight)</a>, <a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fBottom)</a>\)</code>.
### Parameters
@@ -3188,10 +3180,9 @@
void <a href='#SkRect_roundOut'>roundOut</a>(<a href='#SkRect'>SkRect</a>* dst) const
</pre>
-Sets <a href='#Rect'>Rect</a> by discarding the fractional portion of <a href='#SkRect_fLeft'>fLeft</a> and <a href='#SkRect_fTop'>fTop</a>; and
-rounding up <a href='#SkRect_fRight'>fRight</a> and <a href='#SkRect_fBottom'>fBottom</a>, using(<a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fLeft)</a>, <a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fTop)</a>,
-<a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fRight)</a>, <a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fBottom)</a>)
-.
+Sets <a href='#Rect'>Rect</a> by discarding the fractional portion of <a href='#SkRect_fLeft'>fLeft</a> and <a href='#SkRect_fTop'>fTop</a>; and rounding
+up <a href='#SkRect_fRight'>fRight</a> and <a href='#SkRect_fBottom'>fBottom</a>, using <code>\(<a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fLeft)</a>, <a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fTop)</a>,
+ <a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fRight)</a>, <a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fBottom)</a>\)</code>.
### Parameters
@@ -3225,10 +3216,9 @@
void <a href='#SkRect_roundIn'>roundIn</a>(<a href='SkIRect_Reference#SkIRect'>SkIRect</a>* dst) const
</pre>
-Sets <a href='#Rect'>Rect</a> by rounding up <a href='#SkRect_fLeft'>fLeft</a> and <a href='#SkRect_fTop'>fTop</a>; and
-discarding the fractional portion of <a href='#SkRect_fRight'>fRight</a> and <a href='#SkRect_fBottom'>fBottom</a>, using(<a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fLeft)</a>, <a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fTop)</a>,
-<a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fRight)</a>, <a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fBottom)</a>)
-.
+Sets <a href='#Rect'>Rect</a> by rounding up <a href='#SkRect_fLeft'>fLeft</a> and <a href='#SkRect_fTop'>fTop</a>; and discarding the fractional portion
+of <a href='#SkRect_fRight'>fRight</a> and <a href='#SkRect_fBottom'>fBottom</a>, using <code>\(<a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fLeft)</a>, <a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fTop)</a>,
+ <a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fRight)</a>, <a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fBottom)</a>\)</code>.
### Parameters
@@ -3262,9 +3252,8 @@
</pre>
Returns <a href='SkIRect_Reference#IRect'>IRect</a> by adding 0.5 and discarding the fractional portion of <a href='#Rect'>Rect</a>
-members, using(<a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fLeft)</a>, <a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fTop)</a>,
-<a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fRight)</a>, <a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fBottom)</a>)
-.
+members, using <code>\(<a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fLeft)</a>, <a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fTop)</a>,
+ <a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fRight)</a>, <a href='undocumented#SkScalarRoundToInt'>SkScalarRoundToInt(fBottom)</a>\)</code>.
### Return Value
@@ -3294,10 +3283,9 @@
<a href='SkIRect_Reference#SkIRect'>SkIRect</a> <a href='#SkRect_roundOut'>roundOut</a>() const
</pre>
-Sets <a href='SkIRect_Reference#IRect'>IRect</a> by discarding the fractional portion of <a href='#SkRect_fLeft'>fLeft</a> and <a href='#SkRect_fTop'>fTop</a>; and
-rounding up <a href='#SkRect_fRight'>fRight</a> and <a href='#SkRect_fBottom'>fBottom</a>, using(<a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fLeft)</a>, <a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fTop)</a>,
-<a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fRight)</a>, <a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fBottom)</a>)
-.
+Sets <a href='SkIRect_Reference#IRect'>IRect</a> by discarding the fractional portion of <a href='#SkRect_fLeft'>fLeft</a> and <a href='#SkRect_fTop'>fTop</a>; and rounding
+up <a href='#SkRect_fRight'>fRight</a> and <a href='#SkRect_fBottom'>fBottom</a>, using <code>\(<a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fLeft)</a>, <a href='undocumented#SkScalarFloorToInt'>SkScalarFloorToInt(fTop)</a>,
+ <a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fRight)</a>, <a href='undocumented#SkScalarCeilToInt'>SkScalarCeilToInt(fBottom)</a>\)</code>.
### Return Value
diff --git a/site/user/api/SkSurface_Reference.md b/site/user/api/SkSurface_Reference.md
index 93d0a7a..8499932 100644
--- a/site/user/api/SkSurface_Reference.md
+++ b/site/user/api/SkSurface_Reference.md
@@ -1797,8 +1797,7 @@
Copies <a href='SkRect_Reference#Rect'>Rect</a> of pixels from the <a href='#SkSurface_writePixels_src'>src</a> <a href='SkPixmap_Reference#Pixmap'>Pixmap</a> to the <a href='#Surface'>Surface</a>.
Source <a href='SkRect_Reference#Rect'>Rect</a> corners are (0, 0) and (<a href='#SkSurface_writePixels_src'>src</a>.<a href='#SkSurface_width'>width</a>, <a href='#SkSurface_writePixels_src'>src</a>.<a href='#SkSurface_height'>height</a>).
-Destination <a href='SkRect_Reference#Rect'>Rect</a> corners are (<a href='#SkSurface_writePixels_dstX'>dstX</a>, <a href='#SkSurface_writePixels_dstY'>dstY</a>) and(<a href='#SkSurface_writePixels_dstX'>dstX</a> + <a href='#Surface'>Surface</a> <a href='#SkSurface_width'>width</a>, <a href='#SkSurface_writePixels_dstY'>dstY</a> + <a href='#Surface'>Surface</a> <a href='#SkSurface_height'>height</a>)
-.
+Destination <a href='SkRect_Reference#Rect'>Rect</a> corners are (<a href='#SkSurface_writePixels_dstX'>dstX</a>, <a href='#SkSurface_writePixels_dstY'>dstY</a>) and <code>\(<a href='#SkSurface_writePixels_dstX'>dstX</a> \+ <a href='#Surface'>Surface</a> <a href='#SkSurface_width'>width</a>, <a href='#SkSurface_writePixels_dstY'>dstY</a> \+ <a href='#Surface'>Surface</a> <a href='#SkSurface_height'>height</a>\)</code>.
Copies each readable pixel intersecting both rectangles, without scaling,
converting to <a href='#Surface'>Surface</a> colorType() and <a href='#Surface'>Surface</a> alphaType() if required.
@@ -1835,8 +1834,7 @@
Copies <a href='SkRect_Reference#Rect'>Rect</a> of pixels from the <a href='#SkSurface_writePixels_2_src'>src</a> <a href='SkBitmap_Reference#Bitmap'>Bitmap</a> to the <a href='#Surface'>Surface</a>.
Source <a href='SkRect_Reference#Rect'>Rect</a> corners are (0, 0) and (<a href='#SkSurface_writePixels_2_src'>src</a>.<a href='#SkSurface_width'>width</a>, <a href='#SkSurface_writePixels_2_src'>src</a>.<a href='#SkSurface_height'>height</a>).
-Destination <a href='SkRect_Reference#Rect'>Rect</a> corners are (<a href='#SkSurface_writePixels_2_dstX'>dstX</a>, <a href='#SkSurface_writePixels_2_dstY'>dstY</a>) and(<a href='#SkSurface_writePixels_2_dstX'>dstX</a> + <a href='#Surface'>Surface</a> <a href='#SkSurface_width'>width</a>, <a href='#SkSurface_writePixels_2_dstY'>dstY</a> + <a href='#Surface'>Surface</a> <a href='#SkSurface_height'>height</a>)
-.
+Destination <a href='SkRect_Reference#Rect'>Rect</a> corners are (<a href='#SkSurface_writePixels_2_dstX'>dstX</a>, <a href='#SkSurface_writePixels_2_dstY'>dstY</a>) and <code>\(<a href='#SkSurface_writePixels_2_dstX'>dstX</a> \+ <a href='#Surface'>Surface</a> <a href='#SkSurface_width'>width</a>, <a href='#SkSurface_writePixels_2_dstY'>dstY</a> \+ <a href='#Surface'>Surface</a> <a href='#SkSurface_height'>height</a>\)</code>.
Copies each readable pixel intersecting both rectangles, without scaling,
converting to <a href='#Surface'>Surface</a> colorType() and <a href='#Surface'>Surface</a> alphaType() if required.
diff --git a/tools/bookmaker/bookmaker.cpp b/tools/bookmaker/bookmaker.cpp
index 998ccce..411e192 100644
--- a/tools/bookmaker/bookmaker.cpp
+++ b/tools/bookmaker/bookmaker.cpp
@@ -95,6 +95,7 @@
#define R_Y Resolvable::kYes
#define R_N Resolvable::kNo
#define R_O Resolvable::kOut
+#define R_K Resolvable::kCode
#define R_F Resolvable::kFormula
#define R_C Resolvable::kClone
@@ -111,7 +112,7 @@
, { "Bug", MarkType::kBug, R_N, E_N, M_CSST | M_MDCM | M_E
| M(Example) | M(NoExample) }
, { "Class", MarkType::kClass, R_Y, E_O, M_CSST }
-, { "Code", MarkType::kCode, R_F, E_N, M_CSST | M_E | M_MD | M(Typedef) }
+, { "Code", MarkType::kCode, R_K, E_N, M_CSST | M_E | M_MD | M(Typedef) }
, { "", MarkType::kColumn, R_Y, E_N, M(Row) }
, { "", MarkType::kComment, R_N, E_N, 0 }
, { "Const", MarkType::kConst, R_Y, E_O, M_E | M_CSST }
@@ -173,6 +174,7 @@
#undef R_O
#undef R_N
#undef R_Y
+#undef R_K
#undef R_F
#undef R_C
@@ -381,6 +383,29 @@
}
}
break;
+ case MarkType::kFormula:
+ // hasEnd : single line / multiple line
+ if (!fParent || MarkType::kFormula != fParent->fMarkType) {
+ SkASSERT(!definition || MarkType::kFormula == definition->fMarkType);
+ fMarkup.emplace_front(markType, defStart, fLineCount, fParent, fMC);
+ definition = &fMarkup.front();
+ definition->fContentStart = fChar;
+ definition->fName = typeNameBuilder[0];
+ definition->fFiddle = fParent->fFiddle;
+ fParent = definition;
+ } else {
+ SkASSERT(fParent && MarkType::kFormula == fParent->fMarkType);
+ SkASSERT(fMC == defStart[0]);
+ SkASSERT(fMC == defStart[-1]);
+ definition = fParent;
+ definition->fTerminator = fChar;
+ if (!this->popParentStack(definition)) {
+ return false;
+ }
+ this->parseHashFormula(definition);
+ fParent->fChildren.push_back(definition);
+ }
+ break;
// these types are children of parents, but are not in named maps
case MarkType::kDescription:
case MarkType::kStdOut:
@@ -483,7 +508,6 @@
case MarkType::kCode:
case MarkType::kExample:
case MarkType::kFile:
- case MarkType::kFormula:
case MarkType::kFunction:
case MarkType::kLegend:
case MarkType::kList:
@@ -573,52 +597,9 @@
definition->fTerminator = this->lineEnd() - 1;
fParent->fChildren.push_back(definition);
if (MarkType::kAnchor == markType) {
- this->skipToEndBracket(fMC);
- fMarkup.emplace_front(MarkType::kLink, fChar, fLineCount, definition, fMC);
- SkAssertResult(fMC == this->next());
- this->skipWhiteSpace();
- Definition* link = &fMarkup.front();
- link->fContentStart = fChar;
- link->fContentEnd = this->trimmedBracketEnd(fMC);
- this->skipToEndBracket(fMC);
- SkAssertResult(fMC == this->next());
- SkAssertResult(fMC == this->next());
- link->fTerminator = fChar;
- definition->fContentEnd = link->fContentEnd;
- definition->fTerminator = fChar;
- definition->fChildren.emplace_back(link);
+ this->parseHashAnchor(definition);
} else if (MarkType::kLine == markType) {
- const char* nextLF = this->strnchr('\n', this->fEnd);
- const char* start = fChar;
- const char* end = this->trimmedBracketEnd(fMC);
- this->skipToEndBracket(fMC, nextLF);
- if (fMC != this->next() || fMC != this->next()) {
- return this->reportError<bool>("expected ## to delineate line");
- }
- fMarkup.emplace_front(MarkType::kText, start, fLineCount, definition, fMC);
- Definition* text = &fMarkup.front();
- if (!islower(start[0]) && (!isdigit(start[0])
- || MarkType::kConst != definition->fParent->fMarkType)) {
- return this->reportError<bool>("expect lower case start");
- }
- string contents = string(start, end - start);
- if (string::npos != contents.find('.')) {
- return this->reportError<bool>("expect phrase, not sentence");
- }
- size_t firstSpace = contents.find(' ');
- if (string::npos == firstSpace || 0 == firstSpace || 's' != start[firstSpace - 1]) {
- if (MarkType::kMethod == fParent->fMarkType && "experimental" != contents
- && "incomplete" != contents) {
- return this->reportError<bool>( "expect phrase in third person present"
- " tense (1st word should end in 's'");
- }
- }
- text->fContentStart = start;
- text->fContentEnd = end;
- text->fTerminator = fChar;
- definition->fContentEnd = text->fContentEnd;
- definition->fTerminator = fChar;
- definition->fChildren.emplace_back(text);
+ this->parseHashLine(definition);
} else if (IncompleteAllowed(markType)) {
this->skipSpace();
fParent->fDeprecated = true;
@@ -1283,7 +1264,9 @@
if (this->peek() == fMC) {
this->next();
if (!lineStart && ' ' < this->peek()) {
- return this->reportError<bool>("expected definition");
+ if (!fParent || MarkType::kFormula != fParent->fMarkType) {
+ return this->reportError<bool>("expected definition");
+ }
}
if (this->peek() != fMC) {
if (MarkType::kColumn == fParent->fMarkType) {
@@ -1356,10 +1339,11 @@
}
continue;
} else if (this->peek() == ' ') {
- if (!fParent || (MarkType::kTable != fParent->fMarkType
+ if (!fParent || (MarkType::kFormula != fParent->fMarkType
&& MarkType::kLegend != fParent->fMarkType
&& MarkType::kList != fParent->fMarkType
- && MarkType::kLine != fParent->fMarkType)) {
+ && MarkType::kLine != fParent->fMarkType
+ && MarkType::kTable != fParent->fMarkType)) {
int endHashes = this->endHashCount();
if (endHashes <= 1) {
if (fParent) {
@@ -1735,13 +1719,18 @@
}
bool BmhParser::hasEndToken() const {
- const char* last = fLine + this->lineLength();
- while (last > fLine && ' ' >= *--last)
- ;
- if (--last < fLine) {
- return false;
- }
- return last[0] == fMC && last[1] == fMC;
+ const char* ptr = fLine;
+ char test;
+ do {
+ if (ptr >= fEnd) {
+ return false;
+ }
+ test = *ptr++;
+ if ('\n' == test) {
+ return false;
+ }
+ } while (fMC != test || fMC != *ptr);
+ return true;
}
string BmhParser::memberName() {
@@ -1942,6 +1931,69 @@
return start;
}
+void BmhParser::parseHashAnchor(Definition* definition) {
+ this->skipToEndBracket(fMC);
+ fMarkup.emplace_front(MarkType::kLink, fChar, fLineCount, definition, fMC);
+ SkAssertResult(fMC == this->next());
+ this->skipWhiteSpace();
+ Definition* link = &fMarkup.front();
+ link->fContentStart = fChar;
+ link->fContentEnd = this->trimmedBracketEnd(fMC);
+ this->skipToEndBracket(fMC);
+ SkAssertResult(fMC == this->next());
+ SkAssertResult(fMC == this->next());
+ link->fTerminator = fChar;
+ definition->fContentEnd = link->fContentEnd;
+ definition->fTerminator = fChar;
+ definition->fChildren.emplace_back(link);
+}
+
+void BmhParser::parseHashFormula(Definition* definition) {
+ const char* start = definition->fContentStart;
+ definition->trimEnd();
+ const char* end = definition->fContentEnd;
+ fMarkup.emplace_front(MarkType::kText, start, fLineCount, definition, fMC);
+ Definition* text = &fMarkup.front();
+ text->fContentStart = start;
+ text->fContentEnd = end;
+ text->fTerminator = definition->fTerminator;
+ definition->fChildren.emplace_back(text);
+}
+
+void BmhParser::parseHashLine(Definition* definition) {
+ const char* nextLF = this->strnchr('\n', this->fEnd);
+ const char* start = fChar;
+ const char* end = this->trimmedBracketEnd(fMC);
+ this->skipToEndBracket(fMC, nextLF);
+ if (fMC != this->next() || fMC != this->next()) {
+ return this->reportError<void>("expected ## to delineate line");
+ }
+ fMarkup.emplace_front(MarkType::kText, start, fLineCount, definition, fMC);
+ Definition* text = &fMarkup.front();
+ if (!islower(start[0]) && (!isdigit(start[0])
+ || MarkType::kConst != definition->fParent->fMarkType)) {
+ return this->reportError<void>("expect lower case start");
+ }
+ string contents = string(start, end - start);
+ if (string::npos != contents.find('.')) {
+ return this->reportError<void>("expect phrase, not sentence");
+ }
+ size_t firstSpace = contents.find(' ');
+ if (string::npos == firstSpace || 0 == firstSpace || 's' != start[firstSpace - 1]) {
+ if (MarkType::kMethod == fParent->fMarkType && "experimental" != contents
+ && "incomplete" != contents) {
+ return this->reportError<void>( "expect phrase in third person present"
+ " tense (1st word should end in 's'");
+ }
+ }
+ text->fContentStart = start;
+ text->fContentEnd = end;
+ text->fTerminator = fChar;
+ definition->fContentEnd = text->fContentEnd;
+ definition->fTerminator = fChar;
+ definition->fChildren.emplace_back(text);
+}
+
bool BmhParser::popParentStack(Definition* definition) {
if (!fParent) {
return this->reportError<bool>("missing parent");
@@ -2118,11 +2170,11 @@
}
this->skipWhiteSpace();
if (fMC != this->peek()) {
- return this->reportError<bool>("expected end mark");
+ return this->reportError<bool>("expected end mark 1");
}
this->next();
if (fMC != this->peek()) {
- return this->reportError<bool>("expected end mark");
+ return this->reportError<bool>("expected end mark 2");
}
this->next();
return true;
@@ -2175,7 +2227,7 @@
bool BmhParser::skipToString() {
this->skipSpace();
if (fMC != this->peek()) {
- return this->reportError<bool>("expected end mark");
+ return this->reportError<bool>("expected end mark 3");
}
this->next();
this->skipSpace();
@@ -2238,7 +2290,6 @@
case MarkType::kCode:
case MarkType::kDescription:
case MarkType::kExternal:
- case MarkType::kFormula:
case MarkType::kFunction:
case MarkType::kLegend:
case MarkType::kList:
@@ -2246,6 +2297,7 @@
case MarkType::kPrivate:
this->skipNoName();
break;
+ case MarkType::kFormula:
case MarkType::kLine:
this->skipToString();
break;
diff --git a/tools/bookmaker/bookmaker.h b/tools/bookmaker/bookmaker.h
index edb629e..3951dce 100644
--- a/tools/bookmaker/bookmaker.h
+++ b/tools/bookmaker/bookmaker.h
@@ -657,6 +657,19 @@
return fChar + index;
}
+ const char* trimmedBracketNoEnd(const char bracket) const {
+ int max = (int) (fEnd - fChar);
+ int index = 0;
+ while (index < max && bracket != fChar[index]) {
+ ++index;
+ }
+ SkASSERT(index < max);
+ while (index > 0 && ' ' >= fChar[index - 1]) {
+ --index;
+ }
+ return fChar + index;
+ }
+
const char* trimmedLineEnd() const {
const char* result = this->lineEnd();
while (result > fChar && ' ' >= result[-1]) {
@@ -972,6 +985,8 @@
return nullptr;
}
+ void trimEnd();
+
string fText; // if text is constructed instead of in a file, it's put here
const char* fStart = nullptr; // .. in original text file, or the start of fText
const char* fContentStart; // start past optional markup name
@@ -1150,6 +1165,7 @@
fParent = def;
}
+ void checkLineLength(size_t len, const char* str);
static void CopyToFile(string oldFile, string newFile);
static char* FindDateTime(char* buffer, int size);
@@ -1169,6 +1185,7 @@
void indentToColumn(int column) {
SkASSERT(column >= fColumn);
SkASSERT(!fReturnOnWrite);
+ SkASSERT(column < 80);
if (fDebugOut) {
SkDebugf("%*s", column - fColumn, "");
}
@@ -1229,6 +1246,7 @@
void resetCommon() {
fLine = fChar = fStart;
fLineCount = 0;
+ fLinesWritten = 1;
fParent = nullptr;
fIndent = 0;
fOut = nullptr;
@@ -1236,6 +1254,7 @@
fPendingLF = 0;
fPendingSpace = 0;
fOutdentNext = false;
+ fWritingIncludes = false;
nl();
}
@@ -1255,7 +1274,7 @@
SkAssertResult(writeBlockTrim(size, data));
}
- bool writeBlockIndent(int size, const char* data);
+ bool writeBlockIndent(int size, const char* data, bool ignoreIndent);
void writeBlockSeparator() {
this->writeString(
@@ -1314,12 +1333,14 @@
int fColumn; // current column; number of chars past last linefeed
int fIndent; // desired indention
int fPendingSpace; // one or two spaces should preceed the next string or block
+ size_t fLinesWritten; // as opposed to fLineCount, number of lines read
char fLastChar; // last written
bool fDebugOut; // set true to write to std out
bool fValidate; // set true to check anchor defs and refs
bool fOutdentNext; // set at end of embedded struct to prevent premature outdent
bool fWroteSomething; // used to detect empty content; an alternative source is preferable
bool fReturnOnWrite; // used to detect non-empty content; allowing early return
+ bool fWritingIncludes; // set true when writing includes to check >100 columns
private:
typedef TextParser INHERITED;
@@ -1369,7 +1390,8 @@
kNo, // neither resolved nor output
kYes, // resolved, output
kOut, // mostly resolved, output (FIXME: is this really different from kYes?)
- kFormula, // resolve methods as they are used, not as they are prototyped
+ kCode, // resolve methods as they are used, not as they are prototyped
+ kFormula, // kCode, plus make most spaces non-breaking
kLiteral, // output untouched
kClone, // resolved, output, with references to clones as well
kSimple, // resolve simple words (used to resolve method declarations)
@@ -1453,8 +1475,11 @@
return findDefinitions();
}
- bool popParentStack(Definition* definition);
- void reportDuplicates(const Definition& def, string dup) const;
+ void parseHashAnchor(Definition* );
+ void parseHashFormula(Definition* );
+ void parseHashLine(Definition* );
+ bool popParentStack(Definition* );
+ void reportDuplicates(const Definition& , string dup) const;
void resetExampleHashes();
void reset() override {
@@ -2057,7 +2082,8 @@
fPendingMethod = false;
fFirstWrite = false;
fStructEnded = false;
- }
+ fWritingIncludes = true;
+ }
string resolveAlias(const Definition* );
string resolveMethod(const char* start, const char* end, bool first);
diff --git a/tools/bookmaker/definition.cpp b/tools/bookmaker/definition.cpp
index f058483..c148357 100644
--- a/tools/bookmaker/definition.cpp
+++ b/tools/bookmaker/definition.cpp
@@ -1177,6 +1177,13 @@
return !def.eof() && ')' == def.peek() && !m.eof() && ')' == m.peek();
}
+
+void Definition::trimEnd() {
+ while (fContentEnd > fContentStart && ' ' >= fContentEnd[-1]) {
+ --fContentEnd;
+ }
+}
+
void RootDefinition::clearVisited() {
fVisited = false;
for (auto& leaf : fLeaves) {
diff --git a/tools/bookmaker/includeWriter.cpp b/tools/bookmaker/includeWriter.cpp
index e9ab8b9..7f3a2d4 100644
--- a/tools/bookmaker/includeWriter.cpp
+++ b/tools/bookmaker/includeWriter.cpp
@@ -144,7 +144,7 @@
if (!fReturnOnWrite && !literalOutdent) {
fIndent += 4;
}
- wroteSomething |= this->writeBlockIndent(commentLen, commentStart);
+ wroteSomething |= this->writeBlockIndent(commentLen, commentStart, false);
if (fReturnOnWrite) {
return true;
}
@@ -190,7 +190,7 @@
}
commentLen = (int) (prop->fContentEnd - commentStart);
if (commentLen > 0) {
- wroteSomething |= this->writeBlockIndent(commentLen, commentStart);
+ wroteSomething |= this->writeBlockIndent(commentLen, commentStart, false);
if (wroteSomething && fReturnOnWrite) {
return true;
}
@@ -230,8 +230,7 @@
if (fReturnOnWrite) {
return true;
}
- if (commentLen > 1 && '\n' == prop->fStart[-1] &&
- '\n' == prop->fStart[-2]) {
+ if (commentLen > 1 && '\n' == prop->fStart[-1]) {
this->lf(1);
} else {
this->writeSpace();
@@ -243,7 +242,7 @@
if (fIndent < fColumn + 1) {
fIndent = fColumn + 1;
}
- wroteSomething |= this->writeBlockIndent(prop->length(), prop->fContentStart);
+ wroteSomething |= this->writeBlockIndent(prop->length(), prop->fContentStart, true);
fIndent = saveIndent;
if (wroteSomething && fReturnOnWrite) {
return true;
@@ -251,13 +250,8 @@
commentStart = prop->fTerminator;
commentLen = (int) (def->fContentEnd - commentStart);
if (!fReturnOnWrite) {
- if (commentLen > 1 && '\n' == commentStart[0] && '\n' == commentStart[1]) {
- this->lf(2);
- } else {
- SkASSERT('\n' == prop->fTerminator[0]);
- if ('.' != prop->fTerminator[1] && !fLinefeeds) {
- this->writeSpace();
- }
+ if (commentLen > 1 && ' ' == commentStart[0] && !fLinefeeds) {
+ this->writeSpace();
}
}
} break;
diff --git a/tools/bookmaker/mdOut.cpp b/tools/bookmaker/mdOut.cpp
index 60a39e9..c79d8b2 100644
--- a/tools/bookmaker/mdOut.cpp
+++ b/tools/bookmaker/mdOut.cpp
@@ -278,6 +278,11 @@
return nullptr;
}
+static bool formula_or_code(BmhParser::Resolvable resolvable) {
+ return BmhParser::Resolvable::kFormula == resolvable
+ || BmhParser::Resolvable::kCode == resolvable;
+}
+
// FIXME: preserve inter-line spaces and don't add new ones
string MdOut::addReferences(const char* refStart, const char* refEnd,
BmhParser::Resolvable resolvable) {
@@ -292,7 +297,7 @@
const char* base = t.fChar;
t.skipWhiteSpace();
const char* wordStart = t.fChar;
- if (BmhParser::Resolvable::kFormula == resolvable && !t.eof() && '"' == t.peek()) {
+ if (formula_or_code(resolvable) && !t.eof() && '"' == t.peek()) {
t.next();
t.skipToEndBracket('"');
t.next();
@@ -306,7 +311,24 @@
} else {
wordStart = base;
}
- result += string(wordStart, start - wordStart);
+ string nonWord = string(wordStart, start - wordStart);
+ if (BmhParser::Resolvable::kFormula == resolvable) {
+ string unbreakable;
+ bool comma = false;
+ for (char c : nonWord) {
+ if (string::npos != string("\\`*_{}[]()#+-.!").find(c)) {
+ unbreakable += '\\';
+ }
+ if (' ' == c && !comma) {
+ unbreakable += " ";
+ } else {
+ unbreakable += c;
+ }
+ comma = ',' == c;
+ }
+ nonWord = unbreakable;
+ }
+ result += nonWord;
if ('\n' != result.back()) {
while (start > wordStart && '\n' == start[-1]) {
result += '\n';
@@ -373,7 +395,7 @@
}
if (!foundMatch) {
if (!(def = this->isDefined(t, fullRef, resolvable))) {
- if (BmhParser::Resolvable::kFormula == resolvable) {
+ if (formula_or_code(resolvable)) {
// TODO: look for looser mapping -- if methods name match, look for
// unique mapping based on number of parameters
// for now, just look for function name match
@@ -422,16 +444,14 @@
// look for Sk / sk / SK ..
if (!ref.compare(0, 2, "Sk") && ref != "Skew" && ref != "Skews" && ref != "Skewing"
&& ref != "Skip" && ref != "Skips") {
- if (BmhParser::Resolvable::kOut != resolvable &&
- BmhParser::Resolvable::kFormula != resolvable) {
+ if (BmhParser::Resolvable::kOut != resolvable && !formula_or_code(resolvable)) {
t.reportError("missed Sk prefixed");
fAddRefFailed = true;
return result;
}
}
if (!ref.compare(0, 2, "SK")) {
- if (BmhParser::Resolvable::kOut != resolvable &&
- BmhParser::Resolvable::kFormula != resolvable) {
+ if (BmhParser::Resolvable::kOut != resolvable && !formula_or_code(resolvable)) {
t.reportError("missed SK prefixed");
fAddRefFailed = true;
return result;
@@ -465,7 +485,7 @@
}
if (BmhParser::Resolvable::kSimple != resolvable
&& BmhParser::Resolvable::kOut != resolvable
- && BmhParser::Resolvable::kFormula != resolvable) {
+ && !formula_or_code(resolvable)) {
t.reportError("missed camelCase");
fAddRefFailed = true;
return result;
@@ -506,7 +526,7 @@
continue;
}
if (BmhParser::Resolvable::kOut != resolvable &&
- BmhParser::Resolvable::kFormula != resolvable) {
+ !formula_or_code(resolvable)) {
t.reportError("undefined reference");
fAddRefFailed = true;
} else {
@@ -763,6 +783,9 @@
}
if (BmhParser::Resolvable::kNo != resolvable) {
end = def->fContentEnd;
+ if (MarkType::kFormula == def->fMarkType && ' ' == start[0]) {
+ this->writeSpace();
+ }
this->resolveOut(start, end, resolvable);
}
if (MarkType::kEnumClass == def->fMarkType) {
@@ -1054,7 +1077,7 @@
}
} else {
if (BmhParser::Resolvable::kOut != resolvable &&
- BmhParser::Resolvable::kFormula != resolvable) {
+ !formula_or_code(resolvable)) {
parser.reportError("SK undefined");
fAddRefFailed = true;
}
@@ -1085,7 +1108,7 @@
}
}
if (BmhParser::Resolvable::kOut != resolvable &&
- BmhParser::Resolvable::kFormula != resolvable) {
+ !formula_or_code(resolvable)) {
parser.reportError("_ undefined");
fAddRefFailed = true;
}
@@ -1692,6 +1715,16 @@
case MarkType::kTemplate:
break;
case MarkType::kText:
+ if (def->fParent && MarkType::kFormula == def->fParent->fMarkType) {
+ if (fColumn > 0) {
+ this->writeSpace();
+ }
+ this->writePending();
+ this->htmlOut("<code>");
+ this->resolveOut(def->fContentStart, def->fContentEnd,
+ BmhParser::Resolvable::kFormula);
+ this->htmlOut("</code>");
+ }
break;
case MarkType::kToDo:
break;
diff --git a/tools/bookmaker/parserCommon.cpp b/tools/bookmaker/parserCommon.cpp
index edeec02..20e5604 100644
--- a/tools/bookmaker/parserCommon.cpp
+++ b/tools/bookmaker/parserCommon.cpp
@@ -14,6 +14,28 @@
SkDebugf("%.*s", len, data);
}
+void ParserCommon::checkLineLength(size_t len, const char* str) {
+ if (!fWritingIncludes) {
+ return;
+ }
+ int column = fColumn;
+ const char* lineStart = str;
+ for (size_t index = 0; index < len; ++index) {
+ if ('\n' == str[index]) {
+ if (column > 100) {
+ SkDebugf("> 100 columns in %s line %d\n", fFileName.c_str(), fLinesWritten);
+ SkDebugf("%.*s\n", &str[index + 1] - lineStart, lineStart);
+ SkDebugf(""); // convenient place to set breakpoints
+ }
+ fLinesWritten++;
+ column = 0;
+ lineStart = &str[index + 1];
+ } else {
+ column++;
+ }
+ }
+}
+
void ParserCommon::CopyToFile(string oldFile, string newFile) {
int bufferSize;
char* buffer = ParserCommon::ReadToBuffer(newFile, &bufferSize);
@@ -115,14 +137,15 @@
return true;
}
-bool ParserCommon::writeBlockIndent(int size, const char* data) {
+bool ParserCommon::writeBlockIndent(int size, const char* data, bool ignoreIdent) {
bool wroteSomething = false;
while (size && ' ' >= data[size - 1]) {
--size;
}
bool newLine = false;
+ char firstCh = 0;
while (size) {
- while (size && ' ' > data[0]) {
+ while (size && (' ' > data[0] || (' ' == data[0] && ignoreIdent))) {
++data;
--size;
}
@@ -135,15 +158,22 @@
if (newLine) {
this->lf(1);
}
+ int indent = fIndent;
+ if (!firstCh) {
+ firstCh = data[0];
+ } else if ('(' == firstCh) {
+ indent += 1;
+ }
TextParser parser(fFileName, data, data + size, fLineCount);
const char* lineEnd = parser.strnchr('\n', data + size);
int len = lineEnd ? (int) (lineEnd - data) : size;
this->writePending();
- this->indentToColumn(fIndent);
+ this->indentToColumn(indent);
if (fDebugOut) {
debug_out(len, data);
}
fprintf(fOut, "%.*s", len, data);
+ checkLineLength(len, data);
size -= len;
data += len;
newLine = true;
@@ -186,6 +216,7 @@
debug_out(size, data);
}
fprintf(fOut, "%.*s", size, data);
+ checkLineLength(size, data);
fWroteSomething = true;
int added = 0;
fLastChar = data[size - 1];
@@ -212,6 +243,7 @@
SkDebugf("\n");
}
fprintf(fOut, "\n");
+ checkLineLength(1, "\n");
++fLinefeeds;
wroteLF = true;
}
@@ -219,6 +251,7 @@
if (wroteLF) {
SkASSERT(0 == fColumn);
SkASSERT(fIndent >= fSpaces);
+ SkASSERT(fIndent - fSpaces < 80);
if (fDebugOut) {
SkDebugf("%*s", fIndent - fSpaces, "");
}
@@ -226,6 +259,7 @@
fColumn = fIndent;
fSpaces = fIndent;
}
+ SkASSERT(!fWritingIncludes || fColumn + fPendingSpace < 100);
for (int index = 0; index < fPendingSpace; ++index) {
if (fDebugOut) {
SkDebugf(" ");
@@ -252,6 +286,7 @@
debug_out((int) strlen(str), str);
}
fprintf(fOut, "%s", str);
+ checkLineLength(strlen(str), str);
fColumn += len;
fSpaces = 0;
fLinefeeds = 0;