fix bookmaker
more strict bookmaker rules are now in effect;
all methods require documentation, and all documentation
is checked for accuracy.
In this case, the multiple temporary copies of SkPaint::getHinting
and SkPaint::setHinting are checked.
In an upcoming change, bookmaker will ignore symbols marked
as deprecated, experimental, or private; making this bookmaker's
strictness a little more palatable.
TBR=reed@google.com
Docs-Preview: https://skia.org/?cl=169822
Bug: skia:
Change-Id: If1bc079a13828a5ca435911338b9c75acbe8ad6f
Reviewed-on: https://skia-review.googlesource.com/c/169822
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
diff --git a/docs/SkPaint_Reference.bmh b/docs/SkPaint_Reference.bmh
index a21183c..29944b8 100644
--- a/docs/SkPaint_Reference.bmh
+++ b/docs/SkPaint_Reference.bmh
@@ -391,7 +391,7 @@
##
##
-#Method void setHinting(Hinting hintingLevel)
+#Method void setHinting(Hinting h)
#In Hinting
#Populate
diff --git a/docs/undocumented.bmh b/docs/undocumented.bmh
index 694d9b2..b8f1140 100644
--- a/docs/undocumented.bmh
+++ b/docs/undocumented.bmh
@@ -345,14 +345,14 @@
##
#Class SkFont
##
-#Enum SkFontHinting
-#Const kNo_SkFontHinting 0
+#EnumClass SkFontHinting
+#Const kNone 0
##
-#Const kSlight_SkFontHinting 1
+#Const kSlight 1
##
-#Const kNormal_SkFontHinting 2
+#Const kNormal 2
##
-#Const kFull_SkFontHinting 3
+#Const kFull 3
##
##
#Struct SkFontMetrics
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 1bd5dec..dcc2fca 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -201,18 +201,31 @@
/** Sets level of glyph outline adjustment.
Does not check for valid values of hintingLevel.
- @param hintingLevel one of: kNo_SkFontHinting, kSlight_SkFontHinting,
- kNormal_SkFontHinting, kFull_SkFontHinting
+ @param hintingLevel one of: SkFontHinting::kNone, SkFontHinting::kSlight,
+ SkFontHinting::kNormal, SkFontHinting::kFull
*/
void setHinting(SkFontHinting hintingLevel);
#ifdef SK_SUPPORT_LEGACY_NESTED_HINTINGENUM
+ /** Returns level of glyph outline adjustment.
+
+ @return one of: kNo_Hinting, kSlight_Hinting, kNormal_Hinting, kFull_Hinting
+ */
Hinting getHinting() const { return (Hinting)fBitfields.fHinting; }
+
+ /** Sets level of glyph outline adjustment.
+ Does not check for valid values of h.
+
+ @param h one of: kNo_Hinting, kSlight_Hinting, kNormal_Hinting, kFull_Hinting
+ */
void setHinting(Hinting h) {
this->setHinting((SkFontHinting)h);
}
#else
/** Returns level of glyph outline adjustment.
+
+ @return one of: SkFontHinting::kNone, SkFontHinting::kSlight, SkFontHinting::kNormal,
+ SkFontHinting::kFull
*/
SkFontHinting getHinting() const { return (SkFontHinting)fBitfields.fHinting; }
#endif
diff --git a/site/user/api/SkPaint_Reference.md b/site/user/api/SkPaint_Reference.md
index 029665c..d718fdc 100644
--- a/site/user/api/SkPaint_Reference.md
+++ b/site/user/api/SkPaint_Reference.md
@@ -27,11 +27,12 @@
<a href='#SkPaint_kFull_Hinting'>kFull_Hinting</a> = 3,
};
+ <a href='#SkPaint_kFull_Hinting'>void</a> <a href='#SkPaint_setHinting'>setHinting</a>(<a href='undocumented#SkFontHinting'>SkFontHinting</a> <a href='undocumented#SkFontHinting'>hintingLevel</a>);
<a href='#SkPaint_Hinting'>Hinting</a> <a href='#SkPaint_getHinting'>getHinting</a>() <a href='#SkPaint_getHinting'>const</a>;
- <a href='#SkPaint_getHinting'>void</a> <a href='#SkPaint_setHinting'>setHinting</a>(<a href='undocumented#SkFontHinting'>SkFontHinting</a> <a href='undocumented#SkFontHinting'>hintingLevel</a>);
- <a href='undocumented#SkFontHinting'>void</a> <a href='#SkPaint_setHinting'>setHinting</a>(<a href='#SkPaint_Hinting'>Hinting</a> <a href='#SkPaint_Hinting'>hintingLevel</a>);
+ <a href='#SkPaint_getHinting'>void</a> <a href='#SkPaint_setHinting'>setHinting</a>(<a href='#SkPaint_Hinting'>Hinting</a> <a href='#SkPaint_Hinting'>h</a>);
+ <a href='undocumented#SkFontHinting'>SkFontHinting</a> <a href='#SkPaint_getHinting'>getHinting</a>() <a href='#SkPaint_getHinting'>const</a>;
- <a href='#SkPaint_Hinting'>enum</a> <a href='#SkPaint_Flags'>Flags</a> {
+ <a href='#SkPaint_getHinting'>enum</a> <a href='#SkPaint_Flags'>Flags</a> {
<a href='#SkPaint_kAntiAlias_Flag'>kAntiAlias_Flag</a> = 0<a href='#SkPaint_kAntiAlias_Flag'>x01</a>,
<a href='#SkPaint_kDither_Flag'>kDither_Flag</a> = 0<a href='#SkPaint_kDither_Flag'>x04</a>,
<a href='#SkPaint_kFakeBoldText_Flag'>kFakeBoldText_Flag</a> = 0<a href='#SkPaint_kFakeBoldText_Flag'>x20</a>,
@@ -715,11 +716,11 @@
### Parameters
<table> <tr> <td><a name='SkPaint_setHinting_hintingLevel'><code><strong>hintingLevel</strong></code></a></td>
- <td>one of: <a href='undocumented#kNo_SkFontHinting'>kNo_SkFontHinting</a>, <a href='undocumented#kSlight_SkFontHinting'>kSlight_SkFontHinting</a>,</td>
+ <td>one of: <a href='undocumented#SkFontHinting'>SkFontHinting</a>::<a href='#SkFontHinting_kNone'>kNone</a>, <a href='undocumented#SkFontHinting'>SkFontHinting</a>::<a href='#SkFontHinting_kSlight'>kSlight</a>,</td>
</tr>
</table>
-<a href='undocumented#kNormal_SkFontHinting'>kNormal_SkFontHinting</a>, <a href='undocumented#kFull_SkFontHinting'>kFull_SkFontHinting</a>
+<a href='undocumented#SkFontHinting'>SkFontHinting</a>::<a href='#SkFontHinting_kNormal'>kNormal</a>, <a href='undocumented#SkFontHinting'>SkFontHinting</a>::<a href='#SkFontHinting_kFull'>kFull</a>
### Example
@@ -738,15 +739,15 @@
---
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-void <a href='#SkPaint_setHinting'>setHinting</a>(<a href='#SkPaint_Hinting'>Hinting</a> <a href='#SkPaint_Hinting'>hintingLevel</a>)
+void <a href='#SkPaint_setHinting'>setHinting</a>(<a href='#SkPaint_Hinting'>Hinting</a> <a href='#SkPaint_Hinting'>h</a>)
</pre>
Sets level of <a href='undocumented#Glyph'>glyph</a> <a href='undocumented#Glyph'>outline</a> <a href='undocumented#Glyph'>adjustment</a>.
-Does not check for valid values of <a href='#SkPaint_setHinting_2_hintingLevel'>hintingLevel</a>.
+Does not check for valid values of <a href='#SkPaint_setHinting_2_h'>h</a>.
### Parameters
-<table> <tr> <td><a name='SkPaint_setHinting_2_hintingLevel'><code><strong>hintingLevel</strong></code></a></td>
+<table> <tr> <td><a name='SkPaint_setHinting_2_h'><code><strong>h</strong></code></a></td>
<td>one of: <a href='#SkPaint_kNo_Hinting'>kNo_Hinting</a>, <a href='#SkPaint_kSlight_Hinting'>kSlight_Hinting</a>, <a href='#SkPaint_kNormal_Hinting'>kNormal_Hinting</a>, <a href='#SkPaint_kFull_Hinting'>kFull_Hinting</a></td>
</tr>
</table>