From 525f9a94eef14b73d8cc131bfdddceac5de65d16 Mon Sep 17 00:00:00 2001 From: skia-bookmaker Date: Thu, 3 May 2018 06:27:39 +0000 Subject: Update markdown files Automatic commit by the Housekeeper-Nightly-Bookmaker bot. TBR=rmistry@google.com NO_MERGE_BUILDS No-Try: true Docs-Preview: https://skia.org/?cl=125642 Change-Id: Iad21d2677892ec4c7f9252b5a3d04532c0f3f2b4 Reviewed-on: https://skia-review.googlesource.com/125642 Commit-Queue: Ravi Mistry Reviewed-by: --- site/user/api/SkCanvas_Reference.md | 81 +++++++++++++++++++------------------ site/user/api/SkPaint_Reference.md | 73 ++++++++++----------------------- 2 files changed, 63 insertions(+), 91 deletions(-) (limited to 'site') diff --git a/site/user/api/SkCanvas_Reference.md b/site/user/api/SkCanvas_Reference.md index 0ddcb7243b..77389ecca3 100644 --- a/site/user/api/SkCanvas_Reference.md +++ b/site/user/api/SkCanvas_Reference.md @@ -388,11 +388,11 @@ canvas is empty --- - + ## SkCanvas
-explicit SkCanvas(SkBaseDevice* device)
+explicit SkCanvas(sk_sp<SkBaseDevice> device)
 
