diff options
author | Mike Reed <reed@google.com> | 2018-02-08 14:10:40 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-08 19:34:50 +0000 |
commit | 4c790bd7dd8a6edacfc39b65b7043742331ab4da (patch) | |
tree | 1d66da0bfa6b7627315388b0d3f712897ea03bbd /docs | |
parent | b9fc24e465767db8bd9dbddfd67c905392346e66 (diff) |
add writePixels to SkSurface --> so we can remove it from canvas
Bug: skia:
Change-Id: Ib35d7bdc113c3fd9f6dfacb42ec61aaa448cb165
Reviewed-on: https://skia-review.googlesource.com/105623
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/SkSurface_Reference.bmh | 54 |
1 files changed, 50 insertions, 4 deletions
diff --git a/docs/SkSurface_Reference.bmh b/docs/SkSurface_Reference.bmh index 189ff79e9a..7935bfe563 100644 --- a/docs/SkSurface_Reference.bmh +++ b/docs/SkSurface_Reference.bmh @@ -1392,7 +1392,7 @@ pixmap contents become invalid on any future change to Surface. } ## -#SeeAlso readPixels +#SeeAlso readPixels writePixels #Method ## @@ -1451,7 +1451,7 @@ Does not copy, and returns false if: } ## -#SeeAlso peekPixels +#SeeAlso peekPixels writePixels #Method ## @@ -1517,7 +1517,7 @@ Does not copy, and returns false if: canvas->drawImage(image, 0, 0); ## -#SeeAlso peekPixels +#SeeAlso peekPixels writePixels #Method ## @@ -1575,7 +1575,53 @@ Does not copy, and returns false if: canvas->drawBitmap(bitmap, 0, 0); ## -#SeeAlso peekPixels +#SeeAlso peekPixels writePixels + +#Method ## + +# ------------------------------------------------------------------------------ + +#Method void writePixels(const SkPixmap& src, int dstX, int dstY) + +Copies Rect of pixels from the src Pixmap to the Surface. + +Source Rect corners are (0, 0) and (src.width(), src.height()). +Destination Rect corners are (dstX, dstY) and (dstX + Surface width(), dstY + Surface height()). +Copies each readable pixel intersecting both rectangles, without scaling, +converting to Surface colorType() and Surface alphaType() if required. + +#Param src storage for pixels to copy to Surface ## +#Param dstX x position relative to Surface to begin copy; may be negative ## +#Param dstY x position relative to Surface to begin copy; may be negative ## + +#Example + // todo +## + +#SeeAlso readPixels peekPixels + +#Method ## + +# ------------------------------------------------------------------------------ + +#Method void writePixels(const SkBitmap& src, int dstX, int dstY) + +Copies Rect of pixels from the src Bitmap to the Surface. + +Source Rect corners are (0, 0) and (src.width(), src.height()). +Destination Rect corners are (dstX, dstY) and (dstX + Surface width(), dstY + Surface height()). +Copies each readable pixel intersecting both rectangles, without scaling, +converting to Surface colorType() and Surface alphaType() if required. + +#Param src storage for pixels to copy to Surface ## +#Param dstX x position relative to Surface to begin copy; may be negative ## +#Param dstY x position relative to Surface to begin copy; may be negative ## + +#Example + // todo +## + +#SeeAlso readPixels peekPixels #Method ## |