Skip to content

Commit

Permalink
fix paint docs
Browse files Browse the repository at this point in the history
fix bookmaker build for setHinting

TBR=reed@google.com

Bug: skia:
Change-Id: Ieade1bca4cd369eb5a9431796c83e039ae69e81c
Reviewed-on: https://skia-review.googlesource.com/c/168480
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
  • Loading branch information
Cary Clark authored and Skia Commit-Bot committed Nov 6, 2018
1 parent 5b2bda7 commit 11407e5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 15 deletions.
27 changes: 14 additions & 13 deletions docs/SkPaint_Reference.bmh
Original file line number Diff line number Diff line change
Expand Up @@ -375,24 +375,25 @@ Set SkPaintDefaults_Hinting at compile time to change the default setting.
##
##

#Method void setHinting(Hinting hintingLevel)

#Method void setHinting(SkFontHinting hintingLevel)
#In Hinting
#Line # sets Hinting, glyph outline adjustment level ##
Sets level of glyph outline adjustment.
Does not check for valid values of hintingLevel.
#Populate

#Table
#Legend
# Hinting # value # effect on generated glyph outlines ##
##
# kNo_Hinting # 0 # leaves glyph outlines unchanged from their native representation ##
# kSlight_Hinting # 1 # modifies glyph outlines minimally to improve contrast ##
# kNormal_Hinting # 2 # modifies glyph outlines to improve contrast ##
# kFull_Hinting # 3 # modifies glyph outlines for maximum contrast ##
#Example
SkPaint paint1, paint2;
paint2.setHinting(kNormal_SkFontHinting);
SkDebugf("paint1 %c= paint2\n", paint1 == paint2 ? '=' : ':');

#StdOut
paint1 == paint2
##
##
##

#Param hintingLevel one of: kNo_Hinting, kSlight_Hinting, kNormal_Hinting, kFull_Hinting ##
#Method void setHinting(Hinting hintingLevel)
#In Hinting
#Populate

#Example
SkPaint paint1, paint2;
Expand Down
10 changes: 10 additions & 0 deletions docs/undocumented.bmh
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,16 @@ FT_Load_Glyph
##
#Class SkFont
##
#Enum SkFontHinting
#Const kNo_SkFontHinting 0
##
#Const kSlight_SkFontHinting 1
##
#Const kNormal_SkFontHinting 2
##
#Const kFull_SkFontHinting 3
##
##
#Topic ##

#Topic Font_Manager
Expand Down
11 changes: 9 additions & 2 deletions include/core/SkPaint.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,17 @@ class SK_API SkPaint {
/** Sets level of glyph outline adjustment.
Does not check for valid values of hintingLevel.
@param hintingLevel one of: kNo_Hinting, kSlight_Hinting, kNormal_Hinting, kFull_Hinting
@param hintingLevel one of: kNo_SkFontHinting, kSlight_SkFontHinting,
kNormal_SkFontHinting, kFull_SkFontHinting
*/
void setHinting(SkFontHinting hintingLevel);
void setHinting(Hinting hintingLevel) {

/** Sets level of glyph outline adjustment.
Does not check for valid values of hintingLevel.
@param hintingLevel one of: kNo_Hinting, kSlight_Hinting, kNormal_Hinting, kFull_Hinting
*/
void setHinting(Hinting hintingLevel) {
this->setHinting((SkFontHinting)hintingLevel);
}

Expand Down

0 comments on commit 11407e5

Please sign in to comment.