sync bookmaker docs with canvas
removed SrcRectConstraint from docs to match SkCanvas.h also removed constraint description paragraph from SkCanvas.h TBR=bsalomon@google.com Docs-Preview: https://skia.org/?cl=165821 Bug: skia:5679 Change-Id: I34c51f672477076f182946ce71e2d06f049e7f29 Reviewed-on: https://skia-review.googlesource.com/c/165821 Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org> Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Cary Clark <caryclark@skia.org>
This commit is contained in:
parent
3185f90deb
commit
0ac0eddd88
@ -4056,8 +4056,7 @@ void draw(SkCanvas* canvas) {
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void drawImageRect(const SkImage* image, const SkRect& dst, const SkPaint* paint,
|
||||
SrcRectConstraint constraint = kStrict_SrcRectConstraint)
|
||||
#Method void drawImageRect(const SkImage* image, const SkRect& dst, const SkPaint* paint)
|
||||
#In Draw_Image
|
||||
#In Draw
|
||||
|
||||
@ -4072,16 +4071,11 @@ If generated mask extends beyond image bounds, replicate image edge colors, just
|
||||
as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
|
||||
replicates the image edge color when it samples outside of its bounds.
|
||||
|
||||
constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
|
||||
sample within image; set to kFast_SrcRectConstraint allows sampling outside to
|
||||
improve performance.
|
||||
|
||||
#Param image Image containing pixels, dimensions, and format ##
|
||||
#Param dst destination Rect of image to draw to ##
|
||||
#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
|
||||
and so on; or nullptr
|
||||
##
|
||||
#Param constraint filter strictly within image or draw faster ##
|
||||
|
||||
#Example
|
||||
#Image 4
|
||||
@ -4209,8 +4203,7 @@ void draw(SkCanvas* canvas) {
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void drawImageRect(const sk_sp<SkImage>& image, const SkRect& dst, const SkPaint* paint,
|
||||
SrcRectConstraint constraint = kStrict_SrcRectConstraint)
|
||||
#Method void drawImageRect(const sk_sp<SkImage>& image, const SkRect& dst, const SkPaint* paint)
|
||||
#In Draw_Image
|
||||
#In Draw
|
||||
Draws Image image, scaled and translated to fill Rect dst,
|
||||
@ -4224,16 +4217,11 @@ If generated mask extends beyond image bounds, replicate image edge colors, just
|
||||
as Shader made from SkImage::makeShader with SkShader::kClamp_TileMode set
|
||||
replicates the image edge color when it samples outside of its bounds.
|
||||
|
||||
constraint set to kStrict_SrcRectConstraint limits Paint Filter_Quality to
|
||||
sample within image; set to kFast_SrcRectConstraint allows sampling outside to
|
||||
improve performance.
|
||||
|
||||
#Param image Image containing pixels, dimensions, and format ##
|
||||
#Param dst destination Rect of image to draw to ##
|
||||
#Param paint Paint containing Blend_Mode, Color_Filter, Image_Filter,
|
||||
and so on; or nullptr
|
||||
##
|
||||
#Param constraint filter strictly within image or draw faster ##
|
||||
|
||||
#Example
|
||||
#Height 64
|
||||
|
@ -1463,10 +1463,6 @@ public:
|
||||
as SkShader made from SkImage::makeShader with SkShader::kClamp_TileMode set
|
||||
replicates the image edge color when it samples outside of its bounds.
|
||||
|
||||
constraint set to kStrict_SrcRectConstraint limits SkPaint SkFilterQuality to
|
||||
sample within src; set to kFast_SrcRectConstraint allows sampling outside to
|
||||
improve performance.
|
||||
|
||||
@param image SkImage containing pixels, dimensions, and format
|
||||
@param src source SkRect of image to draw from
|
||||
@param dst destination SkRect of image to draw to
|
||||
|
@ -149,16 +149,14 @@ public:
|
||||
void <a href='#SkCanvas_drawImageRect_2'>drawImageRect</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* image, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& isrc, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
|
||||
const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint,
|
||||
<a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>);
|
||||
void <a href='#SkCanvas_drawImageRect_3'>drawImageRect</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* image, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint,
|
||||
<a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>);
|
||||
void <a href='#SkCanvas_drawImageRect_3'>drawImageRect</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* image, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint);
|
||||
void <a href='#SkCanvas_drawImageRect_4'>drawImageRect</a>(const sk_sp<<a href='SkImage_Reference#SkImage'>SkImage</a>>& image, const <a href='SkRect_Reference#SkRect'>SkRect</a>& src, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
|
||||
const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint,
|
||||
<a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>);
|
||||
void <a href='#SkCanvas_drawImageRect_5'>drawImageRect</a>(const sk_sp<<a href='SkImage_Reference#SkImage'>SkImage</a>>& image, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& isrc, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
|
||||
const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint,
|
||||
<a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>);
|
||||
void <a href='#SkCanvas_drawImageRect_6'>drawImageRect</a>(const sk_sp<<a href='SkImage_Reference#SkImage'>SkImage</a>>& image, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint,
|
||||
<a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict_SrcRectConstraint</a>);
|
||||
void <a href='#SkCanvas_drawImageRect_6'>drawImageRect</a>(const sk_sp<<a href='SkImage_Reference#SkImage'>SkImage</a>>& image, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint);
|
||||
void <a href='#SkCanvas_drawImageNine'>drawImageNine</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* image, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& center, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
|
||||
const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint = nullptr);
|
||||
void <a href='#SkCanvas_drawImageNine_2'>drawImageNine</a>(const sk_sp<<a href='SkImage_Reference#SkImage'>SkImage</a>>& image, const <a href='SkIRect_Reference#SkIRect'>SkIRect</a>& center, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst,
|
||||
@ -4237,8 +4235,7 @@ and so on; or nullptr</td>
|
||||
---
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
|
||||
void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* image, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint,
|
||||
<a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict SrcRectConstraint</a>)
|
||||
void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='SkImage_Reference#SkImage'>SkImage</a>* image, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint)
|
||||
</pre>
|
||||
|
||||
Draws <a href='SkImage_Reference#Image'>Image</a> <a href='#SkCanvas_drawImageRect_3_image'>image</a>, scaled and translated to fill <a href='SkRect_Reference#Rect'>Rect</a> <a href='#SkCanvas_drawImageRect_3_dst'>dst</a>, using <a href='#Clip'>Clip</a>, <a href='#Matrix'>Matrix</a>,
|
||||
@ -4252,10 +4249,6 @@ If generated mask extends beyond <a href='#SkCanvas_drawImageRect_3_image'>image
|
||||
as <a href='undocumented#Shader'>Shader</a> made from <a href='SkImage_Reference#SkImage_makeShader'>SkImage::makeShader</a> with <a href='undocumented#SkShader_kClamp_TileMode'>SkShader::kClamp TileMode</a> set
|
||||
replicates the <a href='#SkCanvas_drawImageRect_3_image'>image</a> edge color when it samples outside of its bounds.
|
||||
|
||||
<a href='#SkCanvas_drawImageRect_3_constraint'>constraint</a> set to <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict SrcRectConstraint</a> limits <a href='SkPaint_Reference#Paint'>Paint</a> <a href='undocumented#Filter_Quality'>Filter Quality</a> to
|
||||
sample within <a href='#SkCanvas_drawImageRect_3_image'>image</a>; set to <a href='#SkCanvas_kFast_SrcRectConstraint'>kFast SrcRectConstraint</a> allows sampling outside to
|
||||
improve performance.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name='SkCanvas_drawImageRect_3_image'><code><strong>image</strong></code></a></td>
|
||||
@ -4268,9 +4261,6 @@ improve performance.
|
||||
<td><a href='SkPaint_Reference#Paint'>Paint</a> containing <a href='SkBlendMode_Reference#Blend_Mode'>Blend Mode</a>, <a href='undocumented#Color_Filter'>Color Filter</a>, <a href='undocumented#Image_Filter'>Image Filter</a>,
|
||||
and so on; or nullptr</td>
|
||||
</tr>
|
||||
<tr> <td><a name='SkCanvas_drawImageRect_3_constraint'><code><strong>constraint</strong></code></a></td>
|
||||
<td>filter strictly within <a href='#SkCanvas_drawImageRect_3_image'>image</a> or draw faster</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### Example
|
||||
@ -4393,8 +4383,7 @@ and so on; or nullptr</td>
|
||||
---
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
|
||||
void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='undocumented#sk_sp'>sk sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>>& image, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint,
|
||||
<a href='#SkCanvas_SrcRectConstraint'>SrcRectConstraint</a> constraint = <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict SrcRectConstraint</a>)
|
||||
void <a href='#SkCanvas_drawImageRect'>drawImageRect</a>(const <a href='undocumented#sk_sp'>sk sp</a><<a href='SkImage_Reference#SkImage'>SkImage</a>>& image, const <a href='SkRect_Reference#SkRect'>SkRect</a>& dst, const <a href='SkPaint_Reference#SkPaint'>SkPaint</a>* paint)
|
||||
</pre>
|
||||
|
||||
Draws <a href='SkImage_Reference#Image'>Image</a> <a href='#SkCanvas_drawImageRect_6_image'>image</a>, scaled and translated to fill <a href='SkRect_Reference#Rect'>Rect</a> <a href='#SkCanvas_drawImageRect_6_dst'>dst</a>,
|
||||
@ -4408,10 +4397,6 @@ If generated mask extends beyond <a href='#SkCanvas_drawImageRect_6_image'>image
|
||||
as <a href='undocumented#Shader'>Shader</a> made from <a href='SkImage_Reference#SkImage_makeShader'>SkImage::makeShader</a> with <a href='undocumented#SkShader_kClamp_TileMode'>SkShader::kClamp TileMode</a> set
|
||||
replicates the <a href='#SkCanvas_drawImageRect_6_image'>image</a> edge color when it samples outside of its bounds.
|
||||
|
||||
<a href='#SkCanvas_drawImageRect_6_constraint'>constraint</a> set to <a href='#SkCanvas_kStrict_SrcRectConstraint'>kStrict SrcRectConstraint</a> limits <a href='SkPaint_Reference#Paint'>Paint</a> <a href='undocumented#Filter_Quality'>Filter Quality</a> to
|
||||
sample within <a href='#SkCanvas_drawImageRect_6_image'>image</a>; set to <a href='#SkCanvas_kFast_SrcRectConstraint'>kFast SrcRectConstraint</a> allows sampling outside to
|
||||
improve performance.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name='SkCanvas_drawImageRect_6_image'><code><strong>image</strong></code></a></td>
|
||||
@ -4424,9 +4409,6 @@ improve performance.
|
||||
<td><a href='SkPaint_Reference#Paint'>Paint</a> containing <a href='SkBlendMode_Reference#Blend_Mode'>Blend Mode</a>, <a href='undocumented#Color_Filter'>Color Filter</a>, <a href='undocumented#Image_Filter'>Image Filter</a>,
|
||||
and so on; or nullptr</td>
|
||||
</tr>
|
||||
<tr> <td><a name='SkCanvas_drawImageRect_6_constraint'><code><strong>constraint</strong></code></a></td>
|
||||
<td>filter strictly within <a href='#SkCanvas_drawImageRect_6_image'>image</a> or draw faster</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### Example
|
||||
|
Loading…
Reference in New Issue
Block a user