generated include refresh
The latest, minor changes on includes already generated, plus four new ones. TBR=reed@google.com Bug: skia:6898 Change-Id: If06ae9b9aaa3a0a9fae570aa7a6698ff340c43b8 Reviewed-on: https://skia-review.googlesource.com/62862 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org>
This commit is contained in:
parent
d2b8af1152
commit
cc309eb9b1
File diff suppressed because it is too large
Load Diff
@ -114,7 +114,7 @@ public:
|
||||
Pixel buffer size should be height times rowBytes.
|
||||
|
||||
@param width pixel column count on raster surface created; must be zero or greater
|
||||
@param height pixel row count on raster surface created.; must be zero or greater
|
||||
@param height pixel row count on raster surface created; must be zero or greater
|
||||
@param pixels pointer to destination pixels buffer; buffer size should be height
|
||||
times rowBytes
|
||||
@param rowBytes interval from one SkSurface row to the next, or zero
|
||||
@ -267,7 +267,7 @@ public:
|
||||
|
||||
@param info storage for writable pixels' SkImageInfo; may be nullptr
|
||||
@param rowBytes storage for writable pixels' row bytes; may be nullptr
|
||||
@param origin storage for SkCanvas top layer origin, its top left corner;
|
||||
@param origin storage for SkCanvas top layer origin, its top-left corner;
|
||||
may be nullptr
|
||||
@return address of pixels, or nullptr if inaccessible
|
||||
*/
|
||||
@ -276,7 +276,7 @@ public:
|
||||
/** Returns custom context that tracks the SkMatrix and clip.
|
||||
|
||||
Use SkRasterHandleAllocator to blend Skia drawing with custom drawing, typically performed
|
||||
by the host platform's user interface. The custom context returned is generated by
|
||||
by the host platform user interface. The custom context returned is generated by
|
||||
SkRasterHandleAllocator::MakeCanvas, which creates a custom canvas with raster storage for
|
||||
the drawing destination.
|
||||
|
||||
@ -294,17 +294,16 @@ public:
|
||||
pixmap is valid only while SkCanvas is in scope and unchanged. Any
|
||||
SkCanvas or SkSurface call may invalidate the pixmap values.
|
||||
|
||||
@param pixmap storage for SkCanvas pixel state if SkCanvas pixels are readable;
|
||||
otherwise, ignored
|
||||
@param pixmap storage for pixel state if pixels are readable; otherwise, ignored
|
||||
@return true if SkCanvas has direct access to pixels
|
||||
*/
|
||||
bool peekPixels(SkPixmap* pixmap);
|
||||
|
||||
/** Copies rectangle of pixels from SkCanvas into dstPixels. SkMatrix and clip are
|
||||
ignored. Source rectangle corners are (srcX, srcY) and
|
||||
(this->imageInfo.width(), this->imageInfo.height()).
|
||||
/** Copies SkRect of pixels from SkCanvas into dstPixels. SkMatrix and clip are
|
||||
ignored. Source SkRect corners are (srcX, srcY) and
|
||||
(imageInfo().width(), imageInfo().height()).
|
||||
|
||||
Destination rectangle corners are (0, 0) and (bitmap.width(), bitmap.height()).
|
||||
Destination SkRect corners are (0, 0) and (bitmap.width(), bitmap.height()).
|
||||
Copies each readable pixel intersecting both rectangles, without scaling,
|
||||
converting to dstInfo.colorType() and dstInfo.alphaType() if required.
|
||||
|
||||
@ -317,7 +316,7 @@ public:
|
||||
|
||||
Pixel values are converted only if SkColorType and SkAlphaType
|
||||
do not match. Only pixels within both source and destination rectangles
|
||||
are copied. dstPixels contents outside the rectangle intersection are unchanged.
|
||||
are copied. dstPixels contents outside SkRect intersection are unchanged.
|
||||
|
||||
Pass negative values for srcX or srcY to offset pixels across or down destination.
|
||||
|
||||
@ -337,11 +336,11 @@ public:
|
||||
bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
|
||||
int srcX, int srcY);
|
||||
|
||||
/** Copies rectangle of pixels from SkCanvas into pixmap. SkMatrix and clip are
|
||||
ignored. Source rectangle corners are (srcX, srcY) and
|
||||
(this->imageInfo.width(), this->imageInfo.height()).
|
||||
/** Copies SkRect of pixels from SkCanvas into pixmap. SkMatrix and clip are
|
||||
ignored. Source SkRect corners are (srcX, srcY) and
|
||||
(imageInfo().width(), imageInfo().height()).
|
||||
|
||||
Destination rectangle corners are (0, 0) and (bitmap.width(), bitmap.height()).
|
||||
Destination SkRect corners are (0, 0) and (bitmap.width(), bitmap.height()).
|
||||
Copies each readable pixel intersecting both rectangles, without scaling,
|
||||
converting to pixmap.colorType() and pixmap.alphaType() if required.
|
||||
|
||||
@ -353,8 +352,8 @@ public:
|
||||
Caller must allocate pixel storage in pixmap if needed.
|
||||
|
||||
Pixel values are converted only if SkColorType and SkAlphaType
|
||||
do not match. Only pixels within both source and destination rectangles
|
||||
are copied. pixmap pixels contents outside the rectangle intersection are unchanged.
|
||||
do not match. Only pixels within both source and destination SkRect
|
||||
are copied. pixmap pixels contents outside SkRect intersection are unchanged.
|
||||
|
||||
Pass negative values for srcX or srcY to offset pixels across or down pixmap.
|
||||
|
||||
@ -372,11 +371,11 @@ public:
|
||||
*/
|
||||
bool readPixels(const SkPixmap& pixmap, int srcX, int srcY);
|
||||
|
||||
/** Copies rectangle of pixels from SkCanvas into bitmap. SkMatrix and clip are
|
||||
ignored. Source rectangle corners are (srcX, srcY) and
|
||||
(this->imageInfo.width(), this->imageInfo.height()).
|
||||
/** Copies SkRect of pixels from SkCanvas into bitmap. SkMatrix and clip are
|
||||
ignored. Source SkRect corners are (srcX, srcY) and
|
||||
(imageInfo().width(), imageInfo().height()).
|
||||
|
||||
Destination rectangle corners are (0, 0) and (bitmap.width(), bitmap.height()).
|
||||
Destination SkRect corners are (0, 0) and (bitmap.width(), bitmap.height()).
|
||||
Copies each readable pixel intersecting both rectangles, without scaling,
|
||||
converting to bitmap.colorType() and bitmap.alphaType() if required.
|
||||
|
||||
@ -389,7 +388,7 @@ public:
|
||||
|
||||
SkBitmap values are converted only if SkColorType and SkAlphaType
|
||||
do not match. Only pixels within both source and destination rectangles
|
||||
are copied. SkBitmap pixels outside the rectangle intersection are unchanged.
|
||||
are copied. SkBitmap pixels outside SkRect intersection are unchanged.
|
||||
|
||||
Pass negative values for srcX or srcY to offset pixels across or down bitmap.
|
||||
|
||||
@ -407,15 +406,13 @@ public:
|
||||
*/
|
||||
bool readPixels(const SkBitmap& bitmap, int srcX, int srcY);
|
||||
|
||||
/** Copies rectangle from pixels to SkCanvas. SkMatrix and clip are ignored.
|
||||
Source rectangle corners are (0, 0) and (info.width(), info.height()).
|
||||
Destination rectangle corners are (x, y) and
|
||||
(this->imageInfo.width(), this->imageInfo.height()).
|
||||
/** Copies SkRect from pixels to SkCanvas. SkMatrix and clip are ignored.
|
||||
Source SkRect corners are (0, 0) and (info.width(), info.height()).
|
||||
Destination SkRect corners are (x, y) and
|
||||
(imageInfo().width(), imageInfo().height()).
|
||||
|
||||
Copies each readable pixel intersecting both rectangles, without scaling,
|
||||
converting to
|
||||
this->imageInfo.colorType()and
|
||||
this->imageInfo.alphaType()if required.
|
||||
converting to imageInfo().colorType() and imageInfo().alphaType() if required.
|
||||
|
||||
Pixels are writable when SkBaseDevice is raster, or backed by a GPU.
|
||||
Pixels are not writable when SkCanvas is returned by SkDocument::beginPage,
|
||||
@ -424,15 +421,15 @@ public:
|
||||
|
||||
Pixel values are converted only if SkColorType and SkAlphaType
|
||||
do not match. Only pixels within both source and destination rectangles
|
||||
are copied. SkCanvas pixels outside the rectangle intersection are unchanged.
|
||||
are copied. SkCanvas pixels outside SkRect intersection are unchanged.
|
||||
|
||||
Pass negative values for x or y to offset pixels to the left or
|
||||
above SkCanvas pixels.
|
||||
|
||||
Does not copy, and returns false if:
|
||||
- Source and destination rectangles do not intersect.
|
||||
- pixels could not be converted to this->imageInfo.colorType() or
|
||||
this->imageInfo.alphaType().
|
||||
- pixels could not be converted to this->imageInfo().colorType() or
|
||||
this->imageInfo().alphaType().
|
||||
- SkCanvas pixels are not writable; for instance, SkCanvas is document-based.
|
||||
- rowBytes is too small to contain one row of pixels.
|
||||
|
||||
@ -445,16 +442,14 @@ public:
|
||||
*/
|
||||
bool writePixels(const SkImageInfo& info, const void* pixels, size_t rowBytes, int x, int y);
|
||||
|
||||
/** Copies rectangle from pixels to SkCanvas. SkMatrix and clip are ignored.
|
||||
Source rectangle corners are (0, 0) and (bitmap.width(), bitmap.height()).
|
||||
/** Copies SkRect from pixels to SkCanvas. SkMatrix and clip are ignored.
|
||||
Source SkRect corners are (0, 0) and (bitmap.width(), bitmap.height()).
|
||||
|
||||
Destination rectangle corners are (x, y) and
|
||||
(this->imageInfo.width(), this->imageInfo.height()).
|
||||
Destination SkRect corners are (x, y) and
|
||||
(imageInfo().width(), imageInfo().height()).
|
||||
|
||||
Copies each readable pixel intersecting both rectangles, without scaling,
|
||||
converting to
|
||||
this->imageInfo.colorType()and
|
||||
this->imageInfo.alphaType()if required.
|
||||
converting to imageInfo().colorType() and imageInfo().alphaType() if required.
|
||||
|
||||
Pixels are writable when SkBaseDevice is raster, or backed by a GPU.
|
||||
Pixels are not writable when SkCanvas is returned by SkDocument::beginPage,
|
||||
@ -463,7 +458,7 @@ public:
|
||||
|
||||
Pixel values are converted only if SkColorType and SkAlphaType
|
||||
do not match. Only pixels within both source and destination rectangles
|
||||
are copied. SkCanvas pixels outside the rectangle intersection are unchanged.
|
||||
are copied. SkCanvas pixels outside SkRect intersection are unchanged.
|
||||
|
||||
Pass negative values for x or y to offset pixels to the left or
|
||||
above SkCanvas pixels.
|
||||
@ -471,8 +466,8 @@ public:
|
||||
Does not copy, and returns false if:
|
||||
- Source and destination rectangles do not intersect.
|
||||
- bitmap does not have allocated pixels.
|
||||
- bitmap pixels could not be converted to this->imageInfo.colorType() or
|
||||
this->imageInfo.alphaType().
|
||||
- bitmap pixels could not be converted to this->imageInfo().colorType() or
|
||||
this->imageInfo().alphaType().
|
||||
- SkCanvas pixels are not writable; for instance, SkCanvas is document based.
|
||||
- bitmap pixels are inaccessible; for instance, bitmap wraps a texture.
|
||||
|
||||
@ -626,6 +621,7 @@ public:
|
||||
typedef uint32_t SaveLayerFlags;
|
||||
|
||||
/** \struct SkCanvas::SaveLayerRec
|
||||
SaveLayerRec contains the state used to create the layer.
|
||||
*/
|
||||
struct SaveLayerRec {
|
||||
|
||||
@ -1205,7 +1201,7 @@ public:
|
||||
if stroked, SkPaint stroke width describes the line thickness, and
|
||||
SkPaint::Join draws the corners rounded or square.
|
||||
|
||||
@param rect rectangle to be drawn
|
||||
@param rect rectangle to draw
|
||||
@param paint stroke or fill, blend, color, and so on, used to draw
|
||||
*/
|
||||
void drawRect(const SkRect& rect, const SkPaint& paint);
|
||||
@ -1215,7 +1211,7 @@ public:
|
||||
if stroked, SkPaint stroke width describes the line thickness, and
|
||||
SkPaint::Join draws the corners rounded or square.
|
||||
|
||||
@param rect rectangle to be drawn
|
||||
@param rect rectangle to draw
|
||||
@param paint stroke or fill, blend, color, and so on, used to draw
|
||||
*/
|
||||
void drawIRect(const SkIRect& rect, const SkPaint& paint) {
|
||||
@ -1229,7 +1225,7 @@ public:
|
||||
if stroked, SkPaint stroke width describes the line thickness, and
|
||||
SkPaint::Join draws the corners rounded or square.
|
||||
|
||||
@param region region to be drawn
|
||||
@param region region to draw
|
||||
@param paint SkPaint stroke or fill, blend, color, and so on, used to draw
|
||||
*/
|
||||
void drawRegion(const SkRegion& region, const SkPaint& paint);
|
||||
@ -1360,7 +1356,7 @@ public:
|
||||
If paint contains SkMaskFilter, generate mask from image bounds. If generated
|
||||
mask extends beyond image bounds, replicate image edge colors, just as SkShader
|
||||
made from SkImage::makeShader with SkShader::kClamp_TileMode set replicates the
|
||||
image's edge color when it samples outside of its bounds.
|
||||
image edge color when it samples outside of its bounds.
|
||||
|
||||
@param image uncompressed rectangular map of pixels
|
||||
@param left left side of image
|
||||
@ -1379,7 +1375,7 @@ public:
|
||||
If paint contains SkMaskFilter, generate mask from image bounds. If generated
|
||||
mask extends beyond image bounds, replicate image edge colors, just as SkShader
|
||||
made from SkImage::makeShader with SkShader::kClamp_TileMode set replicates the
|
||||
image's edge color when it samples outside of its bounds.
|
||||
image edge color when it samples outside of its bounds.
|
||||
|
||||
@param image uncompressed rectangular map of pixels
|
||||
@param left left side of image
|
||||
@ -1421,7 +1417,7 @@ public:
|
||||
|
||||
If generated mask extends beyond image bounds, replicate image edge colors, just
|
||||
as SkShader made from SkImage::makeShader with SkShader::kClamp_TileMode set
|
||||
replicates the image's edge color when it samples outside of its bounds.
|
||||
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
|
||||
@ -1449,7 +1445,7 @@ public:
|
||||
|
||||
If generated mask extends beyond image bounds, replicate image edge colors, just
|
||||
as SkShader made from SkImage::makeShader with SkShader::kClamp_TileMode set
|
||||
replicates the image's edge color when it samples outside of its bounds.
|
||||
replicates the image edge color when it samples outside of its bounds.
|
||||
|
||||
constraint set to kStrict_SrcRectConstraint limits SkPaint SkFilterQuality to
|
||||
sample within isrc; set to kFast_SrcRectConstraint allows sampling outside to
|
||||
@ -1475,7 +1471,7 @@ public:
|
||||
|
||||
If generated mask extends beyond image bounds, replicate image edge colors, just
|
||||
as SkShader made from SkImage::makeShader with SkShader::kClamp_TileMode set
|
||||
replicates the image's edge color when it samples outside of its bounds.
|
||||
replicates the image edge color when it samples outside of its bounds.
|
||||
|
||||
constraint set to kStrict_SrcRectConstraint limits SkPaint SkFilterQuality to
|
||||
sample within image; set to kFast_SrcRectConstraint allows sampling outside to
|
||||
@ -1499,7 +1495,7 @@ public:
|
||||
|
||||
If generated mask extends beyond image bounds, replicate image edge colors, just
|
||||
as SkShader made from SkImage::makeShader with SkShader::kClamp_TileMode set
|
||||
replicates the image's edge color when it samples outside of its bounds.
|
||||
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
|
||||
@ -1528,7 +1524,7 @@ public:
|
||||
|
||||
If generated mask extends beyond image bounds, replicate image edge colors, just
|
||||
as SkShader made from SkImage::makeShader with SkShader::kClamp_TileMode set
|
||||
replicates the image's edge color when it samples outside of its bounds.
|
||||
replicates the image edge color when it samples outside of its bounds.
|
||||
|
||||
constraint set to kStrict_SrcRectConstraint limits SkPaint SkFilterQuality to
|
||||
sample within image; set to kFast_SrcRectConstraint allows sampling outside to
|
||||
@ -1556,7 +1552,7 @@ public:
|
||||
|
||||
If generated mask extends beyond image bounds, replicate image edge colors, just
|
||||
as SkShader made from SkImage::makeShader with SkShader::kClamp_TileMode set
|
||||
replicates the image's edge color when it samples outside of its bounds.
|
||||
replicates the image edge color when it samples outside of its bounds.
|
||||
|
||||
constraint set to kStrict_SrcRectConstraint limits SkPaint SkFilterQuality to
|
||||
sample within image; set to kFast_SrcRectConstraint allows sampling outside to
|
||||
@ -1586,7 +1582,7 @@ public:
|
||||
|
||||
If generated mask extends beyond image bounds, replicate image edge colors, just
|
||||
as SkShader made from SkImage::makeShader with SkShader::kClamp_TileMode set
|
||||
replicates the image's edge color when it samples outside of its bounds.
|
||||
replicates the image edge color when it samples outside of its bounds.
|
||||
|
||||
@param image SkImage containing pixels, dimensions, and format
|
||||
@param center SkIRect edge of image corners and sides
|
||||
@ -1610,7 +1606,7 @@ public:
|
||||
|
||||
If generated mask extends beyond image bounds, replicate image edge colors, just
|
||||
as SkShader made from SkImage::makeShader with SkShader::kClamp_TileMode set
|
||||
replicates the image's edge color when it samples outside of its bounds.
|
||||
replicates the image edge color when it samples outside of its bounds.
|
||||
|
||||
@param image SkImage containing pixels, dimensions, and format
|
||||
@param center SkIRect edge of image corners and sides
|
||||
@ -1632,7 +1628,7 @@ public:
|
||||
|
||||
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
|
||||
just as SkShader made from SkShader::MakeBitmapShader with
|
||||
SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
|
||||
SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
|
||||
outside of its bounds.
|
||||
|
||||
@param bitmap SkBitmap containing pixels, dimensions, and format
|
||||
@ -1653,7 +1649,7 @@ public:
|
||||
|
||||
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
|
||||
just as SkShader made from SkShader::MakeBitmapShader with
|
||||
SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
|
||||
SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
|
||||
outside of its bounds.
|
||||
|
||||
constraint set to kStrict_SrcRectConstraint limits SkPaint SkFilterQuality to
|
||||
@ -1681,7 +1677,7 @@ public:
|
||||
|
||||
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
|
||||
just as SkShader made from SkShader::MakeBitmapShader with
|
||||
SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
|
||||
SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
|
||||
outside of its bounds.
|
||||
|
||||
constraint set to kStrict_SrcRectConstraint limits SkPaint SkFilterQuality to
|
||||
@ -1709,7 +1705,7 @@ public:
|
||||
|
||||
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
|
||||
just as SkShader made from SkShader::MakeBitmapShader with
|
||||
SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
|
||||
SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
|
||||
outside of its bounds.
|
||||
|
||||
constraint set to kStrict_SrcRectConstraint limits SkPaint SkFilterQuality to
|
||||
@ -1739,7 +1735,7 @@ public:
|
||||
|
||||
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
|
||||
just as SkShader made from SkShader::MakeBitmapShader with
|
||||
SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
|
||||
SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
|
||||
outside of its bounds.
|
||||
|
||||
@param bitmap SkBitmap containing pixels, dimensions, and format
|
||||
@ -1816,7 +1812,7 @@ public:
|
||||
Lattice lattice divides bitmap into a rectangular grid.
|
||||
Each intersection of an even-numbered row and column is fixed; like the corners
|
||||
of drawBitmapNine(), fixed lattice elements never scale larger than their initial
|
||||
size and shrink proportionately when all fixed elements exceed the bitmap's
|
||||
size and shrink proportionately when all fixed elements exceed the bitmap
|
||||
dimension. All other grid elements scale to fill the available space, if any.
|
||||
|
||||
Additionally transform draw using clip, SkMatrix, and optional SkPaint paint.
|
||||
@ -1827,7 +1823,7 @@ public:
|
||||
|
||||
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
|
||||
just as SkShader made from SkShader::MakeBitmapShader with
|
||||
SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
|
||||
SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
|
||||
outside of its bounds.
|
||||
|
||||
@param bitmap SkBitmap containing pixels, dimensions, and format
|
||||
@ -1844,7 +1840,7 @@ public:
|
||||
Lattice lattice divides image into a rectangular grid.
|
||||
Each intersection of an even-numbered row and column is fixed; like the corners
|
||||
of drawBitmapNine(), fixed lattice elements never scale larger than their initial
|
||||
size and shrink proportionately when all fixed elements exceed the bitmap's
|
||||
size and shrink proportionately when all fixed elements exceed the bitmap
|
||||
dimension. All other grid elements scale to fill the available space, if any.
|
||||
|
||||
Additionally transform draw using clip, SkMatrix, and optional SkPaint paint.
|
||||
@ -1855,7 +1851,7 @@ public:
|
||||
|
||||
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
|
||||
just as SkShader made from SkShader::MakeBitmapShader with
|
||||
SkShader::kClamp_TileMode set replicates the bitmap's edge color when it samples
|
||||
SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
|
||||
outside of its bounds.
|
||||
|
||||
@param image SkImage containing pixels, dimensions, and format
|
||||
@ -1869,11 +1865,11 @@ public:
|
||||
|
||||
/** Draw text, with origin at (x, y), using clip, SkMatrix, and SkPaint paint.
|
||||
|
||||
text's meaning depends on SkPaint::TextEncoding; by default, text encoding is
|
||||
text meaning depends on SkPaint::TextEncoding; by default, text is encoded as
|
||||
UTF-8.
|
||||
|
||||
x and y meaning depends on SkPaint::Align and SkPaint vertical text; by default
|
||||
text draws left to right, positioning the first glyph's left side bearing at x
|
||||
text draws left to right, positioning the first glyph left side bearing at x
|
||||
and its baseline at y. Text size is affected by SkMatrix and SkPaint text size.
|
||||
|
||||
All elements of paint: SkPathEffect, SkRasterizer, SkMaskFilter, SkShader,
|
||||
@ -1892,12 +1888,12 @@ public:
|
||||
/** Draw null terminated string, with origin at (x, y), using clip, SkMatrix, and
|
||||
SkPaint paint.
|
||||
|
||||
string's meaning depends on SkPaint::TextEncoding; by default, string encoding is
|
||||
UTF-8. Other values of SkPaint::TextEncoding are unlikely to produce the desired
|
||||
string meaning depends on SkPaint::TextEncoding; by default, strings are encoded
|
||||
as UTF-8. Other values of SkPaint::TextEncoding are unlikely to produce the desired
|
||||
results, since zero bytes may be embedded in the string.
|
||||
|
||||
x and y meaning depends on SkPaint::Align and SkPaint vertical text; by default
|
||||
string draws left to right, positioning the first glyph's left side bearing at x
|
||||
string draws left to right, positioning the first glyph left side bearing at x
|
||||
and its baseline at y. Text size is affected by SkMatrix and SkPaint text size.
|
||||
|
||||
All elements of paint: SkPathEffect, SkRasterizer, SkMaskFilter, SkShader,
|
||||
@ -1920,12 +1916,12 @@ public:
|
||||
/** Draw null terminated string, with origin at (x, y), using clip, SkMatrix, and
|
||||
SkPaint paint.
|
||||
|
||||
string's meaning depends on SkPaint::TextEncoding; by default, string encoding is
|
||||
UTF-8. Other values of SkPaint::TextEncoding are unlikely to produce the desired
|
||||
string meaning depends on SkPaint::TextEncoding; by default, strings are encoded
|
||||
as UTF-8. Other values of SkPaint::TextEncoding are unlikely to produce the desired
|
||||
results, since zero bytes may be embedded in the string.
|
||||
|
||||
x and y meaning depends on SkPaint::Align and SkPaint vertical text; by default
|
||||
string draws left to right, positioning the first glyph's left side bearing at x
|
||||
string draws left to right, positioning the first glyph left side bearing at x
|
||||
and its baseline at y. Text size is affected by SkMatrix and SkPaint text size.
|
||||
|
||||
All elements of paint: SkPathEffect, SkRasterizer, SkMaskFilter, SkShader,
|
||||
@ -1944,9 +1940,9 @@ public:
|
||||
SkPaint paint. The number of entries in pos array must match the number of glyphs
|
||||
described by byteLength of text.
|
||||
|
||||
text's meaning depends on SkPaint::TextEncoding; by default, text encoding is
|
||||
text meaning depends on SkPaint::TextEncoding; by default, text is encoded as
|
||||
UTF-8. pos elements' meaning depends on SkPaint::Align and SkPaint vertical text;
|
||||
by default each glyph's left side bearing is positioned at x and its
|
||||
by default each glyph left side bearing is positioned at x and its
|
||||
baseline is positioned at y. Text size is affected by SkMatrix and
|
||||
SkPaint text size.
|
||||
|
||||
@ -1955,7 +1951,7 @@ public:
|
||||
filled 12 point black glyphs.
|
||||
|
||||
Layout engines such as Harfbuzz typically position each glyph
|
||||
rather than using the font's advance widths.
|
||||
rather than using the font advance widths.
|
||||
|
||||
@param text character code points or glyphs drawn
|
||||
@param byteLength byte length of text array
|
||||
@ -1969,9 +1965,9 @@ public:
|
||||
constY, using clip, SkMatrix, and SkPaint paint. The number of entries in xpos array
|
||||
must match the number of glyphs described by byteLength of text.
|
||||
|
||||
text's meaning depends on SkPaint::TextEncoding; by default, text encoding is
|
||||
text meaning depends on SkPaint::TextEncoding; by default, text is encoded as
|
||||
UTF-8. xpos elements' meaning depends on SkPaint::Align and SkPaint vertical text;
|
||||
by default each glyph's left side bearing is positioned at an xpos element and
|
||||
by default each glyph left side bearing is positioned at an xpos element and
|
||||
its baseline is positioned at constY. Text size is affected by SkMatrix and
|
||||
SkPaint text size.
|
||||
|
||||
@ -1980,7 +1976,7 @@ public:
|
||||
filled 12 point black glyphs.
|
||||
|
||||
Layout engines such as Harfbuzz typically position each glyph
|
||||
rather than using the font's advance widths if all glyphs share the same
|
||||
rather than using the font advance widths if all glyphs share the same
|
||||
baseline.
|
||||
|
||||
@param text character code points or glyphs drawn
|
||||
@ -1997,12 +1993,12 @@ public:
|
||||
Origin of text is at distance hOffset along the path, offset by a perpendicular
|
||||
vector of length vOffset. If the path section corresponding the glyph advance is
|
||||
curved, the glyph is drawn curved to match; control points in the glyph are
|
||||
mapped to projected points parallel to the path. If the text's advance is larger
|
||||
mapped to projected points parallel to the path. If the text advance is larger
|
||||
than the path length, the excess text is clipped.
|
||||
|
||||
text's meaning depends on SkPaint::TextEncoding; by default, text encoding is
|
||||
text meaning depends on SkPaint::TextEncoding; by default, text is encoded as
|
||||
UTF-8. Origin meaning depends on SkPaint::Align and SkPaint vertical text; by
|
||||
default text positions the first glyph's left side bearing at origin x and its
|
||||
default text positions the first glyph left side bearing at origin x and its
|
||||
baseline at origin y. Text size is affected by SkMatrix and SkPaint text size.
|
||||
|
||||
All elements of paint: SkPathEffect, SkRasterizer, SkMaskFilter, SkShader,
|
||||
@ -2024,12 +2020,12 @@ public:
|
||||
Origin of text is at beginning of path offset by matrix, if provided, before it
|
||||
is mapped to path. If the path section corresponding the glyph advance is
|
||||
curved, the glyph is drawn curved to match; control points in the glyph are
|
||||
mapped to projected points parallel to the path. If the text's advance is larger
|
||||
mapped to projected points parallel to the path. If the text advance is larger
|
||||
than the path length, the excess text is clipped.
|
||||
|
||||
text's meaning depends on SkPaint::TextEncoding; by default, text encoding is
|
||||
text meaning depends on SkPaint::TextEncoding; by default, text is encoded as
|
||||
UTF-8. Origin meaning depends on SkPaint::Align and SkPaint vertical text; by
|
||||
default text positions the first glyph's left side bearing at origin x and its
|
||||
default text positions the first glyph left side bearing at origin x and its
|
||||
baseline at origin y. Text size is affected by SkMatrix and SkPaint text size.
|
||||
|
||||
All elements of paint: SkPathEffect, SkRasterizer, SkMaskFilter, SkShader,
|
||||
@ -2181,20 +2177,20 @@ public:
|
||||
/** Draws a Coons patch: the interpolation of four cubics with shared corners,
|
||||
associating a color, and optionally a texture coordinate, with each corner.
|
||||
|
||||
The Coons patch uses clip and SkMatrix, SkPaint paint's SkShader, SkColorFilter,
|
||||
The Coons patch uses clip and SkMatrix, paint SkShader, SkColorFilter,
|
||||
color alpha, SkImageFilter, and SkBlendMode. If SkShader is provided it is treated
|
||||
as the Coons patch texture; SkBlendMode mode combines color colors and SkShader if
|
||||
both are provided.
|
||||
|
||||
SkPoint array cubics specifies four cubics starting at the top left corner,
|
||||
SkPoint array cubics specifies four cubics starting at the top-left corner,
|
||||
in clockwise order, sharing every fourth point. The last cubic ends at the
|
||||
first point.
|
||||
|
||||
Color array color associates colors with corners in top left, top right,
|
||||
bottom right, bottom left order.
|
||||
Color array color associates colors with corners in top-left, top-right,
|
||||
bottom-right, bottom-left order.
|
||||
|
||||
If paint contains SkShader, SkPoint array texCoords maps SkShader as texture to
|
||||
corners in top left, top right, bottom right, bottom left order.
|
||||
corners in top-left, top-right, bottom-right, bottom-left order.
|
||||
|
||||
@param cubics SkPath cubic array, sharing common points
|
||||
@param colors color array, one for each corner
|
||||
@ -2209,20 +2205,20 @@ public:
|
||||
/** Draws cubic Coons patch: the interpolation of four cubics with shared corners,
|
||||
associating a color, and optionally a texture coordinate, with each corner.
|
||||
|
||||
The Coons patch uses clip and SkMatrix, SkPaint paint's SkShader, SkColorFilter,
|
||||
The Coons patch uses clip and SkMatrix, paint SkShader, SkColorFilter,
|
||||
color alpha, SkImageFilter, and SkBlendMode. If SkShader is provided it is treated
|
||||
as the Coons patch texture; SkBlendMode mode combines color colors and SkShader if
|
||||
both are provided.
|
||||
|
||||
SkPoint array cubics specifies four cubics starting at the top left corner,
|
||||
SkPoint array cubics specifies four cubics starting at the top-left corner,
|
||||
in clockwise order, sharing every fourth point. The last cubic ends at the
|
||||
first point.
|
||||
|
||||
Color array color associates colors with corners in top left, top right,
|
||||
bottom right, bottom left order.
|
||||
Color array color associates colors with corners in top-left, top-right,
|
||||
bottom-right, bottom-left order.
|
||||
|
||||
If paint contains SkShader, SkPoint array texCoords maps SkShader as texture to
|
||||
corners in top left, top right, bottom right, bottom left order.
|
||||
corners in top-left, top-right, bottom-right, bottom-left order.
|
||||
|
||||
@param cubics SkPath cubic array, sharing common points
|
||||
@param colors color array, one for each corner
|
||||
@ -2757,12 +2753,20 @@ private:
|
||||
typedef SkRefCnt INHERITED;
|
||||
};
|
||||
|
||||
/** Stack helper class to automatically call restoreToCount() on the canvas
|
||||
when this object goes out of scope. Use this to guarantee that the canvas
|
||||
is restored to a known state.
|
||||
/** \class SkAutoCanvasRestore
|
||||
Stack helper class calls SkCanvas::restoreToCount() when SkAutoCanvasRestore
|
||||
goes out of scope. Use this to guarantee that the canvas is restored to a known
|
||||
state.
|
||||
*/
|
||||
class SkAutoCanvasRestore : SkNoncopyable {
|
||||
public:
|
||||
|
||||
/** Preserves SkCanvas save count. Optionally saves SkCanvas clip and SkMatrix.
|
||||
|
||||
@param canvas SkCanvas to guard
|
||||
@param doSave call SkCanvas::save()
|
||||
@return utility to restore SkCanvas state on destructor
|
||||
*/
|
||||
SkAutoCanvasRestore(SkCanvas* canvas, bool doSave) : fCanvas(canvas), fSaveCount(0) {
|
||||
if (fCanvas) {
|
||||
fSaveCount = canvas->getSaveCount();
|
||||
@ -2771,16 +2775,18 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Restores SkCanvas to saved state.
|
||||
*/
|
||||
~SkAutoCanvasRestore() {
|
||||
if (fCanvas) {
|
||||
fCanvas->restoreToCount(fSaveCount);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform the restore now, instead of waiting for the destructor. Will
|
||||
* only do this once.
|
||||
*/
|
||||
/** Restores SkCanvas to saved state immediately. Subsequent calls and
|
||||
~SkAutoCanvasRestore have no effect.
|
||||
*/
|
||||
void restore() {
|
||||
if (fCanvas) {
|
||||
fCanvas->restoreToCount(fSaveCount);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -180,8 +180,8 @@ public:
|
||||
*/
|
||||
void unflatten(SkReadBuffer& buffer);
|
||||
|
||||
/** Sets all paint's contents to their initial values. This is equivalent to replacing
|
||||
the paint with the result of SkPaint().
|
||||
/** Sets all SkPaint contents to their initial values. This is equivalent to replacing
|
||||
SkPaint with the result of SkPaint().
|
||||
*/
|
||||
void reset();
|
||||
|
||||
@ -1062,11 +1062,17 @@ public:
|
||||
|
||||
/** \enum SkPaint::TextEncoding
|
||||
TextEncoding determines whether text specifies character codes and their encoded
|
||||
size, or glyph indices. Character codes use the encoding specified by the Unicode standard.
|
||||
size, or glyph indices. Characters are encoded as specified by the Unicode standard.
|
||||
|
||||
Character codes encoded size are specified by UTF-8, UTF-16, or UTF-32.
|
||||
All character encodings are able to represent all of Unicode, differing only
|
||||
in the total storage required. UTF-8 (RFC 3629) encodes each character as one or more 8-bit bytes. UTF-16 (RFC 2781) encodes each character as one or two 16-bit words. UTF-32 encodes each character as one 32-bit word.
|
||||
All character code formats are able to represent all of Unicode, differing only
|
||||
in the total storage required.
|
||||
|
||||
UTF-8 (RFC 3629) encodes each character as one or more 8-bit bytes.
|
||||
|
||||
UTF-16 (RFC 2781) encodes each character as one or two 16-bit words.
|
||||
|
||||
UTF-32 encodes each character as one 32-bit word.
|
||||
|
||||
font manager uses font data to convert character code points into glyph indices.
|
||||
A glyph index is a 16-bit word.
|
||||
@ -1112,6 +1118,11 @@ public:
|
||||
*/
|
||||
struct FontMetrics {
|
||||
|
||||
/** \enum SkPaint::FontMetrics::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.
|
||||
*/
|
||||
enum FontMetricsFlags {
|
||||
kUnderlineThicknessIsValid_Flag = 1 << 0, //!< Set if fUnderlineThickness is valid.
|
||||
kUnderlinePositionIsValid_Flag = 1 << 1, //!< Set if fUnderlinePosition is valid.
|
||||
@ -1150,6 +1161,7 @@ public:
|
||||
Zero if no average width is stored in the font.
|
||||
*/
|
||||
SkScalar fAvgCharWidth;
|
||||
|
||||
SkScalar fMaxCharWidth; //!< Maximum character width.
|
||||
|
||||
/** Minimum bounding box x value for all glyphs.
|
||||
@ -1297,8 +1309,7 @@ public:
|
||||
SkPaint::TextEncoding specifies how text represents characters or glyphs.
|
||||
glyphs may be nullptr, to compute the glyph count.
|
||||
|
||||
Does not check text for valid character encoding or valid
|
||||
glyph indices.
|
||||
Does not check text for valid character codes or valid glyph indices.
|
||||
|
||||
If byteLength equals zero, returns zero.
|
||||
If byteLength includes a partial character, the partial character is ignored.
|
||||
|
@ -37,23 +37,23 @@ class SkWStream;
|
||||
class SK_API SkPath {
|
||||
public:
|
||||
|
||||
/** \enum SkPath::Direction
|
||||
Direction describes whether contour is clockwise or counterclockwise.
|
||||
When SkPath contains multiple overlapping contours, Direction together with
|
||||
FillType determines whether overlaps are filled or form holes.
|
||||
/** \enum SkPath::Direction
|
||||
Direction describes whether contour is clockwise or counterclockwise.
|
||||
When SkPath contains multiple overlapping contours, Direction together with
|
||||
FillType determines whether overlaps are filled or form holes.
|
||||
|
||||
Direction also determines how contour is measured. For instance, dashing
|
||||
measures along SkPath to determine where to start and stop stroke; Direction
|
||||
will change dashed results as it steps clockwise or counterclockwise.
|
||||
Direction also determines how contour is measured. For instance, dashing
|
||||
measures along SkPath to determine where to start and stop stroke; Direction
|
||||
will change dashed results as it steps clockwise or counterclockwise.
|
||||
|
||||
Closed contours like SkRect, SkRRect, circle, and oval added with
|
||||
kCW_Direction travel clockwise; the same added with kCCW_Direction
|
||||
travel counterclockwise.
|
||||
*/
|
||||
enum Direction {
|
||||
kCW_Direction, //!< Contour travels in a clockwise direction.
|
||||
kCCW_Direction, //!< Contour travels in a counterclockwise direction.
|
||||
};
|
||||
Closed contours like SkRect, SkRRect, circle, and oval added with
|
||||
kCW_Direction travel clockwise; the same added with kCCW_Direction
|
||||
travel counterclockwise.
|
||||
*/
|
||||
enum Direction {
|
||||
kCW_Direction, //!< Contour travels in a clockwise direction
|
||||
kCCW_Direction, //!< Contour travels in a counterclockwise direction
|
||||
};
|
||||
|
||||
/** By default, SkPath has no SkPath::Verb, no SkPoint, and no weights.
|
||||
SkPath::FillType is set to kWinding_FillType.
|
||||
@ -127,8 +127,7 @@ enum Direction {
|
||||
/** Interpolate between SkPath with equal sized point arrays.
|
||||
Copy verb array and weights to out,
|
||||
and set out SkPoint arrays to a weighted average of this SkPoint arrays and ending
|
||||
SkPoint arrays, using the formula:
|
||||
(this->points * weight) + ending->points * (1 - weight)
|
||||
SkPoint arrays, using the formula: (this->points * weight) + ending->points * (1 - weight).
|
||||
|
||||
weight is most useful when between zero (ending SkPoint arrays) and
|
||||
one (this Point_Array); will work with values outside of this
|
||||
@ -886,22 +885,24 @@ enum Direction {
|
||||
ArcSize and Direction select one of the four oval parts.
|
||||
*/
|
||||
enum ArcSize {
|
||||
kSmall_ArcSize, //!< Smaller of arc pair.
|
||||
kLarge_ArcSize, //!< Larger of arc pair.
|
||||
kSmall_ArcSize, //!< smaller of arc pair
|
||||
kLarge_ArcSize, //!< larger of arc pair
|
||||
};
|
||||
|
||||
/** Append arc to SkPath. Arc is implemented by one or more conics weighted to describe part of oval
|
||||
with radii (rx, ry) rotated by xAxisRotate degrees. Arc curves from last SkPath SkPoint to (x, y),
|
||||
choosing one of four possible routes: clockwise or counterclockwise, and smaller or larger.
|
||||
/** Append arc to SkPath. Arc is implemented by one or more conics weighted to
|
||||
describe part of oval with radii (rx, ry) rotated by xAxisRotate degrees. Arc
|
||||
curves from last SkPath SkPoint to (x, y), choosing one of four possible routes:
|
||||
clockwise or counterclockwise, and smaller or larger.
|
||||
|
||||
Arc sweep is always less than 360 degrees. arcTo() appends line to (x, y) if either radii are zero,
|
||||
or if last SkPath SkPoint equals (x, y). arcTo() scales radii (rx, ry) to fit last SkPath SkPoint and
|
||||
(x, y) if both are greater than zero but too small.
|
||||
Arc sweep is always less than 360 degrees. arcTo() appends line to (x, y) if
|
||||
either radii are zero, or if last SkPath SkPoint equals (x, y). arcTo() scales radii
|
||||
(rx, ry) to fit last SkPath SkPoint and (x, y) if both are greater than zero but
|
||||
too small.
|
||||
|
||||
arcTo() appends up to four conic curves.
|
||||
arcTo() implements the functionality of svg arc, although SVG "sweep-flag" value is
|
||||
opposite the integer value of sweep; SVG "sweep-flag" uses 1 for clockwise, while kCW_Direction
|
||||
cast to int is zero.
|
||||
arcTo() implements the functionality of svg arc, although SVG "sweep-flag" value
|
||||
is opposite the integer value of sweep; SVG "sweep-flag" uses 1 for clockwise,
|
||||
while kCW_Direction cast to int is zero.
|
||||
|
||||
@param rx radius in x before x-axis rotation
|
||||
@param ry radius in y before x-axis rotation
|
||||
@ -941,7 +942,7 @@ enum Direction {
|
||||
|
||||
/** Append arc to SkPath, relative to last SkPath SkPoint. Arc is implemented by one or
|
||||
more conic, weighted to describe part of oval with radii (rx, ry) rotated by
|
||||
xAxisRotate degrees. Arc curves from last SkPath SkPoint (x0, y0) to end SkPoint
|
||||
xAxisRotate degrees. Arc curves from last SkPath SkPoint (x0, y0) to end SkPoint:
|
||||
(x0 + dx, y0 + dy), choosing one of four possible routes: clockwise or
|
||||
counterclockwise, and smaller or larger. If SkPath is empty, the start arc SkPoint
|
||||
is (0, 0).
|
||||
@ -1012,10 +1013,9 @@ enum Direction {
|
||||
Quad array is stored in pts; this storage is supplied by caller.
|
||||
Maximum quad count is 2 to the pow2.
|
||||
Every third point in array shares last SkPoint of previous quad and first SkPoint of
|
||||
next quad. Maximum pts storage size is given by:
|
||||
(1 + 2 * (1 << pow2)) * sizeof(SkPoint)
|
||||
next quad. Maximum pts storage size is given by: (1 + 2 * (1 << pow2)) * sizeof(SkPoint).
|
||||
|
||||
ConvertConicToQuads returns quad count used the approximation, which may be smaller
|
||||
Returns quad count used the approximation, which may be smaller
|
||||
than the number requested.
|
||||
|
||||
conic weight determines the amount of influence conic control point has on the curve.
|
||||
@ -1123,9 +1123,8 @@ enum Direction {
|
||||
void addOval(const SkRect& oval, Direction dir, unsigned start);
|
||||
|
||||
/** Add circle centered at (x, y) of size radius to SkPath, appending kMove_Verb,
|
||||
four kConic_Verb, and kClose_Verb. Circle begins at
|
||||
(x + radius, y), continuing clockwise if dir is kCW_Direction, and counterclockwise if dir is
|
||||
kCCW_Direction.
|
||||
four kConic_Verb, and kClose_Verb. Circle begins at: (x + radius, y), continuing
|
||||
clockwise if dir is kCW_Direction, and counterclockwise if dir is kCCW_Direction.
|
||||
|
||||
Has no effect if radius is zero or negative.
|
||||
|
||||
@ -1406,13 +1405,9 @@ enum Direction {
|
||||
};
|
||||
|
||||
/** \class SkPath::Iter
|
||||
Iterates through verb array, and associated SkPoint arrays and conic weight.
|
||||
Provides options to treat open contours as closed, and to ignore
|
||||
degenerate data.
|
||||
*/
|
||||
class SK_API Iter {
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
/** Initializes iter with an empty SkPath. next() on iter returns kDone_Verb.
|
||||
Call setPath to initialize iter at a later time.
|
||||
@ -1511,12 +1506,9 @@ enum Direction {
|
||||
};
|
||||
|
||||
/** \class SkPath::RawIter
|
||||
Iterates through verb array, and associated SkPoint arrays and conic weight.
|
||||
verb array, SkPoint arrays, and conic weight are returned unaltered.
|
||||
*/
|
||||
class SK_API RawIter {
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
/** Initializes RawIter with an empty SkPath. next() on RawIter returns kDone_Verb.
|
||||
Call setPath to initialize iter at a later time.
|
||||
@ -1587,12 +1579,12 @@ enum Direction {
|
||||
*/
|
||||
bool contains(SkScalar x, SkScalar y) const;
|
||||
|
||||
/** Writes text representation of SkPath to stream. If stream is nullptr, dump() writes to
|
||||
standard output. Set forceClose to true to get
|
||||
edges used to fill SkPath. Set dumpAsHex true to get exact binary representations
|
||||
/** Writes text representation of SkPath to stream. If stream is nullptr, writes to
|
||||
standard output. Set forceClose to true to get edges used to fill SkPath.
|
||||
Set dumpAsHex true to generate exact binary representations
|
||||
of floating point numbers used in SkPoint arrays and conic weights.
|
||||
|
||||
@param stream writable SkFlattenable receiving SkPath text representation; may be nullptr
|
||||
@param stream writable SkStream receiving SkPath text representation; may be nullptr
|
||||
@param forceClose true if missing kClose_Verb is output
|
||||
@param dumpAsHex true if SkScalar values are written as hexadecimal
|
||||
*/
|
||||
|
@ -24,8 +24,8 @@ struct SkMask;
|
||||
Use SkBitmap to draw pixels referenced by SkPixmap; use SkSurface to draw into
|
||||
pixels referenced by SkPixmap.
|
||||
|
||||
SkPixmap does not try to manage the lifetime of the pixel memory. Use PixelRef
|
||||
to manage pixel memory; PixelRef is safe across threads.
|
||||
SkPixmap does not try to manage the lifetime of the pixel memory. Use SkPixelRef
|
||||
to manage pixel memory; SkPixelRef is safe across threads.
|
||||
*/
|
||||
class SK_API SkPixmap {
|
||||
public:
|
||||
@ -127,10 +127,10 @@ public:
|
||||
const SkImageInfo& info() const { return fInfo; }
|
||||
|
||||
/** Returns row bytes, the interval from one pixel row to the next. Row bytes
|
||||
is at least as large as
|
||||
width() * info().bytesPerPixel().
|
||||
is at least as large as: width() * info().bytesPerPixel().
|
||||
|
||||
It is up to the SkPixmap creator to ensure that row bytes is a useful value.
|
||||
Returns zero if colorType() is kUnknown_SkColorType.
|
||||
It is up to the SkBitmap creator to ensure that row bytes is a useful value.
|
||||
|
||||
@return byte length of pixel row
|
||||
*/
|
||||
@ -145,7 +145,7 @@ public:
|
||||
const void* addr() const { return fPixels; }
|
||||
|
||||
/** Returns pixel count in each pixel row. Should be equal or less than:
|
||||
rowBytes() / info.bytesPerPixel().
|
||||
rowBytes() / info().bytesPerPixel().
|
||||
|
||||
@return pixel width in SkImageInfo
|
||||
*/
|
||||
@ -172,21 +172,23 @@ public:
|
||||
*/
|
||||
SkAlphaType alphaType() const { return fInfo.alphaType(); }
|
||||
|
||||
/** Returns SkColorSpace associated with SkImageInfo.
|
||||
/** Returns SkColorSpace associated with SkImageInfo. The
|
||||
reference count of SkColorSpace is unchanged. The returned SkColorSpace is
|
||||
immutable.
|
||||
|
||||
@return SkColorSpace in SkImageInfo
|
||||
@return SkColorSpace, the range of colors, in SkImageInfo
|
||||
*/
|
||||
SkColorSpace* colorSpace() const { return fInfo.colorSpace(); }
|
||||
|
||||
/** Returns true if SkAlphaType is kOpaque_SkAlphaType.
|
||||
Does not check if SkColorType allows alpha, or alpha in pixel values.
|
||||
Does not check if SkColorType allows alpha, or if any pixel value has
|
||||
transparency.
|
||||
|
||||
@return true if SkImageInfo has opaque SkAlphaType
|
||||
*/
|
||||
bool isOpaque() const { return fInfo.isOpaque(); }
|
||||
|
||||
/** Returns SkIRect
|
||||
{ 0, 0, width(), height() }.
|
||||
/** Returns SkIRect { 0, 0, width(), height() }.
|
||||
|
||||
@return integral rectangle from origin to width() and height()
|
||||
*/
|
||||
@ -206,10 +208,14 @@ public:
|
||||
*/
|
||||
int shiftPerPixel() const { return fInfo.shiftPerPixel(); }
|
||||
|
||||
/**
|
||||
* Returns the size (in bytes) of the pixmap's image buffer.
|
||||
* If the calculation overflows, this returns max_size_t.
|
||||
*/
|
||||
/** Returns minimum memory required for pixel storage.
|
||||
Does not include unused memory on last row when rowBytesAsPixels() exceeds width().
|
||||
Returns zero if result does not fit in size_t.
|
||||
Returns zero if height() or width() is 0.
|
||||
Returns height() times rowBytes() if colorType() is kUnknown_SkColorType.
|
||||
|
||||
@return size in bytes of image buffer
|
||||
*/
|
||||
size_t computeByteSize() const { return fInfo.computeByteSize(fRowBytes); }
|
||||
|
||||
/** Returns true if all pixels are opaque. SkColorType determines how pixels
|
||||
@ -226,7 +232,7 @@ public:
|
||||
|
||||
Returns false for kUnknown_SkColorType.
|
||||
|
||||
@return true all pixels have opaque values or SkColorType is opaque
|
||||
@return true if all pixels have opaque values or SkColorType is opaque
|
||||
*/
|
||||
bool computeIsOpaque() const;
|
||||
|
||||
@ -248,10 +254,13 @@ public:
|
||||
*/
|
||||
SkColor getColor(int x, int y) const;
|
||||
|
||||
/** Returns readable pixel address at (x, y).
|
||||
/** Returns readable pixel address at (x, y). Returns nullptr if SkPixelRef is nullptr.
|
||||
|
||||
Input is not validated: out of bounds values of x or y trigger an assert() if
|
||||
built with SK_DEBUG defined. Returns zero if SkColorType is kUnknown_SkColorType.
|
||||
built with SK_DEBUG defined. Returns nullptr if SkColorType is kUnknown_SkColorType.
|
||||
|
||||
Performs a lookup of pixel size; for better performance, call
|
||||
one of: addr8, addr16, addr32, addr64, or addrF16().
|
||||
|
||||
@param x column index, zero or greater, and less than width()
|
||||
@param y row index, zero or greater, and less than height()
|
||||
@ -511,8 +520,8 @@ public:
|
||||
return reinterpret_cast<uint16_t*>(writable_addr64(x, y));
|
||||
}
|
||||
|
||||
/** Copies a SkRect of pixels to dstPixels. Copy starts at (srcX, srcY), and does not exceed
|
||||
(this->width(), this->height()).
|
||||
/** Copies a SkRect of pixels to dstPixels. Copy starts at (srcX, srcY), and does not
|
||||
exceed (this->width(), this->height()).
|
||||
|
||||
dstInfo specifies width, height, SkColorType, SkAlphaType, and
|
||||
SkColorSpace of destination. dstRowBytes specifics the gap from one destination
|
||||
@ -527,14 +536,13 @@ public:
|
||||
false if pixel conversion is not possible.
|
||||
|
||||
srcX and srcY may be negative to copy only top or left of source. Returns
|
||||
false if width() or height() is zero or negative. Returns false if
|
||||
abs(srcX) >= this->width(), or if
|
||||
abs(srcY) >= this->height().
|
||||
false if width() or height() is zero or negative. Returns false if:
|
||||
abs(srcX) >= this->width(), or if abs(srcY) >= this->height().
|
||||
|
||||
If behavior is SkTransferFunctionBehavior::kRespect: converts source
|
||||
pixels to a linear space before converting to dstInfo.
|
||||
If behavior is SkTransferFunctionBehavior::kIgnore: source
|
||||
pixels are treated as if they are linear, regardless of their encoding.
|
||||
pixels are treated as if they are linear, regardless of how they are encoded.
|
||||
|
||||
@param dstInfo destination width, height, SkColorType, SkAlphaType, SkColorSpace
|
||||
@param dstPixels destination pixel storage
|
||||
@ -549,8 +557,7 @@ public:
|
||||
int srcX, int srcY, SkTransferFunctionBehavior behavior) const;
|
||||
|
||||
/** Copies a SkRect of pixels to dstPixels. Copy starts at (0, 0), and does not
|
||||
exceed
|
||||
(this->width(), this->height()).
|
||||
exceed (this->width(), this->height()).
|
||||
|
||||
dstInfo specifies width, height, SkColorType, SkAlphaType, and
|
||||
SkColorSpace of destination. dstRowBytes specifics the gap from one destination
|
||||
@ -576,8 +583,7 @@ public:
|
||||
}
|
||||
|
||||
/** Copies a SkRect of pixels to dstPixels. Copy starts at (srcX, srcY), and does not
|
||||
exceed
|
||||
(this->width(), this->height()).
|
||||
exceed (this->width(), this->height()).
|
||||
|
||||
dstInfo specifies width, height, SkColorType, SkAlphaType, and
|
||||
SkColorSpace of destination. dstRowBytes specifics the gap from one destination
|
||||
@ -592,9 +598,8 @@ public:
|
||||
false if pixel conversion is not possible.
|
||||
|
||||
srcX and srcY may be negative to copy only top or left of source. Returns
|
||||
false if this->width() or this->height() is zero or negative. Returns false if
|
||||
abs(srcX) >= this->width(), or if
|
||||
abs(srcY) >= this->height().
|
||||
false if this->width() or this->height() is zero or negative. Returns false if:
|
||||
abs(srcX) >= this->width(), or if abs(srcY) >= this->height().
|
||||
|
||||
@param dstInfo destination width, height, SkColorType, SkAlphaType, SkColorSpace
|
||||
@param dstPixels destination pixel storage
|
||||
@ -623,9 +628,8 @@ public:
|
||||
false if pixel conversion is not possible.
|
||||
|
||||
srcX and srcY may be negative to copy only top or left of source. Returns
|
||||
false this->width() or this->height() is zero or negative. Returns false if
|
||||
abs(srcX) >= this->width(), or if
|
||||
abs(srcY) >= this->height().
|
||||
false this->width() or this->height() is zero or negative. Returns false if:
|
||||
abs(srcX) >= this->width(), or if abs(srcY) >= this->height().
|
||||
|
||||
@param dst SkImageInfo and pixel address to write to
|
||||
@param srcX column index whose absolute value is less than width()
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user