soon @@ -1027,7 +1027,7 @@ true if pixels were copied ### Example -
A black circle drawn on a blue background provides an image to copy. +
A black circle drawn on a blue background provides an image to copy. readPixels copies one quarter of the canvas into each of the four corners. The copied quarter circles overdraw the original circle.
@@ -1350,7 +1350,7 @@ save state and return the depth of the stack. ### Example -
Draw to ever smaller clips; then restore drawing to full canvas. +
Draw to ever smaller clips; then restore drawing to full canvas. Note that the second clipRect is not permitted to enlarge Clip.
@@ -1626,6 +1626,7 @@ and draws Layer. Matrix may be changed by translate, scale, rotate, skew, concat, setMatrix, and resetMatrix. Clip may be changed by clipRect, clipRRect, clipPath, clipRegion. + Rect bounds suggests but does not define the Layer size. To clip drawing to a specific rectangle, use clipRect. @@ -1746,7 +1747,7 @@ defining how Layer allocated by
Canvas Layer captures red and blue circles scaled up by four. +
Canvas Layer captures red and blue circles scaled up by four. scalePaint blends Layer back with transparency.
@@ -1808,7 +1809,7 @@ contents of the previous Layer. ### Example -
Canvas Layer captures a red Anti-aliased circle and a blue Aliased circle scaled +
Canvas Layer captures a red Anti-aliased circle and a blue Aliased circle scaled up by four. After drawing another red circle without scaling on top, the Layer is transferred to the main canvas.
@@ -2120,7 +2121,7 @@ amount to rotate, in degrees ### Example -
Draw clock hands at time 5:10. The hour hand and minute hand point up and +
Draw clock hands at time 5:10. The hour hand and minute hand point up and are rotated clockwise.
@@ -2346,7 +2347,7 @@ and is unaffected by Matrix. ### Example -
Draw a red circle with an Aliased clip and an Anti-aliased clip. +
Draw a red circle with an Aliased clip and an Anti-aliased clip. Use an image filter to zoom into the pixels drawn. The edge of the Aliased clip fully draws pixels in the red circle. The edge of the Anti-aliased clip partially draws pixels in the red circle. @@ -2740,7 +2741,7 @@ true if rect, transformed by +
#### Example Output @@ -2781,7 +2782,7 @@ true if path, transformed by +
#### Example Output @@ -2817,7 +2818,7 @@ bounds of Clip in local coordinates ### Example -
Initial bounds is device bounds outset by 1 on all sides. +
Initial bounds is device bounds outset by 1 on all sides. Clipped bounds is clipPath bounds outset by 1 on all sides. Scaling the canvas by two in x and y scales the local bounds by 1/2 in x and y.
@@ -2898,7 +2899,7 @@ bounds of Clip in Device c ### Example -
Initial bounds is device bounds, not outset. +
Initial bounds is device bounds, not outset. Clipped bounds is clipPath bounds, not outset. Scaling the canvas by 1/2 in x and y scales the device bounds by 1/2 in x and y.
@@ -3057,7 +3058,7 @@ This has the effect of replacing all pixels contained by Clip
+
### See Also @@ -3208,7 +3209,7 @@ stroke, blend, color, and so on, used to draw ### Example -
+
@@ -3516,7 +3517,7 @@ may have any combination of positive non-square radii for the four corners. ### Example -
+
### See Also @@ -3760,7 +3761,7 @@ stroke, blend, color, and so on, used to draw ### Example -
Top rows draw stroked path with combinations of joins and caps. The open contour +
Top rows draw stroked path with combinations of joins and caps. The open contour is affected by caps; the closed contour is affected by joins. Bottom row draws fill the same for open and closed contour. First bottom column shows winding fills overlap. @@ -3949,7 +3950,7 @@ filter strictly within src or draw fas ### Example -
The left bitmap draws with Paint default kNone_SkFilterQuality, and stays within +
The left bitmap draws with Paint default kNone_SkFilterQuality, and stays within its bounds; there is no bleeding with kFast SrcRectConstraint. the middle and right bitmaps draw with kLow_SkFilterQuality; with kStrict SrcRectConstraint, the filter remains within the checkerboard, and @@ -4004,7 +4005,7 @@ filter strictly within isrc or draw ### Example -
+
### See Also @@ -4098,7 +4099,7 @@ filter strictly within src or draw f ### Example -
Canvas scales and translates; transformation from src to dst also scales. +
Canvas scales and translates; transformation from src to dst also scales. The two matrices are concatenated to create the final transformation.
@@ -4149,7 +4150,7 @@ filter strictly within image or dr ### Example -
+
### See Also @@ -4195,7 +4196,7 @@ filter strictly within image or dr ### Example -
+
### See Also @@ -4242,7 +4243,7 @@ and so on; or nullptr ### Example -
The leftmost image is smaller than center; only corners are drawn, all scaled to fit. +
The leftmost image is smaller than center; only corners are drawn, all scaled to fit. The second image equals the size of center; only corners are drawn without scaling. The remaining images are larger than center. All corners draw without scaling. The sides and center are scaled if needed to take up the remaining space. @@ -4292,7 +4293,7 @@ and so on; or nullptr ### Example -
The two leftmost images has four corners and sides to the left and right of center. +
The two leftmost images has four corners and sides to the left and right of center. The leftmost image scales the width of corners proportionately to fit. The third and fourth image corners are not scaled; the sides and center are scaled to fill the remaining space. @@ -4341,7 +4342,7 @@ and so on; or nullptr ### Example -
+
### See Also @@ -4391,7 +4392,7 @@ filter strictly within src or draw fa ### Example -
+
### See Also @@ -4441,7 +4442,7 @@ sample strictly within isrc, or dr ### Example -
+
### See Also @@ -4489,7 +4490,7 @@ filter strictly within bitmap or ### Example -
+
### See Also @@ -4538,7 +4539,7 @@ and so on; or nullptr ### Example -
The two leftmost bitmap draws has four corners and sides to the left and right of center. +
The two leftmost bitmap draws has four corners and sides to the left and right of center. The leftmost bitmap draw scales the width of corners proportionately to fit. The third and fourth draw corners are not scaled; the sides and center are scaled to fill the remaining space. @@ -4701,7 +4702,7 @@ and so on; or nullptr ### Example -
The two leftmost bitmap draws has four corners and sides to the left and right of center. +
The two leftmost bitmap draws has four corners and sides to the left and right of center. The leftmost bitmap draw scales the width of corners proportionately to fit. The third and fourth draw corners are not scaled; the sides are scaled to fill the remaining space; the center is transparent. @@ -4758,7 +4759,7 @@ and so on; or nullptr ### Example -
The leftmost image is smaller than center; only corners are drawn, all scaled to fit. +
The leftmost image is smaller than center; only corners are drawn, all scaled to fit. The second image equals the size of center; only corners are drawn without scaling. The remaining images are larger than center. All corners draw without scaling. The sides are scaled if needed to take up the remaining space; the center is transparent. @@ -4824,7 +4825,7 @@ start of text on
The same text is drawn varying Paint Text Size and varying +
The same text is drawn varying Paint Text Size and varying Matrix.
@@ -5068,7 +5069,7 @@ offset of text above (if negative) ### Example -
+
### See Also @@ -5119,7 +5120,7 @@ to use identity Matrix ### Example -
+
### See Also @@ -5165,7 +5166,7 @@ byte length of text array ### Example -
+
### See Also @@ -5208,7 +5209,7 @@ blend, color, stroking, and so on, used to draw ### Example -
+
### See Also @@ -5250,7 +5251,7 @@ blend, color, stroking, and so on, used to draw ### Example -
Paint attributes unrelated to text, like color, have no effect on paint in allocated Text Blob. +
Paint attributes unrelated to text, like color, have no effect on paint in allocated Text Blob. Paint attributes related to text, like text size, have no effect on paint passed to drawTextBlob.
@@ -5282,7 +5283,7 @@ recorded drawing commands to play ### Example -
+
### See Also @@ -5311,7 +5312,7 @@ recorded drawing commands to play ### Example -
+
### See Also @@ -5345,7 +5346,7 @@ recorded drawing commands to play ### Example -
+
### See Also @@ -5379,7 +5380,7 @@ recorded drawing commands to play ### Example -
+
### See Also diff --git a/site/user/api/SkPaint_Reference.md b/site/user/api/SkPaint_Reference.md index 1be30418fa..a0207fa69e 100644 --- a/site/user/api/SkPaint_Reference.md +++ b/site/user/api/SkPaint_Reference.md @@ -179,7 +179,6 @@ Multiple colors are drawn either by using multiple paints or with objects like | glyphsToUnichars | converts Glyphs into text | | isAntiAlias | returns true if Anti-alias is set | | isAutohinted | returns true if Glyphs are always hinted | -| isDevKernText | returns true if Full Hinting Spacing is set | | isDither | returns true if Dither is set | | isEmbeddedBitmapText | returns true if Font Embedded Bitmaps is set | | isFakeBoldText | returns true if Fake Bold is set | @@ -205,7 +204,6 @@ Multiple colors are drawn either by using multiple paints or with objects like | setBlendMode | sets Blend Mode, how colors combine with destination | | setColor | sets Color Alpha and Color RGB, one drawing color | | setColorFilter | sets Color Filter, alters color | -| setDevKernText | sets or clears Full Hinting Spacing | | setDither | sets or clears Dither | | setDrawLooper | sets Draw Looper, multiple layers | | setEmbeddedBitmapText | sets or clears Font Embedded Bitmaps | @@ -774,7 +772,7 @@ multiple settings at once.
The first column draws points.
- + @@ -789,7 +787,7 @@ multiple settings at once. - + @@ -1027,6 +1025,7 @@ bool isDither() const If true, color error may be distributed to smooth color transition. + Equivalent to getFlags masked with kDither Flag. ### Return Value @@ -1688,51 +1687,15 @@ a specific pair of characters is adjusted using data in the font Kerning tables. bool isDevKernText() const -Returns if character spacing may be adjusted by the hinting difference. - -Equivalent to getFlags masked with kDevKernText Flag. - -### Return Value - -kDevKernText Flag state - -### Example - -
- --- ## setDevKernText
-void setDevKernText(bool devKernText)
+void setDevKernText(bool)
 
