aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPaint.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/core/SkPaint.h')
-rw-r--r--include/core/SkPaint.h67
1 files changed, 34 insertions, 33 deletions
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 38795629cc..0664cdd360 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -6,7 +6,7 @@
*/
/* Generated by tools/bookmaker from include/core/SkPaint.h and docs/SkPaint_Reference.bmh
- on 2018-06-14 13:13:33. Additional documentation and examples can be found at:
+ on 2018-07-13 08:15:10. Additional documentation and examples can be found at:
https://skia.org/user/api/SkPaint_Reference
You may edit either file directly. Structural changes to public interfaces require
@@ -245,7 +245,7 @@ public:
*/
void setFlags(uint32_t flags);
- /** If true, pixels on the active edges of SkPath may be drawn with partial transparency.
+ /** Returns true if pixels on the active edges of SkPath may be drawn with partial transparency.
Equivalent to getFlags() masked with kAntiAlias_Flag.
@@ -265,7 +265,7 @@ public:
*/
void setAntiAlias(bool aa);
- /** If true, color error may be distributed to smooth color transition.
+ /** Returns true if color error may be distributed to smooth color transition.
Equivalent to getFlags() masked with kDither_Flag.
@@ -284,7 +284,7 @@ public:
*/
void setDither(bool dither);
- /** If true, text is converted to SkPath before drawing and measuring.
+ /** Returns true if text is converted to SkPath before drawing and measuring.
Equivalent to getFlags() masked with kLinearText_Flag.
@@ -294,7 +294,7 @@ public:
return SkToBool(this->getFlags() & kLinearText_Flag);
}
- /** If true, text is converted to SkPath before drawing and measuring.
+ /** Returns true if text is converted to SkPath before drawing and measuring.
By default, kLinearText_Flag is clear.
Sets kLinearText_Flag if linearText is true.
@@ -304,7 +304,7 @@ public:
*/
void setLinearText(bool linearText);
- /** If true, glyphs at different sub-pixel positions may differ on pixel edge coverage.
+ /** Returns true if glyphs at different sub-pixel positions may differ on pixel edge coverage.
Equivalent to getFlags() masked with kSubpixelText_Flag.
@@ -323,7 +323,7 @@ public:
*/
void setSubpixelText(bool subpixelText);
- /** If true, glyphs may use LCD striping to improve glyph edges.
+ /** Returns true if glyphs may use LCD striping to improve glyph edges.
Returns true if SkPaint::Flags kLCDRenderText_Flag is set.
@@ -342,7 +342,7 @@ public:
*/
void setLCDRenderText(bool lcdText);
- /** If true, font engine may return glyphs from font bitmaps instead of from outlines.
+ /** Returns true if font engine may return glyphs from font bitmaps instead of from outlines.
Equivalent to getFlags() masked with kEmbeddedBitmapText_Flag.
@@ -361,9 +361,9 @@ public:
*/
void setEmbeddedBitmapText(bool useEmbeddedBitmapText);
- /** If true, and if SkPaint::Hinting is set to kNormal_Hinting or kFull_Hinting, and if
- platform uses FreeType as the font manager, instruct the font manager to always hint
- glyphs.
+ /** Returns true if SkPaint::Hinting is set to kNormal_Hinting or kFull_Hinting, and if
+ platform uses FreeType as the font manager. If true, instructs
+ the font manager to always hint glyphs.
Equivalent to getFlags() masked with kAutoHinting_Flag.
@@ -373,8 +373,9 @@ public:
return SkToBool(this->getFlags() & kAutoHinting_Flag);
}
- /** If SkPaint::Hinting is set to kNormal_Hinting or kFull_Hinting and useAutohinter is set,
- instruct the font manager to always hint glyphs.
+ /** Sets whether to always hint glyphs.
+ If SkPaint::Hinting is set to kNormal_Hinting or kFull_Hinting and useAutohinter is set,
+ instructs the font manager to always hint glyphs.
auto-hinting has no effect if SkPaint::Hinting is set to kNo_Hinting or
kSlight_Hinting.
@@ -387,7 +388,7 @@ public:
*/
void setAutohinted(bool useAutohinter);
- /** If true, glyphs are drawn top to bottom instead of left to right.
+ /** Returns true if glyphs are drawn top to bottom instead of left to right.
Equivalent to getFlags() masked with kVerticalText_Flag.
@@ -397,7 +398,7 @@ public:
return SkToBool(this->getFlags() & kVerticalText_Flag);
}
- /** If true, text advance positions the next glyph below the previous glyph instead of to the
+ /** Returns true if text advance positions the next glyph below the previous glyph instead of to the
right of previous glyph.
Sets kVerticalText_Flag if vertical is true.
@@ -407,7 +408,7 @@ public:
*/
void setVerticalText(bool verticalText);
- /** If true, approximate bold by increasing the stroke width when creating glyph bitmaps
+ /** Returns true if approximate bold by increasing the stroke width when creating glyph bitmaps
from outlines.
Equivalent to getFlags() masked with kFakeBoldText_Flag.
@@ -418,7 +419,7 @@ public:
return SkToBool(this->getFlags() & kFakeBoldText_Flag);
}
- /** Use increased stroke width when creating glyph bitmaps to approximate a bold typeface.
+ /** Increases stroke width when creating glyph bitmaps to approximate a bold typeface.
Sets kFakeBoldText_Flag if fakeBoldText is true.
Clears kFakeBoldText_Flag if fakeBoldText is false.
@@ -472,7 +473,7 @@ public:
*/
static constexpr int kStyleCount = kStrokeAndFill_Style + 1;
- /** Whether the geometry is filled, stroked, or filled and stroked.
+ /** Returns whether the geometry is filled, stroked, or filled and stroked.
@return one of:kFill_Style, kStroke_Style, kStrokeAndFill_Style
*/
@@ -541,13 +542,13 @@ public:
*/
void setStrokeWidth(SkScalar width);
- /** The limit at which a sharp corner is drawn beveled.
+ /** Returns the limit at which a sharp corner is drawn beveled.
@return zero and greater miter limit
*/
SkScalar getStrokeMiter() const { return fMiterLimit; }
- /** The limit at which a sharp corner is drawn beveled.
+ /** Sets the limit at which a sharp corner is drawn beveled.
Valid values are zero and greater.
Has no effect if miter is less than zero.
@@ -595,33 +596,33 @@ public:
*/
static constexpr int kJoinCount = kLast_Join + 1;
- /** The geometry drawn at the beginning and end of strokes.
+ /** Returns the geometry drawn at the beginning and end of strokes.
@return one of: kButt_Cap, kRound_Cap, kSquare_Cap
*/
Cap getStrokeCap() const { return (Cap)fBitfields.fCapType; }
- /** The geometry drawn at the beginning and end of strokes.
+ /** Sets the geometry drawn at the beginning and end of strokes.
@param cap one of: kButt_Cap, kRound_Cap, kSquare_Cap;
has no effect if cap is not valid
*/
void setStrokeCap(Cap cap);
- /** The geometry drawn at the corners of strokes.
+ /** Returns the geometry drawn at the corners of strokes.
@return one of: kMiter_Join, kRound_Join, kBevel_Join
*/
Join getStrokeJoin() const { return (Join)fBitfields.fJoinType; }
- /** The geometry drawn at the corners of strokes.
+ /** Sets the geometry drawn at the corners of strokes.
@param join one of: kMiter_Join, kRound_Join, kBevel_Join;
otherwise, has no effect
*/
void setStrokeJoin(Join join);
- /** The filled equivalent of the stroked path.
+ /** Returns the filled equivalent of the stroked path.
@param src SkPath read to create a filled version
@param dst resulting SkPath; may be the same as src, but may not be nullptr
@@ -633,7 +634,7 @@ public:
bool getFillPath(const SkPath& src, SkPath* dst, const SkRect* cullRect,
SkScalar resScale = 1) const;
- /** The filled equivalent of the stroked path.
+ /** Returns the filled equivalent of the stroked path.
Replaces dst with the src path modified by SkPathEffect and style stroke.
SkPathEffect, if any, is not culled. stroke width is created with default precision.
@@ -646,7 +647,7 @@ public:
return this->getFillPath(src, dst, nullptr, 1);
}
- /** Optional colors used when filling a path, such as a gradient.
+ /** Returns optional colors used when filling a path, such as a gradient.
Does not alter SkShader SkRefCnt.
@@ -654,7 +655,7 @@ public:
*/
SkShader* getShader() const { return fShader.get(); }
- /** Optional colors used when filling a path, such as a gradient.
+ /** Returns optional colors used when filling a path, such as a gradient.
Increases SkShader SkRefCnt by one.
@@ -662,7 +663,7 @@ public:
*/
sk_sp<SkShader> refShader() const;
- /** Optional colors used when filling a path, such as a gradient.
+ /** Sets optional colors used when filling a path, such as a gradient.
Sets SkShader to shader, decreasing SkRefCnt of the previous SkShader.
Increments shader SkRefCnt by one.
@@ -1015,7 +1016,7 @@ public:
SkScalar fStrikeoutThickness; //!< strikeout thickness
SkScalar fStrikeoutPosition; //!< strikeout position relative to baseline
- /** If SkPaint::FontMetrics has a valid underline thickness, return true, and set
+ /** Returns true if SkPaint::FontMetrics has a valid underline thickness, and sets
thickness to that value. If the underline thickness is not valid,
return false, and ignore thickness.
@@ -1030,7 +1031,7 @@ public:
return false;
}
- /** If SkPaint::FontMetrics has a valid underline position, return true, and set
+ /** Returns true if SkPaint::FontMetrics has a valid underline position, and sets
position to that value. If the underline position is not valid,
return false, and ignore position.
@@ -1045,7 +1046,7 @@ public:
return false;
}
- /** If SkPaint::FontMetrics has a valid strikeout thickness, return true, and set
+ /** Returns true if SkPaint::FontMetrics has a valid strikeout thickness, and sets
thickness to that value. If the underline thickness is not valid,
return false, and ignore thickness.
@@ -1060,7 +1061,7 @@ public:
return false;
}
- /** If SkPaint::FontMetrics has a valid strikeout position, return true, and set
+ /** Returns true if SkPaint::FontMetrics has a valid strikeout position, and sets
position to that value. If the underline position is not valid,
return false, and ignore position.