missing description for FontMetricFlags

rearrange class descriptions to make them
appear consistently inside the #Class
declaration in the .bmh files.

Look for the descriptions there and
regenerate the .md files.

Docs-Preview: https://skia.org/?cl=46523
TBR=caryclark@google.com
Bug: skia: 6898
Change-Id: I00a176428725ef27667d3f23d76d6b7ff0cfced1
Reviewed-on: https://skia-review.googlesource.com/46523
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
This commit is contained in:
Cary Clark 2017-09-15 02:56:12 -04:00 committed by Skia Commit-Bot
parent 053d7a43e5
commit e4aa37128f
6 changed files with 51 additions and 59 deletions

View File

@ -1,6 +1,8 @@
#Topic Canvas
#Alias Canvas_Reference
#Class SkCanvas
Canvas provides an interface for drawing, and how the drawing is clipped and transformed.
Canvas contains a stack of Matrix and Clip values.
@ -22,8 +24,6 @@ destination.
Canvas can be constructed to draw to Bitmap without first creating Raster_Surface.
This approach may be deprecated in the future.
#Class SkCanvas
#Topic Overview
#Subtopic Subtopics

View File

@ -1,6 +1,8 @@
#Topic Paint
#Alias Paint_Reference
#Class SkPaint
Paint controls options applied when drawing and measuring. Paint collects all
options outside of the Canvas_Clip and Canvas_Matrix.
@ -27,8 +29,6 @@ Paint describes a single color, a single font, a single image quality, and so on
Multiple colors are drawn either by using multiple paints or with objects like
Shader attached to Paint.
#Class SkPaint
#Topic Overview
#Subtopic Subtopics
@ -4000,10 +4000,10 @@ All character encoding are able to represent all of Unicode, differing only
in the total storage required.
#A UTF-8 (RFC 3629) # https://tools.ietf.org/html/rfc3629 ## is made up of 8-bit bytes,
and encodes ASCII in one byte, and all valid code points in Unicode in multiple bytes.
#A UTF-16 (RFC 2781) # https://tools.ietf.org/html/rfc2781 ## uses one or two 16-bit words,
and encodes Unicode ranges 0x0000 to 0xD7FF and 0xE000 to 0xFFFF in one word.
#A UTF-32 # http://www.unicode.org/versions/Unicode5.0.0/ch03.pdf ## describes
and encodes ASCII in one byte, and all valid code points in Unicode in multiple
bytes. #A UTF-16 (RFC 2781) # https://tools.ietf.org/html/rfc2781 ## uses one or two 16-bit words,
and encodes Unicode ranges 0x0000 to 0xD7FF and 0xE000 to 0xFFFF in one
word. #A UTF-32 # http://www.unicode.org/versions/Unicode5.0.0/ch03.pdf ## describes
a 32-bit word, which encodes all code points in Unicode.
Font_Manager uses font data to convert character code points into glyph indices.
@ -4159,6 +4159,16 @@ void draw(SkCanvas* canvas) {
#Struct FontMetrics
FontMetrics is filled out by getFontMetrics. FontMetrics contents reflect the values
computed by Font_Manager using Typeface. Values are set to zero if they are
not available.
fUnderlineThickness and fUnderlinePosition have a bit set in fFlags if their values
are valid, since their value may be zero.
fStrikeoutThickness and fStrikeoutPosition have a bit set in fFlags if their values
are valid, since their value may be zero.
#Code
struct FontMetrics {
enum FontMetricsFlags {
@ -4192,17 +4202,12 @@ void draw(SkCanvas* canvas) {
};
##
FontMetrics is filled out by getFontMetrics. FontMetrics contents reflect the values
computed by Font_Manager using Typeface. Values are set to zero if they are
not available.
fUnderlineThickness and fUnderlinePosition have a bit set in fFlags if their values
are valid, since their value may be zero.
fStrikeoutThickness and fStrikeoutPosition have a bit set in fFlags if their values
are valid, since their value may be zero.
#Enum FontMetricsFlags
FontMetricsFlags are set in fFlags when underline and strikeout metrics are valid;
the underline or strikeout metric may be valid and zero.
Fonts with embedded bitmaps may not have valid underline or strikeout metrics.
#Code
enum FontMetricsFlags {
kUnderlineThicknessIsValid_Flag = 1 << 0,
@ -4212,10 +4217,6 @@ void draw(SkCanvas* canvas) {
};
##
FontMetricsFlags are set in fFlags when underline and strikeout metrics are valid;
the underline or strikeout metric may be valid and zero.
Fonts with embedded bitmaps may not have valid underline or strikeout metrics.
#Const kUnderlineThicknessIsValid_Flag 0x0001
Set if fUnderlineThickness is valid.
##

View File

@ -1,5 +1,6 @@
#Topic Pixmap
#Alias Pixmap_Reference
#Class SkPixmap
Pixmap provides a utility to pair SkImageInfo with pixels and row bytes.

View File

@ -2,6 +2,8 @@ SkCanvas Reference
===
# <a name="Canvas"></a> Canvas
# <a name="SkCanvas"></a> Class SkCanvas
<a href="#Canvas">Canvas</a> provides an interface for drawing, and how the drawing is clipped and transformed.
<a href="#Canvas">Canvas</a> contains a stack of <a href="#Matrix">Matrix</a> and <a href="#Clip">Clip</a> values.
@ -23,8 +25,6 @@ destination.
<a href="#Canvas">Canvas</a> can be constructed to draw to <a href="undocumented#Bitmap">Bitmap</a> without first creating <a href="undocumented#Raster_Surface">Raster Surface</a>.
This approach may be deprecated in the future.
# <a name="SkCanvas"></a> Class SkCanvas
# <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics

View File

@ -2,6 +2,8 @@ SkPaint Reference
===
# <a name="Paint"></a> Paint
# <a name="SkPaint"></a> Class SkPaint
<a href="#Paint">Paint</a> controls options applied when drawing and measuring. <a href="#Paint">Paint</a> collects all
options outside of the <a href="#Clip">Canvas Clip</a> and <a href="#Matrix">Canvas Matrix</a>.
@ -28,8 +30,6 @@ is set in <a href="#Paint">Paint</a>.
Multiple colors are drawn either by using multiple paints or with objects like
<a href="undocumented#Shader">Shader</a> attached to <a href="#Paint">Paint</a>.
# <a name="SkPaint"></a> Class SkPaint
# <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
@ -3947,10 +3947,10 @@ All character encoding are able to represent all of <a href="undocumented#Unicod
in the total storage required.
<a href="undocumented#UTF_8">UTF-8</a> (<a href="undocumented#RFC">RFC</a> 3629)is made up of 8-bit bytes,
and encodes <a href="undocumented#ASCII">ASCII</a> in one byte, and all valid code points in <a href="undocumented#Unicode">Unicode</a> in multiple bytes.
<a href="undocumented#UTF_16">UTF-16</a> (<a href="undocumented#RFC">RFC</a> 2781)uses one or two 16-bit words,
and encodes <a href="undocumented#Unicode">Unicode</a> ranges 0x0000 to 0xD7FF and 0xE000 to 0xFFFF in one word.
<a href="undocumented#UTF_32">UTF-32</a>describes
and encodes <a href="undocumented#ASCII">ASCII</a> in one byte, and all valid code points in <a href="undocumented#Unicode">Unicode</a> in multiple
bytes.<a href="undocumented#UTF_16">UTF-16</a> (<a href="undocumented#RFC">RFC</a> 2781)uses one or two 16-bit words,
and encodes <a href="undocumented#Unicode">Unicode</a> ranges 0x0000 to 0xD7FF and 0xE000 to 0xFFFF in one
word.<a href="undocumented#UTF_32">UTF-32</a>describes
a 32-bit word, which encodes all code points in <a href="undocumented#Unicode">Unicode</a>.
<a href="undocumented#Font_Manager">Font Manager</a> uses font data to convert character code points into glyph indices.
@ -4063,6 +4063,14 @@ Y-axis values above the baseline are negative, and below the baseline are positi
<div><fiddle-embed name="b5b76e0a15da0c3530071186a9006498"></fiddle-embed></div>
# <a name="SkPaint_FontMetrics"></a> Struct SkPaint::FontMetrics
<a href="#SkPaint_FontMetrics">FontMetrics</a> is filled out by <a href="#SkPaint_getFontMetrics">getFontMetrics</a>. <a href="#SkPaint_FontMetrics">FontMetrics</a> contents reflect the values
computed by <a href="undocumented#Font_Manager">Font Manager</a> using <a href="undocumented#Typeface">Typeface</a>. Values are set to zero if they are
not available.
<a href="#SkPaint_FontMetrics_fUnderlineThickness">fUnderlineThickness</a> and <a href="#SkPaint_FontMetrics_fUnderlinePosition">fUnderlinePosition</a> have a bit set in <a href="#SkPaint_FontMetrics_fFlags">fFlags</a> if their values
are valid, since their value may be zero.
<a href="#SkPaint_FontMetrics_fStrikeoutThickness">fStrikeoutThickness</a> and <a href="#SkPaint_FontMetrics_fStrikeoutPosition">fStrikeoutPosition</a> have a bit set in <a href="#SkPaint_FontMetrics_fFlags">fFlags</a> if their values
are valid, since their value may be zero.
<pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0">
struct <a href="#SkPaint_FontMetrics">FontMetrics</a> {
@ -4096,17 +4104,12 @@ bool <a href="#SkPaint_FontMetrics_hasStrikeoutThickness">hasStrikeoutThickness(
bool <a href="#SkPaint_FontMetrics_hasStrikeoutPosition">hasStrikeoutPosition(SkScalar* position)</a> const;
};</pre>
<a href="#SkPaint_FontMetrics">FontMetrics</a> is filled out by <a href="#SkPaint_getFontMetrics">getFontMetrics</a>. <a href="#SkPaint_FontMetrics">FontMetrics</a> contents reflect the values
computed by <a href="undocumented#Font_Manager">Font Manager</a> using <a href="undocumented#Typeface">Typeface</a>. Values are set to zero if they are
not available.
<a href="#SkPaint_FontMetrics_fUnderlineThickness">fUnderlineThickness</a> and <a href="#SkPaint_FontMetrics_fUnderlinePosition">fUnderlinePosition</a> have a bit set in <a href="#SkPaint_FontMetrics_fFlags">fFlags</a> if their values
are valid, since their value may be zero.
<a href="#SkPaint_FontMetrics_fStrikeoutThickness">fStrikeoutThickness</a> and <a href="#SkPaint_FontMetrics_fStrikeoutPosition">fStrikeoutPosition</a> have a bit set in <a href="#SkPaint_FontMetrics_fFlags">fFlags</a> if their values
are valid, since their value may be zero.
## <a name="SkPaint_FontMetrics_FontMetricsFlags"></a> Enum SkPaint::FontMetrics::FontMetricsFlags
<a href="#SkPaint_FontMetrics_FontMetricsFlags">FontMetricsFlags</a> are set in <a href="#SkPaint_FontMetrics_fFlags">fFlags</a> when underline and strikeout metrics are valid;
the underline or strikeout metric may be valid and zero.
Fonts with embedded bitmaps may not have valid underline or strikeout metrics.
<pre style="padding: 1em 1em 1em 1em;width: 44em; background-color: #f0f0f0">
enum <a href="#SkPaint_FontMetrics_FontMetricsFlags">FontMetricsFlags</a> {
<a href="#SkPaint_FontMetrics_kUnderlineThicknessIsValid_Flag">kUnderlineThicknessIsValid Flag</a> = 1 << 0,
@ -4115,10 +4118,6 @@ enum <a href="#SkPaint_FontMetrics_FontMetricsFlags">FontMetricsFlags</a> {
<a href="#SkPaint_FontMetrics_kStrikeoutPositionIsValid_Flag">kStrikeoutPositionIsValid Flag</a> = 1 << 3,
};</pre>
<a href="#SkPaint_FontMetrics_FontMetricsFlags">FontMetricsFlags</a> are set in <a href="#SkPaint_FontMetrics_fFlags">fFlags</a> when underline and strikeout metrics are valid;
the underline or strikeout metric may be valid and zero.
Fonts with embedded bitmaps may not have valid underline or strikeout metrics.
### Constants
<table>

View File

@ -406,9 +406,6 @@ void IncludeWriter::enumSizeItems(const Definition& child) {
// walk children and output complete method doxygen description
void IncludeWriter::methodOut(const Definition* method, const Definition& child) {
if ("SkPath::getGenerationID" == method->fName) {
SkDebugf("");
}
fBmhMethod = method;
fMethodDef = &child;
fContinuation = nullptr;
@ -942,14 +939,8 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti
if (Definition* parent = root->fParent) {
if (MarkType::kTopic == parent->fMarkType ||
MarkType::kSubtopic == parent->fMarkType) {
const char* commentStart = parent->fContentStart;
for (auto child : parent->fChildren) {
if (MarkType::kClass == child->fMarkType) {
break;
}
commentStart = child->fTerminator;
}
const char* commentEnd = root->fStart;
const char* commentStart = root->fContentStart;
const char* commentEnd = root->fChildren[0]->fStart;
this->structOut(root, *root, commentStart, commentEnd);
} else {
SkASSERT(0); // incomplete
@ -971,7 +962,7 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti
continue;
}
Definition* codeBlock = nullptr;
Definition* nextBlock = nullptr;
SkDEBUGCODE(Definition* nextBlock = nullptr);
for (auto test : structDef->fChildren) {
if (MarkType::kCode == test->fMarkType) {
SkASSERT(!codeBlock); // FIXME: check enum for correct order earlier
@ -979,14 +970,14 @@ bool IncludeWriter::populate(Definition* def, ParentPair* prevPair, RootDefiniti
continue;
}
if (codeBlock) {
nextBlock = test;
SkDEBUGCODE(nextBlock = test);
break;
}
}
// FIXME: trigger error earlier if inner #Struct or #Class is missing #Code
SkASSERT(nextBlock); // FIXME: check enum for correct order earlier
const char* commentStart = codeBlock->fTerminator;
const char* commentEnd = nextBlock->fStart;
const char* commentStart = structDef->fContentStart;
const char* commentEnd = codeBlock->fStart;
this->structOut(root, *structDef, commentStart, commentEnd);
}
fDeferComment = nullptr;