-Requests, but does not require, to use hinting to adjust glyph spacing. - -Sets kDevKernText Flag if devKernText is true. -Clears kDevKernText Flag if devKernText is false. - -### Parameters - -
SkPaint::kAntiAlias_Flag 0x0001 mask for setting Anti-alias SkPaint::kAntiAlias_Flag 0x0001mask for setting Anti-alias
SkPaint::kDither_Flag 0x0004mask for setting Dither SkPaint::kSubpixelText_Flag 0x0080mask for setting Subpixel Text
SkPaint::kDevKernText_Flag 0x0100mask for setting Full Hinting Spacing SkPaint::kDevKernText_Flag 0x0100
SkPaint::kLCDRenderText_Flag 0x0200mask for setting LCD Text
- -
devKernText -setting for devKernText
- -### Example - -
- -#### Example Output - -~~~~ -paint1 == paint2 -~~~~ - -
- --- ## Filter Quality Methods @@ -1758,7 +1721,7 @@ and when Paint has a Shader
+
## getFilterQuality @@ -2199,7 +2162,7 @@ The default width for the paint is zero. ### Example -
The pixels hit to represent thin lines vary with the angle of the +
The pixels hit to represent thin lines vary with the angle of the line and the platform implementation.
@@ -2772,7 +2735,7 @@ If Shader generates only
+
## getShader @@ -2984,7 +2947,7 @@ mode used to combine source color with destination color ### Example -
+
#### Example Output @@ -3307,7 +3270,7 @@ Increases Typeface +
#### Example Output @@ -3917,7 +3880,7 @@ one of: kUTF8 TextEncoding, +
#### Example Output @@ -4470,7 +4433,7 @@ true if all text corresponds to a non-z ### Example -
containsText succeeds for degree symbol, but cannot find a glyph index +
containsText succeeds for degree symbol, but cannot find a glyph index corresponding to the Unicode surrogate code point.
@@ -4485,7 +4448,7 @@ corresponding to the Unicode surrogate code point. ### Example -
containsText returns true that glyph index is greater than zero, not +
containsText returns true that glyph index is greater than zero, not that it corresponds to an entry in Typeface.
@@ -4800,7 +4763,9 @@ the string. Uses Text Encoding to decode text, Typeface to get the glyph paths, and Text Size, Fake Bold, and Path Effect to scale and modify the glyph paths. Uses x, y, and Text Align to position intervals. + Pass nullptr for intervals to determine the size of the interval array. + intervals are cached to improve performance for multiple calls. ### Parameters @@ -4846,7 +4811,9 @@ the string. Uses Text Encoding to decode text, Typeface to get the glyph paths, and Text Size, Fake Bold, and Path Effect to scale and modify the glyph paths. Uses pos array and Text Align to position intervals. + Pass nullptr for intervals to determine the size of the interval array. + intervals are cached to improve performance for multiple calls. ### Parameters @@ -4890,7 +4857,9 @@ the string. Uses Text Encoding to decode text, Typeface to get the glyph paths, and Text Size, Fake Bold, and Path Effect to scale and modify the glyph paths. Uses xpos array, constY, and Text Align to position intervals. + Pass nullptr for intervals to determine the size of the interval array. + intervals are cached to improve performance for multiple calls. ### Parameters @@ -4935,9 +4904,11 @@ the string. Uses Typeface to get the glyph paths, and Text Size, Fake Bold, and Path Effect to scale and modify the glyph paths. Uses run array and Text Align to position intervals. + Text Encoding must be set to SkPaint::kGlyphID TextEncoding. Pass nullptr for intervals to determine the size of the interval array. + intervals are cached to improve performance for multiple calls. ### Parameters @@ -4957,7 +4928,7 @@ number of intersections; may be zero ### Example -
+
--- @@ -4980,7 +4951,7 @@ true if Paint prevents all drawing ### Example -
+
#### Example Output -- cgit v1.2.3