working on global enum and image info
Added global enum support. That exposed one big hole in bookmaker: The topic overview should not be in the class or struct if the topic includes multiple objects, which is the case for SkImageInfo and enums like SkColorType. This straightens that out, and then used that knowledge to strengthen the topics in SkRect as a test. Now SkRect has more groups of methods, and can expose and link to sets of methods with the same name. This work also is getting ready for tightening SeeAlso data, to be checked as part of the bots' tasks soon. Also, remove links from markup for lowercase method names unless the reference has trailing parentheses. TBR=caryclark@google.com Docs-Preview: https://skia.org/?cl=98782 Bug: skia:6898 Change-Id: I35419c9789da17e272047bf7b9c95b1cf44bb7fe Reviewed-on: https://skia-review.googlesource.com/98782 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@google.com>
This commit is contained in:
parent
33bf56d6b4
commit
2dc84ad3ef
@ -35,7 +35,6 @@ This approach may be deprecated in the future.
|
||||
# Constants # enum and enum class, const values ##
|
||||
# Constructors # functions that construct SkPath ##
|
||||
# Member_Functions # static functions and member methods ##
|
||||
# Operators # operator overloading methods ##
|
||||
#Table ##
|
||||
#Subtopic ##
|
||||
|
||||
@ -183,19 +182,19 @@ Allocates raster Canvas that will draw directly into pixels.
|
||||
Canvas is returned if all parameters are valid.
|
||||
Valid parameters include:
|
||||
info dimensions are zero or positive;
|
||||
info contains Image_Color_Type and Image_Alpha_Type supported by Raster_Surface;
|
||||
info contains Color_Type and Alpha_Type supported by Raster_Surface;
|
||||
pixels is not nullptr;
|
||||
rowBytes is zero or large enough to contain info width pixels of Image_Color_Type.
|
||||
rowBytes is zero or large enough to contain info width pixels of Color_Type.
|
||||
|
||||
Pass zero for rowBytes to compute rowBytes from info width and size of pixel.
|
||||
If rowBytes is greater than zero, it must be equal to or greater than
|
||||
info width times bytes required for Image_Color_Type.
|
||||
info width times bytes required for Color_Type.
|
||||
|
||||
Pixel buffer size should be info height times computed rowBytes.
|
||||
Pixels are not initialized.
|
||||
To access pixels after drawing, call flush() or peekPixels.
|
||||
|
||||
#Param info width, height, Image_Color_Type, Image_Alpha_Type, Color_Space, of Raster_Surface;
|
||||
#Param info width, height, Color_Type, Alpha_Type, Color_Space, of Raster_Surface;
|
||||
width, or height, or both, may be zero
|
||||
##
|
||||
#Param pixels pointer to destination pixels buffer
|
||||
@ -253,8 +252,8 @@ void draw(SkCanvas* ) {
|
||||
|
||||
Allocates raster Canvas specified by inline image specification. Subsequent Canvas
|
||||
calls draw into pixels.
|
||||
Image_Color_Type is set to kN32_SkColorType.
|
||||
Image_Alpha_Type is set to kPremul_SkAlphaType.
|
||||
Color_Type is set to kN32_SkColorType.
|
||||
Alpha_Type is set to kPremul_SkAlphaType.
|
||||
To access pixels after drawing, call flush() or peekPixels.
|
||||
|
||||
Canvas is returned if all parameters are valid.
|
||||
@ -265,7 +264,7 @@ rowBytes is zero or large enough to contain width pixels of kN32_SkColorType.
|
||||
|
||||
Pass zero for rowBytes to compute rowBytes from width and size of pixel.
|
||||
If rowBytes is greater than zero, it must be equal to or greater than
|
||||
width times bytes required for Image_Color_Type.
|
||||
width times bytes required for Color_Type.
|
||||
|
||||
Pixel buffer size should be height times rowBytes.
|
||||
|
||||
@ -445,7 +444,7 @@ May be deprecated in the future.
|
||||
|
||||
#ToDo Should be deprecated? ##
|
||||
|
||||
#Param bitmap width, height, Image_Color_Type, Image_Alpha_Type, and pixel
|
||||
#Param bitmap width, height, Color_Type, Alpha_Type, and pixel
|
||||
storage of Raster_Surface
|
||||
##
|
||||
|
||||
@ -534,7 +533,7 @@ Use props to match the device characteristics, like LCD striping.
|
||||
bitmap is copied so that subsequently editing bitmap will not affect
|
||||
constructed Canvas.
|
||||
|
||||
#Param bitmap width, height, Image_Color_Type, Image_Alpha_Type,
|
||||
#Param bitmap width, height, Color_Type, Alpha_Type,
|
||||
and pixel storage of Raster_Surface
|
||||
##
|
||||
#Param props order and orientation of RGB striping; and whether to use
|
||||
@ -656,9 +655,9 @@ The storage is freed when Canvas is deleted.
|
||||
#Method SkImageInfo imageInfo() const
|
||||
|
||||
Returns Image_Info for Canvas. If Canvas is not associated with Raster_Surface or
|
||||
GPU_Surface, returned Image_Color_Type is set to kUnknown_SkColorType.
|
||||
GPU_Surface, returned Color_Type is set to kUnknown_SkColorType.
|
||||
|
||||
#Return dimensions and Image_Color_Type of Canvas ##
|
||||
#Return dimensions and Color_Type of Canvas ##
|
||||
|
||||
#Example
|
||||
SkCanvas emptyCanvas;
|
||||
@ -788,7 +787,7 @@ Returns nullptr if no match found.
|
||||
If props is nullptr, matches Surface_Properties in Canvas. If props is nullptr and Canvas
|
||||
does not have Surface_Properties, creates Surface with default Surface_Properties.
|
||||
|
||||
#Param info width, height, Image_Color_Type, Image_Alpha_Type, and Color_Space ##
|
||||
#Param info width, height, Color_Type, Alpha_Type, and Color_Space ##
|
||||
#Param props Surface_Properties to match; may be nullptr to match Canvas ##
|
||||
|
||||
#Return Surface matching info and props, or nullptr if no match is available ##
|
||||
@ -1028,7 +1027,7 @@ class like SkDumpCanvas.
|
||||
|
||||
The destination pixel storage must be allocated by the caller.
|
||||
|
||||
Pixel values are converted only if Image_Color_Type and Image_Alpha_Type
|
||||
Pixel values are converted only if Color_Type and Alpha_Type
|
||||
do not match. Only pixels within both source and destination rectangles
|
||||
are copied. dstPixels contents outside Rect intersection are unchanged.
|
||||
|
||||
@ -1043,7 +1042,7 @@ Does not copy, and returns false if:
|
||||
# dstRowBytes is too small to contain one row of pixels. ##
|
||||
##
|
||||
|
||||
#Param dstInfo width, height, Image_Color_Type, and Image_Alpha_Type of dstPixels ##
|
||||
#Param dstInfo width, height, Color_Type, and Alpha_Type of dstPixels ##
|
||||
#Param dstPixels storage for pixels; dstInfo.height() times dstRowBytes, or larger ##
|
||||
#Param dstRowBytes size of one destination row; dstInfo.width() times pixel size, or larger ##
|
||||
#Param srcX offset into readable pixels in x; may be negative ##
|
||||
@ -1120,7 +1119,7 @@ class like SkDumpCanvas.
|
||||
|
||||
Caller must allocate pixel storage in pixmap if needed.
|
||||
|
||||
Pixel values are converted only if Image_Color_Type and Image_Alpha_Type
|
||||
Pixel values are converted only if Color_Type and Alpha_Type
|
||||
do not match. Only pixels within both source and destination Rects
|
||||
are copied. pixmap pixels contents outside Rect intersection are unchanged.
|
||||
|
||||
@ -1183,7 +1182,7 @@ class like SkDumpCanvas.
|
||||
|
||||
Caller must allocate pixel storage in bitmap if needed.
|
||||
|
||||
Bitmap values are converted only if Image_Color_Type and Image_Alpha_Type
|
||||
Bitmap values are converted only if Color_Type and Alpha_Type
|
||||
do not match. Only pixels within both source and destination rectangles
|
||||
are copied. Bitmap pixels outside Rect intersection are unchanged.
|
||||
|
||||
@ -1244,7 +1243,7 @@ Pixels are not writable when SkCanvas is returned by SkDocument::beginPage,
|
||||
returned by SkPictureRecorder::beginRecording, or Canvas is the base of a utility
|
||||
class like SkDumpCanvas.
|
||||
|
||||
Pixel values are converted only if Image_Color_Type and Image_Alpha_Type
|
||||
Pixel values are converted only if Color_Type and Alpha_Type
|
||||
do not match. Only pixels within both source and destination rectangles
|
||||
are copied. Canvas pixels outside Rect intersection are unchanged.
|
||||
|
||||
@ -1261,7 +1260,7 @@ Does not copy, and returns false if:
|
||||
# rowBytes is too small to contain one row of pixels. ##
|
||||
##
|
||||
|
||||
#Param info width, height, Image_Color_Type, and Image_Alpha_Type of pixels ##
|
||||
#Param info width, height, Color_Type, and Alpha_Type of pixels ##
|
||||
#Param pixels pixels to copy, of size info.height() times rowBytes, or larger ##
|
||||
#Param rowBytes size of one row of pixels; info.width() times pixel size, or larger ##
|
||||
#Param x offset into Canvas writable pixels in x; may be negative ##
|
||||
@ -1302,7 +1301,7 @@ Pixels are not writable when SkCanvas is returned by SkDocument::beginPage,
|
||||
returned by SkPictureRecorder::beginRecording, or Canvas is the base of a utility
|
||||
class like SkDumpCanvas.
|
||||
|
||||
Pixel values are converted only if Image_Color_Type and Image_Alpha_Type
|
||||
Pixel values are converted only if Color_Type and Alpha_Type
|
||||
do not match. Only pixels within both source and destination rectangles
|
||||
are copied. Canvas pixels outside Rect intersection are unchanged.
|
||||
|
||||
|
@ -1,6 +1,24 @@
|
||||
#Topic IRect
|
||||
#Alias IRects
|
||||
#Alias IRect_Reference
|
||||
|
||||
#Topic Overview
|
||||
|
||||
#Subtopic Subtopics
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# Constructors # functions that construct SkIRect ##
|
||||
# Member_Functions # static functions and member methods ##
|
||||
# Members # member values ##
|
||||
# Operators # operator overloading methods ##
|
||||
# Related_Functions # similar methods grouped together ##
|
||||
#Table ##
|
||||
##
|
||||
|
||||
#Topic Overview ##
|
||||
|
||||
#Struct SkIRect
|
||||
|
||||
SkIRect holds four 32 bit integer coordinates describing the upper and
|
||||
@ -9,44 +27,18 @@ from position, width, and height. SkIRect describes an area; if its right
|
||||
is less than or equal to its left, or if its bottom is less than or equal to
|
||||
its top, it is considered empty.
|
||||
|
||||
#Topic Overview
|
||||
|
||||
#Subtopic Subtopics
|
||||
#Subtopic Related_Functions
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# Constructors # list of functions that construct SkPath ##
|
||||
# Member_Functions # list of static functions and member methods ##
|
||||
# Operators # operator overloading methods ##
|
||||
#Table ##
|
||||
##
|
||||
|
||||
#Subtopic Constructors
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# MakeEmpty # returns bounds of (0, 0, 0, 0) ##
|
||||
# MakeLTRB # constructs from int left, top, right, bottom ##
|
||||
# MakeLargest # deprecated ##
|
||||
# MakeSize # constructs from ISize returning (0, 0, width, height) ##
|
||||
# MakeWH # constructs from int input returning (0, 0, width, height) ##
|
||||
# MakeXYWH # constructs from int input returning (x, y, width, height) ##
|
||||
# makeInset # constructs from sides moved symmetrically about the center ##
|
||||
# makeOffset # constructs from translated sides ##
|
||||
# makeOutset # constructs from sides moved symmetrically about the center ##
|
||||
# makeSorted # constructs, ordering sides from smaller to larger ##
|
||||
#Table ##
|
||||
#Subtopic ##
|
||||
|
||||
#Subtopic Operators
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# bool operator!=(const SkIRect& a, const SkIRect& b) # returns true if members are unequal ##
|
||||
# bool operator==(const SkIRect& a, const SkIRect& b) # returns true if members are equal ##
|
||||
# Inset_Outset_Offset # moves sides ##
|
||||
# Intersection # set to shared bounds ##
|
||||
# Join # set to union of bounds ##
|
||||
# Properties # side values, center, validity ##
|
||||
# Rounding # adjust to integer bounds ##
|
||||
# Set # replaces all values ##
|
||||
# Sorting # orders sides ##
|
||||
#Table ##
|
||||
#Subtopic ##
|
||||
|
||||
@ -72,7 +64,7 @@ its top, it is considered empty.
|
||||
# height() # returns span in y ##
|
||||
# height64 # returns span in y as int64_t ##
|
||||
# inset() # moves the sides symmetrically about the center ##
|
||||
# intersect # sets to shared area; returns true if not empty ##
|
||||
# intersect() # sets to shared area; returns true if not empty ##
|
||||
# intersectNoEmptyCheck # sets to shared area; returns true if not empty skips empty check ##
|
||||
# is16Bit # returns true if members fit in 16-bit word ##
|
||||
# isEmpty # returns true if width or height are zero or negative or they exceed int32_t ##
|
||||
@ -102,7 +94,7 @@ its top, it is considered empty.
|
||||
#Table ##
|
||||
#Subtopic ##
|
||||
|
||||
#Topic ##
|
||||
#Subtopic Members
|
||||
|
||||
#Member int32_t fLeft
|
||||
May contain any value. The smaller of the horizontal values when sorted.
|
||||
@ -124,6 +116,25 @@ May contain any value. The larger of the vertical values when sorted.
|
||||
When equal to or less than fTop, IRect is empty.
|
||||
##
|
||||
|
||||
#Subtopic Members ##
|
||||
|
||||
#Subtopic Constructors
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# MakeEmpty # returns bounds of (0, 0, 0, 0) ##
|
||||
# MakeLTRB # constructs from int left, top, right, bottom ##
|
||||
# MakeLargest # deprecated ##
|
||||
# MakeSize # constructs from ISize returning (0, 0, width, height) ##
|
||||
# MakeWH # constructs from int input returning (0, 0, width, height) ##
|
||||
# MakeXYWH # constructs from int input returning (x, y, width, height) ##
|
||||
# makeInset # constructs from sides moved symmetrically about the center ##
|
||||
# makeOffset # constructs from translated sides ##
|
||||
# makeOutset # constructs from sides moved symmetrically about the center ##
|
||||
# makeSorted # constructs, ordering sides from smaller to larger ##
|
||||
#Table ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeEmpty()
|
||||
@ -163,8 +174,8 @@ outset rect isEmpty: false
|
||||
Returns constructed IRect set to (0, 0, w, h). Does not validate input; w or h
|
||||
may be negative.
|
||||
|
||||
#Param w width of constructed Rect ##
|
||||
#Param h height of constructed Rect ##
|
||||
#Param w width of constructed IRect ##
|
||||
#Param h height of constructed IRect ##
|
||||
|
||||
#Return bounds (0, 0, w, h) ##
|
||||
|
||||
@ -191,7 +202,7 @@ all equal
|
||||
Returns constructed IRect set to (0, 0, size.width(), size.height()).
|
||||
Does not validate input; size.width() or size.height() may be negative.
|
||||
|
||||
#Param size values for Rect width and height ##
|
||||
#Param size values for IRect width and height ##
|
||||
|
||||
#Return bounds (0, 0, size.width(), size.height()) ##
|
||||
|
||||
@ -215,7 +226,7 @@ floor width: 25 height: 35
|
||||
|
||||
#Method static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b)
|
||||
|
||||
Returns constructed IRect set to (l, t, r, b). Does not sort input; Rect may
|
||||
Returns constructed IRect set to (l, t, r, b). Does not sort input; IRect may
|
||||
result in fLeft greater than fRight, or fTop greater than fBottom.
|
||||
|
||||
#Param l integer stored in fLeft ##
|
||||
@ -277,6 +288,9 @@ rect: -10, 35, 5, 60 isEmpty: false
|
||||
|
||||
##
|
||||
|
||||
#Subtopic Constructors ##
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method int32_t left() const
|
||||
@ -554,8 +568,8 @@ original rect: 20, 30, 40, 50 size: 20, 20
|
||||
|
||||
#Method int32_t centerX() const
|
||||
|
||||
Returns average of left edge and right edge. Result does not change if Rect
|
||||
is sorted. Result may be incorrect if Rect is far from the origin.
|
||||
Returns average of left edge and right edge. Result does not change if IRect
|
||||
is sorted. Result may be incorrect if IRect is far from the origin.
|
||||
|
||||
Result is rounded down.
|
||||
|
||||
@ -585,8 +599,8 @@ left: -10 right: 11 centerX: 0 div2: 0
|
||||
|
||||
#Method int32_t centerY() const
|
||||
|
||||
Returns average of top edge and bottom edge. Result does not change if Rect
|
||||
is sorted. Result may be incorrect if Rect is far from the origin.
|
||||
Returns average of top edge and bottom edge. Result does not change if IRect
|
||||
is sorted. Result may be incorrect if IRect is far from the origin.
|
||||
|
||||
Result is rounded down.
|
||||
|
||||
@ -668,6 +682,15 @@ sorted: {20, 40, 20, 50} is empty
|
||||
|
||||
##
|
||||
|
||||
#Subtopic Operators
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# bool operator!=(const SkIRect& a, const SkIRect& b) # returns true if members are unequal ##
|
||||
# bool operator==(const SkIRect& a, const SkIRect& b) # returns true if members are equal ##
|
||||
#Table ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool operator==(const SkIRect& a, const SkIRect& b)
|
||||
@ -718,6 +741,8 @@ test != sorted
|
||||
|
||||
##
|
||||
|
||||
#Subtopic ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool is16Bit() const
|
||||
@ -862,6 +887,23 @@ rect: -10, 35, 5, 60 isEmpty: false
|
||||
|
||||
##
|
||||
|
||||
#Subtopic Inset_Outset_Offset
|
||||
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# inset() # moves the sides symmetrically about the center ##
|
||||
# makeInset # constructs from sides moved symmetrically about the center ##
|
||||
# makeOffset # constructs from translated sides ##
|
||||
# makeOutset # constructs from sides moved symmetrically about the center ##
|
||||
# offset() # translates sides without changing width and height ##
|
||||
# # void offset(int32_t dx, int32_t dy) ##
|
||||
# # void offset(const SkIPoint& delta) ##
|
||||
# offsetTo # translates to (x, y) without changing width and height ##
|
||||
# outset() # moves the sides symmetrically about the center ##
|
||||
#Table ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method SkIRect makeOffset(int32_t dx, int32_t dy) const
|
||||
@ -876,7 +918,7 @@ If dy is positive, IRect returned is moved downward.
|
||||
#Param dx offset added to fLeft and fRight ##
|
||||
#Param dy offset added to fTop and fBottom ##
|
||||
|
||||
#Return Rect offset in x or y, with original width and height ##
|
||||
#Return IRect offset in x or y, with original width and height ##
|
||||
|
||||
#Example
|
||||
SkIRect rect = { 10, 50, 20, 60 };
|
||||
@ -909,7 +951,7 @@ If dy is positive, IRect returned is shorter.
|
||||
#Param dx offset added to fLeft and subtracted from fRight ##
|
||||
#Param dy offset added to fTop and subtracted from fBottom ##
|
||||
|
||||
#Return Rect inset symmetrically left and right, top and bottom ##
|
||||
#Return IRect inset symmetrically left and right, top and bottom ##
|
||||
|
||||
#Example
|
||||
SkIRect rect = { 10, 50, 20, 60 };
|
||||
@ -942,7 +984,7 @@ If dy is positive, IRect returned is taller.
|
||||
#Param dx offset subtracted to fLeft and added from fRight ##
|
||||
#Param dy offset subtracted to fTop and added from fBottom ##
|
||||
|
||||
#Return Rect outset symmetrically left and right, top and bottom ##
|
||||
#Return IRect outset symmetrically left and right, top and bottom ##
|
||||
|
||||
#Example
|
||||
SkIRect rect = { 10, 50, 20, 60 };
|
||||
@ -1071,10 +1113,10 @@ rect: 15, 27, 45, 60
|
||||
|
||||
Outsets IRect by (dx, dy).
|
||||
|
||||
If dx is positive, makes Rect wider.
|
||||
If dx is negative, makes Rect narrower.
|
||||
If dy is positive, makes Rect taller.
|
||||
If dy is negative, makes Rect shorter.
|
||||
If dx is positive, makes IRect wider.
|
||||
If dx is negative, makes IRect narrower.
|
||||
If dy is positive, makes IRect taller.
|
||||
If dy is negative, makes IRect shorter.
|
||||
|
||||
#Param dx subtracted to fLeft and added from fRight ##
|
||||
#Param dy subtracted to fTop and added from fBottom ##
|
||||
@ -1092,6 +1134,42 @@ rect: 5, 1, 55, 86
|
||||
|
||||
##
|
||||
|
||||
#Subtopic Inset_Outset_Offset ##
|
||||
|
||||
#Subtopic Intersection
|
||||
|
||||
IRects intersect when they enclose a common area. To intersect, each of the pair
|
||||
must describe area; fLeft is less than fRight, and fTop is less than fBottom;
|
||||
empty() returns false. The intersection of IRect pair can be described by:
|
||||
|
||||
#Formula
|
||||
(max(a.fLeft, b.fLeft), max(a.fTop, b.fTop),
|
||||
min(a.fRight, b.fRight), min(a.fBottom, b.fBottom))
|
||||
##
|
||||
.
|
||||
|
||||
The intersection is only meaningful if the resulting IRect is not empty and
|
||||
describes an area: fLeft is less than fRight, and fTop is less than fBottom.
|
||||
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# Intersects # returns true if areas overlap ##
|
||||
# IntersectsNoEmptyCheck # returns true if areas overlap skips empty check ##
|
||||
# contains() # returns true if points are equal or inside ##
|
||||
# # bool contains(int32_t x, int32_t y) const ##
|
||||
# # bool contains(int32_t left, int32_t top, int32_t right, int32_t bottom) const ##
|
||||
# # bool contains(const SkIRect& r) const ##
|
||||
# intersect() # sets to shared area; returns true if not empty ##
|
||||
# # bool intersect(const SkIRect& r) ##
|
||||
# # bool intersect(const SkIRect& a, const SkIRect& b) ##
|
||||
# # bool intersect(int32_t left, int32_t top, int32_t right, int32_t bottom) ##
|
||||
# intersectNoEmptyCheck # sets to shared area; returns true if not empty skips empty check ##
|
||||
# quickReject # returns true if rectangles do not intersect ##
|
||||
#Table ##
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool quickReject(int l, int t, int r, int b) const
|
||||
@ -1102,10 +1180,10 @@ intersect IRect. Does not check to see if construction or IRect is empty.
|
||||
Is implemented with short circuit logic so that true can be returned after
|
||||
a single compare.
|
||||
|
||||
#Param l x minimum of constructed Rect ##
|
||||
#Param t y minimum of constructed Rect ##
|
||||
#Param r x maximum of constructed Rect ##
|
||||
#Param b y maximum of constructed Rect ##
|
||||
#Param l x minimum of constructed IRect ##
|
||||
#Param t y minimum of constructed IRect ##
|
||||
#Param r x maximum of constructed IRect ##
|
||||
#Param b y maximum of constructed IRect ##
|
||||
|
||||
#Return true if construction and IRect have no area in common ##
|
||||
|
||||
@ -1143,7 +1221,7 @@ Returns true if:
|
||||
fLeft <= x < fRight && fTop <= y < fBottom
|
||||
##
|
||||
.
|
||||
Returns false if Rect is empty.
|
||||
Returns false if IRect is empty.
|
||||
|
||||
Considers input to describe constructed IRect:
|
||||
#Formula
|
||||
@ -1180,16 +1258,16 @@ rect: (30, 50, 40, 60) does not contain (30, 60)
|
||||
|
||||
#Method bool contains(int32_t left, int32_t top, int32_t right, int32_t bottom) const
|
||||
|
||||
Constructs Rect to intersect from (left, top, right, bottom). Does not sort
|
||||
Constructs IRect to intersect from (left, top, right, bottom). Does not sort
|
||||
construction.
|
||||
|
||||
Returns true if Rect contains construction.
|
||||
Returns false if Rect is empty or construction is empty.
|
||||
Returns true if IRect contains construction.
|
||||
Returns false if IRect is empty or construction is empty.
|
||||
|
||||
#Param left x minimum of constructed Rect ##
|
||||
#Param top y minimum of constructed Rect ##
|
||||
#Param right x maximum of constructed Rect ##
|
||||
#Param bottom y maximum of constructed Rect ##
|
||||
#Param left x minimum of constructed IRect ##
|
||||
#Param top y minimum of constructed IRect ##
|
||||
#Param right x maximum of constructed IRect ##
|
||||
#Param bottom y maximum of constructed IRect ##
|
||||
|
||||
#Return true if all sides of IRect are outside construction ##
|
||||
|
||||
@ -1219,10 +1297,10 @@ rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
|
||||
|
||||
#Method bool contains(const SkIRect& r) const
|
||||
|
||||
Returns true if Rect contains r.
|
||||
Returns false if Rect is empty or r is empty.
|
||||
Returns true if IRect contains r.
|
||||
Returns false if IRect is empty or r is empty.
|
||||
|
||||
Rect contains r when Rect area completely includes r area.
|
||||
IRect contains r when IRect area completely includes r area.
|
||||
|
||||
#Param r IRect contained ##
|
||||
|
||||
@ -1252,10 +1330,10 @@ rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
|
||||
|
||||
#Method bool contains(const SkRect& r) const
|
||||
|
||||
Returns true if Rect contains r.
|
||||
Returns false if Rect is empty or r is empty.
|
||||
Returns true if IRect contains r.
|
||||
Returns false if IRect is empty or r is empty.
|
||||
|
||||
Rect contains r when Rect area completely includes r area.
|
||||
IRect contains r when IRect area completely includes r area.
|
||||
|
||||
#Param r Rect contained ##
|
||||
|
||||
@ -1289,15 +1367,15 @@ rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
|
||||
Constructs IRect from (left, top, right, bottom). Does not sort
|
||||
construction.
|
||||
|
||||
Returns true if Rect contains construction.
|
||||
Returns true if IRect contains construction.
|
||||
Asserts if IRect is empty or construction is empty, and if SK_DEBUG is defined.
|
||||
|
||||
Return is undefined if Rect is empty or construction is empty.
|
||||
Return is undefined if IRect is empty or construction is empty.
|
||||
|
||||
#Param left x minimum of constructed Rect ##
|
||||
#Param top y minimum of constructed Rect ##
|
||||
#Param right x maximum of constructed Rect ##
|
||||
#Param bottom y maximum of constructed Rect ##
|
||||
#Param left x minimum of constructed IRect ##
|
||||
#Param top y minimum of constructed IRect ##
|
||||
#Param right x maximum of constructed IRect ##
|
||||
#Param bottom y maximum of constructed IRect ##
|
||||
|
||||
#Return true if all sides of IRect are outside construction ##
|
||||
|
||||
@ -1327,12 +1405,12 @@ rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
|
||||
|
||||
#Method bool containsNoEmptyCheck(const SkIRect& r) const
|
||||
|
||||
Returns true if Rect contains construction.
|
||||
Returns true if IRect contains construction.
|
||||
Asserts if IRect is empty or construction is empty, and if SK_DEBUG is defined.
|
||||
|
||||
Return is undefined if Rect is empty or construction is empty.
|
||||
Return is undefined if IRect is empty or construction is empty.
|
||||
|
||||
#Param r Rect contained ##
|
||||
#Param r IRect contained ##
|
||||
|
||||
#Return true if all sides of IRect are outside r ##
|
||||
|
||||
@ -1356,18 +1434,6 @@ rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
|
||||
|
||||
##
|
||||
|
||||
#Topic Intersection
|
||||
|
||||
IRects intersect when they enclose a common area. To intersect, each of the pair
|
||||
must describe area; fLeft is less than fRight, and fTop is less than fBottom;
|
||||
empty() returns false. The intersection of IRect pair can be described by:
|
||||
#Formula
|
||||
(max(a.fLeft, b.fLeft), max(a.fTop, b.fTop),
|
||||
min(a.fRight, b.fRight), min(a.fBottom, b.fBottom))
|
||||
##
|
||||
The intersection is only meaningful if the resulting IRect is not empty and
|
||||
describes an area: fLeft is less than fRight, and fTop is less than fBottom.
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool intersect(const SkIRect& r)
|
||||
@ -1379,7 +1445,7 @@ Returns false if either r or IRect is empty, leaving IRect unchanged.
|
||||
|
||||
#Param r limit of result ##
|
||||
|
||||
#Return true if r and Rect have area in common ##
|
||||
#Return true if r and IRect have area in common ##
|
||||
|
||||
#Example
|
||||
#Description
|
||||
@ -1542,24 +1608,24 @@ Asserts if either a or b is empty, and if SK_DEBUG is defined.
|
||||
|
||||
##
|
||||
|
||||
#Topic Intersection ##
|
||||
#Subtopic Intersection ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void join(int32_t left, int32_t top, int32_t right, int32_t bottom)
|
||||
|
||||
Constructs Rect to intersect from (left, top, right, bottom). Does not sort
|
||||
Constructs IRect to intersect from (left, top, right, bottom). Does not sort
|
||||
construction.
|
||||
|
||||
Sets Rect to the union of itself and the construction.
|
||||
Sets IRect to the union of itself and the construction.
|
||||
|
||||
Has no effect if construction is empty. Otherwise, if Rect is empty, sets
|
||||
Rect to construction.
|
||||
Has no effect if construction is empty. Otherwise, if IRect is empty, sets
|
||||
IRect to construction.
|
||||
|
||||
#Param left x minimum of constructed Rect ##
|
||||
#Param top y minimum of constructed Rect ##
|
||||
#Param right x maximum of constructed Rect ##
|
||||
#Param bottom y maximum of constructed Rect ##
|
||||
#Param left x minimum of constructed IRect ##
|
||||
#Param top y minimum of constructed IRect ##
|
||||
#Param right x maximum of constructed IRect ##
|
||||
#Param bottom y maximum of constructed IRect ##
|
||||
|
||||
#Example
|
||||
SkIRect rect = { 10, 20, 15, 25};
|
||||
@ -1578,11 +1644,11 @@ Rect to construction.
|
||||
|
||||
#Method void join(const SkIRect& r)
|
||||
|
||||
Sets Rect to the union of itself and r.
|
||||
Sets IRect to the union of itself and r.
|
||||
|
||||
Has no effect if r is empty. Otherwise, if Rect is empty, sets Rect to r.
|
||||
Has no effect if r is empty. Otherwise, if IRect is empty, sets IRect to r.
|
||||
|
||||
#Param r expansion Rect ##
|
||||
#Param r expansion IRect ##
|
||||
|
||||
#Example
|
||||
SkIRect rect = { 10, 20, 15, 25};
|
||||
@ -1624,7 +1690,7 @@ sorted: 20, 10, 30, 50
|
||||
|
||||
#Method SkIRect makeSorted() const
|
||||
|
||||
Returns Rect with fLeft and fRight swapped if fLeft is greater than fRight; and
|
||||
Returns IRect with fLeft and fRight swapped if fLeft is greater than fRight; and
|
||||
with fTop and fBottom swapped if fTop is greater than fBottom. Result may be empty;
|
||||
and width() and height() will be zero or positive.
|
||||
|
||||
|
891
docs/SkImageInfo_Reference.bmh
Normal file
891
docs/SkImageInfo_Reference.bmh
Normal file
@ -0,0 +1,891 @@
|
||||
#Topic Image_Info
|
||||
#Alias Image_Info_Reference
|
||||
|
||||
#Topic Overview
|
||||
|
||||
#Subtopic Subtopics
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# Constants # enum and enum class, const values ##
|
||||
# Constructors # functions that construct ImageInfo ##
|
||||
# Member_Functions # static functions and member methods ##
|
||||
# Operators # operator overloading methods ##
|
||||
#Table ##
|
||||
##
|
||||
|
||||
#Subtopic Constants
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# Alpha_Type # encoding for pixel transparency ##
|
||||
# Color_Type # encoding for pixel color components ##
|
||||
# SkDestinationSurfaceColorMode # ##
|
||||
# SkYUVColorSpace # ##
|
||||
#Table ##
|
||||
#Subtopic ##
|
||||
|
||||
#Topic ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
#Topic Alpha_Type
|
||||
#Alias Alpha_Type
|
||||
#Alias Alpha_Types
|
||||
#Enum SkAlphaType
|
||||
|
||||
#Code
|
||||
enum SkAlphaType {
|
||||
kUnknown_SkAlphaType,
|
||||
kOpaque_SkAlphaType,
|
||||
kPremul_SkAlphaType,
|
||||
kUnpremul_SkAlphaType,
|
||||
kLastEnum_SkAlphaType = kUnpremul_SkAlphaType,
|
||||
};
|
||||
##
|
||||
|
||||
Describes how to interpret the alpha component of a pixel.
|
||||
|
||||
#Const kUnknown_SkAlphaType 0
|
||||
##
|
||||
#Const kOpaque_SkAlphaType 1
|
||||
All pixels are stored as opaque.
|
||||
##
|
||||
#Const kPremul_SkAlphaType 2
|
||||
All pixels have their alpha premultiplied in their color components.
|
||||
This is the natural format for the rendering target pixels.
|
||||
##
|
||||
#Const kUnpremul_SkAlphaType 3
|
||||
All pixels have their color components stored without any regard to the
|
||||
alpha. e.g. this is the default configuration for PNG images.
|
||||
kUnpremul_SkAlphaType is supported only for input images. Rendering cannot
|
||||
generate this on output.
|
||||
##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Enum SkAlphaType ##
|
||||
#Topic ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
#Topic Color_Type
|
||||
#Subtopic Native_Color_Type
|
||||
#Alias Native_Color_Type
|
||||
#Substitute native SkColorType
|
||||
##
|
||||
#Alias Color_Type
|
||||
#Alias Color_Types
|
||||
#Enum SkColorType
|
||||
|
||||
#Code
|
||||
enum SkColorType {
|
||||
kUnknown_SkColorType,
|
||||
kAlpha_8_SkColorType,
|
||||
kRGB_565_SkColorType,
|
||||
kARGB_4444_SkColorType,
|
||||
kRGBA_8888_SkColorType,
|
||||
kBGRA_8888_SkColorType,
|
||||
kGray_8_SkColorType,
|
||||
kRGBA_F16_SkColorType,
|
||||
kLastEnum_SkColorType = kRGBA_F16_SkColorType,
|
||||
kN32_SkColorType = kBGRA_8888_SkColorType,
|
||||
kN32_SkColorType = kRGBA_8888_SkColorType,
|
||||
};
|
||||
##
|
||||
|
||||
Describes how to interpret the components of a pixel.
|
||||
kN32_SkColorType is an alias for whichever 32 bit Color_ARGB format is the "native"
|
||||
form for skia's blitters. Use this if you don't have a swizzle preference
|
||||
for 32 bit pixels.
|
||||
|
||||
#Const kUnknown_SkColorType 0
|
||||
##
|
||||
#Const kAlpha_8_SkColorType 1
|
||||
##
|
||||
#Const kRGB_565_SkColorType 2
|
||||
##
|
||||
#Const kARGB_4444_SkColorType 3
|
||||
##
|
||||
#Const kRGBA_8888_SkColorType 4
|
||||
##
|
||||
#Const kBGRA_8888_SkColorType 5
|
||||
##
|
||||
#Const kGray_8_SkColorType 6
|
||||
##
|
||||
#Const kRGBA_F16_SkColorType 7
|
||||
##
|
||||
#Const kN32_SkColorType 4
|
||||
##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Enum SkColorType ##
|
||||
#Topic ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
#Enum SkYUVColorSpace
|
||||
|
||||
#Code
|
||||
enum SkYUVColorSpace {
|
||||
kJPEG_SkYUVColorSpace,
|
||||
kRec601_SkYUVColorSpace,
|
||||
kRec709_SkYUVColorSpace,
|
||||
kLastEnum_SkYUVColorSpace = kRec709_SkYUVColorSpace,
|
||||
};
|
||||
##
|
||||
|
||||
Describes the color space a YUV pixel.
|
||||
|
||||
#Const kJPEG_SkYUVColorSpace 0
|
||||
Standard JPEG color space.
|
||||
##
|
||||
#Const kRec601_SkYUVColorSpace 1
|
||||
SDTV standard Rec. 601 color space. Uses "studio swing" [16, 235] color
|
||||
range. See http://en.wikipedia.org/wiki/Rec._601 for details.
|
||||
##
|
||||
#Const kRec709_SkYUVColorSpace 2
|
||||
HDTV standard Rec. 709 color space. Uses "studio swing" [16, 235] color
|
||||
range. See http://en.wikipedia.org/wiki/Rec._709 for details.
|
||||
##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Enum SkYUVColorSpace ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
#EnumClass SkDestinationSurfaceColorMode
|
||||
|
||||
#Code
|
||||
enum class SkDestinationSurfaceColorMode {
|
||||
kLegacy,
|
||||
kGammaAndColorSpaceAware,
|
||||
};
|
||||
##
|
||||
|
||||
#Const kLegacy 0
|
||||
##
|
||||
#Const kGammaAndColorSpaceAware 1
|
||||
##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#EnumClass SkDestinationSurfaceColorMode ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Struct SkImageInfo
|
||||
|
||||
Describe an image's dimensions and pixel type.
|
||||
Used for both src images and render-targets (surfaces).
|
||||
|
||||
#Subtopic Operators
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# bool operator!=(const SkImageInfo& other)_const # ##
|
||||
# bool operator==(const SkImageInfo& other)_const # ##
|
||||
#Table ##
|
||||
#Subtopic ##
|
||||
|
||||
#Subtopic Member_Functions
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# ByteSizeOverflowed # ##
|
||||
# Make # creates Image_Info from dimensions, Color_Type, Alpha_Type, Color_Space ##
|
||||
# MakeA8 # creates Image_Info with kAlpha_8_SkColorType, kPremul_SkAlphaType ##
|
||||
# MakeN32 # creates Image_Info with Native_Color_Type ##
|
||||
# MakeN32Premul # creates Image_Info with Native_Color_Type, kPremul_SkAlphaType ##
|
||||
# MakeS32 # creates Image_Info with Native_Color_Type, sRGB Color_Space ##
|
||||
# MakeUnknown # creates Image_Info with kUnknown_SkColorType, kUnknown_SkAlphaType ##
|
||||
# alphaType # ##
|
||||
# bounds() # ##
|
||||
# bytesPerPixel # ##
|
||||
# colorSpace # ##
|
||||
# colorType # ##
|
||||
# computeByteSize # ##
|
||||
# computeMinByteSize # ##
|
||||
# computeOffset # ##
|
||||
# dimensions() # ##
|
||||
# flatten() # ##
|
||||
# gammaCloseToSRGB # ##
|
||||
# height() # ##
|
||||
# isEmpty # ##
|
||||
# isOpaque # ##
|
||||
# makeAlphaType # creates Image_Info with changed Alpha_Type ##
|
||||
# makeColorSpace # creates Image_Info with changed Color_Space ##
|
||||
# makeColorType # creates Image_Info with changed Color_Type ##
|
||||
# makeWH # creates Image_Info with changed dimensions ##
|
||||
# minRowBytes # ##
|
||||
# minRowBytes64 # ##
|
||||
# refColorSpace # ##
|
||||
# reset() # ##
|
||||
# shiftPerPixel # ##
|
||||
# unflatten() # ##
|
||||
# validRowBytes # ##
|
||||
# validate() # ##
|
||||
# width() # ##
|
||||
#Table ##
|
||||
#Subtopic ##
|
||||
|
||||
#Subtopic Constructors
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# Make # creates Image_Info from dimensions, Color_Type, Alpha_Type, Color_Space ##
|
||||
# MakeA8 # creates Image_Info with kAlpha_8_SkColorType, kPremul_SkAlphaType ##
|
||||
# MakeN32 # creates Image_Info with Native_Color_Type ##
|
||||
# MakeN32Premul # creates Image_Info with Native_Color_Type, kPremul_SkAlphaType ##
|
||||
# MakeS32 # creates Image_Info with Native_Color_Type, sRGB Color_Space ##
|
||||
# MakeUnknown # creates Image_Info with kUnknown_SkColorType, kUnknown_SkAlphaType ##
|
||||
# SkImageInfo() # creates with zero dimensions, kUnknown_SkColorType, kUnknown_SkAlphaType ##
|
||||
# makeAlphaType # creates Image_Info with changed Alpha_Type ##
|
||||
# makeColorSpace # creates Image_Info with changed Color_Space ##
|
||||
# makeColorType # creates Image_Info with changed Color_Type ##
|
||||
# makeWH # creates Image_Info with changed dimensions ##
|
||||
|
||||
#Table ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method SkImageInfo()
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at,
|
||||
sk_sp<SkColorSpace> cs = nullptr)
|
||||
|
||||
#Param width incomplete ##
|
||||
#Param height incomplete ##
|
||||
#Param ct incomplete ##
|
||||
#Param at incomplete ##
|
||||
#Param cs incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method static SkImageInfo MakeN32(int width, int height, SkAlphaType at,
|
||||
sk_sp<SkColorSpace> cs = nullptr)
|
||||
|
||||
Sets colortype to kN32_SkColorType.
|
||||
|
||||
#Param width incomplete ##
|
||||
#Param height incomplete ##
|
||||
#Param at incomplete ##
|
||||
#Param cs incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method static SkImageInfo MakeS32(int width, int height, SkAlphaType at)
|
||||
|
||||
Creates Image_Info marked as sRGB with kN32_SkColorType swizzle.
|
||||
|
||||
#Param width incomplete ##
|
||||
#Param height incomplete ##
|
||||
#Param at incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method static SkImageInfo MakeN32Premul(int width, int height, sk_sp<SkColorSpace> cs = nullptr)
|
||||
|
||||
Sets colortype to kN32_SkColorType, and the alphatype to premul.
|
||||
|
||||
#Param width incomplete ##
|
||||
#Param height incomplete ##
|
||||
#Param cs incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method static SkImageInfo MakeN32Premul(const SkISize& size)
|
||||
|
||||
#Param size incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method static SkImageInfo MakeA8(int width, int height)
|
||||
|
||||
#Param width incomplete ##
|
||||
#Param height incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method static SkImageInfo MakeUnknown(int width, int height)
|
||||
|
||||
#Param width incomplete ##
|
||||
#Param height incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method static SkImageInfo MakeUnknown()
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
#Subtopic Constructors ##
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method int width() const
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method int height() const
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method SkColorType colorType() const
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method SkAlphaType alphaType() const
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method SkColorSpace* colorSpace() const
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method sk_sp<SkColorSpace> refColorSpace() const
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool isEmpty() const
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool isOpaque() const
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method SkISize dimensions() const
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method SkIRect bounds() const
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool gammaCloseToSRGB() const
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method SkImageInfo makeWH(int newWidth, int newHeight) const
|
||||
|
||||
Creates Image_Info with the same colortype and alphatype as this info,
|
||||
but with the specified width and height.
|
||||
|
||||
#Param newWidth incomplete ##
|
||||
#Param newHeight incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method SkImageInfo makeAlphaType(SkAlphaType newAlphaType) const
|
||||
|
||||
#Param newAlphaType incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method SkImageInfo makeColorType(SkColorType newColorType) const
|
||||
|
||||
#Param newColorType incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method SkImageInfo makeColorSpace(sk_sp<SkColorSpace> cs) const
|
||||
|
||||
#Param cs incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method int bytesPerPixel() const
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method int shiftPerPixel() const
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method uint64_t minRowBytes64() const
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method size_t minRowBytes() const
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method size_t computeOffset(int x, int y, size_t rowBytes) const
|
||||
|
||||
#Param x incomplete ##
|
||||
#Param y incomplete ##
|
||||
#Param rowBytes incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool operator==(const SkImageInfo& other)_const
|
||||
|
||||
#Param other incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool operator!=(const SkImageInfo& other)_const
|
||||
|
||||
#Param other incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void unflatten(SkReadBuffer& buffer)
|
||||
|
||||
#Param buffer incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void flatten(SkWriteBuffer& buffer) const
|
||||
|
||||
#Param buffer incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method size_t computeByteSize(size_t rowBytes) const
|
||||
|
||||
Returns the size (in bytes) of the image buffer that this info needs, given the specified
|
||||
rowBytes. The rowBytes must be >= this->minRowBytes().
|
||||
if (height == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return (height - 1) * rowBytes + width * bytes_per_pixel.
|
||||
|
||||
If the calculation overflows this returns SK_MaxSizeT.
|
||||
|
||||
#Param rowBytes incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method size_t computeMinByteSize() const
|
||||
|
||||
Returns the minimum size (in bytes) of the image buffer that this info needs.
|
||||
If the calculation overflows, or if the height is 0, this returns 0.
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method static bool ByteSizeOverflowed(size_t byteSize)
|
||||
|
||||
Returns true if the result of computeByteSize (or computeMinByteSize) overflowed
|
||||
|
||||
#Param byteSize incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool validRowBytes(size_t rowBytes) const
|
||||
|
||||
#Param rowBytes incomplete ##
|
||||
|
||||
#Return incomplete ##
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void reset()
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void validate() const
|
||||
|
||||
#Example
|
||||
// incomplete
|
||||
##
|
||||
|
||||
#SeeAlso incomplete
|
||||
|
||||
#Method ##
|
||||
|
||||
#Struct SkImageInfo ##
|
||||
|
||||
#Topic ImageInfo ##
|
@ -5112,7 +5112,7 @@ Paint may draw to.
|
||||
#Topic Fast_Bounds ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
#Method void toString(SkString* str) const;
|
||||
#Method void toString(SkString* str) const
|
||||
|
||||
#DefinedBy SK_TO_STRING_NONVIRT() ##
|
||||
|
||||
|
@ -2,6 +2,23 @@
|
||||
#Alias Rects
|
||||
#Alias Rect_Reference
|
||||
|
||||
#Topic Overview
|
||||
|
||||
#Subtopic Subtopics
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# Constructors # functions that construct SkRect ##
|
||||
# Member_Functions # static functions and member methods ##
|
||||
# Members # member values ##
|
||||
# Operators # operator overloading methods ##
|
||||
# Related_Functions # similar methods grouped together ##
|
||||
#Table ##
|
||||
##
|
||||
|
||||
#Topic Overview ##
|
||||
|
||||
#Struct SkRect
|
||||
|
||||
SkRect holds four SkScalar coordinates describing the upper and
|
||||
@ -14,48 +31,20 @@ its top, it is considered empty.
|
||||
SkRect can be constructed from int values to avoid compiler warnings that
|
||||
integer input cannot convert to SkScalar without loss of precision.
|
||||
|
||||
#Topic Overview
|
||||
|
||||
#Subtopic Subtopics
|
||||
#ToDo manually add subtopics ##
|
||||
#Subtopic Related_Functions
|
||||
#Table
|
||||
#Legend
|
||||
# topics # description ##
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# Constructors # functions that construct SkPath ##
|
||||
# Member_Functions # static functions and member methods ##
|
||||
# Operators # operator overloading methods ##
|
||||
#Table ##
|
||||
##
|
||||
|
||||
#Subtopic Constructors
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# Make # constructs from ISize returning (0, 0, width, height) ##
|
||||
# MakeEmpty # constructs from bounds of (0, 0, 0, 0) ##
|
||||
# MakeFromIRect # deprecated ##
|
||||
# MakeIWH # constructs from int input returning (0, 0, width, height) ##
|
||||
# MakeLTRB # constructs from SkScalar left, top, right, bottom ##
|
||||
# MakeLargest # deprecated ##
|
||||
# MakeSize # constructs from Size returning (0, 0, width, height) ##
|
||||
# MakeWH # constructs from SkScalar input returning (0, 0, width, height) ##
|
||||
# MakeXYWH # constructs from SkScalar input returning (x, y, width, height) ##
|
||||
# makeInset # constructs from sides moved symmetrically about the center ##
|
||||
# makeOffset # constructs from translated sides ##
|
||||
# makeOutset # constructs from sides moved symmetrically about the center ##
|
||||
# makeSorted # constructs, ordering sides from smaller to larger ##
|
||||
#Table ##
|
||||
#Subtopic ##
|
||||
|
||||
#Subtopic Operators
|
||||
#Table
|
||||
#Legend
|
||||
# description # function ##
|
||||
#Legend ##
|
||||
# bool operator!=(const SkRect& a, const SkRect& b) # returns true if members are unequal ##
|
||||
# bool operator==(const SkRect& a, const SkRect& b) # returns true if members are equal ##
|
||||
# As_Points # conversion to and from Points ##
|
||||
# From_Integers # set Scalar values from integer input ##
|
||||
# Inset_Outset_Offset # moves sides ##
|
||||
# Intersection # set to shared bounds ##
|
||||
# Join # set to union of bounds ##
|
||||
# Properties # side values, center, validity ##
|
||||
# Rounding # adjust to integer bounds ##
|
||||
# Set # replaces all values ##
|
||||
# Sorting # orders sides ##
|
||||
#Table ##
|
||||
#Subtopic ##
|
||||
|
||||
@ -121,7 +110,7 @@ integer input cannot convert to SkScalar without loss of precision.
|
||||
#Table ##
|
||||
#Subtopic ##
|
||||
|
||||
#Topic ##
|
||||
#Subtopic Members
|
||||
|
||||
#Member SkScalar fLeft
|
||||
May contain any value, including infinities and NaN. The smaller of the
|
||||
@ -143,6 +132,28 @@ May contain any value, including infinities and NaN. The larger of the
|
||||
vertical values when sorted. When equal to or less than fTop, Rect is empty.
|
||||
##
|
||||
|
||||
#Subtopic Members ##
|
||||
|
||||
#Subtopic Constructors
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# Make # constructs from ISize returning (0, 0, width, height) ##
|
||||
# MakeEmpty # constructs from bounds of (0, 0, 0, 0) ##
|
||||
# MakeFromIRect # deprecated ##
|
||||
# MakeIWH # constructs from int input returning (0, 0, width, height) ##
|
||||
# MakeLTRB # constructs from SkScalar left, top, right, bottom ##
|
||||
# MakeLargest # deprecated ##
|
||||
# MakeSize # constructs from Size returning (0, 0, width, height) ##
|
||||
# MakeWH # constructs from SkScalar input returning (0, 0, width, height) ##
|
||||
# MakeXYWH # constructs from SkScalar input returning (x, y, width, height) ##
|
||||
# makeInset # constructs from sides moved symmetrically about the center ##
|
||||
# makeOffset # constructs from translated sides ##
|
||||
# makeOutset # constructs from sides moved symmetrically about the center ##
|
||||
# makeSorted # constructs, ordering sides from smaller to larger ##
|
||||
#Table ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method static constexpr SkRect SK_WARN_UNUSED_RESULT MakeEmpty()
|
||||
@ -402,6 +413,29 @@ than fBottom.
|
||||
|
||||
##
|
||||
|
||||
#Subtopic Constructors ##
|
||||
|
||||
#Subtopic Properties
|
||||
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# bottom() # returns larger bounds in y, if sorted ##
|
||||
# centerX # returns midpoint in x ##
|
||||
# centerY # returns midpoint in y ##
|
||||
# height() # returns span in y ##
|
||||
# isEmpty # returns true if width or height are zero or negative ##
|
||||
# isFinite # returns true if no member is infinite or NaN ##
|
||||
# isSorted # returns true if width or height are zero or positive ##
|
||||
# left() # returns smaller bounds in x, if sorted ##
|
||||
# right() # returns larger bounds in x, if sorted ##
|
||||
# top() # returns smaller bounds in y, if sorted ##
|
||||
# width() # returns span in x ##
|
||||
# x() # returns bounds left ##
|
||||
# y() # returns bounds top ##
|
||||
#Table ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool isEmpty() const
|
||||
@ -738,6 +772,18 @@ left: 2e+38 right: 3e+38 centerX: inf safe mid x: 2.5e+38
|
||||
|
||||
##
|
||||
|
||||
#Subtopic Properties ##
|
||||
|
||||
#Subtopic Operators
|
||||
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# bool operator!=(const SkRect& a, const SkRect& b) # returns true if members are unequal ##
|
||||
# bool operator==(const SkRect& a, const SkRect& b) # returns true if members are equal ##
|
||||
#Table ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool operator==(const SkRect& a, const SkRect& b)
|
||||
@ -808,6 +854,19 @@ test with NaN is not equal to itself
|
||||
|
||||
##
|
||||
|
||||
#Subtopic Operators ##
|
||||
|
||||
#Subtopic As_Points
|
||||
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# setBounds # sets to upper and lower limits of Point array ##
|
||||
# setBoundsCheck # sets to upper and lower limits of Point array ##
|
||||
# toQuad # returns four corners as Point ##
|
||||
#Table ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void toQuad(SkPoint quad[4]) const
|
||||
@ -843,6 +902,108 @@ corners: {1, 2} {3, 2} {3, 4} {1, 4}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void setBounds(const SkPoint pts[], int count)
|
||||
|
||||
Sets to bounds of Point array with count entries. If count is zero or smaller,
|
||||
or if Point array contains an infinity or NaN, sets to (0, 0, 0, 0).
|
||||
|
||||
Result is either empty or sorted: fLeft is less than or equal to fRight, and
|
||||
fTop is less than or equal to fBottom.
|
||||
|
||||
#Param pts Point array ##
|
||||
#Param count entries in array ##
|
||||
|
||||
#Example
|
||||
SkPoint points[] = {{3, 4}, {1, 2}, {5, 6}, {SK_ScalarNaN, 8}};
|
||||
for (int count = 0; count <= (int) SK_ARRAY_COUNT(points); ++count) {
|
||||
SkRect rect;
|
||||
rect.setBounds(points, count);
|
||||
if (count > 0) {
|
||||
SkDebugf("added: %3g, %g ", points[count - 1].fX, points[count - 1].fY);
|
||||
} else {
|
||||
SkDebugf("%14s", " ");
|
||||
}
|
||||
SkDebugf("count: %d rect: %g, %g, %g, %g\n", count,
|
||||
rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
|
||||
}
|
||||
#StdOut
|
||||
count: 0 rect: 0, 0, 0, 0
|
||||
added: 3, 4 count: 1 rect: 3, 4, 3, 4
|
||||
added: 1, 2 count: 2 rect: 1, 2, 3, 4
|
||||
added: 5, 6 count: 3 rect: 1, 2, 5, 6
|
||||
added: nan, 8 count: 4 rect: 0, 0, 0, 0
|
||||
##
|
||||
##
|
||||
|
||||
#SeeAlso set setBoundsCheck SkPath::addPoly
|
||||
|
||||
##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool setBoundsCheck(const SkPoint pts[], int count)
|
||||
|
||||
Sets to bounds of Point array with count entries. Returns false if count is
|
||||
zero or smaller, or if Point array contains an infinity or NaN; in these cases
|
||||
sets Rect to (0, 0, 0, 0).
|
||||
|
||||
Result is either empty or sorted: fLeft is less than or equal to fRight, and
|
||||
fTop is less than or equal to fBottom.
|
||||
|
||||
#Param pts Point array ##
|
||||
#Param count entries in array ##
|
||||
|
||||
#Return true if all Point values are finite ##
|
||||
|
||||
#Example
|
||||
SkPoint points[] = {{3, 4}, {1, 2}, {5, 6}, {SK_ScalarNaN, 8}};
|
||||
for (int count = 0; count <= (int) SK_ARRAY_COUNT(points); ++count) {
|
||||
SkRect rect;
|
||||
bool success = rect.setBoundsCheck(points, count);
|
||||
if (count > 0) {
|
||||
SkDebugf("added: %3g, %g ", points[count - 1].fX, points[count - 1].fY);
|
||||
} else {
|
||||
SkDebugf("%14s", " ");
|
||||
}
|
||||
SkDebugf("count: %d rect: %g, %g, %g, %g success: %s\n", count,
|
||||
rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, success ? "true" : "false");
|
||||
}
|
||||
#StdOut
|
||||
count: 0 rect: 0, 0, 0, 0 success: true
|
||||
added: 3, 4 count: 1 rect: 3, 4, 3, 4 success: true
|
||||
added: 1, 2 count: 2 rect: 1, 2, 3, 4 success: true
|
||||
added: 5, 6 count: 3 rect: 1, 2, 5, 6 success: true
|
||||
added: nan, 8 count: 4 rect: 0, 0, 0, 0 success: false
|
||||
##
|
||||
##
|
||||
|
||||
#SeeAlso set setBounds SkPath::addPoly
|
||||
|
||||
##
|
||||
|
||||
#Subtopic As_Points ##
|
||||
|
||||
#Subtopic Set
|
||||
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# iset() # sets to int input (left, top, right, bottom) ##
|
||||
# isetWH # sets to int input (0, 0, width, height) ##
|
||||
# set() # sets to SkScalar input (left, top, right, bottom) and others ##
|
||||
# # void set(const SkIRect& src) ##
|
||||
# # void set(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) ##
|
||||
# # void set(const SkPoint pts[], int count) ##
|
||||
# # void set(const SkPoint& p0, const SkPoint& p1) ##
|
||||
# setEmpty # sets to (0, 0, 0, 0) ##
|
||||
# setLTRB # sets to SkScalar input (left, top, right, bottom) ##
|
||||
# setWH # sets to SkScalar input (0, 0, width, height) ##
|
||||
# setXYWH # sets to SkScalar input (x, y, width, height) ##
|
||||
#Table ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void setEmpty()
|
||||
|
||||
Sets Rect to (0, 0, 0, 0).
|
||||
@ -953,63 +1114,6 @@ rect2: {3, 4, 1, 2}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void iset(int left, int top, int right, int bottom)
|
||||
|
||||
Sets Rect to (left, top, right, bottom).
|
||||
All parameters are promoted from integer to Scalar.
|
||||
left and right are not sorted; left is not necessarily less than right.
|
||||
top and bottom are not sorted; top is not necessarily less than bottom.
|
||||
|
||||
#Param left promoted to SkScalar and stored in fLeft ##
|
||||
#Param top promoted to SkScalar and stored in fTop ##
|
||||
#Param right promoted to SkScalar and stored in fRight ##
|
||||
#Param bottom promoted to SkScalar and stored in fBottom ##
|
||||
|
||||
#Example
|
||||
SkRect rect1 = {3, 4, 1, 2};
|
||||
SkDebugf("rect1: {%g, %g, %g, %g}\n", rect1.fLeft, rect1.fTop, rect1.fRight, rect1.fBottom);
|
||||
SkRect rect2;
|
||||
rect2.iset(3, 4, 1, 2);
|
||||
SkDebugf("rect2: {%g, %g, %g, %g}\n", rect2.fLeft, rect2.fTop, rect2.fRight, rect2.fBottom);
|
||||
#StdOut
|
||||
rect1: {3, 4, 1, 2}
|
||||
rect2: {3, 4, 1, 2}
|
||||
##
|
||||
##
|
||||
|
||||
#SeeAlso set setLTRB SkIRect::set SkIntToScalar
|
||||
|
||||
##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void isetWH(int width, int height)
|
||||
|
||||
Sets Rect to (0, 0, width, height).
|
||||
width and height may be zero or negative. width and height are promoted from
|
||||
integer to SkScalar, large values may lose precision.
|
||||
|
||||
#Param width promoted to SkScalar and stored in fRight ##
|
||||
#Param height promoted to SkScalar and stored in fBottom ##
|
||||
|
||||
#Example
|
||||
SkRect rect1 = {0, 0, 1, 2};
|
||||
SkDebugf("rect1: {%g, %g, %g, %g}\n", rect1.fLeft, rect1.fTop, rect1.fRight, rect1.fBottom);
|
||||
SkRect rect2;
|
||||
rect2.isetWH(1, 2);
|
||||
SkDebugf("rect2: {%g, %g, %g, %g}\n", rect2.fLeft, rect2.fTop, rect2.fRight, rect2.fBottom);
|
||||
#StdOut
|
||||
rect1: {0, 0, 1, 2}
|
||||
rect2: {0, 0, 1, 2}
|
||||
##
|
||||
##
|
||||
|
||||
#SeeAlso MakeWH MakeXYWH iset() SkIRect:MakeWH
|
||||
|
||||
##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void set(const SkPoint pts[], int count)
|
||||
|
||||
Sets to bounds of Point array with count entries. If count is zero or smaller,
|
||||
@ -1049,87 +1153,6 @@ added: nan, 8 count: 4 rect: 0, 0, 0, 0
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void setBounds(const SkPoint pts[], int count)
|
||||
|
||||
Sets to bounds of Point array with count entries. If count is zero or smaller,
|
||||
or if Point array contains an infinity or NaN, sets to (0, 0, 0, 0).
|
||||
|
||||
Result is either empty or sorted: fLeft is less than or equal to fRight, and
|
||||
fTop is less than or equal to fBottom.
|
||||
|
||||
#Param pts Point array ##
|
||||
#Param count entries in array ##
|
||||
|
||||
#Example
|
||||
SkPoint points[] = {{3, 4}, {1, 2}, {5, 6}, {SK_ScalarNaN, 8}};
|
||||
for (int count = 0; count <= (int) SK_ARRAY_COUNT(points); ++count) {
|
||||
SkRect rect;
|
||||
rect.setBounds(points, count);
|
||||
if (count > 0) {
|
||||
SkDebugf("added: %3g, %g ", points[count - 1].fX, points[count - 1].fY);
|
||||
} else {
|
||||
SkDebugf("%14s", " ");
|
||||
}
|
||||
SkDebugf("count: %d rect: %g, %g, %g, %g\n", count,
|
||||
rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
|
||||
}
|
||||
#StdOut
|
||||
count: 0 rect: 0, 0, 0, 0
|
||||
added: 3, 4 count: 1 rect: 3, 4, 3, 4
|
||||
added: 1, 2 count: 2 rect: 1, 2, 3, 4
|
||||
added: 5, 6 count: 3 rect: 1, 2, 5, 6
|
||||
added: nan, 8 count: 4 rect: 0, 0, 0, 0
|
||||
##
|
||||
##
|
||||
|
||||
#SeeAlso set setBoundsCheck SkPath::addPoly
|
||||
|
||||
##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool setBoundsCheck(const SkPoint pts[], int count)
|
||||
|
||||
Sets to bounds of Point array with count entries. Returns false if count is
|
||||
zero or smaller, or if Point array contains an infinity or NaN; in these cases
|
||||
sets Rect to (0, 0, 0, 0).
|
||||
|
||||
Result is either empty or sorted: fLeft is less than or equal to fRight, and
|
||||
fTop is less than or equal to fBottom.
|
||||
|
||||
#Param pts Point array ##
|
||||
#Param count entries in array ##
|
||||
|
||||
#Return true if all Point values are finite ##
|
||||
|
||||
#Example
|
||||
SkPoint points[] = {{3, 4}, {1, 2}, {5, 6}, {SK_ScalarNaN, 8}};
|
||||
for (int count = 0; count <= (int) SK_ARRAY_COUNT(points); ++count) {
|
||||
SkRect rect;
|
||||
bool success = rect.setBoundsCheck(points, count);
|
||||
if (count > 0) {
|
||||
SkDebugf("added: %3g, %g ", points[count - 1].fX, points[count - 1].fY);
|
||||
} else {
|
||||
SkDebugf("%14s", " ");
|
||||
}
|
||||
SkDebugf("count: %d rect: %g, %g, %g, %g success: %s\n", count,
|
||||
rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, success ? "true" : "false");
|
||||
}
|
||||
#StdOut
|
||||
count: 0 rect: 0, 0, 0, 0 success: true
|
||||
added: 3, 4 count: 1 rect: 3, 4, 3, 4 success: true
|
||||
added: 1, 2 count: 2 rect: 1, 2, 3, 4 success: true
|
||||
added: 5, 6 count: 3 rect: 1, 2, 5, 6 success: true
|
||||
added: nan, 8 count: 4 rect: 0, 0, 0, 0 success: false
|
||||
##
|
||||
##
|
||||
|
||||
#SeeAlso set setBounds SkPath::addPoly
|
||||
|
||||
##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void set(const SkPoint& p0, const SkPoint& p1)
|
||||
|
||||
Sets bounds to the smallest Rect enclosing Points p0 and p1. The result is
|
||||
@ -1217,6 +1240,94 @@ rect: -15, 0, 0, 25 isEmpty: false
|
||||
|
||||
##
|
||||
|
||||
#Subtopic Set ##
|
||||
|
||||
#Subtopic From_Integers
|
||||
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# iset() # sets to int input (left, top, right, bottom) ##
|
||||
# isetWH # sets to int input (0, 0, width, height) ##
|
||||
#Table ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void iset(int left, int top, int right, int bottom)
|
||||
|
||||
Sets Rect to (left, top, right, bottom).
|
||||
All parameters are promoted from integer to Scalar.
|
||||
left and right are not sorted; left is not necessarily less than right.
|
||||
top and bottom are not sorted; top is not necessarily less than bottom.
|
||||
|
||||
#Param left promoted to SkScalar and stored in fLeft ##
|
||||
#Param top promoted to SkScalar and stored in fTop ##
|
||||
#Param right promoted to SkScalar and stored in fRight ##
|
||||
#Param bottom promoted to SkScalar and stored in fBottom ##
|
||||
|
||||
#Example
|
||||
SkRect rect1 = {3, 4, 1, 2};
|
||||
SkDebugf("rect1: {%g, %g, %g, %g}\n", rect1.fLeft, rect1.fTop, rect1.fRight, rect1.fBottom);
|
||||
SkRect rect2;
|
||||
rect2.iset(3, 4, 1, 2);
|
||||
SkDebugf("rect2: {%g, %g, %g, %g}\n", rect2.fLeft, rect2.fTop, rect2.fRight, rect2.fBottom);
|
||||
#StdOut
|
||||
rect1: {3, 4, 1, 2}
|
||||
rect2: {3, 4, 1, 2}
|
||||
##
|
||||
##
|
||||
|
||||
#SeeAlso set setLTRB SkIRect::set SkIntToScalar
|
||||
|
||||
##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method void isetWH(int width, int height)
|
||||
|
||||
Sets Rect to (0, 0, width, height).
|
||||
width and height may be zero or negative. width and height are promoted from
|
||||
integer to SkScalar, large values may lose precision.
|
||||
|
||||
#Param width promoted to SkScalar and stored in fRight ##
|
||||
#Param height promoted to SkScalar and stored in fBottom ##
|
||||
|
||||
#Example
|
||||
SkRect rect1 = {0, 0, 1, 2};
|
||||
SkDebugf("rect1: {%g, %g, %g, %g}\n", rect1.fLeft, rect1.fTop, rect1.fRight, rect1.fBottom);
|
||||
SkRect rect2;
|
||||
rect2.isetWH(1, 2);
|
||||
SkDebugf("rect2: {%g, %g, %g, %g}\n", rect2.fLeft, rect2.fTop, rect2.fRight, rect2.fBottom);
|
||||
#StdOut
|
||||
rect1: {0, 0, 1, 2}
|
||||
rect2: {0, 0, 1, 2}
|
||||
##
|
||||
##
|
||||
|
||||
#SeeAlso MakeWH MakeXYWH iset() SkIRect:MakeWH
|
||||
|
||||
##
|
||||
|
||||
#Subtopic From_Integers ##
|
||||
|
||||
#Subtopic Inset_Outset_Offset
|
||||
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# inset() # moves the sides symmetrically about the center ##
|
||||
# makeInset # constructs from sides moved symmetrically about the center ##
|
||||
# makeOffset # constructs from translated sides ##
|
||||
# makeOutset # constructs from sides moved symmetrically about the center ##
|
||||
# offset() # translates sides without changing width and height ##
|
||||
# # void offset(SkScalar dx, SkScalar dy) ##
|
||||
# # void offset(const SkPoint& delta) ##
|
||||
# offsetTo # translates to (x, y) without changing width and height ##
|
||||
# outset() # moves the sides symmetrically about the center ##
|
||||
#Table ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method SkRect makeOffset(SkScalar dx, SkScalar dy) const
|
||||
@ -1447,7 +1558,9 @@ rect: 5, 1, 55, 86
|
||||
|
||||
##
|
||||
|
||||
#Topic Intersection
|
||||
#Subtopic Inset_Outset_Offset ##
|
||||
|
||||
#Subtopic Intersection
|
||||
|
||||
Rects intersect when they enclose a common area. To intersect, each of the pair
|
||||
must describe area; fLeft is less than fRight, and fTop is less than fBottom;
|
||||
@ -1462,6 +1575,89 @@ empty() returns false. The intersection of Rect pair can be described by:
|
||||
The intersection is only meaningful if the resulting Rect is not empty and
|
||||
describes an area: fLeft is less than fRight, and fTop is less than fBottom.
|
||||
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# Intersects # returns true if areas overlap ##
|
||||
# contains() # returns true if points are equal or inside ##
|
||||
# # bool contains(const SkRect& r) const ##
|
||||
# # bool contains(const SkIRect& r) const ##
|
||||
# intersect() # sets to shared area; returns true if not empty ##
|
||||
# # bool intersect(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) ##
|
||||
# # bool intersect(const SkRect& r) ##
|
||||
# # bool intersect(const SkRect& a, const SkRect& b) ##
|
||||
# intersects() # returns true if areas overlap ##
|
||||
# # bool intersects(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) const ##
|
||||
# # bool intersects(const SkRect& r) const ##
|
||||
#Table ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool contains(const SkRect& r) const
|
||||
|
||||
Returns true if Rect contains r.
|
||||
Returns false if Rect is empty or r is empty.
|
||||
|
||||
Rect contains r when Rect area completely includes r area.
|
||||
|
||||
#Param r Rect contained ##
|
||||
|
||||
#Return true if all sides of Rect are outside r ##
|
||||
|
||||
#Example
|
||||
SkRect rect = { 30, 50, 40, 60 };
|
||||
SkRect tests[] = { { 30, 50, 31, 51}, { 39, 49, 40, 50}, { 29, 59, 30, 60} };
|
||||
for (auto contained : tests) {
|
||||
SkDebugf("rect: (%g, %g, %g, %g) %s (%g, %g, %g, %g)\n",
|
||||
rect.left(), rect.top(), rect.right(), rect.bottom(),
|
||||
rect.contains(contained) ? "contains" : "does not contain",
|
||||
contained.left(), contained.top(), contained.right(), contained.bottom());
|
||||
}
|
||||
#StdOut
|
||||
rect: (30, 50, 40, 60) contains (30, 50, 31, 51)
|
||||
rect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)
|
||||
rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
|
||||
##
|
||||
##
|
||||
|
||||
#SeeAlso SkIRect::contains
|
||||
|
||||
##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool contains(const SkIRect& r) const
|
||||
|
||||
Returns true if Rect contains r.
|
||||
Returns false if Rect is empty or r is empty.
|
||||
|
||||
Rect contains r when Rect area completely includes r area.
|
||||
|
||||
#Param r IRect contained ##
|
||||
|
||||
#Return true if all sides of Rect are outside r ##
|
||||
|
||||
#Example
|
||||
SkRect rect = { 30, 50, 40, 60 };
|
||||
SkIRect tests[] = { { 30, 50, 31, 51}, { 39, 49, 40, 50}, { 29, 59, 30, 60} };
|
||||
for (auto contained : tests) {
|
||||
SkDebugf("rect: (%g, %g, %g, %g) %s (%d, %d, %d, %d)\n",
|
||||
rect.left(), rect.top(), rect.right(), rect.bottom(),
|
||||
rect.contains(contained) ? "contains" : "does not contain",
|
||||
contained.left(), contained.top(), contained.right(), contained.bottom());
|
||||
}
|
||||
#StdOut
|
||||
rect: (30, 50, 40, 60) contains (30, 50, 31, 51)
|
||||
rect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)
|
||||
rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
|
||||
##
|
||||
##
|
||||
|
||||
#SeeAlso SkIRect::contains
|
||||
|
||||
##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool intersect(const SkRect& r)
|
||||
@ -1636,8 +1832,20 @@ Returns false if either a or b is empty, or do not intersect.
|
||||
|
||||
##
|
||||
|
||||
#Topic Intersection ##
|
||||
#Subtopic Intersection ##
|
||||
|
||||
#Subtopic Join
|
||||
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# join() # sets to union of bounds ##
|
||||
# # void join(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) ##
|
||||
# # void join(const SkRect& r) ##
|
||||
# joinNonEmptyArg # sets to union of bounds, asserting that argument is not empty ##
|
||||
# joinPossiblyEmptyRect # sets to union of bounds. Skips empty check for both ##
|
||||
#Table ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
@ -1758,75 +1966,23 @@ sorted: 10, 0, 55, 100
|
||||
|
||||
##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
#Subtopic Join ##
|
||||
|
||||
#Method bool contains(const SkRect& r) const
|
||||
#Subtopic Rounding
|
||||
|
||||
Returns true if Rect contains r.
|
||||
Returns false if Rect is empty or r is empty.
|
||||
|
||||
Rect contains r when Rect area completely includes r area.
|
||||
|
||||
#Param r Rect contained ##
|
||||
|
||||
#Return true if all sides of Rect are outside r ##
|
||||
|
||||
#Example
|
||||
SkRect rect = { 30, 50, 40, 60 };
|
||||
SkRect tests[] = { { 30, 50, 31, 51}, { 39, 49, 40, 50}, { 29, 59, 30, 60} };
|
||||
for (auto contained : tests) {
|
||||
SkDebugf("rect: (%g, %g, %g, %g) %s (%g, %g, %g, %g)\n",
|
||||
rect.left(), rect.top(), rect.right(), rect.bottom(),
|
||||
rect.contains(contained) ? "contains" : "does not contain",
|
||||
contained.left(), contained.top(), contained.right(), contained.bottom());
|
||||
}
|
||||
#StdOut
|
||||
rect: (30, 50, 40, 60) contains (30, 50, 31, 51)
|
||||
rect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)
|
||||
rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
|
||||
##
|
||||
##
|
||||
|
||||
#SeeAlso SkIRect::contains
|
||||
|
||||
##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method bool contains(const SkIRect& r) const
|
||||
|
||||
Returns true if Rect contains r.
|
||||
Returns false if Rect is empty or r is empty.
|
||||
|
||||
Rect contains r when Rect area completely includes r area.
|
||||
|
||||
#Param r IRect contained ##
|
||||
|
||||
#Return true if all sides of Rect are outside r ##
|
||||
|
||||
#Example
|
||||
SkRect rect = { 30, 50, 40, 60 };
|
||||
SkIRect tests[] = { { 30, 50, 31, 51}, { 39, 49, 40, 50}, { 29, 59, 30, 60} };
|
||||
for (auto contained : tests) {
|
||||
SkDebugf("rect: (%g, %g, %g, %g) %s (%d, %d, %d, %d)\n",
|
||||
rect.left(), rect.top(), rect.right(), rect.bottom(),
|
||||
rect.contains(contained) ? "contains" : "does not contain",
|
||||
contained.left(), contained.top(), contained.right(), contained.bottom());
|
||||
}
|
||||
#StdOut
|
||||
rect: (30, 50, 40, 60) contains (30, 50, 31, 51)
|
||||
rect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)
|
||||
rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
|
||||
##
|
||||
##
|
||||
|
||||
#SeeAlso SkIRect::contains
|
||||
|
||||
##
|
||||
|
||||
#Topic Round
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# round() # sets members to nearest integer value ##
|
||||
# # void round(SkIRect* dst) const ##
|
||||
# # SkIRect round() const ##
|
||||
# roundIn # sets members to nearest integer value towards opposite ##
|
||||
# roundOut # sets members to nearest integer value away from opposite ##
|
||||
# # void roundOut(SkIRect* dst) const ##
|
||||
# # void roundOut(SkRect* dst) const ##
|
||||
# # SkIRect roundOut() const ##
|
||||
#Table ##
|
||||
|
||||
#Method void round(SkIRect* dst) const
|
||||
|
||||
@ -1993,7 +2149,17 @@ round: 30, 50, 41, 61
|
||||
|
||||
##
|
||||
|
||||
#Topic Round ##
|
||||
#Subtopic Rounding ##
|
||||
|
||||
#Subtopic Sorting
|
||||
|
||||
#Table
|
||||
#Legend
|
||||
# name # description ##
|
||||
#Legend ##
|
||||
# makeSorted # constructs, ordering sides from smaller to larger ##
|
||||
# sort() # orders sides from smaller to larger ##
|
||||
#Table ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
@ -2014,7 +2180,7 @@ sorted: 20.5, 10.5, 30.5, 50.5
|
||||
##
|
||||
##
|
||||
|
||||
#SeeAlso makeSorted SkIRect::sort
|
||||
#SeeAlso makeSorted SkIRect::sort isSorted
|
||||
|
||||
##
|
||||
|
||||
@ -2039,10 +2205,12 @@ sorted: 20.5, 10.5, 30.5, 50.5
|
||||
##
|
||||
##
|
||||
|
||||
#SeeAlso sort SkIRect::makeSorted
|
||||
#SeeAlso sort SkIRect::makeSorted isSorted
|
||||
|
||||
##
|
||||
|
||||
#Subtopic Sorting ##
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
#Method const SkScalar* asScalars() const
|
||||
|
@ -90,15 +90,15 @@ Allocates raster Surface. Canvas returned by Surface draws directly into pixels.
|
||||
Surface is returned if all parameters are valid.
|
||||
Valid parameters include:
|
||||
info dimensions are greater than zero;
|
||||
info contains Image_Color_Type and Image_Alpha_Type supported by Raster_Surface;
|
||||
info contains Color_Type and Alpha_Type supported by Raster_Surface;
|
||||
pixels is not nullptr;
|
||||
rowBytes is large enough to contain info width pixels of Image_Color_Type.
|
||||
rowBytes is large enough to contain info width pixels of Color_Type.
|
||||
|
||||
Pixel buffer size should be info height times computed rowBytes.
|
||||
Pixels are not initialized.
|
||||
To access pixels after drawing, call flush() or peekPixels.
|
||||
|
||||
#Param imageInfo width, height, Image_Color_Type, Image_Alpha_Type, Color_Space,
|
||||
#Param imageInfo width, height, Color_Type, Alpha_Type, Color_Space,
|
||||
of Raster_Surface; width and height must be greater than zero
|
||||
##
|
||||
#Param pixels pointer to destination pixels buffer ##
|
||||
@ -153,15 +153,15 @@ releaseProc is called with pixels and context when Surface is deleted.
|
||||
Surface is returned if all parameters are valid.
|
||||
Valid parameters include:
|
||||
info dimensions are greater than zero;
|
||||
info contains Image_Color_Type and Image_Alpha_Type supported by Raster_Surface;
|
||||
info contains Color_Type and Alpha_Type supported by Raster_Surface;
|
||||
pixels is not nullptr;
|
||||
rowBytes is large enough to contain info width pixels of Image_Color_Type.
|
||||
rowBytes is large enough to contain info width pixels of Color_Type.
|
||||
|
||||
Pixel buffer size should be info height times computed rowBytes.
|
||||
Pixels are not initialized.
|
||||
To access pixels after drawing, call flush() or peekPixels.
|
||||
|
||||
#Param imageInfo width, height, Image_Color_Type, Image_Alpha_Type, Color_Space,
|
||||
#Param imageInfo width, height, Color_Type, Alpha_Type, Color_Space,
|
||||
of Raster_Surface; width and height must be greater than zero
|
||||
##
|
||||
#Param pixels pointer to destination pixels buffer ##
|
||||
@ -229,13 +229,13 @@ Pixel memory is deleted when Surface is deleted.
|
||||
Surface is returned if all parameters are valid.
|
||||
Valid parameters include:
|
||||
info dimensions are greater than zero;
|
||||
info contains Image_Color_Type and Image_Alpha_Type supported by Raster_Surface;
|
||||
rowBytes is large enough to contain info width pixels of Image_Color_Type, or is zero.
|
||||
info contains Color_Type and Alpha_Type supported by Raster_Surface;
|
||||
rowBytes is large enough to contain info width pixels of Color_Type, or is zero.
|
||||
|
||||
If rowBytes is not zero, subsequent images returned by makeImageSnapshot
|
||||
have the same rowBytes.
|
||||
|
||||
#Param imageInfo width, height, Image_Color_Type, Image_Alpha_Type, Color_Space,
|
||||
#Param imageInfo width, height, Color_Type, Alpha_Type, Color_Space,
|
||||
of Raster_Surface; width and height must be greater than zero
|
||||
##
|
||||
#Param rowBytes interval from one Surface row to the next; may be zero ##
|
||||
@ -292,9 +292,9 @@ Pixel memory is deleted when Surface is deleted.
|
||||
Surface is returned if all parameters are valid.
|
||||
Valid parameters include:
|
||||
info dimensions are greater than zero;
|
||||
info contains Image_Color_Type and Image_Alpha_Type supported by Raster_Surface.
|
||||
info contains Color_Type and Alpha_Type supported by Raster_Surface.
|
||||
|
||||
#Param imageInfo width, height, Image_Color_Type, Image_Alpha_Type, Color_Space,
|
||||
#Param imageInfo width, height, Color_Type, Alpha_Type, Color_Space,
|
||||
of Raster_Surface; width and height must be greater than zero
|
||||
##
|
||||
#Param props LCD striping orientation and setting for device independent fonts;
|
||||
@ -735,10 +735,10 @@ If SK_SUPPORT_GPU is defined as zero, has no effect and returns nullptr.
|
||||
bool shouldCreateWithMips = false)
|
||||
|
||||
Returns offscreen Surface on GPU indicated by context. Allocates memory for
|
||||
pixels, based on the width, height, and Image_Color_Type in ImageInfo. budgeted
|
||||
pixels, based on the width, height, and Color_Type in ImageInfo. budgeted
|
||||
selects whether allocation for offscreen pixels is tracked by context. imageInfo
|
||||
describes the pixel format in Image_Color_Type, and transparency in
|
||||
Image_Alpha_Type, and color matching in Color_Space.
|
||||
describes the pixel format in Color_Type, and transparency in
|
||||
Alpha_Type, and color matching in Color_Space.
|
||||
|
||||
sampleCount requests the number of samples per pixel.
|
||||
Pass zero to disable Multi_Sample_Anti_Aliasing. The request is rounded
|
||||
@ -753,7 +753,7 @@ If SK_SUPPORT_GPU is defined as zero, has no effect and returns nullptr.
|
||||
|
||||
#Param context GPU_Context ##
|
||||
#Param budgeted one of: SkBudgeted::kNo, SkBudgeted::kYes ##
|
||||
#Param imageInfo width, height, Image_Color_Type, Image_Alpha_Type, Color_Space;
|
||||
#Param imageInfo width, height, Color_Type, Alpha_Type, Color_Space;
|
||||
width, or height, or both, may be zero
|
||||
##
|
||||
#Param sampleCount samples per pixel, or 0 to disable full scene anti-aliasing ##
|
||||
@ -800,10 +800,10 @@ If SK_SUPPORT_GPU is defined as zero, has no effect and returns nullptr.
|
||||
const SkSurfaceProps* props)
|
||||
|
||||
Returns offscreen Surface on GPU indicated by context. Allocates memory for
|
||||
pixels, based on the width, height, and Image_Color_Type in ImageInfo. budgeted
|
||||
pixels, based on the width, height, and Color_Type in ImageInfo. budgeted
|
||||
selects whether allocation for offscreen pixels is tracked by context. imageInfo
|
||||
describes the pixel format in Image_Color_Type, and transparency in
|
||||
Image_Alpha_Type, and color matching in Color_Space.
|
||||
describes the pixel format in Color_Type, and transparency in
|
||||
Alpha_Type, and color matching in Color_Space.
|
||||
|
||||
sampleCount requests the number of samples per pixel.
|
||||
Pass zero to disable Multi_Sample_Anti_Aliasing. The request is rounded
|
||||
@ -814,7 +814,7 @@ Surface bottom-left corner is pinned to the origin.
|
||||
|
||||
#Param context GPU_Context ##
|
||||
#Param budgeted one of: SkBudgeted::kNo, SkBudgeted::kYes ##
|
||||
#Param imageInfo width, height, Image_Color_Type, Image_Alpha_Type, Color_Space,
|
||||
#Param imageInfo width, height, Color_Type, Alpha_Type, Color_Space,
|
||||
of Raster_Surface; width, or height, or both, may be zero
|
||||
##
|
||||
#Param sampleCount samples per pixel, or 0 to disable Multi_Sample_Anti_Aliasing ##
|
||||
@ -872,16 +872,16 @@ void draw(SkCanvas* canvas) {
|
||||
const SkImageInfo& imageInfo)
|
||||
|
||||
Returns offscreen Surface on GPU indicated by context. Allocates memory for
|
||||
pixels, based on the width, height, and Image_Color_Type in ImageInfo. budgeted
|
||||
pixels, based on the width, height, and Color_Type in ImageInfo. budgeted
|
||||
selects whether allocation for offscreen pixels is tracked by context. imageInfo
|
||||
describes the pixel format in Image_Color_Type, and transparency in
|
||||
Image_Alpha_Type, and color matching in Color_Space.
|
||||
describes the pixel format in Color_Type, and transparency in
|
||||
Alpha_Type, and color matching in Color_Space.
|
||||
|
||||
Surface bottom-left corner is pinned to the origin.
|
||||
|
||||
#Param context GPU_Context ##
|
||||
#Param budgeted one of: SkBudgeted::kNo, SkBudgeted::kYes ##
|
||||
#Param imageInfo width, height, Image_Color_Type, Image_Alpha_Type, Color_Space,
|
||||
#Param imageInfo width, height, Color_Type, Alpha_Type, Color_Space,
|
||||
of Raster_Surface; width, or height, or both, may be zero
|
||||
##
|
||||
|
||||
@ -1282,7 +1282,7 @@ does not share the same pixels.
|
||||
Returns nullptr if imageInfo width or height are zero, or if imageInfo
|
||||
is incompatible with Surface.
|
||||
|
||||
#Param imageInfo width, height, Image_Color_Type, Image_Alpha_Type, Color_Space,
|
||||
#Param imageInfo width, height, Color_Type, Alpha_Type, Color_Space,
|
||||
of Surface; width and height must be greater than zero
|
||||
##
|
||||
|
||||
@ -1422,7 +1422,7 @@ Pixels are readable when Surface is raster, or backed by a GPU.
|
||||
|
||||
The destination pixel storage must be allocated by the caller.
|
||||
|
||||
Pixel values are converted only if Image_Color_Type and Image_Alpha_Type
|
||||
Pixel values are converted only if Color_Type and Alpha_Type
|
||||
do not match. Only pixels within both source and destination rectangles
|
||||
are copied. dst contents outside Rect intersection are unchanged.
|
||||
|
||||
@ -1481,7 +1481,7 @@ Pixels are readable when Surface is raster, or backed by a GPU.
|
||||
|
||||
The destination pixel storage must be allocated by the caller.
|
||||
|
||||
Pixel values are converted only if Image_Color_Type and Image_Alpha_Type
|
||||
Pixel values are converted only if Color_Type and Alpha_Type
|
||||
do not match. Only pixels within both source and destination rectangles
|
||||
are copied. dstPixels contents outside Rect intersection are unchanged.
|
||||
|
||||
@ -1495,7 +1495,7 @@ Does not copy, and returns false if:
|
||||
# dstRowBytes is too small to contain one row of pixels. ##
|
||||
##
|
||||
|
||||
#Param dstInfo width, height, Image_Color_Type, and Image_Alpha_Type of dstPixels ##
|
||||
#Param dstInfo width, height, Color_Type, and Alpha_Type of dstPixels ##
|
||||
#Param dstPixels storage for pixels; dstInfo.height() times dstRowBytes, or larger ##
|
||||
#Param dstRowBytes size of one destination row; dstInfo.width() times pixel size, or larger ##
|
||||
#Param srcX offset into readable pixels in x; may be negative ##
|
||||
@ -1546,7 +1546,7 @@ Pixels are readable when Surface is raster, or backed by a GPU.
|
||||
|
||||
The destination pixel storage must be allocated by the caller.
|
||||
|
||||
Pixel values are converted only if Image_Color_Type and Image_Alpha_Type
|
||||
Pixel values are converted only if Color_Type and Alpha_Type
|
||||
do not match. Only pixels within both source and destination rectangles
|
||||
are copied. dst contents outside Rect intersection are unchanged.
|
||||
|
||||
|
@ -33,11 +33,13 @@
|
||||
"InProgress": {
|
||||
"include": {
|
||||
"core": [
|
||||
"SkImage.h"
|
||||
"SkImage.h",
|
||||
"SkImageInfo.h"
|
||||
]
|
||||
},
|
||||
"docs": [
|
||||
"SkImage_Reference.bmh",
|
||||
"SkImageInfo_Reference.bmh",
|
||||
"overview.bmh",
|
||||
"usingBookmaker.bmh"
|
||||
]
|
||||
|
@ -344,86 +344,6 @@ FT_Load_Glyph
|
||||
##
|
||||
##
|
||||
|
||||
#Topic Image_Alpha_Type
|
||||
#Alias Alpha_Type
|
||||
#Alias Alpha_Types
|
||||
#Enum SkAlphaType
|
||||
#Const kUnknown_SkAlphaType 0
|
||||
##
|
||||
#Const kOpaque_SkAlphaType 1
|
||||
##
|
||||
#Const kPremul_SkAlphaType 2
|
||||
##
|
||||
#Const kUnpremul_SkAlphaType 3
|
||||
##
|
||||
##
|
||||
#Topic ##
|
||||
#Topic Image_Color_Type
|
||||
#Subtopic Native_Color_Type
|
||||
#Alias Native_Color_Type
|
||||
#Substitute native SkColorType
|
||||
##
|
||||
#Alias Color_Type
|
||||
#Alias Color_Types
|
||||
#Enum SkColorType
|
||||
#Const kUnknown_SkColorType 0
|
||||
##
|
||||
#Const kAlpha_8_SkColorType 1
|
||||
##
|
||||
#Const kRGB_565_SkColorType 2
|
||||
##
|
||||
#Const kARGB_4444_SkColorType 3
|
||||
##
|
||||
#Const kRGBA_8888_SkColorType 4
|
||||
##
|
||||
#Const kBGRA_8888_SkColorType 5
|
||||
##
|
||||
#Const kIndex_8_SkColorType 6
|
||||
##
|
||||
#Const kGray_8_SkColorType 7
|
||||
##
|
||||
#Const kRGBA_F16_SkColorType 8
|
||||
##
|
||||
#ToDo this is a lie; need to not require values for consts ##
|
||||
#Const kN32_SkColorType 4
|
||||
##
|
||||
#Enum ##
|
||||
#Topic ##
|
||||
#Topic Image_Info
|
||||
#Struct SkImageInfo
|
||||
#Method SkImageInfo()
|
||||
##
|
||||
#Method static SkImageInfo MakeN32Premul(int width, int height, sk_sp<SkColorSpace> cs = nullptr)
|
||||
##
|
||||
#Method SkImageInfo makeColorSpace(sk_sp<SkColorSpace> cs) const
|
||||
##
|
||||
#Method size_t minRowBytes() const
|
||||
##
|
||||
#Method bool isOpaque() const
|
||||
##
|
||||
#Method int bytesPerPixel() const
|
||||
##
|
||||
#Method int height() const
|
||||
##
|
||||
#Method int width() const
|
||||
##
|
||||
#Method SkColorType colorType() const
|
||||
##
|
||||
#Method SkAlphaType alphaType() const
|
||||
##
|
||||
#Method SkColorSpace* colorSpace() const
|
||||
##
|
||||
#Method bool isOpaque() const
|
||||
##
|
||||
#Method size_t minRowBytes() const
|
||||
##
|
||||
#Method size_t computeByteSize(size_t rowBytes) const
|
||||
##
|
||||
#Method void validate() const
|
||||
##
|
||||
##
|
||||
#Topic ##
|
||||
|
||||
#Topic Image_Filter
|
||||
#Subtopic Scaling
|
||||
#Subtopic ##
|
||||
@ -556,6 +476,9 @@ FT_Load_Glyph
|
||||
#Const SK_MaxS32
|
||||
to be written
|
||||
##
|
||||
#Const SK_MaxSizeT
|
||||
to be written
|
||||
##
|
||||
#Typedef int32_t SkUnichar
|
||||
#Typedef ##
|
||||
#Typedef unsigned U8CPU
|
||||
|
@ -48,7 +48,7 @@ call <a href="#SkCanvas_save">SkCanvas::save()</a></td>
|
||||
|
||||
### Return Value
|
||||
|
||||
utility to <a href="#SkAutoCanvasRestore_restore">restore</a> <a href="SkCanvas_Reference#Canvas">Canvas</a> state on destructor
|
||||
utility to restore <a href="SkCanvas_Reference#Canvas">Canvas</a> state on destructor
|
||||
|
||||
### Example
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -32,11 +32,11 @@ SkIPoint16 Reference
|
||||
|
||||
<a name="SkIPoint16_fX"> <code><strong>int16_t fX</strong></code> </a>
|
||||
|
||||
<a href="#SkIPoint16_x">x</a>-axis value used by <a href="#IPoint16">IPoint16</a>
|
||||
x-axis value used by <a href="#IPoint16">IPoint16</a>
|
||||
|
||||
<a name="SkIPoint16_fY"> <code><strong>int16_t fY</strong></code> </a>
|
||||
|
||||
<a href="#SkIPoint16_y">y</a>-axis value used by <a href="#IPoint16">IPoint16</a>
|
||||
y-axis value used by <a href="#IPoint16">IPoint16</a>
|
||||
|
||||
<a name="SkIPoint16_Make"></a>
|
||||
## Make
|
||||
@ -45,21 +45,21 @@ SkIPoint16 Reference
|
||||
static constexpr SkIPoint16 Make(int x, int y)
|
||||
</pre>
|
||||
|
||||
Sets <a href="#SkIPoint16_fX">fX</a> to <a href="#SkIPoint16_x">x</a>, <a href="#SkIPoint16_fY">fY</a> to <a href="#SkIPoint16_y">y</a>. If SK_DEBUG is defined, asserts
|
||||
if <a href="#SkIPoint16_x">x</a> or <a href="#SkIPoint16_y">y</a> does not fit in 16 bits.
|
||||
Sets <a href="#SkIPoint16_fX">fX</a> to x, <a href="#SkIPoint16_fY">fY</a> to y. If SK_DEBUG is defined, asserts
|
||||
if x or y does not fit in 16 bits.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkIPoint16_Make_x"> <code><strong>x </strong></code> </a></td> <td>
|
||||
integer <a href="#SkIPoint16_x">x</a>-axis value of constructed <a href="SkIPoint_Reference#IPoint">IPoint</a></td>
|
||||
integer x-axis value of constructed <a href="SkIPoint_Reference#IPoint">IPoint</a></td>
|
||||
</tr> <tr> <td><a name="SkIPoint16_Make_y"> <code><strong>y </strong></code> </a></td> <td>
|
||||
integer <a href="#SkIPoint16_y">y</a>-axis value of constructed <a href="SkIPoint_Reference#IPoint">IPoint</a></td>
|
||||
integer y-axis value of constructed <a href="SkIPoint_Reference#IPoint">IPoint</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### Return Value
|
||||
|
||||
<a href="#IPoint16">IPoint16</a> (<a href="#SkIPoint16_x">x</a>, <a href="#SkIPoint16_y">y</a>)
|
||||
<a href="#IPoint16">IPoint16</a> (x, y)
|
||||
|
||||
### Example
|
||||
|
||||
@ -76,7 +76,7 @@ pt1.fY == pt2.fY
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkIPoint16_set">set</a> <a href="#SkPoint_iset">SkPoint::iset()</a> <a href="#SkIPoint_Make">SkIPoint::Make</a>
|
||||
<a href="#SkIPoint16_set">set</a> <a href="#SkPoint_iset">SkPoint::iset()</a><sup><a href="#SkPoint_iset_2">[2]</a></sup> <a href="#SkIPoint_Make">SkIPoint::Make</a>
|
||||
|
||||
---
|
||||
|
||||
@ -87,7 +87,7 @@ pt1.fY == pt2.fY
|
||||
int16_t x() const
|
||||
</pre>
|
||||
|
||||
Returns <a href="#SkIPoint16_x">x</a>-axis value of <a href="#IPoint16">IPoint16</a>.
|
||||
Returns x-axis value of <a href="#IPoint16">IPoint16</a>.
|
||||
|
||||
### Return Value
|
||||
|
||||
@ -118,7 +118,7 @@ pt1.fX == pt1.x()
|
||||
int16_t y() const
|
||||
</pre>
|
||||
|
||||
Returns <a href="#SkIPoint16_y">y</a>-axis value of <a href="SkIPoint_Reference#IPoint">IPoint</a>.
|
||||
Returns y-axis value of <a href="SkIPoint_Reference#IPoint">IPoint</a>.
|
||||
|
||||
### Return Value
|
||||
|
||||
@ -149,7 +149,7 @@ pt1.fY == pt1.y()
|
||||
void set(int x, int y)
|
||||
</pre>
|
||||
|
||||
Sets <a href="#SkIPoint16_fX">fX</a> to <a href="#SkIPoint16_x">x</a> and <a href="#SkIPoint16_fY">fY</a> to <a href="#SkIPoint16_y">y</a>.
|
||||
Sets <a href="#SkIPoint16_fX">fX</a> to x and <a href="#SkIPoint16_fY">fY</a> to y.
|
||||
|
||||
### Parameters
|
||||
|
||||
|
@ -47,11 +47,11 @@ SkIPoint Reference
|
||||
|
||||
<a name="SkIPoint_fX"> <code><strong>int32_t fX</strong></code> </a>
|
||||
|
||||
<a href="#SkIPoint_x">x</a>-axis value used by <a href="#IPoint">IPoint</a>.
|
||||
x-axis value used by <a href="#IPoint">IPoint</a>.
|
||||
|
||||
<a name="SkIPoint_fY"> <code><strong>int32_t fY</strong></code> </a>
|
||||
|
||||
<a href="#SkIPoint_y">y</a>-axis value used by <a href="#IPoint">IPoint</a>.
|
||||
y-axis value used by <a href="#IPoint">IPoint</a>.
|
||||
|
||||
<a name="SkIPoint_Make"></a>
|
||||
## Make
|
||||
@ -60,20 +60,20 @@ SkIPoint Reference
|
||||
static constexpr SkIPoint Make(int32_t x, int32_t y)
|
||||
</pre>
|
||||
|
||||
Sets <a href="#SkIPoint_fX">fX</a> to <a href="#SkIPoint_x">x</a>, <a href="#SkIPoint_fY">fY</a> to <a href="#SkIPoint_y">y</a>.
|
||||
Sets <a href="#SkIPoint_fX">fX</a> to x, <a href="#SkIPoint_fY">fY</a> to y.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkIPoint_Make_x"> <code><strong>x </strong></code> </a></td> <td>
|
||||
integer <a href="#SkIPoint_x">x</a>-axis value of constructed <a href="#IPoint">IPoint</a></td>
|
||||
integer x-axis value of constructed <a href="#IPoint">IPoint</a></td>
|
||||
</tr> <tr> <td><a name="SkIPoint_Make_y"> <code><strong>y </strong></code> </a></td> <td>
|
||||
integer <a href="#SkIPoint_y">y</a>-axis value of constructed <a href="#IPoint">IPoint</a></td>
|
||||
integer y-axis value of constructed <a href="#IPoint">IPoint</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### Return Value
|
||||
|
||||
<a href="#IPoint">IPoint</a> (<a href="#SkIPoint_x">x</a>, <a href="#SkIPoint_y">y</a>)
|
||||
<a href="#IPoint">IPoint</a> (x, y)
|
||||
|
||||
### Example
|
||||
|
||||
@ -89,7 +89,7 @@ pt1 == pt2
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkIPoint_set">set</a> <a href="#SkPoint_iset">SkPoint::iset()</a> <a href="#SkPoint_Make">SkPoint::Make</a> <a href="#SkIPoint16_Make">SkIPoint16::Make</a>
|
||||
<a href="#SkIPoint_set">set</a> <a href="#SkPoint_iset">SkPoint::iset()</a><sup><a href="#SkPoint_iset_2">[2]</a></sup> <a href="#SkPoint_Make">SkPoint::Make</a> <a href="#SkIPoint16_Make">SkIPoint16::Make</a>
|
||||
|
||||
---
|
||||
|
||||
@ -100,7 +100,7 @@ pt1 == pt2
|
||||
int32_t x() const
|
||||
</pre>
|
||||
|
||||
Returns <a href="#SkIPoint_x">x</a>-axis value of <a href="#IPoint">IPoint</a>.
|
||||
Returns x-axis value of <a href="#IPoint">IPoint</a>.
|
||||
|
||||
### Return Value
|
||||
|
||||
@ -131,7 +131,7 @@ pt1.fX == pt1.x()
|
||||
int32_t y() const
|
||||
</pre>
|
||||
|
||||
Returns <a href="#SkIPoint_y">y</a>-axis value of <a href="#IPoint">IPoint</a>.
|
||||
Returns y-axis value of <a href="#IPoint">IPoint</a>.
|
||||
|
||||
### Return Value
|
||||
|
||||
@ -193,7 +193,7 @@ pt.isZero() == true
|
||||
void set(int32_t x, int32_t y)
|
||||
</pre>
|
||||
|
||||
Sets <a href="#SkIPoint_fX">fX</a> to <a href="#SkIPoint_x">x</a> and <a href="#SkIPoint_fY">fY</a> to <a href="#SkIPoint_y">y</a>.
|
||||
Sets <a href="#SkIPoint_fX">fX</a> to x and <a href="#SkIPoint_fY">fY</a> to y.
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -316,7 +316,7 @@ Subtracts <a href="SkIPoint_Reference#IVector">IVector</a> <a href="#SkIPoint_su
|
||||
bool equals(int32_t x, int32_t y) const
|
||||
</pre>
|
||||
|
||||
Returns true if <a href="#IPoint">IPoint</a> is equivalent to <a href="#IPoint">IPoint</a> constructed from (<a href="#SkIPoint_x">x</a>, <a href="#SkIPoint_y">y</a>).
|
||||
Returns true if <a href="#IPoint">IPoint</a> is equivalent to <a href="#IPoint">IPoint</a> constructed from (x, y).
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -329,7 +329,7 @@ value compared with <a href="#SkIPoint_fY">fY</a></td>
|
||||
|
||||
### Return Value
|
||||
|
||||
true if <a href="#IPoint">IPoint</a> <a href="#SkIPoint_equals">equals</a> (<a href="#SkIPoint_x">x</a>, <a href="#SkIPoint_y">y</a>)
|
||||
true if <a href="#IPoint">IPoint</a> equals (x, y)
|
||||
|
||||
### Example
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
1262
site/user/api/SkImageInfo_Reference.md
Normal file
1262
site/user/api/SkImageInfo_Reference.md
Normal file
File diff suppressed because it is too large
Load Diff
@ -11,8 +11,8 @@ or located in GPU memory as a <a href="undocumented#GPU_Texture">GPU Texture</a>
|
||||
<a href="#Image">Image</a> cannot be modified after it is created. <a href="#Image">Image</a> may allocate additional
|
||||
storage as needed; for instance, an encoded <a href="#Image">Image</a> may decode when drawn.
|
||||
|
||||
<a href="#Image">Image</a> <a href="#SkImage_width">width</a> and <a href="#SkImage_height">height</a> are greater than zero. Creating an <a href="#Image">Image</a> with zero <a href="#SkImage_width">width</a>
|
||||
or <a href="#SkImage_height">height</a> returns <a href="#Image">Image</a> equal to nullptr.
|
||||
<a href="#Image">Image</a> width and height are greater than zero. Creating an <a href="#Image">Image</a> with zero width
|
||||
or height returns <a href="#Image">Image</a> equal to nullptr.
|
||||
|
||||
<a href="#Image">Image</a> may be created from <a href="SkBitmap_Reference#Bitmap">Bitmap</a>, <a href="SkPixmap_Reference#Pixmap">Pixmap</a>, <a href="SkSurface_Reference#Surface">Surface</a>, <a href="undocumented#Picture">Picture</a>, encoded streams,
|
||||
<a href="undocumented#GPU_Texture">GPU Texture</a>, <a href="undocumented#YUV_ColorSpace">YUV ColorSpace</a> data, or hardware buffer. Encoded streams supported
|
||||
@ -90,7 +90,7 @@ drawing.
|
||||
| <a href="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a> | Creates <a href="#Image">Image</a> from <a href="undocumented#YUV_ColorSpace">YUV ColorSpace</a> data in three planes. |
|
||||
| <a href="#SkImage_MakeRasterCopy">MakeRasterCopy</a> | Creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixmap</a> and copied pixels. |
|
||||
| <a href="#SkImage_MakeRasterData">MakeRasterData</a> | Creates <a href="#Image">Image</a> from <a href="#Info">Image Info</a> and shared pixels. |
|
||||
| <a href="#SkImage_alphaType">alphaType</a> | Returns <a href="#Alpha_Type">Alpha Type</a>. |
|
||||
| <a href="#SkImage_alphaType">alphaType</a> | Returns <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>. |
|
||||
| <a href="#SkImage_asLegacyBitmap">asLegacyBitmap</a> | Returns as <a href="undocumented#Raster_Bitmap">Raster Bitmap</a>. |
|
||||
| <a href="#SkImage_bounds">bounds</a> | Returns <a href="#SkImage_width">width</a> and <a href="#SkImage_height">height</a> as Rectangle. |
|
||||
| <a href="#SkImage_colorSpace">colorSpace</a> | Returns <a href="undocumented#Color_Space">Color Space</a>. |
|
||||
@ -102,7 +102,7 @@ drawing.
|
||||
| <a href="#SkImage_height">height</a> | Returns pixel row count. |
|
||||
| <a href="#SkImage_isAlphaOnly">isAlphaOnly</a> | Returns if pixels represent a transparency mask. |
|
||||
| <a href="#SkImage_isLazyGenerated">isLazyGenerated</a> | Returns if <a href="#Image">Image</a> is created as needed. |
|
||||
| <a href="#SkImage_isOpaque">isOpaque</a> | Returns if <a href="#Alpha_Type">Alpha Type</a> is <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>. |
|
||||
| <a href="#SkImage_isOpaque">isOpaque</a> | Returns if <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> is <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>. |
|
||||
| <a href="#SkImage_isTextureBacked">isTextureBacked</a> | Returns if <a href="#Image">Image</a> was created from <a href="undocumented#GPU_Texture">GPU Texture</a>. |
|
||||
| <a href="#SkImage_isValid">isValid</a> | Returns if <a href="#Image">Image</a> can draw to <a href="undocumented#Raster_Surface">Raster Surface</a> or <a href="undocumented#GPU_Context">GPU Context</a>. |
|
||||
| <a href="#SkImage_makeColorSpace">makeColorSpace</a> | Creates <a href="#Image">Image</a> matching <a href="undocumented#Color_Space">Color Space</a> if possible. |
|
||||
@ -132,9 +132,9 @@ Creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixm
|
||||
pixels may be modified or deleted without affecting <a href="#Image">Image</a>.
|
||||
|
||||
<a href="#Image">Image</a> is returned if <a href="SkPixmap_Reference#Pixmap">Pixmap</a> is valid. Valid <a href="SkPixmap_Reference#Pixmap">Pixmap</a> parameters include:
|
||||
<a href="#SkImage_dimensions">dimensions</a> are greater than zero;
|
||||
dimensions are greater than zero;
|
||||
each dimension fits in 29 bits;
|
||||
<a href="#Color_Type">Color Type</a> and <a href="#Alpha_Type">Alpha Type</a> are valid, and <a href="#Color_Type">Color Type</a> is not <a href="undocumented#SkColorType">kUnknown SkColorType</a>;
|
||||
<a href="SkImageInfo_Reference#Color_Type">Color Type</a> and <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> are valid, and <a href="SkImageInfo_Reference#Color_Type">Color Type</a> is not <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>;
|
||||
row bytes are large enough to hold one row of pixels;
|
||||
pixel address is not nullptr.
|
||||
|
||||
@ -171,16 +171,16 @@ static sk_sp<SkImage> MakeRasterData(const Info& info, sk_sp<SkData>
|
||||
Creates <a href="#Image">Image</a> from <a href="#Info">Image Info</a>, sharing <a href="#SkImage_MakeRasterData_pixels">pixels</a>.
|
||||
|
||||
<a href="#Image">Image</a> is returned if <a href="#Info">Image Info</a> is valid. Valid <a href="#Info">Image Info</a> parameters include:
|
||||
<a href="#SkImage_dimensions">dimensions</a> are greater than zero;
|
||||
dimensions are greater than zero;
|
||||
each dimension fits in 29 bits;
|
||||
<a href="#Color_Type">Color Type</a> and <a href="#Alpha_Type">Alpha Type</a> are valid, and <a href="#Color_Type">Color Type</a> is not <a href="undocumented#SkColorType">kUnknown SkColorType</a>;
|
||||
<a href="SkImageInfo_Reference#Color_Type">Color Type</a> and <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> are valid, and <a href="SkImageInfo_Reference#Color_Type">Color Type</a> is not <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>;
|
||||
<a href="#SkImage_MakeRasterData_rowBytes">rowBytes</a> are large enough to hold one row of <a href="#SkImage_MakeRasterData_pixels">pixels</a>;
|
||||
<a href="#SkImage_MakeRasterData_pixels">pixels</a> is not nullptr, and contains enough data for <a href="#Image">Image</a>.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkImage_MakeRasterData_info"> <code><strong>info </strong></code> </a></td> <td>
|
||||
contains <a href="#SkImage_width">width</a>, <a href="#SkImage_height">height</a>, <a href="#Alpha_Type">Alpha Type</a>, <a href="#Color_Type">Color Type</a>, <a href="undocumented#Color_Space">Color Space</a></td>
|
||||
contains width, height, <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, <a href="undocumented#Color_Space">Color Space</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeRasterData_pixels"> <code><strong>pixels </strong></code> </a></td> <td>
|
||||
address or pixel storage</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeRasterData_rowBytes"> <code><strong>rowBytes </strong></code> </a></td> <td>
|
||||
@ -232,9 +232,9 @@ when <a href="#Image">Image</a> is released. Pass nullptr for <a href="#SkImage_
|
||||
does not require state.
|
||||
|
||||
<a href="#Image">Image</a> is returned if <a href="#SkImage_MakeFromRaster_pixmap">pixmap</a> is valid. Valid <a href="SkPixmap_Reference#Pixmap">Pixmap</a> parameters include:
|
||||
<a href="#SkImage_dimensions">dimensions</a> are greater than zero;
|
||||
dimensions are greater than zero;
|
||||
each dimension fits in 29 bits;
|
||||
<a href="#Color_Type">Color Type</a> and <a href="#Alpha_Type">Alpha Type</a> are valid, and <a href="#Color_Type">Color Type</a> is not <a href="undocumented#SkColorType">kUnknown SkColorType</a>;
|
||||
<a href="SkImageInfo_Reference#Color_Type">Color Type</a> and <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> are valid, and <a href="SkImageInfo_Reference#Color_Type">Color Type</a> is not <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>;
|
||||
row bytes are large enough to hold one row of pixels;
|
||||
pixel address is not nullptr.
|
||||
|
||||
@ -284,9 +284,9 @@ is marked immutable, and its pixel memory is shareable, it may be shared
|
||||
instead of copied.
|
||||
|
||||
<a href="#Image">Image</a> is returned if <a href="#SkImage_MakeFromBitmap_bitmap">bitmap</a> is valid. Valid <a href="SkBitmap_Reference#Bitmap">Bitmap</a> parameters include:
|
||||
<a href="#SkImage_dimensions">dimensions</a> are greater than zero;
|
||||
dimensions are greater than zero;
|
||||
each dimension fits in 29 bits;
|
||||
<a href="#Color_Type">Color Type</a> and <a href="#Alpha_Type">Alpha Type</a> are valid, and <a href="#Color_Type">Color Type</a> is not <a href="undocumented#SkColorType">kUnknown SkColorType</a>;
|
||||
<a href="SkImageInfo_Reference#Color_Type">Color Type</a> and <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> are valid, and <a href="SkImageInfo_Reference#Color_Type">Color Type</a> is not <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>;
|
||||
row bytes are large enough to hold one row of pixels;
|
||||
pixel address is not nullptr.
|
||||
|
||||
@ -326,7 +326,7 @@ Creates <a href="#Image">Image</a> from data returned by <a href="#SkImage_MakeF
|
||||
be shared or accessed.
|
||||
|
||||
<a href="#SkImage_MakeFromGenerator_subset">subset</a> allows selecting a portion of the full image. Pass nullptr to select the entire image;
|
||||
otherwise, <a href="#SkImage_MakeFromGenerator_subset">subset</a> must be contained by image <a href="#SkImage_bounds">bounds</a>.
|
||||
otherwise, <a href="#SkImage_MakeFromGenerator_subset">subset</a> must be contained by image bounds.
|
||||
|
||||
<a href="#Image">Image</a> is returned if generator data is valid. Valid data parameters vary by type of data
|
||||
and platform.
|
||||
@ -338,7 +338,7 @@ and platform.
|
||||
<table> <tr> <td><a name="SkImage_MakeFromGenerator_imageGenerator"> <code><strong>imageGenerator </strong></code> </a></td> <td>
|
||||
stock or custom routines to retrieve <a href="#Image">Image</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromGenerator_subset"> <code><strong>subset </strong></code> </a></td> <td>
|
||||
<a href="#SkImage_bounds">bounds</a> of returned <a href="#Image">Image</a>; may be nullptr</td>
|
||||
bounds of returned <a href="#Image">Image</a>; may be nullptr</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -365,7 +365,7 @@ static sk_sp<SkImage> MakeFromEncoded(sk_sp<SkData> encoded, const S
|
||||
|
||||
Creates <a href="#Image">Image</a> from <a href="#SkImage_MakeFromEncoded_encoded">encoded</a> data.
|
||||
<a href="#SkImage_MakeFromEncoded_subset">subset</a> allows selecting a portion of the full image. Pass nullptr to select the entire image;
|
||||
otherwise, <a href="#SkImage_MakeFromEncoded_subset">subset</a> must be contained by image <a href="#SkImage_bounds">bounds</a>.
|
||||
otherwise, <a href="#SkImage_MakeFromEncoded_subset">subset</a> must be contained by image bounds.
|
||||
|
||||
<a href="#Image">Image</a> is returned if format of the <a href="#SkImage_MakeFromEncoded_encoded">encoded</a> data is recognized and supported.
|
||||
Recognized formats vary by platfrom.
|
||||
@ -375,7 +375,7 @@ Recognized formats vary by platfrom.
|
||||
<table> <tr> <td><a name="SkImage_MakeFromEncoded_encoded"> <code><strong>encoded </strong></code> </a></td> <td>
|
||||
data of <a href="#Image">Image</a> to decode</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromEncoded_subset"> <code><strong>subset </strong></code> </a></td> <td>
|
||||
<a href="#SkImage_bounds">bounds</a> of returned <a href="#Image">Image</a>; may be nullptr</td>
|
||||
bounds of returned <a href="#Image">Image</a>; may be nullptr</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -413,8 +413,8 @@ texture residing on GPU</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_origin"> <code><strong>origin </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>, <a href="undocumented#GrSurfaceOrigin">kTopLeft GrSurfaceOrigin</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_alphaType"> <code><strong>alphaType </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>, <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>, <a href="undocumented#SkAlphaType">kUnpremul SkAlphaType</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnpremul SkAlphaType</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
|
||||
range of colors; may be nullptr</td>
|
||||
</tr>
|
||||
@ -426,6 +426,8 @@ created <a href="#Image">Image</a>, or nullptr
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImage_MakeFromTexture_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
static sk_sp<SkImage> MakeFromTexture(GrContext* context, const GrBackendTexture& backendTexture,
|
||||
GrSurfaceOrigin origin, SkAlphaType alphaType,
|
||||
@ -445,8 +447,8 @@ texture residing on GPU</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_2_origin"> <code><strong>origin </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>, <a href="undocumented#GrSurfaceOrigin">kTopLeft GrSurfaceOrigin</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_2_alphaType"> <code><strong>alphaType </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>, <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>, <a href="undocumented#SkAlphaType">kUnpremul SkAlphaType</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnpremul SkAlphaType</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_2_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
|
||||
range of colors; may be nullptr</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_2_textureReleaseProc"> <code><strong>textureReleaseProc </strong></code> </a></td> <td>
|
||||
@ -462,6 +464,8 @@ created <a href="#Image">Image</a>, or nullptr
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImage_MakeFromTexture_3"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
static sk_sp<SkImage> MakeFromTexture(GrContext* context, const GrBackendTexture& backendTexture,
|
||||
GrSurfaceOrigin origin, SkColorType colorType,
|
||||
@ -483,13 +487,13 @@ texture residing on GPU</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_3_origin"> <code><strong>origin </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>, <a href="undocumented#GrSurfaceOrigin">kTopLeft GrSurfaceOrigin</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_3_colorType"> <code><strong>colorType </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#SkColorType">kUnknown SkColorType</a>, <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kRGB 565 SkColorType</a>, <a href="undocumented#SkColorType">kARGB 4444 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kRGBA 8888 SkColorType</a>, <a href="undocumented#SkColorType">kBGRA 8888 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="undocumented#SkColorType">kRGBA F16 SkColorType</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kRGB 565 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kARGB 4444 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kRGBA 8888 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kBGRA 8888 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kRGBA F16 SkColorType</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_3_alphaType"> <code><strong>alphaType </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>, <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>, <a href="undocumented#SkAlphaType">kUnpremul SkAlphaType</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnpremul SkAlphaType</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_3_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
|
||||
range of colors; may be nullptr</td>
|
||||
</tr>
|
||||
@ -505,10 +509,12 @@ created <a href="#Image">Image</a>, or nullptr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_MakeFromAdoptedTexture">MakeFromAdoptedTexture</a> <a href="#SkSurface_MakeFromBackendTexture">SkSurface::MakeFromBackendTexture</a>
|
||||
<a href="#SkImage_MakeFromAdoptedTexture">MakeFromAdoptedTexture</a><sup><a href="#SkImage_MakeFromAdoptedTexture_2">[2]</a></sup> <a href="#SkSurface_MakeFromBackendTexture">SkSurface::MakeFromBackendTexture</a><sup><a href="#SkSurface_MakeFromBackendTexture_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImage_MakeFromTexture_4"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
static sk_sp<SkImage> MakeFromTexture(GrContext* context, const GrBackendTexture& backendTexture,
|
||||
GrSurfaceOrigin origin, SkColorType colorType,
|
||||
@ -533,13 +539,13 @@ texture residing on GPU</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_4_origin"> <code><strong>origin </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>, <a href="undocumented#GrSurfaceOrigin">kTopLeft GrSurfaceOrigin</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_4_colorType"> <code><strong>colorType </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#SkColorType">kUnknown SkColorType</a>, <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kRGB 565 SkColorType</a>, <a href="undocumented#SkColorType">kARGB 4444 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kRGBA 8888 SkColorType</a>, <a href="undocumented#SkColorType">kBGRA 8888 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="undocumented#SkColorType">kRGBA F16 SkColorType</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kRGB 565 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kARGB 4444 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kRGBA 8888 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kBGRA 8888 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kRGBA F16 SkColorType</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_4_alphaType"> <code><strong>alphaType </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>, <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>, <a href="undocumented#SkAlphaType">kUnpremul SkAlphaType</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnpremul SkAlphaType</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_4_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
|
||||
range of colors; may be nullptr</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromTexture_4_textureReleaseProc"> <code><strong>textureReleaseProc </strong></code> </a></td> <td>
|
||||
@ -559,7 +565,7 @@ created <a href="#Image">Image</a>, or nullptr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_MakeFromAdoptedTexture">MakeFromAdoptedTexture</a> <a href="#SkSurface_MakeFromBackendTexture">SkSurface::MakeFromBackendTexture</a>
|
||||
<a href="#SkImage_MakeFromAdoptedTexture">MakeFromAdoptedTexture</a><sup><a href="#SkImage_MakeFromAdoptedTexture_2">[2]</a></sup> <a href="#SkSurface_MakeFromBackendTexture">SkSurface::MakeFromBackendTexture</a><sup><a href="#SkSurface_MakeFromBackendTexture_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -691,8 +697,8 @@ texture residing on GPU</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromAdoptedTexture_surfaceOrigin"> <code><strong>surfaceOrigin </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>, <a href="undocumented#GrSurfaceOrigin">kTopLeft GrSurfaceOrigin</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromAdoptedTexture_alphaType"> <code><strong>alphaType </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>, <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>, <a href="undocumented#SkAlphaType">kUnpremul SkAlphaType</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnpremul SkAlphaType</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromAdoptedTexture_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
|
||||
range of colors; may be nullptr</td>
|
||||
</tr>
|
||||
@ -704,10 +710,12 @@ created <a href="#Image">Image</a>, or nullptr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_MakeFromTexture">MakeFromTexture</a> <a href="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a>
|
||||
<a href="#SkImage_MakeFromTexture">MakeFromTexture</a><sup><a href="#SkImage_MakeFromTexture_2">[2]</a></sup><sup><a href="#SkImage_MakeFromTexture_3">[3]</a></sup><sup><a href="#SkImage_MakeFromTexture_4">[4]</a></sup> <a href="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a><sup><a href="#SkImage_MakeFromYUVTexturesCopy_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImage_MakeFromAdoptedTexture_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
static sk_sp<SkImage> MakeFromAdoptedTexture(GrContext* context,
|
||||
const GrBackendTexture& backendTexture,
|
||||
@ -731,13 +739,13 @@ texture residing on GPU</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromAdoptedTexture_2_surfaceOrigin"> <code><strong>surfaceOrigin </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>, <a href="undocumented#GrSurfaceOrigin">kTopLeft GrSurfaceOrigin</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromAdoptedTexture_2_colorType"> <code><strong>colorType </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#SkColorType">kUnknown SkColorType</a>, <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kRGB 565 SkColorType</a>, <a href="undocumented#SkColorType">kARGB 4444 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kRGBA 8888 SkColorType</a>, <a href="undocumented#SkColorType">kBGRA 8888 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="undocumented#SkColorType">kRGBA F16 SkColorType</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kRGB 565 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kARGB 4444 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kRGBA 8888 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kBGRA 8888 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kRGBA F16 SkColorType</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromAdoptedTexture_2_alphaType"> <code><strong>alphaType </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>, <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>, <a href="undocumented#SkAlphaType">kUnpremul SkAlphaType</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnpremul SkAlphaType</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromAdoptedTexture_2_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
|
||||
range of colors; may be nullptr</td>
|
||||
</tr>
|
||||
@ -753,7 +761,7 @@ created <a href="#Image">Image</a>, or nullptr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_MakeFromTexture">MakeFromTexture</a> <a href="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a>
|
||||
<a href="#SkImage_MakeFromTexture">MakeFromTexture</a><sup><a href="#SkImage_MakeFromTexture_2">[2]</a></sup><sup><a href="#SkImage_MakeFromTexture_3">[3]</a></sup><sup><a href="#SkImage_MakeFromTexture_4">[4]</a></sup> <a href="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a><sup><a href="#SkImage_MakeFromYUVTexturesCopy_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -770,8 +778,8 @@ static sk_sp<SkImage> MakeFromYUVTexturesCopy(GrContext* context, SkYUVCol
|
||||
|
||||
Creates <a href="#Image">Image</a> from copy of <a href="#SkImage_MakeFromYUVTexturesCopy_yuvTextureHandles">yuvTextureHandles</a>, an array of textures on GPU.
|
||||
<a href="#SkImage_MakeFromYUVTexturesCopy_yuvTextureHandles">yuvTextureHandles</a> contain pixels for YUV planes of <a href="#Image">Image</a>.
|
||||
<a href="#SkImage_MakeFromYUVTexturesCopy_yuvSizes">yuvSizes</a> conain <a href="#SkImage_dimensions">dimensions</a> for each pixel plane. Dimensions must be greater than
|
||||
zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has the <a href="#SkImage_dimensions">dimensions</a>
|
||||
<a href="#SkImage_MakeFromYUVTexturesCopy_yuvSizes">yuvSizes</a> conain dimensions for each pixel plane. Dimensions must be greater than
|
||||
zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has the dimensions
|
||||
<a href="#SkImage_MakeFromYUVTexturesCopy_yuvSizes">yuvSizes</a>[0]. <a href="#SkImage_MakeFromYUVTexturesCopy_yuvColorSpace">yuvColorSpace</a> describes how YUV colors convert to RGB colors.
|
||||
|
||||
### Parameters
|
||||
@ -779,12 +787,12 @@ zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has
|
||||
<table> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_context"> <code><strong>context </strong></code> </a></td> <td>
|
||||
<a href="undocumented#GPU_Context">GPU Context</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_yuvColorSpace"> <code><strong>yuvColorSpace </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#YUV_ColorSpace">kJPEG SkYUVColorSpace</a>, <a href="undocumented#YUV_ColorSpace">kRec601 SkYUVColorSpace</a>,
|
||||
<a href="undocumented#YUV_ColorSpace">kRec709 SkYUVColorSpace</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkYUVColorSpace">kJPEG SkYUVColorSpace</a>, <a href="SkImageInfo_Reference#SkYUVColorSpace">kRec601 SkYUVColorSpace</a>,
|
||||
<a href="SkImageInfo_Reference#SkYUVColorSpace">kRec709 SkYUVColorSpace</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_yuvTextureHandles"> <code><strong>yuvTextureHandles </strong></code> </a></td> <td>
|
||||
array of YUV textures on GPU</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_yuvSizes"> <code><strong>yuvSizes </strong></code> </a></td> <td>
|
||||
<a href="#SkImage_dimensions">dimensions</a> of YUV textures</td>
|
||||
dimensions of YUV textures</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_surfaceOrigin"> <code><strong>surfaceOrigin </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>, <a href="undocumented#GrSurfaceOrigin">kTopLeft GrSurfaceOrigin</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
|
||||
@ -798,10 +806,12 @@ created <a href="#Image">Image</a>, or nullptr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_MakeFromNV12TexturesCopy">MakeFromNV12TexturesCopy</a>
|
||||
<a href="#SkImage_MakeFromNV12TexturesCopy">MakeFromNV12TexturesCopy</a><sup><a href="#SkImage_MakeFromNV12TexturesCopy_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImage_MakeFromYUVTexturesCopy_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
static sk_sp<SkImage> MakeFromYUVTexturesCopy(GrContext* context, SkYUVColorSpace yuvColorSpace,
|
||||
const GrBackendTexture yuvTextureHandles[3],
|
||||
@ -812,8 +822,8 @@ static sk_sp<SkImage> MakeFromYUVTexturesCopy(GrContext* context, SkYUVCol
|
||||
|
||||
Creates <a href="#Image">Image</a> from copy of <a href="#SkImage_MakeFromYUVTexturesCopy_2_yuvTextureHandles">yuvTextureHandles</a>, an array of textures on GPU.
|
||||
<a href="#SkImage_MakeFromYUVTexturesCopy_2_yuvTextureHandles">yuvTextureHandles</a> contain pixels for YUV planes of <a href="#Image">Image</a>.
|
||||
<a href="#SkImage_MakeFromYUVTexturesCopy_2_yuvSizes">yuvSizes</a> conain <a href="#SkImage_dimensions">dimensions</a> for each pixel plane. Dimensions must be greater than
|
||||
zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has the <a href="#SkImage_dimensions">dimensions</a>
|
||||
<a href="#SkImage_MakeFromYUVTexturesCopy_2_yuvSizes">yuvSizes</a> conain dimensions for each pixel plane. Dimensions must be greater than
|
||||
zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has the dimensions
|
||||
<a href="#SkImage_MakeFromYUVTexturesCopy_2_yuvSizes">yuvSizes</a>[0]. <a href="#SkImage_MakeFromYUVTexturesCopy_2_yuvColorSpace">yuvColorSpace</a> describes how YUV colors convert to RGB colors.
|
||||
|
||||
### Parameters
|
||||
@ -821,12 +831,12 @@ zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has
|
||||
<table> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_2_context"> <code><strong>context </strong></code> </a></td> <td>
|
||||
<a href="undocumented#GPU_Context">GPU Context</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_2_yuvColorSpace"> <code><strong>yuvColorSpace </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#YUV_ColorSpace">kJPEG SkYUVColorSpace</a>, <a href="undocumented#YUV_ColorSpace">kRec601 SkYUVColorSpace</a>,
|
||||
<a href="undocumented#YUV_ColorSpace">kRec709 SkYUVColorSpace</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkYUVColorSpace">kJPEG SkYUVColorSpace</a>, <a href="SkImageInfo_Reference#SkYUVColorSpace">kRec601 SkYUVColorSpace</a>,
|
||||
<a href="SkImageInfo_Reference#SkYUVColorSpace">kRec709 SkYUVColorSpace</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_2_yuvTextureHandles"> <code><strong>yuvTextureHandles </strong></code> </a></td> <td>
|
||||
array of YUV textures on GPU</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_2_yuvSizes"> <code><strong>yuvSizes </strong></code> </a></td> <td>
|
||||
<a href="#SkImage_dimensions">dimensions</a> of YUV textures</td>
|
||||
dimensions of YUV textures</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_2_surfaceOrigin"> <code><strong>surfaceOrigin </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>, <a href="undocumented#GrSurfaceOrigin">kTopLeft GrSurfaceOrigin</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromYUVTexturesCopy_2_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
|
||||
@ -840,7 +850,7 @@ created <a href="#Image">Image</a>, or nullptr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_MakeFromNV12TexturesCopy">MakeFromNV12TexturesCopy</a>
|
||||
<a href="#SkImage_MakeFromNV12TexturesCopy">MakeFromNV12TexturesCopy</a><sup><a href="#SkImage_MakeFromNV12TexturesCopy_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -859,8 +869,8 @@ Creates <a href="#Image">Image</a> from copy of <a href="#SkImage_MakeFromNV12Te
|
||||
<a href="#SkImage_MakeFromNV12TexturesCopy_nv12TextureHandles">nv12TextureHandles</a>[0] contains pixels for YUV_Component_Y plane.
|
||||
<a href="#SkImage_MakeFromNV12TexturesCopy_nv12TextureHandles">nv12TextureHandles</a>[1] contains pixels for YUV_Component_U plane,
|
||||
followed by pixels for YUV_Component_V plane.
|
||||
<a href="#SkImage_MakeFromNV12TexturesCopy_nv12Sizes">nv12Sizes</a> conain <a href="#SkImage_dimensions">dimensions</a> for each pixel plane. Dimensions must be greater than
|
||||
zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has the <a href="#SkImage_dimensions">dimensions</a>
|
||||
<a href="#SkImage_MakeFromNV12TexturesCopy_nv12Sizes">nv12Sizes</a> conain dimensions for each pixel plane. Dimensions must be greater than
|
||||
zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has the dimensions
|
||||
<a href="#SkImage_MakeFromNV12TexturesCopy_nv12Sizes">nv12Sizes</a>[0]. <a href="#SkImage_MakeFromNV12TexturesCopy_yuvColorSpace">yuvColorSpace</a> describes how YUV colors convert to RGB colors.
|
||||
|
||||
### Parameters
|
||||
@ -868,12 +878,12 @@ zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has
|
||||
<table> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_context"> <code><strong>context </strong></code> </a></td> <td>
|
||||
<a href="undocumented#GPU_Context">GPU Context</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_yuvColorSpace"> <code><strong>yuvColorSpace </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#YUV_ColorSpace">kJPEG SkYUVColorSpace</a>, <a href="undocumented#YUV_ColorSpace">kRec601 SkYUVColorSpace</a>,
|
||||
<a href="undocumented#YUV_ColorSpace">kRec709 SkYUVColorSpace</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkYUVColorSpace">kJPEG SkYUVColorSpace</a>, <a href="SkImageInfo_Reference#SkYUVColorSpace">kRec601 SkYUVColorSpace</a>,
|
||||
<a href="SkImageInfo_Reference#SkYUVColorSpace">kRec709 SkYUVColorSpace</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_nv12TextureHandles"> <code><strong>nv12TextureHandles </strong></code> </a></td> <td>
|
||||
array of YUV textures on GPU</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_nv12Sizes"> <code><strong>nv12Sizes </strong></code> </a></td> <td>
|
||||
<a href="#SkImage_dimensions">dimensions</a> of YUV textures</td>
|
||||
dimensions of YUV textures</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_surfaceOrigin"> <code><strong>surfaceOrigin </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>, <a href="undocumented#GrSurfaceOrigin">kTopLeft GrSurfaceOrigin</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
|
||||
@ -887,10 +897,12 @@ created <a href="#Image">Image</a>, or nullptr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a>
|
||||
<a href="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a><sup><a href="#SkImage_MakeFromYUVTexturesCopy_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImage_MakeFromNV12TexturesCopy_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
static sk_sp<SkImage> MakeFromNV12TexturesCopy(GrContext* context, SkYUVColorSpace yuvColorSpace,
|
||||
const GrBackendTexture nv12TextureHandles[2],
|
||||
@ -903,8 +915,8 @@ Creates <a href="#Image">Image</a> from copy of <a href="#SkImage_MakeFromNV12Te
|
||||
<a href="#SkImage_MakeFromNV12TexturesCopy_2_nv12TextureHandles">nv12TextureHandles</a>[0] contains pixels for YUV_Component_Y plane.
|
||||
<a href="#SkImage_MakeFromNV12TexturesCopy_2_nv12TextureHandles">nv12TextureHandles</a>[1] contains pixels for YUV_Component_U plane,
|
||||
followed by pixels for YUV_Component_V plane.
|
||||
<a href="#SkImage_MakeFromNV12TexturesCopy_2_nv12Sizes">nv12Sizes</a> conain <a href="#SkImage_dimensions">dimensions</a> for each pixel plane. Dimensions must be greater than
|
||||
zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has the <a href="#SkImage_dimensions">dimensions</a>
|
||||
<a href="#SkImage_MakeFromNV12TexturesCopy_2_nv12Sizes">nv12Sizes</a> conain dimensions for each pixel plane. Dimensions must be greater than
|
||||
zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has the dimensions
|
||||
<a href="#SkImage_MakeFromNV12TexturesCopy_2_nv12Sizes">nv12Sizes</a>[0]. <a href="#SkImage_MakeFromNV12TexturesCopy_2_yuvColorSpace">yuvColorSpace</a> describes how YUV colors convert to RGB colors.
|
||||
|
||||
### Parameters
|
||||
@ -912,12 +924,12 @@ zero but may differ from plane to plane. Returned <a href="#Image">Image</a> has
|
||||
<table> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_2_context"> <code><strong>context </strong></code> </a></td> <td>
|
||||
<a href="undocumented#GPU_Context">GPU Context</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_2_yuvColorSpace"> <code><strong>yuvColorSpace </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#YUV_ColorSpace">kJPEG SkYUVColorSpace</a>, <a href="undocumented#YUV_ColorSpace">kRec601 SkYUVColorSpace</a>,
|
||||
<a href="undocumented#YUV_ColorSpace">kRec709 SkYUVColorSpace</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkYUVColorSpace">kJPEG SkYUVColorSpace</a>, <a href="SkImageInfo_Reference#SkYUVColorSpace">kRec601 SkYUVColorSpace</a>,
|
||||
<a href="SkImageInfo_Reference#SkYUVColorSpace">kRec709 SkYUVColorSpace</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_2_nv12TextureHandles"> <code><strong>nv12TextureHandles </strong></code> </a></td> <td>
|
||||
array of YUV textures on GPU</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_2_nv12Sizes"> <code><strong>nv12Sizes </strong></code> </a></td> <td>
|
||||
<a href="#SkImage_dimensions">dimensions</a> of YUV textures</td>
|
||||
dimensions of YUV textures</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_2_surfaceOrigin"> <code><strong>surfaceOrigin </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>, <a href="undocumented#GrSurfaceOrigin">kTopLeft GrSurfaceOrigin</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromNV12TexturesCopy_2_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
|
||||
@ -931,7 +943,7 @@ created <a href="#Image">Image</a>, or nullptr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a>
|
||||
<a href="#SkImage_MakeFromYUVTexturesCopy">MakeFromYUVTexturesCopy</a><sup><a href="#SkImage_MakeFromYUVTexturesCopy_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -969,7 +981,7 @@ static sk_sp<SkImage> MakeFromPicture(sk_sp<SkPicture> picture, cons
|
||||
BitDepth bitDepth, sk_sp<SkColorSpace> colorSpace)
|
||||
</pre>
|
||||
|
||||
Creates <a href="#Image">Image</a> from <a href="#SkImage_MakeFromPicture_picture">picture</a>. Returned <a href="#Image">Image</a> <a href="#SkImage_width">width</a> and <a href="#SkImage_height">height</a> are set by <a href="#SkImage_dimensions">dimensions</a>.
|
||||
Creates <a href="#Image">Image</a> from <a href="#SkImage_MakeFromPicture_picture">picture</a>. Returned <a href="#Image">Image</a> width and height are set by dimensions.
|
||||
<a href="#Image">Image</a> draws <a href="#SkImage_MakeFromPicture_picture">picture</a> with <a href="#SkImage_MakeFromPicture_matrix">matrix</a> and <a href="#SkImage_MakeFromPicture_paint">paint</a>, set to <a href="#SkImage_MakeFromPicture_bitDepth">bitDepth</a> and <a href="#SkImage_colorSpace">colorSpace</a>.
|
||||
|
||||
If <a href="#SkImage_MakeFromPicture_matrix">matrix</a> is nullptr, draws with identity <a href="SkMatrix_Reference#Matrix">Matrix</a>. If <a href="#SkImage_MakeFromPicture_paint">paint</a> is nullptr, draws
|
||||
@ -980,7 +992,7 @@ with default <a href="SkPaint_Reference#Paint">Paint</a>. <a href="#SkImage_colo
|
||||
<table> <tr> <td><a name="SkImage_MakeFromPicture_picture"> <code><strong>picture </strong></code> </a></td> <td>
|
||||
stream of drawing commands</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromPicture_dimensions"> <code><strong>dimensions </strong></code> </a></td> <td>
|
||||
<a href="#SkImage_width">width</a> and <a href="#SkImage_height">height</a></td>
|
||||
width and height</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromPicture_matrix"> <code><strong>matrix </strong></code> </a></td> <td>
|
||||
<a href="SkMatrix_Reference#Matrix">Matrix</a> to rotate, scale, translate, and so on; may be nullptr</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromPicture_paint"> <code><strong>paint </strong></code> </a></td> <td>
|
||||
@ -1002,7 +1014,7 @@ created <a href="#Image">Image</a>, or nullptr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkCanvas_drawPicture">SkCanvas::drawPicture</a>
|
||||
<a href="#SkCanvas_drawPicture">SkCanvas::drawPicture</a><sup><a href="#SkCanvas_drawPicture_2">[2]</a></sup><sup><a href="#SkCanvas_drawPicture_3">[3]</a></sup><sup><a href="#SkCanvas_drawPicture_4">[4]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1025,8 +1037,8 @@ Only available on Android, when __ANDROID_API__ is defined to be 26 or greater.
|
||||
<table> <tr> <td><a name="SkImage_MakeFromAHardwareBuffer_hardwareBuffer"> <code><strong>hardwareBuffer </strong></code> </a></td> <td>
|
||||
AHardwareBuffer Android hardware buffer</td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromAHardwareBuffer_alphaType"> <code><strong>alphaType </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>, <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>, <a href="undocumented#SkAlphaType">kUnpremul SkAlphaType</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnpremul SkAlphaType</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_MakeFromAHardwareBuffer_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
|
||||
range of colors; may be nullptr</td>
|
||||
</tr>
|
||||
@ -1053,7 +1065,7 @@ Returns pixel count in each row.
|
||||
|
||||
### Return Value
|
||||
|
||||
pixel <a href="#SkImage_width">width</a> in <a href="#Image">Image</a>
|
||||
pixel width in <a href="#Image">Image</a>
|
||||
|
||||
### Example
|
||||
|
||||
@ -1076,7 +1088,7 @@ Returns pixel row count.
|
||||
|
||||
### Return Value
|
||||
|
||||
pixel <a href="#SkImage_height">height</a> in <a href="#Image">Image</a>
|
||||
pixel height in <a href="#Image">Image</a>
|
||||
|
||||
### Example
|
||||
|
||||
@ -1166,15 +1178,15 @@ unique identifier
|
||||
SkAlphaType alphaType() const
|
||||
</pre>
|
||||
|
||||
Returns <a href="#Alpha_Type">Alpha Type</a>, one of: <a href="undocumented#SkAlphaType">kUnknown SkAlphaType</a>, <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>, <a href="undocumented#SkAlphaType">kUnpremul SkAlphaType</a>.
|
||||
Returns <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, one of: <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>,
|
||||
<a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnpremul SkAlphaType</a>.
|
||||
|
||||
<a href="#Alpha_Type">Alpha Type</a> returned was a parameter to an <a href="#Image">Image</a> constructor,
|
||||
<a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> returned was a parameter to an <a href="#Image">Image</a> constructor,
|
||||
or was parsed from encoded data.
|
||||
|
||||
### Return Value
|
||||
|
||||
<a href="#Alpha_Type">Alpha Type</a> in <a href="#Image">Image</a>
|
||||
<a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> in <a href="#Image">Image</a>
|
||||
|
||||
### Example
|
||||
|
||||
@ -1254,7 +1266,7 @@ bool isAlphaOnly() const
|
||||
</pre>
|
||||
|
||||
Returns true if <a href="#Image">Image</a> pixels represent transparency only. If true, each pixel
|
||||
is packed in 8 bits as defined by <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>.
|
||||
is packed in 8 bits as defined by <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>.
|
||||
|
||||
### Return Value
|
||||
|
||||
@ -1289,7 +1301,7 @@ Returns true if pixels ignore their <a href="#Alpha">Alpha</a> value and are tre
|
||||
|
||||
### Return Value
|
||||
|
||||
true if <a href="#Alpha_Type">Alpha Type</a> is <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>
|
||||
true if <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> is <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>
|
||||
|
||||
### Example
|
||||
|
||||
@ -1318,7 +1330,7 @@ sk_sp<SkShader> makeShader(SkShader::TileMode tileMode1, SkShader::TileMod
|
||||
const SkMatrix* localMatrix = nullptr) const
|
||||
</pre>
|
||||
|
||||
Creates <a href="undocumented#Shader">Shader</a> from <a href="#Image">Image</a>. <a href="undocumented#Shader">Shader</a> <a href="#SkImage_dimensions">dimensions</a> are taken from <a href="#Image">Image</a>. <a href="undocumented#Shader">Shader</a> uses
|
||||
Creates <a href="undocumented#Shader">Shader</a> from <a href="#Image">Image</a>. <a href="undocumented#Shader">Shader</a> dimensions are taken from <a href="#Image">Image</a>. <a href="undocumented#Shader">Shader</a> uses
|
||||
<a href="#SkShader_TileMode">SkShader::TileMode</a> rules to fill drawn area outside <a href="#Image">Image</a>. <a href="#SkImage_makeShader_localMatrix">localMatrix</a> permits
|
||||
transforming <a href="#Image">Image</a> before <a href="#Matrix">Canvas Matrix</a> is applied.
|
||||
|
||||
@ -1349,11 +1361,13 @@ tiling in y, one of: <a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMo
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImage_makeShader_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
sk_sp<SkShader> makeShader(const SkMatrix* localMatrix = nullptr) const
|
||||
</pre>
|
||||
|
||||
Creates <a href="undocumented#Shader">Shader</a> from <a href="#Image">Image</a>. <a href="undocumented#Shader">Shader</a> <a href="#SkImage_dimensions">dimensions</a> are taken from <a href="#Image">Image</a>. <a href="undocumented#Shader">Shader</a> uses
|
||||
Creates <a href="undocumented#Shader">Shader</a> from <a href="#Image">Image</a>. <a href="undocumented#Shader">Shader</a> dimensions are taken from <a href="#Image">Image</a>. <a href="undocumented#Shader">Shader</a> uses
|
||||
<a href="#SkShader_kClamp_TileMode">SkShader::kClamp TileMode</a> to fill drawn area outside <a href="#Image">Image</a>. <a href="#SkImage_makeShader_2_localMatrix">localMatrix</a> permits
|
||||
transforming <a href="#Image">Image</a> before <a href="#Matrix">Canvas Matrix</a> is applied.
|
||||
|
||||
@ -1424,7 +1438,7 @@ true if <a href="#Image">Image</a> has direct access to pixels
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_readPixels">readPixels</a>
|
||||
<a href="#SkImage_readPixels">readPixels</a><sup><a href="#SkImage_readPixels_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1459,7 +1473,7 @@ true if <a href="#Image">Image</a> is a <a href="undocumented#GPU_Texture">GPU T
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_MakeFromTexture">MakeFromTexture</a> <a href="#SkImage_isValid">isValid</a>
|
||||
<a href="#SkImage_MakeFromTexture">MakeFromTexture</a><sup><a href="#SkImage_MakeFromTexture_2">[2]</a></sup><sup><a href="#SkImage_MakeFromTexture_3">[3]</a></sup><sup><a href="#SkImage_MakeFromTexture_4">[4]</a></sup> <a href="#SkImage_isValid">isValid</a>
|
||||
|
||||
---
|
||||
|
||||
@ -1535,7 +1549,7 @@ back-end API texture handle, or nullptr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_MakeFromTexture">MakeFromTexture</a> <a href="#SkImage_isTextureBacked">isTextureBacked</a>
|
||||
<a href="#SkImage_MakeFromTexture">MakeFromTexture</a><sup><a href="#SkImage_MakeFromTexture_2">[2]</a></sup><sup><a href="#SkImage_MakeFromTexture_3">[3]</a></sup><sup><a href="#SkImage_MakeFromTexture_4">[4]</a></sup> <a href="#SkImage_isTextureBacked">isTextureBacked</a>
|
||||
|
||||
---
|
||||
|
||||
@ -1571,7 +1585,7 @@ pixels are not accessible.
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_readPixels">readPixels</a> <a href="#SkImage_scalePixels">scalePixels</a>
|
||||
<a href="#SkImage_readPixels">readPixels</a><sup><a href="#SkImage_readPixels_2">[2]</a></sup> <a href="#SkImage_scalePixels">scalePixels</a>
|
||||
|
||||
|
||||
|
||||
@ -1586,20 +1600,20 @@ bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
|
||||
Copies <a href="SkRect_Reference#Rect">Rect</a> of pixels from <a href="#Image">Image</a> to <a href="#SkImage_readPixels_dstPixels">dstPixels</a>. Copy starts at offset (<a href="#SkImage_readPixels_srcX">srcX</a>, <a href="#SkImage_readPixels_srcY">srcY</a>),
|
||||
and does not exceed <a href="#Image">Image</a> (<a href="#SkImage_width">width</a>, <a href="#SkImage_height">height</a>).
|
||||
|
||||
<a href="#SkImage_readPixels_dstInfo">dstInfo</a> specifies <a href="#SkImage_width">width</a>, <a href="#SkImage_height">height</a>, <a href="#Color_Type">Color Type</a>, <a href="#Alpha_Type">Alpha Type</a>, and <a href="undocumented#Color_Space">Color Space</a> of
|
||||
<a href="#SkImage_readPixels_dstInfo">dstInfo</a> specifies width, height, <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, and <a href="undocumented#Color_Space">Color Space</a> of
|
||||
destination. <a href="#SkImage_readPixels_dstRowBytes">dstRowBytes</a> specifics the gap from one destination row to the next.
|
||||
Returns true if pixels are copied. Returns false if:
|
||||
|
||||
<table> <tr>
|
||||
<td><a href="#SkImage_readPixels_dstInfo">dstInfo</a>.addr() equals nullptr</td> </tr> <tr>
|
||||
<td><a href="#SkImage_readPixels_dstRowBytes">dstRowBytes</a> is less than <a href="#SkImage_readPixels_dstInfo">dstInfo</a>.<a href="undocumented#SkImageInfo">minRowBytes</a></td> </tr> <tr>
|
||||
<td><a href="#SkImage_readPixels_dstRowBytes">dstRowBytes</a> is less than <a href="#SkImage_readPixels_dstInfo">dstInfo</a>.<a href="SkImageInfo_Reference#SkImageInfo">minRowBytes</a></td> </tr> <tr>
|
||||
<td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
|
||||
</table>
|
||||
|
||||
Pixels are copied only if pixel conversion is possible. If <a href="#Image">Image</a> <a href="#Color_Type">Color Type</a> is
|
||||
<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, or <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkImage_readPixels_dstInfo">dstInfo</a>.<a href="undocumented#SkImageInfo">colorType</a> must match.
|
||||
If <a href="#Image">Image</a> <a href="#Color_Type">Color Type</a> is <a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="#SkImage_readPixels_dstInfo">dstInfo</a>.<a href="#SkImage_colorSpace">colorSpace</a> must match.
|
||||
If <a href="#Image">Image</a> <a href="#Alpha_Type">Alpha Type</a> is <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkImage_readPixels_dstInfo">dstInfo</a>.<a href="#SkImage_alphaType">alphaType</a> must
|
||||
Pixels are copied only if pixel conversion is possible. If <a href="#Image">Image</a> <a href="SkImageInfo_Reference#Color_Type">Color Type</a> is
|
||||
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, or <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkImage_readPixels_dstInfo">dstInfo</a>.<a href="SkImageInfo_Reference#SkImageInfo">colorType</a> must match.
|
||||
If <a href="#Image">Image</a> <a href="SkImageInfo_Reference#Color_Type">Color Type</a> is <a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="#SkImage_readPixels_dstInfo">dstInfo</a>.<a href="#SkImage_colorSpace">colorSpace</a> must match.
|
||||
If <a href="#Image">Image</a> <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> is <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkImage_readPixels_dstInfo">dstInfo</a>.<a href="#SkImage_alphaType">alphaType</a> must
|
||||
match. If <a href="#Image">Image</a> <a href="undocumented#Color_Space">Color Space</a> is nullptr, <a href="#SkImage_readPixels_dstInfo">dstInfo</a>.<a href="#SkImage_colorSpace">colorSpace</a> must match. Returns
|
||||
false if pixel conversion is not possible.
|
||||
|
||||
@ -1614,7 +1628,7 @@ If <a href="#SkImage_readPixels_cachingHint">cachingHint</a> is <a href="#SkImag
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkImage_readPixels_dstInfo"> <code><strong>dstInfo </strong></code> </a></td> <td>
|
||||
destination <a href="#SkImage_width">width</a>, <a href="#SkImage_height">height</a>, <a href="#Color_Type">Color Type</a>, <a href="#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a></td>
|
||||
destination width, height, <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a></td>
|
||||
</tr> <tr> <td><a name="SkImage_readPixels_dstPixels"> <code><strong>dstPixels </strong></code> </a></td> <td>
|
||||
destination pixel storage</td>
|
||||
</tr> <tr> <td><a name="SkImage_readPixels_dstRowBytes"> <code><strong>dstRowBytes </strong></code> </a></td> <td>
|
||||
@ -1638,10 +1652,12 @@ true if pixels are copied to <a href="#SkImage_readPixels_dstPixels">dstPixels</
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_scalePixels">scalePixels</a> <a href="#SkBitmap_readPixels">SkBitmap::readPixels</a> <a href="#SkPixmap_readPixels">SkPixmap::readPixels</a> <a href="#SkCanvas_readPixels">SkCanvas::readPixels</a> <a href="#SkSurface_readPixels">SkSurface::readPixels</a>
|
||||
<a href="#SkImage_scalePixels">scalePixels</a> <a href="#SkBitmap_readPixels">SkBitmap::readPixels</a><sup><a href="#SkBitmap_readPixels_2">[2]</a></sup><sup><a href="#SkBitmap_readPixels_3">[3]</a></sup><sup><a href="#SkBitmap_readPixels_4">[4]</a></sup> <a href="#SkPixmap_readPixels">SkPixmap::readPixels</a><sup><a href="#SkPixmap_readPixels_2">[2]</a></sup><sup><a href="#SkPixmap_readPixels_3">[3]</a></sup><sup><a href="#SkPixmap_readPixels_4">[4]</a></sup><sup><a href="#SkPixmap_readPixels_5">[5]</a></sup> <a href="#SkCanvas_readPixels">SkCanvas::readPixels</a><sup><a href="#SkCanvas_readPixels_2">[2]</a></sup><sup><a href="#SkCanvas_readPixels_3">[3]</a></sup> <a href="#SkSurface_readPixels">SkSurface::readPixels</a><sup><a href="#SkSurface_readPixels_2">[2]</a></sup><sup><a href="#SkSurface_readPixels_3">[3]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImage_readPixels_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
bool readPixels(const SkPixmap& dst, int srcX, int srcY, CachingHint cachingHint = kAllow_CachingHint) const
|
||||
</pre>
|
||||
@ -1649,7 +1665,7 @@ bool readPixels(const SkPixmap& dst, int srcX, int srcY, CachingHint cachingHint
|
||||
Copies a <a href="SkRect_Reference#Rect">Rect</a> of pixels from <a href="#Image">Image</a> to <a href="#SkImage_readPixels_2_dst">dst</a>. Copy starts at (<a href="#SkImage_readPixels_2_srcX">srcX</a>, <a href="#SkImage_readPixels_2_srcY">srcY</a>), and
|
||||
does not exceed <a href="#Image">Image</a> (<a href="#SkImage_width">width</a>, <a href="#SkImage_height">height</a>).
|
||||
|
||||
<a href="#SkImage_readPixels_2_dst">dst</a> specifies <a href="#SkImage_width">width</a>, <a href="#SkImage_height">height</a>, <a href="#Color_Type">Color Type</a>, <a href="#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>, pixel storage,
|
||||
<a href="#SkImage_readPixels_2_dst">dst</a> specifies width, height, <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>, pixel storage,
|
||||
and row bytes of destination. <a href="#SkImage_readPixels_2_dst">dst</a>.<a href="SkPixmap_Reference#SkPixmap">rowBytes</a> specifics the gap from one destination
|
||||
row to the next. Returns true if pixels are copied. Returns false if:
|
||||
|
||||
@ -1659,10 +1675,10 @@ row to the next. Returns true if pixels are copied. Returns false if:
|
||||
<td><a href="undocumented#Pixel_Ref">Pixel Ref</a> is nullptr</td> </tr>
|
||||
</table>
|
||||
|
||||
Pixels are copied only if pixel conversion is possible. If <a href="#Image">Image</a> <a href="#Color_Type">Color Type</a> is
|
||||
<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, or <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkImage_readPixels_2_dst">dst</a>.<a href="SkPixmap_Reference#SkPixmap">colorType</a> must match.
|
||||
If <a href="#Image">Image</a> <a href="#Color_Type">Color Type</a> is <a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="#SkImage_readPixels_2_dst">dst</a>.<a href="#SkImage_colorSpace">colorSpace</a> must match.
|
||||
If <a href="#Image">Image</a> <a href="#Alpha_Type">Alpha Type</a> is <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkImage_readPixels_2_dst">dst</a>.<a href="#SkImage_alphaType">alphaType</a> must
|
||||
Pixels are copied only if pixel conversion is possible. If <a href="#Image">Image</a> <a href="SkImageInfo_Reference#Color_Type">Color Type</a> is
|
||||
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, or <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkImage_readPixels_2_dst">dst</a>.<a href="SkPixmap_Reference#SkPixmap">colorType</a> must match.
|
||||
If <a href="#Image">Image</a> <a href="SkImageInfo_Reference#Color_Type">Color Type</a> is <a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="#SkImage_readPixels_2_dst">dst</a>.<a href="#SkImage_colorSpace">colorSpace</a> must match.
|
||||
If <a href="#Image">Image</a> <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> is <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkImage_readPixels_2_dst">dst</a>.<a href="#SkImage_alphaType">alphaType</a> must
|
||||
match. If <a href="#Image">Image</a> <a href="undocumented#Color_Space">Color Space</a> is nullptr, <a href="#SkImage_readPixels_2_dst">dst</a>.<a href="#SkImage_colorSpace">colorSpace</a> must match. Returns
|
||||
false if pixel conversion is not possible.
|
||||
<a href="#SkImage_readPixels_2_srcX">srcX</a> and <a href="#SkImage_readPixels_2_srcY">srcY</a> may be negative to copy only top or left of source. Returns
|
||||
@ -1696,7 +1712,7 @@ true if pixels are copied to <a href="#SkImage_readPixels_2_dst">dst</a>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_scalePixels">scalePixels</a> <a href="#SkBitmap_readPixels">SkBitmap::readPixels</a> <a href="#SkPixmap_readPixels">SkPixmap::readPixels</a> <a href="#SkCanvas_readPixels">SkCanvas::readPixels</a> <a href="#SkSurface_readPixels">SkSurface::readPixels</a>
|
||||
<a href="#SkImage_scalePixels">scalePixels</a> <a href="#SkBitmap_readPixels">SkBitmap::readPixels</a><sup><a href="#SkBitmap_readPixels_2">[2]</a></sup><sup><a href="#SkBitmap_readPixels_3">[3]</a></sup><sup><a href="#SkBitmap_readPixels_4">[4]</a></sup> <a href="#SkPixmap_readPixels">SkPixmap::readPixels</a><sup><a href="#SkPixmap_readPixels_2">[2]</a></sup><sup><a href="#SkPixmap_readPixels_3">[3]</a></sup><sup><a href="#SkPixmap_readPixels_4">[4]</a></sup><sup><a href="#SkPixmap_readPixels_5">[5]</a></sup> <a href="#SkCanvas_readPixels">SkCanvas::readPixels</a><sup><a href="#SkCanvas_readPixels_2">[2]</a></sup><sup><a href="#SkCanvas_readPixels_3">[3]</a></sup> <a href="#SkSurface_readPixels">SkSurface::readPixels</a><sup><a href="#SkSurface_readPixels_2">[2]</a></sup><sup><a href="#SkSurface_readPixels_3">[3]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1713,10 +1729,10 @@ converting pixels to match <a href="#SkImage_scalePixels_dst">dst</a>.<a href="S
|
||||
pixels are copied. Returns false if <a href="#SkImage_scalePixels_dst">dst</a>.addr() is nullptr, or <a href="#SkImage_scalePixels_dst">dst</a>.<a href="SkPixmap_Reference#SkPixmap">rowBytes</a> is
|
||||
less than <a href="#SkImage_scalePixels_dst">dst</a> <a href="#SkImageInfo_minRowBytes">SkImageInfo::minRowBytes</a>.
|
||||
|
||||
Pixels are copied only if pixel conversion is possible. If <a href="#Image">Image</a> <a href="#Color_Type">Color Type</a> is
|
||||
<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, or <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkImage_scalePixels_dst">dst</a>.<a href="SkPixmap_Reference#SkPixmap">colorType</a> must match.
|
||||
If <a href="#Image">Image</a> <a href="#Color_Type">Color Type</a> is <a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="#SkImage_scalePixels_dst">dst</a>.<a href="#SkImage_colorSpace">colorSpace</a> must match.
|
||||
If <a href="#Image">Image</a> <a href="#Alpha_Type">Alpha Type</a> is <a href="undocumented#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkImage_scalePixels_dst">dst</a>.<a href="#SkImage_alphaType">alphaType</a> must
|
||||
Pixels are copied only if pixel conversion is possible. If <a href="#Image">Image</a> <a href="SkImageInfo_Reference#Color_Type">Color Type</a> is
|
||||
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, or <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>; <a href="#SkImage_scalePixels_dst">dst</a>.<a href="SkPixmap_Reference#SkPixmap">colorType</a> must match.
|
||||
If <a href="#Image">Image</a> <a href="SkImageInfo_Reference#Color_Type">Color Type</a> is <a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="#SkImage_scalePixels_dst">dst</a>.<a href="#SkImage_colorSpace">colorSpace</a> must match.
|
||||
If <a href="#Image">Image</a> <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> is <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>, <a href="#SkImage_scalePixels_dst">dst</a>.<a href="#SkImage_alphaType">alphaType</a> must
|
||||
match. If <a href="#Image">Image</a> <a href="undocumented#Color_Space">Color Space</a> is nullptr, <a href="#SkImage_scalePixels_dst">dst</a>.<a href="#SkImage_colorSpace">colorSpace</a> must match. Returns
|
||||
false if pixel conversion is not possible.
|
||||
|
||||
@ -1752,7 +1768,7 @@ true if pixels are scaled to fit <a href="#SkImage_scalePixels_dst">dst</a>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkCanvas_drawImage">SkCanvas::drawImage</a> <a href="#SkImage_readPixels">readPixels</a> <a href="#SkPixmap_scalePixels">SkPixmap::scalePixels</a>
|
||||
<a href="#SkCanvas_drawImage">SkCanvas::drawImage</a><sup><a href="#SkCanvas_drawImage_2">[2]</a></sup> <a href="#SkImage_readPixels">readPixels</a><sup><a href="#SkImage_readPixels_2">[2]</a></sup> <a href="#SkPixmap_scalePixels">SkPixmap::scalePixels</a>
|
||||
|
||||
---
|
||||
|
||||
@ -1803,6 +1819,8 @@ encoded <a href="#Image">Image</a>, or nullptr
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImage_encodeToData_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
sk_sp<SkData> encodeToData() const
|
||||
</pre>
|
||||
@ -1851,7 +1869,7 @@ encoded <a href="#Image">Image</a>, or nullptr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_encodeToData">encodeToData</a> <a href="#SkImage_MakeFromEncoded">MakeFromEncoded</a>
|
||||
<a href="#SkImage_encodeToData">encodeToData</a><sup><a href="#SkImage_encodeToData_2">[2]</a></sup> <a href="#SkImage_MakeFromEncoded">MakeFromEncoded</a>
|
||||
|
||||
---
|
||||
|
||||
@ -1862,7 +1880,7 @@ encoded <a href="#Image">Image</a>, or nullptr
|
||||
const char* toString(SkString* string) const
|
||||
</pre>
|
||||
|
||||
Appends <a href="#Image">Image</a> description to <a href="#SkImage_toString_string">string</a>, including unique ID, <a href="#SkImage_width">width</a>, <a href="#SkImage_height">height</a>, and
|
||||
Appends <a href="#Image">Image</a> description to <a href="#SkImage_toString_string">string</a>, including unique ID, width, height, and
|
||||
whether the image is opaque.
|
||||
|
||||
### Parameters
|
||||
@ -1896,13 +1914,13 @@ sk_sp<SkImage> makeSubset(const SkIRect& subset) const
|
||||
Returns <a href="#SkImage_makeSubset_subset">subset</a> of <a href="#Image">Image</a>. <a href="#SkImage_makeSubset_subset">subset</a> must be fully contained by <a href="#Image">Image</a> <a href="#SkImage_dimensions">dimensions</a>.
|
||||
The implementation may share pixels, or may copy them.
|
||||
|
||||
Returns nullptr if <a href="#SkImage_makeSubset_subset">subset</a> is empty, or <a href="#SkImage_makeSubset_subset">subset</a> is not contained by <a href="#SkImage_bounds">bounds</a>, or
|
||||
Returns nullptr if <a href="#SkImage_makeSubset_subset">subset</a> is empty, or <a href="#SkImage_makeSubset_subset">subset</a> is not contained by bounds, or
|
||||
pixels in <a href="#Image">Image</a> could not be read or copied.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkImage_makeSubset_subset"> <code><strong>subset </strong></code> </a></td> <td>
|
||||
<a href="#SkImage_bounds">bounds</a> of returned <a href="#Image">Image</a></td>
|
||||
bounds of returned <a href="#Image">Image</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -1953,7 +1971,7 @@ created <a href="#Image">Image</a>, or nullptr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkImage_MakeFromTexture">MakeFromTexture</a>
|
||||
<a href="#SkImage_MakeFromTexture">MakeFromTexture</a><sup><a href="#SkImage_MakeFromTexture_2">[2]</a></sup><sup><a href="#SkImage_MakeFromTexture_3">[3]</a></sup><sup><a href="#SkImage_MakeFromTexture_4">[4]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2020,9 +2038,9 @@ sk_sp<SkImage> makeWithFilter(const SkImageFilter* filter, const SkIRect&
|
||||
</pre>
|
||||
|
||||
Creates filtered <a href="#Image">Image</a>. <a href="#SkImage_makeWithFilter_filter">filter</a> processes original <a href="#Image">Image</a>, potentially changing
|
||||
color, position, and size. <a href="#SkImage_makeWithFilter_subset">subset</a> is the <a href="#SkImage_bounds">bounds</a> of original <a href="#Image">Image</a> processed
|
||||
by <a href="#SkImage_makeWithFilter_filter">filter</a>. <a href="#SkImage_makeWithFilter_clipBounds">clipBounds</a> is the expected <a href="#SkImage_bounds">bounds</a> of the filtered <a href="#Image">Image</a>. <a href="#SkImage_makeWithFilter_outSubset">outSubset</a>
|
||||
is required storage for the actual <a href="#SkImage_bounds">bounds</a> of the filtered <a href="#Image">Image</a>. <a href="#SkImage_makeWithFilter_offset">offset</a> is
|
||||
color, position, and size. <a href="#SkImage_makeWithFilter_subset">subset</a> is the bounds of original <a href="#Image">Image</a> processed
|
||||
by <a href="#SkImage_makeWithFilter_filter">filter</a>. <a href="#SkImage_makeWithFilter_clipBounds">clipBounds</a> is the expected bounds of the filtered <a href="#Image">Image</a>. <a href="#SkImage_makeWithFilter_outSubset">outSubset</a>
|
||||
is required storage for the actual bounds of the filtered <a href="#Image">Image</a>. <a href="#SkImage_makeWithFilter_offset">offset</a> is
|
||||
required storage for translation of returned <a href="#Image">Image</a>.
|
||||
|
||||
Returns nullptr if <a href="#Image">Image</a> could not be created. If nullptr is returned, <a href="#SkImage_makeWithFilter_outSubset">outSubset</a>
|
||||
@ -2031,7 +2049,7 @@ and <a href="#SkImage_makeWithFilter_offset">offset</a> are undefined.
|
||||
<a href="#SkImage_makeWithFilter">makeWithFilter</a> is optimized to support <a href="#Image">Image</a> backed by <a href="undocumented#GPU_Texture">GPU Texture</a> drawn in an
|
||||
animation with <a href="undocumented#SkImageFilter">SkImageFilter</a> that vary in size from one frame to the next. The
|
||||
created <a href="#Image">Image</a> is drawn at an increased size so that <a href="undocumented#GPU_Texture">GPU Texture</a> can be reused
|
||||
with different sized effects. <a href="#SkImage_makeWithFilter_outSubset">outSubset</a> describes the valid <a href="#SkImage_bounds">bounds</a> of <a href="undocumented#GPU_Texture">GPU Texture</a>
|
||||
with different sized effects. <a href="#SkImage_makeWithFilter_outSubset">outSubset</a> describes the valid bounds of <a href="undocumented#GPU_Texture">GPU Texture</a>
|
||||
returned. The returned <a href="#Image">Image</a> may be much larger than required for the <a href="#SkImage_makeWithFilter_filter">filter</a>.
|
||||
<a href="#SkImage_makeWithFilter_offset">offset</a> translates the returned <a href="#Image">Image</a> to keep subsequent animation frames
|
||||
aligned with respect to each other.
|
||||
@ -2162,7 +2180,7 @@ for building them (gamma-correct or not).
|
||||
|
||||
<a href="#SkImage_getDeferredTextureImageData_dstColorType">dstColorType</a> is the color type of the surface where this texture will ultimately be used.
|
||||
This determines the format with which the image will be uploaded to the GPU. If <a href="#SkImage_getDeferredTextureImageData_dstColorType">dstColorType</a>
|
||||
does not support <a href="undocumented#Color_Space">Color Space</a> (low bit depth types such as <a href="undocumented#SkColorType">kARGB 4444 SkColorType</a>),
|
||||
does not support <a href="undocumented#Color_Space">Color Space</a> (low bit depth types such as <a href="SkImageInfo_Reference#SkColorType">kARGB 4444 SkColorType</a>),
|
||||
then <a href="#SkImage_getDeferredTextureImageData_dstColorSpace">dstColorSpace</a> must be null.
|
||||
|
||||
### Parameters
|
||||
@ -2178,7 +2196,7 @@ storage for <a href="undocumented#GPU_Texture">GPU Texture</a> data, or nullptr<
|
||||
</tr> <tr> <td><a name="SkImage_getDeferredTextureImageData_dstColorSpace"> <code><strong>dstColorSpace </strong></code> </a></td> <td>
|
||||
<a href="SkSurface_Reference#Surface">Surface</a> <a href="undocumented#Color_Space">Color Space</a>, or nullptr</td>
|
||||
</tr> <tr> <td><a name="SkImage_getDeferredTextureImageData_dstColorType"> <code><strong>dstColorType </strong></code> </a></td> <td>
|
||||
<a href="SkSurface_Reference#Surface">Surface</a> <a href="#Color_Type">Color Type</a></td>
|
||||
<a href="SkSurface_Reference#Surface">Surface</a> <a href="SkImageInfo_Reference#Color_Type">Color Type</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -2398,11 +2416,11 @@ If <a href="#Image">Image</a> <a href="#SkImage_colorSpace">colorSpace</a> retur
|
||||
<a href="undocumented#SkTransferFunctionBehavior">SkTransferFunctionBehavior</a> is to be deprecated.
|
||||
|
||||
Set <a href="#SkImage_makeColorSpace_premulBehavior">premulBehavior</a> to <a href="#SkTransferFunctionBehavior_kRespect">SkTransferFunctionBehavior::kRespect</a> to convert <a href="#Image">Image</a>
|
||||
pixels to a linear space, before converting to destination <a href="#Color_Type">Color Type</a>
|
||||
pixels to a linear space, before converting to destination <a href="SkImageInfo_Reference#Color_Type">Color Type</a>
|
||||
and <a href="undocumented#Color_Space">Color Space</a>.
|
||||
|
||||
Set <a href="#SkImage_makeColorSpace_premulBehavior">premulBehavior</a> to <a href="#SkTransferFunctionBehavior_kIgnore">SkTransferFunctionBehavior::kIgnore</a> to treat <a href="#Image">Image</a>
|
||||
pixels as linear, when converting to destination <a href="#Color_Type">Color Type</a>
|
||||
pixels as linear, when converting to destination <a href="SkImageInfo_Reference#Color_Type">Color Type</a>
|
||||
and <a href="undocumented#Color_Space">Color Space</a>, ignoring pixel encoding.
|
||||
|
||||
### Parameters
|
||||
@ -2425,7 +2443,7 @@ created <a href="#Image">Image</a> in <a href="#SkImage_makeColorSpace_target">t
|
||||
|
||||
### See Also
|
||||
|
||||
MakeFromPixture <a href="#SkImage_MakeFromTexture">MakeFromTexture</a>
|
||||
MakeFromPixture <a href="#SkImage_MakeFromTexture">MakeFromTexture</a><sup><a href="#SkImage_MakeFromTexture_2">[2]</a></sup><sup><a href="#SkImage_MakeFromTexture_3">[3]</a></sup><sup><a href="#SkImage_MakeFromTexture_4">[4]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
|
@ -163,10 +163,12 @@ vertical scale factor</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setScale">setScale</a> <a href="#SkMatrix_postScale">postScale</a> <a href="#SkMatrix_preScale">preScale</a>
|
||||
<a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup> <a href="#SkMatrix_postScale">postScale</a><sup><a href="#SkMatrix_postScale_2">[2]</a></sup> <a href="#SkMatrix_preScale">preScale</a><sup><a href="#SkMatrix_preScale_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_MakeScale_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
static SkMatrix SK_WARN_UNUSED_RESULT MakeScale(SkScalar scale)
|
||||
</pre>
|
||||
@ -195,7 +197,7 @@ horizontal and vertical <a href="#SkMatrix_MakeScale_2_scale">scale</a> factor</
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setScale">setScale</a> <a href="#SkMatrix_postScale">postScale</a> <a href="#SkMatrix_preScale">preScale</a>
|
||||
<a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup> <a href="#SkMatrix_postScale">postScale</a><sup><a href="#SkMatrix_postScale_2">[2]</a></sup> <a href="#SkMatrix_preScale">preScale</a><sup><a href="#SkMatrix_preScale_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -232,7 +234,7 @@ vertical translation</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setTranslate">setTranslate</a> <a href="#SkMatrix_postTranslate">postTranslate</a> <a href="#SkMatrix_preTranslate">preTranslate</a>
|
||||
<a href="#SkMatrix_setTranslate">setTranslate</a><sup><a href="#SkMatrix_setTranslate_2">[2]</a></sup> <a href="#SkMatrix_postTranslate">postTranslate</a> <a href="#SkMatrix_preTranslate">preTranslate</a>
|
||||
|
||||
---
|
||||
|
||||
@ -310,16 +312,16 @@ Used to identify the complexity of <a href="#Matrix">Matrix</a>, to optimize per
|
||||
<td><a name="SkMatrix_kIdentity_Mask"> <code><strong>SkMatrix::kIdentity_Mask </strong></code> </a></td><td>0</td><td>all bits clear if <a href="#Matrix">Matrix</a> is identity</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="SkMatrix_kTranslate_Mask"> <code><strong>SkMatrix::kTranslate_Mask </strong></code> </a></td><td>1</td><td><a href="#SkMatrix_set">set</a> if <a href="#Matrix">Matrix</a> has translation</td>
|
||||
<td><a name="SkMatrix_kTranslate_Mask"> <code><strong>SkMatrix::kTranslate_Mask </strong></code> </a></td><td>1</td><td>set if <a href="#Matrix">Matrix</a> has translation</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="SkMatrix_kScale_Mask"> <code><strong>SkMatrix::kScale_Mask </strong></code> </a></td><td>2</td><td><a href="#SkMatrix_set">set</a> if <a href="#Matrix">Matrix</a> has x or y scale</td>
|
||||
<td><a name="SkMatrix_kScale_Mask"> <code><strong>SkMatrix::kScale_Mask </strong></code> </a></td><td>2</td><td>set if <a href="#Matrix">Matrix</a> has x or y scale</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="SkMatrix_kAffine_Mask"> <code><strong>SkMatrix::kAffine_Mask </strong></code> </a></td><td>4</td><td><a href="#SkMatrix_set">set</a> if <a href="#Matrix">Matrix</a> skews or rotates</td>
|
||||
<td><a name="SkMatrix_kAffine_Mask"> <code><strong>SkMatrix::kAffine_Mask </strong></code> </a></td><td>4</td><td>set if <a href="#Matrix">Matrix</a> skews or rotates</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="SkMatrix_kPerspective_Mask"> <code><strong>SkMatrix::kPerspective_Mask </strong></code> </a></td><td>8</td><td><a href="#SkMatrix_set">set</a> if <a href="#Matrix">Matrix</a> has perspective</td>
|
||||
<td><a name="SkMatrix_kPerspective_Mask"> <code><strong>SkMatrix::kPerspective_Mask </strong></code> </a></td><td>8</td><td>set if <a href="#Matrix">Matrix</a> has perspective</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -354,8 +356,8 @@ TypeMask getType() const
|
||||
|
||||
Returns a bit field describing the transformations the matrix may
|
||||
perform. The bit field is computed conservatively, so it may include
|
||||
false positives. For example, when <a href="#SkMatrix_kPerspective_Mask">kPerspective Mask</a> is <a href="#SkMatrix_set">set</a>, all
|
||||
other bits are <a href="#SkMatrix_set">set</a>.
|
||||
false positives. For example, when <a href="#SkMatrix_kPerspective_Mask">kPerspective Mask</a> is set, all
|
||||
other bits are set.
|
||||
|
||||
### Return Value
|
||||
|
||||
@ -454,7 +456,7 @@ is scale-translate: true
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setScale">setScale</a> <a href="#SkMatrix_isTranslate">isTranslate</a> <a href="#SkMatrix_setTranslate">setTranslate</a> <a href="#SkMatrix_getType">getType</a>
|
||||
<a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup> <a href="#SkMatrix_isTranslate">isTranslate</a> <a href="#SkMatrix_setTranslate">setTranslate</a><sup><a href="#SkMatrix_setTranslate_2">[2]</a></sup> <a href="#SkMatrix_getType">getType</a>
|
||||
|
||||
---
|
||||
|
||||
@ -493,7 +495,7 @@ is translate: false
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setTranslate">setTranslate</a> <a href="#SkMatrix_getType">getType</a>
|
||||
<a href="#SkMatrix_setTranslate">setTranslate</a><sup><a href="#SkMatrix_setTranslate_2">[2]</a></sup> <a href="#SkMatrix_getType">getType</a>
|
||||
|
||||
---
|
||||
|
||||
@ -926,7 +928,7 @@ matrix.getScaleX() == 42
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_get">get</a> <a href="#SkMatrix_getScaleY">getScaleY</a> <a href="#SkMatrix_setScaleX">setScaleX</a> <a href="#SkMatrix_setScale">setScale</a>
|
||||
<a href="#SkMatrix_get">get</a> <a href="#SkMatrix_getScaleY">getScaleY</a> <a href="#SkMatrix_setScaleX">setScaleX</a> <a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -958,7 +960,7 @@ matrix.getScaleY() == 24
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_get">get</a> <a href="#SkMatrix_getScaleX">getScaleX</a> <a href="#SkMatrix_setScaleY">setScaleY</a> <a href="#SkMatrix_setScale">setScale</a>
|
||||
<a href="#SkMatrix_get">get</a> <a href="#SkMatrix_getScaleX">getScaleX</a> <a href="#SkMatrix_setScaleY">setScaleY</a> <a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -991,7 +993,7 @@ matrix.getSkewY() == 24
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_get">get</a> <a href="#SkMatrix_getSkewX">getSkewX</a> <a href="#SkMatrix_setSkewY">setSkewY</a> <a href="#SkMatrix_setSkew">setSkew</a>
|
||||
<a href="#SkMatrix_get">get</a> <a href="#SkMatrix_getSkewX">getSkewX</a> <a href="#SkMatrix_setSkewY">setSkewY</a> <a href="#SkMatrix_setSkew">setSkew</a><sup><a href="#SkMatrix_setSkew_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1024,7 +1026,7 @@ matrix.getSkewX() == 42
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_get">get</a> <a href="#SkMatrix_getSkewY">getSkewY</a> <a href="#SkMatrix_setSkewX">setSkewX</a> <a href="#SkMatrix_setSkew">setSkew</a>
|
||||
<a href="#SkMatrix_get">get</a> <a href="#SkMatrix_getSkewY">getSkewY</a> <a href="#SkMatrix_setSkewX">setSkewX</a> <a href="#SkMatrix_setSkew">setSkew</a><sup><a href="#SkMatrix_setSkew_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1056,7 +1058,7 @@ matrix.getTranslateX() == 42
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_get">get</a> <a href="#SkMatrix_getTranslateY">getTranslateY</a> <a href="#SkMatrix_setTranslateX">setTranslateX</a> <a href="#SkMatrix_setTranslate">setTranslate</a>
|
||||
<a href="#SkMatrix_get">get</a> <a href="#SkMatrix_getTranslateY">getTranslateY</a> <a href="#SkMatrix_setTranslateX">setTranslateX</a> <a href="#SkMatrix_setTranslate">setTranslate</a><sup><a href="#SkMatrix_setTranslate_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1088,7 +1090,7 @@ matrix.getTranslateY() == 24
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_get">get</a> <a href="#SkMatrix_getTranslateX">getTranslateX</a> <a href="#SkMatrix_setTranslateY">setTranslateY</a> <a href="#SkMatrix_setTranslate">setTranslate</a>
|
||||
<a href="#SkMatrix_get">get</a> <a href="#SkMatrix_getTranslateX">getTranslateX</a> <a href="#SkMatrix_setTranslateY">setTranslateY</a> <a href="#SkMatrix_setTranslate">setTranslate</a><sup><a href="#SkMatrix_setTranslate_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1246,7 +1248,7 @@ horizontal scale factor to store</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_set">set</a> <a href="#SkMatrix_setScale">setScale</a> <a href="#SkMatrix_setScaleY">setScaleY</a>
|
||||
<a href="#SkMatrix_set">set</a> <a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup> <a href="#SkMatrix_setScaleY">setScaleY</a>
|
||||
|
||||
---
|
||||
|
||||
@ -1272,7 +1274,7 @@ vertical scale factor to store</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_set">set</a> <a href="#SkMatrix_setScale">setScale</a> <a href="#SkMatrix_setScaleX">setScaleX</a>
|
||||
<a href="#SkMatrix_set">set</a> <a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup> <a href="#SkMatrix_setScaleX">setScaleX</a>
|
||||
|
||||
---
|
||||
|
||||
@ -1298,7 +1300,7 @@ vertical skew factor to store</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_set">set</a> <a href="#SkMatrix_setSkew">setSkew</a> <a href="#SkMatrix_setSkewX">setSkewX</a>
|
||||
<a href="#SkMatrix_set">set</a> <a href="#SkMatrix_setSkew">setSkew</a><sup><a href="#SkMatrix_setSkew_2">[2]</a></sup> <a href="#SkMatrix_setSkewX">setSkewX</a>
|
||||
|
||||
---
|
||||
|
||||
@ -1324,7 +1326,7 @@ horizontal skew factor to store</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_set">set</a> <a href="#SkMatrix_setSkew">setSkew</a> <a href="#SkMatrix_setSkewX">setSkewX</a>
|
||||
<a href="#SkMatrix_set">set</a> <a href="#SkMatrix_setSkew">setSkew</a><sup><a href="#SkMatrix_setSkew_2">[2]</a></sup> <a href="#SkMatrix_setSkewX">setSkewX</a>
|
||||
|
||||
---
|
||||
|
||||
@ -1350,7 +1352,7 @@ horizontal translation to store</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_set">set</a> <a href="#SkMatrix_setTranslate">setTranslate</a> <a href="#SkMatrix_setTranslateY">setTranslateY</a>
|
||||
<a href="#SkMatrix_set">set</a> <a href="#SkMatrix_setTranslate">setTranslate</a><sup><a href="#SkMatrix_setTranslate_2">[2]</a></sup> <a href="#SkMatrix_setTranslateY">setTranslateY</a>
|
||||
|
||||
---
|
||||
|
||||
@ -1376,7 +1378,7 @@ vertical translation to store</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_set">set</a> <a href="#SkMatrix_setTranslate">setTranslate</a> <a href="#SkMatrix_setTranslateX">setTranslateX</a>
|
||||
<a href="#SkMatrix_set">set</a> <a href="#SkMatrix_setTranslate">setTranslate</a><sup><a href="#SkMatrix_setTranslate_2">[2]</a></sup> <a href="#SkMatrix_setTranslateX">setTranslateX</a>
|
||||
|
||||
---
|
||||
|
||||
@ -1657,6 +1659,8 @@ vertical translation</td>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_setTranslate_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void setTranslate(const SkVector& v)
|
||||
</pre>
|
||||
@ -1709,10 +1713,12 @@ pivot y</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setScaleX">setScaleX</a> <a href="#SkMatrix_setScaleY">setScaleY</a> <a href="#SkMatrix_MakeScale">MakeScale</a> <a href="#SkMatrix_preScale">preScale</a> <a href="#SkMatrix_postScale">postScale</a>
|
||||
<a href="#SkMatrix_setScaleX">setScaleX</a> <a href="#SkMatrix_setScaleY">setScaleY</a> <a href="#SkMatrix_MakeScale">MakeScale</a><sup><a href="#SkMatrix_MakeScale_2">[2]</a></sup> <a href="#SkMatrix_preScale">preScale</a><sup><a href="#SkMatrix_preScale_2">[2]</a></sup> <a href="#SkMatrix_postScale">postScale</a><sup><a href="#SkMatrix_postScale_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_setScale_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void setScale(SkScalar sx, SkScalar sy)
|
||||
</pre>
|
||||
@ -1734,7 +1740,7 @@ vertical scale factor</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setScaleX">setScaleX</a> <a href="#SkMatrix_setScaleY">setScaleY</a> <a href="#SkMatrix_MakeScale">MakeScale</a> <a href="#SkMatrix_preScale">preScale</a> <a href="#SkMatrix_postScale">postScale</a>
|
||||
<a href="#SkMatrix_setScaleX">setScaleX</a> <a href="#SkMatrix_setScaleY">setScaleY</a> <a href="#SkMatrix_MakeScale">MakeScale</a><sup><a href="#SkMatrix_MakeScale_2">[2]</a></sup> <a href="#SkMatrix_preScale">preScale</a><sup><a href="#SkMatrix_preScale_2">[2]</a></sup> <a href="#SkMatrix_postScale">postScale</a><sup><a href="#SkMatrix_postScale_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1767,10 +1773,12 @@ pivot y</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setSinCos">setSinCos</a> <a href="#SkMatrix_preRotate">preRotate</a> <a href="#SkMatrix_postRotate">postRotate</a>
|
||||
<a href="#SkMatrix_setSinCos">setSinCos</a><sup><a href="#SkMatrix_setSinCos_2">[2]</a></sup> <a href="#SkMatrix_preRotate">preRotate</a><sup><a href="#SkMatrix_preRotate_2">[2]</a></sup> <a href="#SkMatrix_postRotate">postRotate</a><sup><a href="#SkMatrix_postRotate_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_setRotate_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void setRotate(SkScalar degrees)
|
||||
</pre>
|
||||
@ -1791,7 +1799,7 @@ angle of axes relative to upright axes</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setSinCos">setSinCos</a> <a href="#SkMatrix_preRotate">preRotate</a> <a href="#SkMatrix_postRotate">postRotate</a>
|
||||
<a href="#SkMatrix_setSinCos">setSinCos</a><sup><a href="#SkMatrix_setSinCos_2">[2]</a></sup> <a href="#SkMatrix_preRotate">preRotate</a><sup><a href="#SkMatrix_preRotate_2">[2]</a></sup> <a href="#SkMatrix_postRotate">postRotate</a><sup><a href="#SkMatrix_postRotate_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1827,10 +1835,12 @@ pivot y</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setRotate">setRotate</a> <a href="#SkMatrix_setScale">setScale</a> <a href="#SkMatrix_setRSXform">setRSXform</a>
|
||||
<a href="#SkMatrix_setRotate">setRotate</a><sup><a href="#SkMatrix_setRotate_2">[2]</a></sup> <a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup> <a href="#SkMatrix_setRSXform">setRSXform</a>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_setSinCos_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void setSinCos(SkScalar sinValue, SkScalar cosValue)
|
||||
</pre>
|
||||
@ -1855,7 +1865,7 @@ rotation vector y component</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setRotate">setRotate</a> <a href="#SkMatrix_setScale">setScale</a> <a href="#SkMatrix_setRSXform">setRSXform</a>
|
||||
<a href="#SkMatrix_setRotate">setRotate</a><sup><a href="#SkMatrix_setRotate_2">[2]</a></sup> <a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup> <a href="#SkMatrix_setRSXform">setRSXform</a>
|
||||
|
||||
---
|
||||
|
||||
@ -1889,7 +1899,7 @@ reference to <a href="#Matrix">Matrix</a>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setSinCos">setSinCos</a> <a href="#SkMatrix_setScale">setScale</a> <a href="#SkMatrix_setTranslate">setTranslate</a>
|
||||
<a href="#SkMatrix_setSinCos">setSinCos</a><sup><a href="#SkMatrix_setSinCos_2">[2]</a></sup> <a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup> <a href="#SkMatrix_setTranslate">setTranslate</a><sup><a href="#SkMatrix_setTranslate_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1922,10 +1932,12 @@ pivot y</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setSkewX">setSkewX</a> <a href="#SkMatrix_setSkewY">setSkewY</a> <a href="#SkMatrix_preSkew">preSkew</a> <a href="#SkMatrix_postSkew">postSkew</a>
|
||||
<a href="#SkMatrix_setSkewX">setSkewX</a> <a href="#SkMatrix_setSkewY">setSkewY</a> <a href="#SkMatrix_preSkew">preSkew</a><sup><a href="#SkMatrix_preSkew_2">[2]</a></sup> <a href="#SkMatrix_postSkew">postSkew</a><sup><a href="#SkMatrix_postSkew_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_setSkew_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void setSkew(SkScalar kx, SkScalar ky)
|
||||
</pre>
|
||||
@ -1947,7 +1959,7 @@ vertical skew factor</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setSkewX">setSkewX</a> <a href="#SkMatrix_setSkewY">setSkewY</a> <a href="#SkMatrix_preSkew">preSkew</a> <a href="#SkMatrix_postSkew">postSkew</a>
|
||||
<a href="#SkMatrix_setSkewX">setSkewX</a> <a href="#SkMatrix_setSkewY">setSkewY</a> <a href="#SkMatrix_preSkew">preSkew</a><sup><a href="#SkMatrix_preSkew_2">[2]</a></sup> <a href="#SkMatrix_postSkew">postSkew</a><sup><a href="#SkMatrix_postSkew_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2033,7 +2045,7 @@ y translation before applying <a href="#Matrix">Matrix</a></td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_postTranslate">postTranslate</a> <a href="#SkMatrix_setTranslate">setTranslate</a> <a href="#SkMatrix_MakeTrans">MakeTrans</a>
|
||||
<a href="#SkMatrix_postTranslate">postTranslate</a> <a href="#SkMatrix_setTranslate">setTranslate</a><sup><a href="#SkMatrix_setTranslate_2">[2]</a></sup> <a href="#SkMatrix_MakeTrans">MakeTrans</a>
|
||||
|
||||
---
|
||||
|
||||
@ -2087,10 +2099,12 @@ pivot y</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_postScale">postScale</a> <a href="#SkMatrix_setScale">setScale</a> <a href="#SkMatrix_MakeScale">MakeScale</a>
|
||||
<a href="#SkMatrix_postScale">postScale</a><sup><a href="#SkMatrix_postScale_2">[2]</a></sup> <a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup> <a href="#SkMatrix_MakeScale">MakeScale</a><sup><a href="#SkMatrix_MakeScale_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_preScale_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void preScale(SkScalar sx, SkScalar sy)
|
||||
</pre>
|
||||
@ -2128,7 +2142,7 @@ vertical scale factor</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_postScale">postScale</a> <a href="#SkMatrix_setScale">setScale</a> <a href="#SkMatrix_MakeScale">MakeScale</a>
|
||||
<a href="#SkMatrix_postScale">postScale</a><sup><a href="#SkMatrix_postScale_2">[2]</a></sup> <a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup> <a href="#SkMatrix_MakeScale">MakeScale</a><sup><a href="#SkMatrix_MakeScale_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2184,10 +2198,12 @@ pivot y</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_postRotate">postRotate</a> <a href="#SkMatrix_setRotate">setRotate</a>
|
||||
<a href="#SkMatrix_postRotate">postRotate</a><sup><a href="#SkMatrix_postRotate_2">[2]</a></sup> <a href="#SkMatrix_setRotate">setRotate</a><sup><a href="#SkMatrix_setRotate_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_preRotate_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void preRotate(SkScalar degrees)
|
||||
</pre>
|
||||
@ -2231,7 +2247,7 @@ angle of axes relative to upright axes</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_postRotate">postRotate</a> <a href="#SkMatrix_setRotate">setRotate</a>
|
||||
<a href="#SkMatrix_postRotate">postRotate</a><sup><a href="#SkMatrix_postRotate_2">[2]</a></sup> <a href="#SkMatrix_setRotate">setRotate</a><sup><a href="#SkMatrix_setRotate_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2285,10 +2301,12 @@ pivot y</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_postSkew">postSkew</a> <a href="#SkMatrix_setSkew">setSkew</a>
|
||||
<a href="#SkMatrix_postSkew">postSkew</a><sup><a href="#SkMatrix_postSkew_2">[2]</a></sup> <a href="#SkMatrix_setSkew">setSkew</a><sup><a href="#SkMatrix_setSkew_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_preSkew_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void preSkew(SkScalar kx, SkScalar ky)
|
||||
</pre>
|
||||
@ -2326,7 +2344,7 @@ vertical skew factor</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_postSkew">postSkew</a> <a href="#SkMatrix_setSkew">setSkew</a>
|
||||
<a href="#SkMatrix_postSkew">postSkew</a><sup><a href="#SkMatrix_postSkew_2">[2]</a></sup> <a href="#SkMatrix_setSkew">setSkew</a><sup><a href="#SkMatrix_setSkew_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2411,7 +2429,7 @@ y translation after applying <a href="#Matrix">Matrix</a></td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_preTranslate">preTranslate</a> <a href="#SkMatrix_setTranslate">setTranslate</a> <a href="#SkMatrix_MakeTrans">MakeTrans</a>
|
||||
<a href="#SkMatrix_preTranslate">preTranslate</a> <a href="#SkMatrix_setTranslate">setTranslate</a><sup><a href="#SkMatrix_setTranslate_2">[2]</a></sup> <a href="#SkMatrix_MakeTrans">MakeTrans</a>
|
||||
|
||||
---
|
||||
|
||||
@ -2465,10 +2483,12 @@ pivot y</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_preScale">preScale</a> <a href="#SkMatrix_setScale">setScale</a> <a href="#SkMatrix_MakeScale">MakeScale</a>
|
||||
<a href="#SkMatrix_preScale">preScale</a><sup><a href="#SkMatrix_preScale_2">[2]</a></sup> <a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup> <a href="#SkMatrix_MakeScale">MakeScale</a><sup><a href="#SkMatrix_MakeScale_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_postScale_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void postScale(SkScalar sx, SkScalar sy)
|
||||
</pre>
|
||||
@ -2506,7 +2526,7 @@ vertical scale factor</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_preScale">preScale</a> <a href="#SkMatrix_setScale">setScale</a> <a href="#SkMatrix_MakeScale">MakeScale</a>
|
||||
<a href="#SkMatrix_preScale">preScale</a><sup><a href="#SkMatrix_preScale_2">[2]</a></sup> <a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup> <a href="#SkMatrix_MakeScale">MakeScale</a><sup><a href="#SkMatrix_MakeScale_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2560,7 +2580,7 @@ true on successful scale
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_postScale">postScale</a> <a href="#SkMatrix_MakeScale">MakeScale</a>
|
||||
<a href="#SkMatrix_postScale">postScale</a><sup><a href="#SkMatrix_postScale_2">[2]</a></sup> <a href="#SkMatrix_MakeScale">MakeScale</a><sup><a href="#SkMatrix_MakeScale_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2616,10 +2636,12 @@ pivot y</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_preRotate">preRotate</a> <a href="#SkMatrix_setRotate">setRotate</a>
|
||||
<a href="#SkMatrix_preRotate">preRotate</a><sup><a href="#SkMatrix_preRotate_2">[2]</a></sup> <a href="#SkMatrix_setRotate">setRotate</a><sup><a href="#SkMatrix_setRotate_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_postRotate_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void postRotate(SkScalar degrees)
|
||||
</pre>
|
||||
@ -2663,7 +2685,7 @@ angle of axes relative to upright axes</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_preRotate">preRotate</a> <a href="#SkMatrix_setRotate">setRotate</a>
|
||||
<a href="#SkMatrix_preRotate">preRotate</a><sup><a href="#SkMatrix_preRotate_2">[2]</a></sup> <a href="#SkMatrix_setRotate">setRotate</a><sup><a href="#SkMatrix_setRotate_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2717,10 +2739,12 @@ pivot y</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_preSkew">preSkew</a> <a href="#SkMatrix_setSkew">setSkew</a>
|
||||
<a href="#SkMatrix_preSkew">preSkew</a><sup><a href="#SkMatrix_preSkew_2">[2]</a></sup> <a href="#SkMatrix_setSkew">setSkew</a><sup><a href="#SkMatrix_setSkew_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_postSkew_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void postSkew(SkScalar kx, SkScalar ky)
|
||||
</pre>
|
||||
@ -2758,7 +2782,7 @@ vertical skew factor</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_preSkew">preSkew</a> <a href="#SkMatrix_setSkew">setSkew</a>
|
||||
<a href="#SkMatrix_preSkew">preSkew</a><sup><a href="#SkMatrix_preSkew_2">[2]</a></sup> <a href="#SkMatrix_setSkew">setSkew</a><sup><a href="#SkMatrix_setSkew_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2918,10 +2942,10 @@ src: 1, 2, 3, 4 dst: 5, 6, 8, 9 success: true
|
||||
static SkMatrix MakeRectToRect(const SkRect& src, const SkRect& dst, ScaleToFit stf)
|
||||
</pre>
|
||||
|
||||
Returns <a href="#Matrix">Matrix</a> <a href="#SkMatrix_set">set</a> to scale and translate <a href="#SkMatrix_MakeRectToRect_src">src</a> <a href="SkRect_Reference#Rect">Rect</a> to <a href="#SkMatrix_MakeRectToRect_dst">dst</a> <a href="SkRect_Reference#Rect">Rect</a>. <a href="#SkMatrix_MakeRectToRect_stf">stf</a> selects
|
||||
Returns <a href="#Matrix">Matrix</a> set to scale and translate <a href="#SkMatrix_MakeRectToRect_src">src</a> <a href="SkRect_Reference#Rect">Rect</a> to <a href="#SkMatrix_MakeRectToRect_dst">dst</a> <a href="SkRect_Reference#Rect">Rect</a>. <a href="#SkMatrix_MakeRectToRect_stf">stf</a> selects
|
||||
whether mapping completely fills <a href="#SkMatrix_MakeRectToRect_dst">dst</a> or preserves the aspect ratio, and how to
|
||||
align <a href="#SkMatrix_MakeRectToRect_src">src</a> within <a href="#SkMatrix_MakeRectToRect_dst">dst</a>. Returns the identity <a href="#Matrix">Matrix</a> if <a href="#SkMatrix_MakeRectToRect_src">src</a> is empty. If <a href="#SkMatrix_MakeRectToRect_dst">dst</a> is
|
||||
empty, returns <a href="#Matrix">Matrix</a> <a href="#SkMatrix_set">set</a> to:
|
||||
empty, returns <a href="#Matrix">Matrix</a> set to:
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
| 0 0 0 |
|
||||
@ -3141,7 +3165,7 @@ column, then row, as:
|
||||
| scale-x skew-x translate-x |
|
||||
| skew-y scale-y translate-y |</pre>
|
||||
|
||||
<a href="#Matrix">Matrix</a> is <a href="#SkMatrix_set">set</a>, row, then column, to:
|
||||
<a href="#Matrix">Matrix</a> is set, row, then column, to:
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
| scale-x skew-x translate-x |
|
||||
@ -3223,10 +3247,12 @@ number of <a href="#Point">Points</a> to transform</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_mapXY">mapXY</a> <a href="#SkMatrix_mapHomogeneousPoints">mapHomogeneousPoints</a> <a href="#SkMatrix_mapVectors">mapVectors</a>
|
||||
<a href="#SkMatrix_mapXY">mapXY</a><sup><a href="#SkMatrix_mapXY_2">[2]</a></sup> <a href="#SkMatrix_mapHomogeneousPoints">mapHomogeneousPoints</a> <a href="#SkMatrix_mapVectors">mapVectors</a><sup><a href="#SkMatrix_mapVectors_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_mapPoints_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void mapPoints(SkPoint pts[], int count) const
|
||||
</pre>
|
||||
@ -3269,7 +3295,7 @@ number of <a href="#Point">Points</a> to transform</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_mapXY">mapXY</a> <a href="#SkMatrix_mapHomogeneousPoints">mapHomogeneousPoints</a> <a href="#SkMatrix_mapVectors">mapVectors</a>
|
||||
<a href="#SkMatrix_mapXY">mapXY</a><sup><a href="#SkMatrix_mapXY_2">[2]</a></sup> <a href="#SkMatrix_mapHomogeneousPoints">mapHomogeneousPoints</a> <a href="#SkMatrix_mapVectors">mapVectors</a><sup><a href="#SkMatrix_mapVectors_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -3312,7 +3338,7 @@ items in <a href="undocumented#Point3">Point3</a> array to transform</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_mapPoints">mapPoints</a> <a href="#SkMatrix_mapXY">mapXY</a> <a href="#SkMatrix_mapVectors">mapVectors</a>
|
||||
<a href="#SkMatrix_mapPoints">mapPoints</a><sup><a href="#SkMatrix_mapPoints_2">[2]</a></sup> <a href="#SkMatrix_mapXY">mapXY</a><sup><a href="#SkMatrix_mapXY_2">[2]</a></sup> <a href="#SkMatrix_mapVectors">mapVectors</a><sup><a href="#SkMatrix_mapVectors_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -3354,10 +3380,12 @@ storage for mapped <a href="SkPoint_Reference#Point">Point</a></td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_mapPoints">mapPoints</a> <a href="#SkMatrix_mapVectors">mapVectors</a>
|
||||
<a href="#SkMatrix_mapPoints">mapPoints</a><sup><a href="#SkMatrix_mapPoints_2">[2]</a></sup> <a href="#SkMatrix_mapVectors">mapVectors</a><sup><a href="#SkMatrix_mapVectors_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_mapXY_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
SkPoint mapXY(SkScalar x, SkScalar y) const
|
||||
</pre>
|
||||
@ -3395,7 +3423,7 @@ mapped <a href="SkPoint_Reference#Point">Point</a>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_mapPoints">mapPoints</a> <a href="#SkMatrix_mapVectors">mapVectors</a>
|
||||
<a href="#SkMatrix_mapPoints">mapPoints</a><sup><a href="#SkMatrix_mapPoints_2">[2]</a></sup> <a href="#SkMatrix_mapVectors">mapVectors</a><sup><a href="#SkMatrix_mapVectors_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -3449,10 +3477,12 @@ number of <a href="#Vector">Vectors</a> to transform</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_mapVector">mapVector</a> <a href="#SkMatrix_mapPoints">mapPoints</a> <a href="#SkMatrix_mapXY">mapXY</a>
|
||||
<a href="#SkMatrix_mapVector">mapVector</a><sup><a href="#SkMatrix_mapVector_2">[2]</a></sup> <a href="#SkMatrix_mapPoints">mapPoints</a><sup><a href="#SkMatrix_mapPoints_2">[2]</a></sup> <a href="#SkMatrix_mapXY">mapXY</a><sup><a href="#SkMatrix_mapXY_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_mapVectors_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void mapVectors(SkVector vecs[], int count) const
|
||||
</pre>
|
||||
@ -3495,7 +3525,7 @@ number of <a href="#Vector">Vectors</a> to transform</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_mapVector">mapVector</a> <a href="#SkMatrix_mapPoints">mapPoints</a> <a href="#SkMatrix_mapXY">mapXY</a>
|
||||
<a href="#SkMatrix_mapVector">mapVector</a><sup><a href="#SkMatrix_mapVector_2">[2]</a></sup> <a href="#SkMatrix_mapPoints">mapPoints</a><sup><a href="#SkMatrix_mapPoints_2">[2]</a></sup> <a href="#SkMatrix_mapXY">mapXY</a><sup><a href="#SkMatrix_mapXY_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -3538,10 +3568,12 @@ storage for mapped <a href="SkPoint_Reference#Vector">Vector</a></td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_mapVectors">mapVectors</a> <a href="#SkMatrix_mapPoints">mapPoints</a> <a href="#SkMatrix_mapXY">mapXY</a>
|
||||
<a href="#SkMatrix_mapVectors">mapVectors</a><sup><a href="#SkMatrix_mapVectors_2">[2]</a></sup> <a href="#SkMatrix_mapPoints">mapPoints</a><sup><a href="#SkMatrix_mapPoints_2">[2]</a></sup> <a href="#SkMatrix_mapXY">mapXY</a><sup><a href="#SkMatrix_mapXY_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_mapVector_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
SkVector mapVector(SkScalar dx, SkScalar dy) const
|
||||
</pre>
|
||||
@ -3580,7 +3612,7 @@ mapped <a href="SkPoint_Reference#Vector">Vector</a>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_mapVectors">mapVectors</a> <a href="#SkMatrix_mapPoints">mapPoints</a> <a href="#SkMatrix_mapXY">mapXY</a>
|
||||
<a href="#SkMatrix_mapVectors">mapVectors</a><sup><a href="#SkMatrix_mapVectors_2">[2]</a></sup> <a href="#SkMatrix_mapPoints">mapPoints</a><sup><a href="#SkMatrix_mapPoints_2">[2]</a></sup> <a href="#SkMatrix_mapXY">mapXY</a><sup><a href="#SkMatrix_mapXY_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -3615,10 +3647,12 @@ true if <a href="#SkMatrix_mapRect_dst">dst</a> is equivalent to mapped <a href=
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_mapPoints">mapPoints</a> <a href="#SkMatrix_rectStaysRect">rectStaysRect</a>
|
||||
<a href="#SkMatrix_mapPoints">mapPoints</a><sup><a href="#SkMatrix_mapPoints_2">[2]</a></sup> <a href="#SkMatrix_rectStaysRect">rectStaysRect</a>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkMatrix_mapRect_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
bool mapRect(SkRect* rect) const
|
||||
</pre>
|
||||
@ -3645,7 +3679,7 @@ true if result is equivalent to mapped src
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_mapRectScaleTranslate">mapRectScaleTranslate</a> <a href="#SkMatrix_mapPoints">mapPoints</a> <a href="#SkMatrix_rectStaysRect">rectStaysRect</a>
|
||||
<a href="#SkMatrix_mapRectScaleTranslate">mapRectScaleTranslate</a> <a href="#SkMatrix_mapPoints">mapPoints</a><sup><a href="#SkMatrix_mapPoints_2">[2]</a></sup> <a href="#SkMatrix_rectStaysRect">rectStaysRect</a>
|
||||
|
||||
---
|
||||
|
||||
@ -3695,7 +3729,7 @@ storage for mapped corner <a href="#Point">Points</a></td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_mapRect">mapRect</a> <a href="#SkMatrix_mapRectScaleTranslate">mapRectScaleTranslate</a>
|
||||
<a href="#SkMatrix_mapRect">mapRect</a><sup><a href="#SkMatrix_mapRect_2">[2]</a></sup> <a href="#SkMatrix_mapRectScaleTranslate">mapRectScaleTranslate</a>
|
||||
|
||||
---
|
||||
|
||||
@ -3725,7 +3759,7 @@ storage for bounds of mapped <a href="#Point">Points</a></td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_mapRect">mapRect</a> <a href="#SkMatrix_mapRectToQuad">mapRectToQuad</a> <a href="#SkMatrix_isScaleTranslate">isScaleTranslate</a> <a href="#SkMatrix_rectStaysRect">rectStaysRect</a>
|
||||
<a href="#SkMatrix_mapRect">mapRect</a><sup><a href="#SkMatrix_mapRect_2">[2]</a></sup> <a href="#SkMatrix_mapRectToQuad">mapRectToQuad</a> <a href="#SkMatrix_isScaleTranslate">isScaleTranslate</a> <a href="#SkMatrix_rectStaysRect">rectStaysRect</a>
|
||||
|
||||
---
|
||||
|
||||
@ -3759,7 +3793,7 @@ the area enclosed by the ellipse major and minor axes.</div></fiddle-embed></div
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_mapVector">mapVector</a>
|
||||
<a href="#SkMatrix_mapVector">mapVector</a><sup><a href="#SkMatrix_mapVector_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -4198,7 +4232,7 @@ success: true scale: 0.5, 0.25
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setScale">setScale</a> <a href="#SkMatrix_MakeScale">MakeScale</a>
|
||||
<a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup> <a href="#SkMatrix_MakeScale">MakeScale</a><sup><a href="#SkMatrix_MakeScale_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -4209,7 +4243,7 @@ success: true scale: 0.5, 0.25
|
||||
static const SkMatrix& I()
|
||||
</pre>
|
||||
|
||||
Returns reference to const identity <a href="#Matrix">Matrix</a>. Returned <a href="#Matrix">Matrix</a> is <a href="#SkMatrix_set">set</a> to:
|
||||
Returns reference to const identity <a href="#Matrix">Matrix</a>. Returned <a href="#Matrix">Matrix</a> is set to:
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
| 1 0 0 |
|
||||
@ -4246,7 +4280,7 @@ m2 == m3
|
||||
static const SkMatrix& InvalidMatrix()
|
||||
</pre>
|
||||
|
||||
Returns reference to a const <a href="#Matrix">Matrix</a> with invalid values. Returned <a href="#Matrix">Matrix</a> is <a href="#SkMatrix_set">set</a>
|
||||
Returns reference to a const <a href="#Matrix">Matrix</a> with invalid values. Returned <a href="#Matrix">Matrix</a> is set
|
||||
to:
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
@ -4395,7 +4429,7 @@ vertical translation to store</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkMatrix_setScale">setScale</a> <a href="#SkMatrix_preTranslate">preTranslate</a> <a href="#SkMatrix_postTranslate">postTranslate</a>
|
||||
<a href="#SkMatrix_setScale">setScale</a><sup><a href="#SkMatrix_setScale_2">[2]</a></sup> <a href="#SkMatrix_preTranslate">preTranslate</a> <a href="#SkMatrix_postTranslate">postTranslate</a>
|
||||
|
||||
---
|
||||
|
||||
|
@ -1025,14 +1025,14 @@ paint1 == paint2
|
||||
# <a name="Dither"></a> Dither
|
||||
<a href="#Dither">Dither</a> increases fidelity by adjusting the color of adjacent pixels.
|
||||
This can help to smooth color transitions and reducing banding in gradients.
|
||||
Dithering lessens visible banding from <a href="undocumented#SkColorType">kRGB 565 SkColorType</a>
|
||||
and <a href="undocumented#SkColorType">kRGBA 8888 SkColorType</a> gradients,
|
||||
and improves rendering into a <a href="undocumented#SkColorType">kRGB 565 SkColorType</a> <a href="SkSurface_Reference#Surface">Surface</a>.
|
||||
Dithering lessens visible banding from <a href="SkImageInfo_Reference#SkColorType">kRGB 565 SkColorType</a>
|
||||
and <a href="SkImageInfo_Reference#SkColorType">kRGBA 8888 SkColorType</a> gradients,
|
||||
and improves rendering into a <a href="SkImageInfo_Reference#SkColorType">kRGB 565 SkColorType</a> <a href="SkSurface_Reference#Surface">Surface</a>.
|
||||
|
||||
Dithering is always enabled for linear gradients drawing into
|
||||
<a href="undocumented#SkColorType">kRGB 565 SkColorType</a> <a href="SkSurface_Reference#Surface">Surface</a> and <a href="undocumented#SkColorType">kRGBA 8888 SkColorType</a> <a href="SkSurface_Reference#Surface">Surface</a>.
|
||||
<a href="#Dither">Dither</a> cannot be enabled for <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a> <a href="SkSurface_Reference#Surface">Surface</a> and
|
||||
<a href="undocumented#SkColorType">kRGBA F16 SkColorType</a> <a href="SkSurface_Reference#Surface">Surface</a>.
|
||||
<a href="SkImageInfo_Reference#SkColorType">kRGB 565 SkColorType</a> <a href="SkSurface_Reference#Surface">Surface</a> and <a href="SkImageInfo_Reference#SkColorType">kRGBA 8888 SkColorType</a> <a href="SkSurface_Reference#Surface">Surface</a>.
|
||||
<a href="#Dither">Dither</a> cannot be enabled for <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a> <a href="SkSurface_Reference#Surface">Surface</a> and
|
||||
<a href="SkImageInfo_Reference#SkColorType">kRGBA F16 SkColorType</a> <a href="SkSurface_Reference#Surface">Surface</a>.
|
||||
|
||||
<a href="#Dither">Dither</a> is disabled by default.
|
||||
<a href="#Dither">Dither</a> can be enabled by default by setting <a href="undocumented#SkPaintDefaults_Flags">SkPaintDefaults Flags</a> to <a href="#SkPaint_kDither_Flag">kDither Flag</a>
|
||||
@ -1113,7 +1113,7 @@ paint1 == paint2
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="undocumented#SkColorType">kRGB 565 SkColorType</a>
|
||||
<a href="SkImageInfo_Reference#SkColorType">kRGB 565 SkColorType</a>
|
||||
|
||||
---
|
||||
|
||||
@ -2721,6 +2721,8 @@ At the highest precision, the filled path has high fidelity compared to the orig
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPaint_getFillPath_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
bool getFillPath(const SkPath& src, SkPath* dst) const
|
||||
</pre>
|
||||
@ -4573,6 +4575,8 @@ advance width or height
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPaint_measureText_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
SkScalar measureText(const void* text, size_t length) const
|
||||
</pre>
|
||||
@ -5089,7 +5093,7 @@ fast computed bounds
|
||||
## toString
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void toString(SkString* str) const;
|
||||
void toString(SkString* str) const
|
||||
</pre>
|
||||
|
||||
Creates string representation of <a href="#Paint">Paint</a>. The representation is read by
|
||||
|
@ -76,7 +76,7 @@ makes them visible.
|
||||
<a href="#Path">Paths</a> contain geometry. <a href="#Path">Paths</a> may be empty, or contain one or more <a href="#Verb">Verbs</a> that
|
||||
outline a figure. <a href="#Path">Path</a> always starts with a move verb to a Cartesian_Coordinate,
|
||||
and may be followed by additional verbs that add lines or curves.
|
||||
Adding a <a href="#SkPath_close">close</a> verb makes the geometry into a continuous loop, a closed contour.
|
||||
Adding a close verb makes the geometry into a continuous loop, a closed contour.
|
||||
<a href="#Path">Paths</a> may contain any number of contours, each beginning with a move verb.
|
||||
|
||||
<a href="#Path">Path</a> contours may contain only a move verb, or may also contain lines,
|
||||
@ -189,7 +189,7 @@ Internally, <a href="#Path">Path</a> lazily computes metrics likes bounds and co
|
||||
| <a href="#SkPath_getConvexity">getConvexity</a> | returns geometry convexity, computing if necessary |
|
||||
| <a href="#SkPath_getConvexityOrUnknown">getConvexityOrUnknown</a> | returns geometry convexity if known |
|
||||
| <a href="#SkPath_getFillType">getFillType</a> | returns <a href="#Fill_Type">Fill Type</a>: winding, even-odd, inverse |
|
||||
| <a href="#SkPath_getGenerationID">getGenerationID</a> | returns <a href="#SkPath_unique">unique</a> ID |
|
||||
| <a href="#SkPath_getGenerationID">getGenerationID</a> | returns unique ID |
|
||||
| <a href="#SkPath_getLastPt">getLastPt</a> | returns <a href="#Last_Point">Last Point</a> |
|
||||
| <a href="#SkPath_getPoint">getPoint</a> | returns entry from <a href="#Point_Array">Point Array</a> |
|
||||
| <a href="#SkPath_getPoints">getPoints</a> | returns <a href="#Point_Array">Point Array</a> |
|
||||
@ -200,7 +200,7 @@ Internally, <a href="#Path">Path</a> lazily computes metrics likes bounds and co
|
||||
| <a href="#SkPath_isConvex">isConvex</a> | returns if geometry is convex |
|
||||
| <a href="#SkPath_isEmpty">isEmpty</a> | returns if verb count is zero |
|
||||
| <a href="#SkPath_isFinite">isFinite</a> | returns if all <a href="SkPoint_Reference#Point">Point</a> values are finite |
|
||||
| <a href="#SkPath_isInterpolatable">isInterpolatable</a> | returns if pair <a href="#SkPath_contains">contains</a> equal counts of <a href="#Verb_Array">Verb Array</a> and <a href="#Weight">Weights</a> |
|
||||
| <a href="#SkPath_isInterpolatable">isInterpolatable</a> | returns if pair contains equal counts of <a href="#Verb_Array">Verb Array</a> and <a href="#Weight">Weights</a> |
|
||||
| <a href="#SkPath_isInverseFillType">isInverseFillType</a> | returns if <a href="#Fill_Type">Fill Type</a> fills outside geometry |
|
||||
| <a href="#SkPath_isLastContourClosed">isLastContourClosed</a> | returns if final <a href="#Contour">Contour</a> forms a loop |
|
||||
| <a href="#SkPath_isLine">isLine</a> | returns if describes <a href="undocumented#Line">Line</a> |
|
||||
@ -331,7 +331,7 @@ enum <a href="#Direction">Direction</a> {
|
||||
};</pre>
|
||||
|
||||
<a href="#Direction">Direction</a> describes whether <a href="#Contour">Contour</a> is clockwise or counterclockwise.
|
||||
When <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> multiple overlapping <a href="#Contour">Contours</a>, <a href="#Direction">Direction</a> together with
|
||||
When <a href="#Path">Path</a> contains multiple overlapping <a href="#Contour">Contours</a>, <a href="#Direction">Direction</a> together with
|
||||
<a href="#Fill_Type">Fill Type</a> determines whether overlaps are filled or form holes.
|
||||
|
||||
<a href="#Direction">Direction</a> also determines how <a href="#Contour">Contour</a> is measured. For instance, dashing
|
||||
@ -359,7 +359,7 @@ travel counterclockwise.
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_arcTo">arcTo</a> <a href="#SkPath_rArcTo">rArcTo</a> <a href="#SkPath_isRect">isRect</a> <a href="#SkPath_isNestedFillRects">isNestedFillRects</a> <a href="#SkPath_addRect">addRect</a> <a href="#SkPath_addOval">addOval</a>
|
||||
<a href="#SkPath_arcTo">arcTo</a><sup><a href="#SkPath_arcTo_2">[2]</a></sup><sup><a href="#SkPath_arcTo_3">[3]</a></sup><sup><a href="#SkPath_arcTo_4">[4]</a></sup><sup><a href="#SkPath_arcTo_5">[5]</a></sup> <a href="#SkPath_rArcTo">rArcTo</a> <a href="#SkPath_isRect">isRect</a> <a href="#SkPath_isNestedFillRects">isNestedFillRects</a> <a href="#SkPath_addRect">addRect</a><sup><a href="#SkPath_addRect_2">[2]</a></sup><sup><a href="#SkPath_addRect_3">[3]</a></sup> <a href="#SkPath_addOval">addOval</a><sup><a href="#SkPath_addOval_2">[2]</a></sup>
|
||||
|
||||
|
||||
|
||||
@ -600,7 +600,7 @@ Return true if <a href="#Path">Paths</a> contain equal <a href="#Verb">Verbs</a>
|
||||
If <a href="#Path">Paths</a> contain one or more <a href="#Conic">Conics</a>, the <a href="#Weight">Weights</a> must match.
|
||||
|
||||
<a href="#SkPath_conicTo">conicTo</a> may add different <a href="#Verb">Verbs</a> depending on <a href="#Conic_Weight">Conic Weight</a>, so it is not
|
||||
trivial to <a href="#SkPath_interpolate">interpolate</a> a pair of <a href="#Path">Paths</a> containing <a href="#Conic">Conics</a> with different
|
||||
trivial to interpolate a pair of <a href="#Path">Paths</a> containing <a href="#Conic">Conics</a> with different
|
||||
<a href="#Conic_Weight">Conic Weight</a> values.
|
||||
|
||||
### Parameters
|
||||
@ -876,7 +876,7 @@ enum <a href="#Convexity">Convexity</a> : uint8_t {
|
||||
<a href="#SkPath_kConcave_Convexity">kConcave Convexity</a>,
|
||||
};</pre>
|
||||
|
||||
<a href="#Path">Path</a> is convex if it <a href="#SkPath_contains">contains</a> one <a href="#Contour">Contour</a> and <a href="#Contour">Contour</a> loops no more than
|
||||
<a href="#Path">Path</a> is convex if it contains one <a href="#Contour">Contour</a> and <a href="#Contour">Contour</a> loops no more than
|
||||
360 degrees, and <a href="#Contour">Contour</a> angles all have same <a href="#SkPath_Direction">Direction</a>. Convex <a href="#Path">Path</a>
|
||||
may have better performance and require fewer resources on <a href="undocumented#GPU_Surface">GPU Surface</a>.
|
||||
|
||||
@ -1078,7 +1078,7 @@ true if <a href="#Path">Path</a> was constructed by method that reduces to <a hr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="undocumented#Oval">Oval</a> <a href="#SkPath_addCircle">addCircle</a> <a href="#SkPath_addOval">addOval</a>
|
||||
<a href="undocumented#Oval">Oval</a> <a href="#SkPath_addCircle">addCircle</a> <a href="#SkPath_addOval">addOval</a><sup><a href="#SkPath_addOval_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1115,7 +1115,7 @@ storage for <a href="#SkPath_isRRect_start">start</a> of <a href="undocumented#R
|
||||
|
||||
### Return Value
|
||||
|
||||
true if <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> only <a href="undocumented#Round_Rect">Round Rect</a>
|
||||
true if <a href="#Path">Path</a> contains only <a href="undocumented#Round_Rect">Round Rect</a>
|
||||
|
||||
### Example
|
||||
|
||||
@ -1124,7 +1124,7 @@ rectangle starts and its direction.</div></fiddle-embed></div>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="undocumented#Round_Rect">Round Rect</a> <a href="#SkPath_addRoundRect">addRoundRect</a> <a href="#SkPath_addRRect">addRRect</a>
|
||||
<a href="undocumented#Round_Rect">Round Rect</a> <a href="#SkPath_addRoundRect">addRoundRect</a><sup><a href="#SkPath_addRoundRect_2">[2]</a></sup> <a href="#SkPath_addRRect">addRRect</a><sup><a href="#SkPath_addRRect_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1182,11 +1182,11 @@ bool isEmpty() const
|
||||
</pre>
|
||||
|
||||
Empty <a href="#Path">Path</a> may have <a href="#SkPath_FillType">FillType</a> but has no <a href="SkPoint_Reference#SkPoint">SkPoint</a>, <a href="#SkPath_Verb">Verb</a>, or <a href="#Conic_Weight">Conic Weight</a>.
|
||||
<a href="#SkPath_empty_constructor">SkPath()</a> constructs empty <a href="#Path">Path</a>; <a href="#SkPath_reset">reset</a> and (<a href="#SkPath_rewind">rewind</a>) make <a href="#Path">Path</a> empty.
|
||||
<a href="#SkPath_empty_constructor">SkPath()</a> constructs empty <a href="#Path">Path</a>; <a href="#SkPath_reset">reset</a> and (rewind) make <a href="#Path">Path</a> empty.
|
||||
|
||||
### Return Value
|
||||
|
||||
true if the path <a href="#SkPath_contains">contains</a> no <a href="#SkPath_Verb">Verb</a> array
|
||||
true if the path contains no <a href="#SkPath_Verb">Verb</a> array
|
||||
|
||||
### Example
|
||||
|
||||
@ -1510,9 +1510,9 @@ true if <a href="#Cubic">Cubic</a> is degenerate; its length is effectively zero
|
||||
bool isLine(SkPoint line[2]) const
|
||||
</pre>
|
||||
|
||||
Returns true if <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> only one <a href="undocumented#Line">Line</a>;
|
||||
Returns true if <a href="#Path">Path</a> contains only one <a href="undocumented#Line">Line</a>;
|
||||
<a href="#Verb">Path Verb</a> array has two entries: <a href="#SkPath_kMove_Verb">kMove Verb</a>, <a href="#SkPath_kLine_Verb">kLine Verb</a>.
|
||||
If <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> one <a href="undocumented#Line">Line</a> and <a href="#SkPath_isLine_line">line</a> is not nullptr, <a href="#SkPath_isLine_line">line</a> is set to
|
||||
If <a href="#Path">Path</a> contains one <a href="undocumented#Line">Line</a> and <a href="#SkPath_isLine_line">line</a> is not nullptr, <a href="#SkPath_isLine_line">line</a> is set to
|
||||
<a href="undocumented#Line">Line</a> start point and <a href="undocumented#Line">Line</a> end point.
|
||||
Returns false if <a href="#Path">Path</a> is not one <a href="undocumented#Line">Line</a>; <a href="#SkPath_isLine_line">line</a> is unaltered.
|
||||
|
||||
@ -1525,7 +1525,7 @@ storage for <a href="undocumented#Line">Line</a>. May be nullptr</td>
|
||||
|
||||
### Return Value
|
||||
|
||||
true if <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> exactly one <a href="undocumented#Line">Line</a>
|
||||
true if <a href="#Path">Path</a> contains exactly one <a href="undocumented#Line">Line</a>
|
||||
|
||||
### Example
|
||||
|
||||
@ -1546,7 +1546,7 @@ second move is not line
|
||||
|
||||
## <a name="Point_Array"></a> Point Array
|
||||
|
||||
<a href="#Point_Array">Point Array</a> <a href="#SkPath_contains">contains</a> <a href="#Point">Points</a> satisfying the allocated <a href="#Point">Points</a> for
|
||||
<a href="#Point_Array">Point Array</a> contains <a href="#Point">Points</a> satisfying the allocated <a href="#Point">Points</a> for
|
||||
each <a href="#SkPath_Verb">Verb</a> in <a href="#Verb_Array">Verb Array</a>. For instance, <a href="#Path">Path</a> containing one <a href="#Contour">Contour</a> with <a href="undocumented#Line">Line</a>
|
||||
and <a href="#Quad">Quad</a> is described by <a href="#Verb_Array">Verb Array</a>: Verb::kMoveTo, Verb::kLineTo, Verb::kQuadTo; and
|
||||
one <a href="SkPoint_Reference#Point">Point</a> for move, one <a href="SkPoint_Reference#Point">Point</a> for <a href="undocumented#Line">Line</a>, two <a href="#Point">Points</a> for <a href="#Quad">Quad</a>; totaling four <a href="#Point">Points</a>.
|
||||
@ -1812,7 +1812,7 @@ const SkRect& getBounds() const
|
||||
</pre>
|
||||
|
||||
Returns minimum and maximum x and y values of <a href="#Point_Array">Point Array</a>.
|
||||
Returns (0, 0, 0, 0) if <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> no points. Returned bounds width and height may
|
||||
Returns (0, 0, 0, 0) if <a href="#Path">Path</a> contains no points. Returned bounds width and height may
|
||||
be larger or smaller than area affected when <a href="#Path">Path</a> is drawn.
|
||||
|
||||
<a href="SkRect_Reference#Rect">Rect</a> returned includes all <a href="#Point">Points</a> added to <a href="#Path">Path</a>, including <a href="#Point">Points</a> associated with
|
||||
@ -1886,15 +1886,15 @@ SkRect computeTightBounds() const
|
||||
</pre>
|
||||
|
||||
Returns minimum and maximum x and y values of the lines and curves in <a href="#Path">Path</a>.
|
||||
Returns (0, 0, 0, 0) if <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> no points.
|
||||
Returns (0, 0, 0, 0) if <a href="#Path">Path</a> contains no points.
|
||||
Returned bounds width and height may be larger or smaller than area affected
|
||||
when <a href="#Path">Path</a> is drawn.
|
||||
|
||||
Includes <a href="#Point">Points</a> associated with <a href="#SkPath_kMove_Verb">kMove Verb</a> that define empty
|
||||
<a href="#Contour">Contours</a>.
|
||||
|
||||
Behaves identically to <a href="#SkPath_getBounds">getBounds</a> when <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a>
|
||||
only lines. If <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> curves, computed bounds includes
|
||||
Behaves identically to <a href="#SkPath_getBounds">getBounds</a> when <a href="#Path">Path</a> contains
|
||||
only lines. If <a href="#Path">Path</a> contains curves, computed bounds includes
|
||||
the maximum extent of the <a href="#Quad">Quad</a>, <a href="#Conic">Conic</a>, or <a href="#Cubic">Cubic</a>; is slower than <a href="#SkPath_getBounds">getBounds</a>;
|
||||
and unlike <a href="#SkPath_getBounds">getBounds</a>, does not cache the result.
|
||||
|
||||
@ -2010,10 +2010,12 @@ Adds beginning of <a href="#Contour">Contour</a> at <a href="SkPoint_Reference#P
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_lineTo">lineTo</a> <a href="#SkPath_rMoveTo">rMoveTo</a> <a href="#SkPath_quadTo">quadTo</a> <a href="#SkPath_conicTo">conicTo</a> <a href="#SkPath_cubicTo">cubicTo</a> <a href="#SkPath_close">close</a>
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_lineTo">lineTo</a><sup><a href="#SkPath_lineTo_2">[2]</a></sup> <a href="#SkPath_rMoveTo">rMoveTo</a> <a href="#SkPath_quadTo">quadTo</a><sup><a href="#SkPath_quadTo_2">[2]</a></sup> <a href="#SkPath_conicTo">conicTo</a><sup><a href="#SkPath_conicTo_2">[2]</a></sup> <a href="#SkPath_cubicTo">cubicTo</a><sup><a href="#SkPath_cubicTo_2">[2]</a></sup> <a href="#SkPath_close">close</a>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_moveTo_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void moveTo(const SkPoint& p)
|
||||
</pre>
|
||||
@ -2033,7 +2035,7 @@ contour start</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_lineTo">lineTo</a> <a href="#SkPath_rMoveTo">rMoveTo</a> <a href="#SkPath_quadTo">quadTo</a> <a href="#SkPath_conicTo">conicTo</a> <a href="#SkPath_cubicTo">cubicTo</a> <a href="#SkPath_close">close</a>
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_lineTo">lineTo</a><sup><a href="#SkPath_lineTo_2">[2]</a></sup> <a href="#SkPath_rMoveTo">rMoveTo</a> <a href="#SkPath_quadTo">quadTo</a><sup><a href="#SkPath_quadTo_2">[2]</a></sup> <a href="#SkPath_conicTo">conicTo</a><sup><a href="#SkPath_conicTo_2">[2]</a></sup> <a href="#SkPath_cubicTo">cubicTo</a><sup><a href="#SkPath_cubicTo_2">[2]</a></sup> <a href="#SkPath_close">close</a>
|
||||
|
||||
---
|
||||
|
||||
@ -2046,15 +2048,15 @@ void rMoveTo(SkScalar dx, SkScalar dy)
|
||||
|
||||
Adds beginning of <a href="#Contour">Contour</a> relative to <a href="#Last_Point">Last Point</a>.
|
||||
If <a href="#Path">Path</a> is empty, starts <a href="#Contour">Contour</a> at (<a href="#SkPath_rMoveTo_dx">dx</a>, <a href="#SkPath_rMoveTo_dy">dy</a>).
|
||||
Otherwise, start <a href="#Contour">Contour</a> at <a href="#Last_Point">Last Point</a> <a href="#SkPath_offset">offset</a> by (<a href="#SkPath_rMoveTo_dx">dx</a>, <a href="#SkPath_rMoveTo_dy">dy</a>).
|
||||
Otherwise, start <a href="#Contour">Contour</a> at <a href="#Last_Point">Last Point</a> offset by (<a href="#SkPath_rMoveTo_dx">dx</a>, <a href="#SkPath_rMoveTo_dy">dy</a>).
|
||||
Function name stands for "relative move to".
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkPath_rMoveTo_dx"> <code><strong>dx </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to <a href="#Contour">Contour</a> start x</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to <a href="#Contour">Contour</a> start x</td>
|
||||
</tr> <tr> <td><a name="SkPath_rMoveTo_dy"> <code><strong>dy </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> y to <a href="#Contour">Contour</a> start y</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> y to <a href="#Contour">Contour</a> start y</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -2064,7 +2066,7 @@ Function name stands for "relative move to".
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_lineTo">lineTo</a> <a href="#SkPath_moveTo">moveTo</a> <a href="#SkPath_quadTo">quadTo</a> <a href="#SkPath_conicTo">conicTo</a> <a href="#SkPath_cubicTo">cubicTo</a> <a href="#SkPath_close">close</a>
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_lineTo">lineTo</a><sup><a href="#SkPath_lineTo_2">[2]</a></sup> <a href="#SkPath_moveTo">moveTo</a><sup><a href="#SkPath_moveTo_2">[2]</a></sup> <a href="#SkPath_quadTo">quadTo</a><sup><a href="#SkPath_quadTo_2">[2]</a></sup> <a href="#SkPath_conicTo">conicTo</a><sup><a href="#SkPath_conicTo_2">[2]</a></sup> <a href="#SkPath_cubicTo">cubicTo</a><sup><a href="#SkPath_cubicTo_2">[2]</a></sup> <a href="#SkPath_close">close</a>
|
||||
|
||||
---
|
||||
|
||||
@ -2096,10 +2098,12 @@ end of added <a href="undocumented#Line">Line</a> in <a href="#SkPath_lineTo_y">
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a> <a href="#SkPath_rLineTo">rLineTo</a> <a href="#SkPath_addRect">addRect</a>
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a><sup><a href="#SkPath_moveTo_2">[2]</a></sup> <a href="#SkPath_rLineTo">rLineTo</a> <a href="#SkPath_addRect">addRect</a><sup><a href="#SkPath_addRect_2">[2]</a></sup><sup><a href="#SkPath_addRect_3">[3]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_lineTo_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void lineTo(const SkPoint& p)
|
||||
</pre>
|
||||
@ -2123,7 +2127,7 @@ end <a href="SkPoint_Reference#Point">Point</a> of added <a href="undocumented#L
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a> <a href="#SkPath_rLineTo">rLineTo</a> <a href="#SkPath_addRect">addRect</a>
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a><sup><a href="#SkPath_moveTo_2">[2]</a></sup> <a href="#SkPath_rLineTo">rLineTo</a> <a href="#SkPath_addRect">addRect</a><sup><a href="#SkPath_addRect_2">[2]</a></sup><sup><a href="#SkPath_addRect_3">[3]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2145,9 +2149,9 @@ Function name stands for "relative line to".
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkPath_rLineTo_dx"> <code><strong>dx </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to <a href="undocumented#Line">Line</a> end x</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to <a href="undocumented#Line">Line</a> end x</td>
|
||||
</tr> <tr> <td><a name="SkPath_rLineTo_dy"> <code><strong>dy </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> y to <a href="undocumented#Line">Line</a> end y</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> y to <a href="undocumented#Line">Line</a> end y</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -2157,7 +2161,7 @@ Function name stands for "relative line to".
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a> <a href="#SkPath_lineTo">lineTo</a> <a href="#SkPath_addRect">addRect</a>
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a><sup><a href="#SkPath_moveTo_2">[2]</a></sup> <a href="#SkPath_lineTo">lineTo</a><sup><a href="#SkPath_lineTo_2">[2]</a></sup> <a href="#SkPath_addRect">addRect</a><sup><a href="#SkPath_addRect_2">[2]</a></sup><sup><a href="#SkPath_addRect_3">[3]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2214,10 +2218,12 @@ end <a href="SkPoint_Reference#Point">Point</a> of <a href="#Quad">Quad</a> in y
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a> <a href="#SkPath_conicTo">conicTo</a> <a href="#SkPath_rQuadTo">rQuadTo</a>
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a><sup><a href="#SkPath_moveTo_2">[2]</a></sup> <a href="#SkPath_conicTo">conicTo</a><sup><a href="#SkPath_conicTo_2">[2]</a></sup> <a href="#SkPath_rQuadTo">rQuadTo</a>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_quadTo_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void quadTo(const SkPoint& p1, const SkPoint& p2)
|
||||
</pre>
|
||||
@ -2245,7 +2251,7 @@ end <a href="SkPoint_Reference#Point">Point</a> of added <a href="#Quad">Quad</a
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a> <a href="#SkPath_conicTo">conicTo</a> <a href="#SkPath_rQuadTo">rQuadTo</a>
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a><sup><a href="#SkPath_moveTo_2">[2]</a></sup> <a href="#SkPath_conicTo">conicTo</a><sup><a href="#SkPath_conicTo_2">[2]</a></sup> <a href="#SkPath_rQuadTo">rQuadTo</a>
|
||||
|
||||
---
|
||||
|
||||
@ -2270,13 +2276,13 @@ Function name stands for "relative quad to".
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkPath_rQuadTo_dx1"> <code><strong>dx1 </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to <a href="#Quad">Quad</a> control x</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to <a href="#Quad">Quad</a> control x</td>
|
||||
</tr> <tr> <td><a name="SkPath_rQuadTo_dy1"> <code><strong>dy1 </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to <a href="#Quad">Quad</a> control y</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to <a href="#Quad">Quad</a> control y</td>
|
||||
</tr> <tr> <td><a name="SkPath_rQuadTo_dx2"> <code><strong>dx2 </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to <a href="#Quad">Quad</a> end x</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to <a href="#Quad">Quad</a> end x</td>
|
||||
</tr> <tr> <td><a name="SkPath_rQuadTo_dy2"> <code><strong>dy2 </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to <a href="#Quad">Quad</a> end y</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to <a href="#Quad">Quad</a> end y</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -2286,7 +2292,7 @@ Function name stands for "relative quad to".
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a> <a href="#SkPath_conicTo">conicTo</a> <a href="#SkPath_quadTo">quadTo</a>
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a><sup><a href="#SkPath_moveTo_2">[2]</a></sup> <a href="#SkPath_conicTo">conicTo</a><sup><a href="#SkPath_conicTo_2">[2]</a></sup> <a href="#SkPath_quadTo">quadTo</a><sup><a href="#SkPath_quadTo_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2399,10 +2405,12 @@ top curve is hyperbolic.</div></fiddle-embed></div>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_rConicTo">rConicTo</a> <a href="#SkPath_arcTo">arcTo</a> <a href="#SkPath_addArc">addArc</a> <a href="#SkPath_quadTo">quadTo</a>
|
||||
<a href="#SkPath_rConicTo">rConicTo</a> <a href="#SkPath_arcTo">arcTo</a><sup><a href="#SkPath_arcTo_2">[2]</a></sup><sup><a href="#SkPath_arcTo_3">[3]</a></sup><sup><a href="#SkPath_arcTo_4">[4]</a></sup><sup><a href="#SkPath_arcTo_5">[5]</a></sup> <a href="#SkPath_addArc">addArc</a> <a href="#SkPath_quadTo">quadTo</a><sup><a href="#SkPath_quadTo_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_conicTo_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void conicTo(const SkPoint& p1, const SkPoint& p2, SkScalar w)
|
||||
</pre>
|
||||
@ -2440,7 +2448,7 @@ the <a href="#Conic_Weight">Conic Weight</a> also increases, but remains smaller
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_rConicTo">rConicTo</a> <a href="#SkPath_arcTo">arcTo</a> <a href="#SkPath_addArc">addArc</a> <a href="#SkPath_quadTo">quadTo</a>
|
||||
<a href="#SkPath_rConicTo">rConicTo</a> <a href="#SkPath_arcTo">arcTo</a><sup><a href="#SkPath_arcTo_2">[2]</a></sup><sup><a href="#SkPath_arcTo_3">[3]</a></sup><sup><a href="#SkPath_arcTo_4">[4]</a></sup><sup><a href="#SkPath_arcTo_5">[5]</a></sup> <a href="#SkPath_addArc">addArc</a> <a href="#SkPath_quadTo">quadTo</a><sup><a href="#SkPath_quadTo_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2471,13 +2479,13 @@ Function name stands for "relative conic to".
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkPath_rConicTo_dx1"> <code><strong>dx1 </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to <a href="#Conic">Conic</a> control x</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to <a href="#Conic">Conic</a> control x</td>
|
||||
</tr> <tr> <td><a name="SkPath_rConicTo_dy1"> <code><strong>dy1 </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to <a href="#Conic">Conic</a> control y</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to <a href="#Conic">Conic</a> control y</td>
|
||||
</tr> <tr> <td><a name="SkPath_rConicTo_dx2"> <code><strong>dx2 </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to <a href="#Conic">Conic</a> end x</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to <a href="#Conic">Conic</a> end x</td>
|
||||
</tr> <tr> <td><a name="SkPath_rConicTo_dy2"> <code><strong>dy2 </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to <a href="#Conic">Conic</a> end y</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to <a href="#Conic">Conic</a> end y</td>
|
||||
</tr> <tr> <td><a name="SkPath_rConicTo_w"> <code><strong>w </strong></code> </a></td> <td>
|
||||
weight of added <a href="#Conic">Conic</a></td>
|
||||
</tr>
|
||||
@ -2489,7 +2497,7 @@ weight of added <a href="#Conic">Conic</a></td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_conicTo">conicTo</a> <a href="#SkPath_arcTo">arcTo</a> <a href="#SkPath_addArc">addArc</a> <a href="#SkPath_quadTo">quadTo</a>
|
||||
<a href="#SkPath_conicTo">conicTo</a><sup><a href="#SkPath_conicTo_2">[2]</a></sup> <a href="#SkPath_arcTo">arcTo</a><sup><a href="#SkPath_arcTo_2">[2]</a></sup><sup><a href="#SkPath_arcTo_3">[3]</a></sup><sup><a href="#SkPath_arcTo_4">[4]</a></sup><sup><a href="#SkPath_arcTo_5">[5]</a></sup> <a href="#SkPath_addArc">addArc</a> <a href="#SkPath_quadTo">quadTo</a><sup><a href="#SkPath_quadTo_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2540,10 +2548,12 @@ end <a href="SkPoint_Reference#Point">Point</a> of <a href="#Cubic">Cubic</a> in
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a> <a href="#SkPath_rCubicTo">rCubicTo</a> <a href="#SkPath_quadTo">quadTo</a>
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a><sup><a href="#SkPath_moveTo_2">[2]</a></sup> <a href="#SkPath_rCubicTo">rCubicTo</a> <a href="#SkPath_quadTo">quadTo</a><sup><a href="#SkPath_quadTo_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_cubicTo_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void cubicTo(const SkPoint& p1, const SkPoint& p2, const SkPoint& p3)
|
||||
</pre>
|
||||
@ -2573,7 +2583,7 @@ end <a href="SkPoint_Reference#Point">Point</a> of <a href="#Cubic">Cubic</a></t
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a> <a href="#SkPath_rCubicTo">rCubicTo</a> <a href="#SkPath_quadTo">quadTo</a>
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a><sup><a href="#SkPath_moveTo_2">[2]</a></sup> <a href="#SkPath_rCubicTo">rCubicTo</a> <a href="#SkPath_quadTo">quadTo</a><sup><a href="#SkPath_quadTo_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2599,17 +2609,17 @@ Function name stands for "relative cubic to".
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkPath_rCubicTo_x1"> <code><strong>x1 </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to first <a href="#Cubic">Cubic</a> control x</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to first <a href="#Cubic">Cubic</a> control x</td>
|
||||
</tr> <tr> <td><a name="SkPath_rCubicTo_y1"> <code><strong>y1 </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to first <a href="#Cubic">Cubic</a> control y</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to first <a href="#Cubic">Cubic</a> control y</td>
|
||||
</tr> <tr> <td><a name="SkPath_rCubicTo_x2"> <code><strong>x2 </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to second <a href="#Cubic">Cubic</a> control x</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to second <a href="#Cubic">Cubic</a> control x</td>
|
||||
</tr> <tr> <td><a name="SkPath_rCubicTo_y2"> <code><strong>y2 </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to second <a href="#Cubic">Cubic</a> control y</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to second <a href="#Cubic">Cubic</a> control y</td>
|
||||
</tr> <tr> <td><a name="SkPath_rCubicTo_x3"> <code><strong>x3 </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to <a href="#Cubic">Cubic</a> end x</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to <a href="#Cubic">Cubic</a> end x</td>
|
||||
</tr> <tr> <td><a name="SkPath_rCubicTo_y3"> <code><strong>y3 </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> from <a href="#Last_Point">Last Point</a> x to <a href="#Cubic">Cubic</a> end y</td>
|
||||
offset from <a href="#Last_Point">Last Point</a> x to <a href="#Cubic">Cubic</a> end y</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -2619,7 +2629,7 @@ Function name stands for "relative cubic to".
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a> <a href="#SkPath_cubicTo">cubicTo</a> <a href="#SkPath_quadTo">quadTo</a>
|
||||
<a href="#Contour">Contour</a> <a href="#SkPath_moveTo">moveTo</a><sup><a href="#SkPath_moveTo_2">[2]</a></sup> <a href="#SkPath_cubicTo">cubicTo</a><sup><a href="#SkPath_cubicTo_2">[2]</a></sup> <a href="#SkPath_quadTo">quadTo</a><sup><a href="#SkPath_quadTo_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2712,10 +2722,12 @@ is not empty.</div></fiddle-embed></div>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_addArc">addArc</a> <a href="#SkCanvas_drawArc">SkCanvas::drawArc</a> <a href="#SkPath_conicTo">conicTo</a>
|
||||
<a href="#SkPath_addArc">addArc</a> <a href="#SkCanvas_drawArc">SkCanvas::drawArc</a> <a href="#SkPath_conicTo">conicTo</a><sup><a href="#SkPath_conicTo_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_arcTo_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void arcTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar radius)
|
||||
</pre>
|
||||
@ -2773,10 +2785,12 @@ conic (79.2893,20),(200,20),(114.645,105.355) weight 0.382683
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_conicTo">conicTo</a>
|
||||
<a href="#SkPath_conicTo">conicTo</a><sup><a href="#SkPath_conicTo_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_arcTo_3"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void arcTo(const SkPoint p1, const SkPoint p2, SkScalar radius)
|
||||
</pre>
|
||||
@ -2822,7 +2836,7 @@ line (156,20),(200,20)
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_conicTo">conicTo</a>
|
||||
<a href="#SkPath_conicTo">conicTo</a><sup><a href="#SkPath_conicTo_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -2856,7 +2870,11 @@ and counterclockwise is blue.</div></fiddle-embed></div>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_arcTo">arcTo</a> <a href="#SkPath_Direction">Direction</a>
|
||||
<a href="#SkPath_arcTo">arcTo</a><sup><a href="#SkPath_arcTo_2">[2]</a></sup><sup><a href="#SkPath_arcTo_3">[3]</a></sup><sup><a href="#SkPath_arcTo_4">[4]</a></sup><sup><a href="#SkPath_arcTo_5">[5]</a></sup> <a href="#SkPath_Direction">Direction</a>
|
||||
|
||||
|
||||
|
||||
<a name="SkPath_arcTo_4"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void arcTo(SkScalar rx, SkScalar ry, SkScalar xAxisRotate, ArcSize largeArc, Direction sweep,
|
||||
@ -2907,6 +2925,8 @@ end of <a href="#Arc">Arc</a></td>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_arcTo_5"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void arcTo(const SkPoint r, SkScalar xAxisRotate, ArcSize largeArc, Direction sweep, const SkPoint xy)
|
||||
</pre>
|
||||
@ -2990,9 +3010,9 @@ chooses smaller or larger <a href="#Arc">Arc</a></td>
|
||||
</tr> <tr> <td><a name="SkPath_rArcTo_sweep"> <code><strong>sweep </strong></code> </a></td> <td>
|
||||
chooses clockwise or counterclockwise <a href="#Arc">Arc</a></td>
|
||||
</tr> <tr> <td><a name="SkPath_rArcTo_dx"> <code><strong>dx </strong></code> </a></td> <td>
|
||||
x <a href="#SkPath_offset">offset</a> end of <a href="#Arc">Arc</a> from last <a href="#Path">Path</a> <a href="SkPoint_Reference#Point">Point</a></td>
|
||||
x offset end of <a href="#Arc">Arc</a> from last <a href="#Path">Path</a> <a href="SkPoint_Reference#Point">Point</a></td>
|
||||
</tr> <tr> <td><a name="SkPath_rArcTo_dy"> <code><strong>dy </strong></code> </a></td> <td>
|
||||
y <a href="#SkPath_offset">offset</a> end of <a href="#Arc">Arc</a> from last <a href="#Path">Path</a> <a href="SkPoint_Reference#Point">Point</a></td>
|
||||
y offset end of <a href="#Arc">Arc</a> from last <a href="#Path">Path</a> <a href="SkPoint_Reference#Point">Point</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -3002,7 +3022,7 @@ y <a href="#SkPath_offset">offset</a> end of <a href="#Arc">Arc</a> from last <a
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_arcTo">arcTo</a> <a href="#SkPath_ArcSize">ArcSize</a> <a href="#SkPath_Direction">Direction</a>
|
||||
<a href="#SkPath_arcTo">arcTo</a><sup><a href="#SkPath_arcTo_2">[2]</a></sup><sup><a href="#SkPath_arcTo_3">[3]</a></sup><sup><a href="#SkPath_arcTo_4">[4]</a></sup><sup><a href="#SkPath_arcTo_5">[5]</a></sup> <a href="#SkPath_ArcSize">ArcSize</a> <a href="#SkPath_Direction">Direction</a>
|
||||
|
||||
---
|
||||
|
||||
@ -3214,7 +3234,7 @@ storage set to <a href="SkRect_Reference#Rect">Rect</a> <a href="#SkPath_isRect_
|
||||
|
||||
### Return Value
|
||||
|
||||
true if <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> <a href="SkRect_Reference#Rect">Rect</a>
|
||||
true if <a href="#Path">Path</a> contains <a href="SkRect_Reference#Rect">Rect</a>
|
||||
|
||||
### Example
|
||||
|
||||
@ -3265,7 +3285,7 @@ storage for <a href="#SkPath_Direction">Direction</a> pair; may be nullptr</td>
|
||||
|
||||
### Return Value
|
||||
|
||||
true if <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> nested <a href="SkRect_Reference#Rect">Rect</a> pair
|
||||
true if <a href="#Path">Path</a> contains nested <a href="SkRect_Reference#Rect">Rect</a> pair
|
||||
|
||||
### Example
|
||||
|
||||
@ -3318,6 +3338,8 @@ The right <a href="SkRect_Reference#Rect">Rect</a> dashes starting at the top-le
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_addRect_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void addRect(const SkRect& rect, Direction dir, unsigned start)
|
||||
</pre>
|
||||
@ -3356,6 +3378,8 @@ corner appended to <a href="#Path">Path</a>.</div></fiddle-embed></div>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_addRect_3"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void addRect(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom,
|
||||
Direction dir = kCW_Direction)
|
||||
@ -3426,6 +3450,8 @@ bounds of ellipse added</td>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_addOval_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void addOval(const SkRect& oval, Direction dir, unsigned start)
|
||||
</pre>
|
||||
@ -3497,7 +3523,7 @@ distance from center to edge</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkCanvas_drawCircle">SkCanvas::drawCircle</a> <a href="#SkPath_Direction">Direction</a> <a href="undocumented#Circle">Circle</a>
|
||||
<a href="#SkCanvas_drawCircle">SkCanvas::drawCircle</a><sup><a href="#SkCanvas_drawCircle_2">[2]</a></sup> <a href="#SkPath_Direction">Direction</a> <a href="undocumented#Circle">Circle</a>
|
||||
|
||||
---
|
||||
|
||||
@ -3536,7 +3562,7 @@ and <a href="#SkPath_addArc_startAngle">startAngle</a> modulo 90 is not zero.</d
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#Arc">Arc</a> <a href="#SkPath_arcTo">arcTo</a> <a href="#SkCanvas_drawArc">SkCanvas::drawArc</a>
|
||||
<a href="#Arc">Arc</a> <a href="#SkPath_arcTo">arcTo</a><sup><a href="#SkPath_arcTo_2">[2]</a></sup><sup><a href="#SkPath_arcTo_3">[3]</a></sup><sup><a href="#SkPath_arcTo_4">[4]</a></sup><sup><a href="#SkPath_arcTo_5">[5]</a></sup> <a href="#SkCanvas_drawArc">SkCanvas::drawArc</a>
|
||||
|
||||
---
|
||||
|
||||
@ -3574,18 +3600,20 @@ y-radius of rounded corners on the <a href="undocumented#Round_Rect">Round Rect<
|
||||
|
||||
### Example
|
||||
|
||||
<div><fiddle-embed name="24736f685f265cf533f1700c042db353"><div>If either radius is zero, path <a href="#SkPath_contains">contains</a> <a href="SkRect_Reference#Rect">Rect</a> and is drawn red.
|
||||
If sides are only radii, path <a href="#SkPath_contains">contains</a> <a href="undocumented#Oval">Oval</a> and is drawn blue.
|
||||
<div><fiddle-embed name="24736f685f265cf533f1700c042db353"><div>If either radius is zero, path contains <a href="SkRect_Reference#Rect">Rect</a> and is drawn red.
|
||||
If sides are only radii, path contains <a href="undocumented#Oval">Oval</a> and is drawn blue.
|
||||
All remaining path draws are convex, and are drawn in gray; no
|
||||
paths constructed from <a href="#SkPath_addRoundRect">addRoundRect</a> are concave, so none are
|
||||
drawn in green.</div></fiddle-embed></div>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_addRRect">addRRect</a> <a href="#SkCanvas_drawRoundRect">SkCanvas::drawRoundRect</a>
|
||||
<a href="#SkPath_addRRect">addRRect</a><sup><a href="#SkPath_addRRect_2">[2]</a></sup> <a href="#SkCanvas_drawRoundRect">SkCanvas::drawRoundRect</a>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_addRoundRect_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void addRoundRect(const SkRect& rect, const SkScalar radii[], Direction dir = kCW_Direction)
|
||||
</pre>
|
||||
@ -3632,7 +3660,7 @@ array of 8 <a href="undocumented#SkScalar">SkScalar</a> values, a radius pair fo
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_addRRect">addRRect</a> <a href="#SkCanvas_drawRoundRect">SkCanvas::drawRoundRect</a>
|
||||
<a href="#SkPath_addRRect">addRRect</a><sup><a href="#SkPath_addRRect_2">[2]</a></sup> <a href="#SkCanvas_drawRoundRect">SkCanvas::drawRoundRect</a>
|
||||
|
||||
---
|
||||
|
||||
@ -3665,10 +3693,12 @@ bounds and radii of rounded rectangle</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_addRoundRect">addRoundRect</a> <a href="#SkCanvas_drawRRect">SkCanvas::drawRRect</a>
|
||||
<a href="#SkPath_addRoundRect">addRoundRect</a><sup><a href="#SkPath_addRoundRect_2">[2]</a></sup> <a href="#SkCanvas_drawRRect">SkCanvas::drawRRect</a>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_addRRect_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void addRRect(const SkRRect& rrect, Direction dir, unsigned start)
|
||||
</pre>
|
||||
@ -3707,7 +3737,7 @@ index of initial point of <a href="undocumented#Round_Rect">Round Rect</a></td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_addRoundRect">addRoundRect</a> <a href="#SkCanvas_drawRRect">SkCanvas::drawRRect</a>
|
||||
<a href="#SkPath_addRoundRect">addRoundRect</a><sup><a href="#SkPath_addRoundRect_2">[2]</a></sup> <a href="#SkCanvas_drawRRect">SkCanvas::drawRRect</a>
|
||||
|
||||
---
|
||||
|
||||
@ -3720,7 +3750,7 @@ void addPoly(const SkPoint pts[], int count, bool close)
|
||||
|
||||
Add <a href="#Contour">Contour</a> created from <a href="undocumented#Line">Line</a> array, adding (<a href="#SkPath_addPoly_count">count</a> - 1) <a href="undocumented#Line">Line</a> segments.
|
||||
<a href="#Contour">Contour</a> added starts at <a href="#SkPath_addPoly_pts">pts</a>[0], then adds a line for every additional <a href="SkPoint_Reference#Point">Point</a>
|
||||
in <a href="#SkPath_addPoly_pts">pts</a> array. If <a href="#SkPath_close">close</a> is true,appends <a href="#SkPath_kClose_Verb">kClose Verb</a> to <a href="#Path">Path</a>, connecting
|
||||
in <a href="#SkPath_addPoly_pts">pts</a> array. If close is true,appends <a href="#SkPath_kClose_Verb">kClose Verb</a> to <a href="#Path">Path</a>, connecting
|
||||
<a href="#SkPath_addPoly_pts">pts</a>[<a href="#SkPath_addPoly_count">count</a> - 1] and <a href="#SkPath_addPoly_pts">pts</a>[0].
|
||||
|
||||
If <a href="#SkPath_addPoly_count">count</a> is zero, append <a href="#SkPath_kMove_Verb">kMove Verb</a> to path.
|
||||
@ -3779,7 +3809,7 @@ The top right composition is made up of one contour; the other three have two.</
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_addPath">addPath</a> <a href="#SkPath_reverseAddPath">reverseAddPath</a>
|
||||
<a href="#SkPath_addPath">addPath</a><sup><a href="#SkPath_addPath_2">[2]</a></sup><sup><a href="#SkPath_addPath_3">[3]</a></sup> <a href="#SkPath_reverseAddPath">reverseAddPath</a>
|
||||
|
||||
|
||||
|
||||
@ -3790,7 +3820,7 @@ The top right composition is made up of one contour; the other three have two.</
|
||||
void addPath(const SkPath& src, SkScalar dx, SkScalar dy, AddPathMode mode = kAppend_AddPathMode)
|
||||
</pre>
|
||||
|
||||
Append <a href="#SkPath_addPath_src">src</a> to <a href="#Path">Path</a>, <a href="#SkPath_offset">offset</a> by (<a href="#SkPath_addPath_dx">dx</a>, <a href="#SkPath_addPath_dy">dy</a>).
|
||||
Append <a href="#SkPath_addPath_src">src</a> to <a href="#Path">Path</a>, offset by (<a href="#SkPath_addPath_dx">dx</a>, <a href="#SkPath_addPath_dy">dy</a>).
|
||||
|
||||
If <a href="#SkPath_addPath_mode">mode</a> is <a href="#SkPath_kAppend_AddPathMode">kAppend AddPathMode</a>, <a href="#SkPath_addPath_src">src</a> <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, and <a href="#Weight">Conic Weights</a> are
|
||||
added unaltered. If <a href="#SkPath_addPath_mode">mode</a> is <a href="#SkPath_kExtend_AddPathMode">kExtend AddPathMode</a>, add <a href="undocumented#Line">Line</a> before appending
|
||||
@ -3801,9 +3831,9 @@ added unaltered. If <a href="#SkPath_addPath_mode">mode</a> is <a href="#SkPath_
|
||||
<table> <tr> <td><a name="SkPath_addPath_src"> <code><strong>src </strong></code> </a></td> <td>
|
||||
<a href="#Path">Path</a> <a href="#Verb">Verbs</a>, <a href="#Point">Points</a>, and <a href="#Weight">Conic Weights</a> to add</td>
|
||||
</tr> <tr> <td><a name="SkPath_addPath_dx"> <code><strong>dx </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> added to <a href="#SkPath_addPath_src">src</a> <a href="#Point_Array">Point Array</a> x coordinates</td>
|
||||
offset added to <a href="#SkPath_addPath_src">src</a> <a href="#Point_Array">Point Array</a> x coordinates</td>
|
||||
</tr> <tr> <td><a name="SkPath_addPath_dy"> <code><strong>dy </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> added to <a href="#SkPath_addPath_src">src</a> <a href="#Point_Array">Point Array</a> y coordinates</td>
|
||||
offset added to <a href="#SkPath_addPath_src">src</a> <a href="#Point_Array">Point Array</a> y coordinates</td>
|
||||
</tr> <tr> <td><a name="SkPath_addPath_mode"> <code><strong>mode </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_kAppend_AddPathMode">kAppend AddPathMode</a> or <a href="#SkPath_kExtend_AddPathMode">kExtend AddPathMode</a></td>
|
||||
</tr>
|
||||
@ -3815,10 +3845,12 @@ added unaltered. If <a href="#SkPath_addPath_mode">mode</a> is <a href="#SkPath_
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_AddPathMode">AddPathMode</a> <a href="#SkPath_offset">offset</a> <a href="#SkPath_reverseAddPath">reverseAddPath</a>
|
||||
<a href="#SkPath_AddPathMode">AddPathMode</a> <a href="#SkPath_offset">offset</a><sup><a href="#SkPath_offset_2">[2]</a></sup> <a href="#SkPath_reverseAddPath">reverseAddPath</a>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_addPath_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void addPath(const SkPath& src, AddPathMode mode = kAppend_AddPathMode)
|
||||
</pre>
|
||||
@ -3848,6 +3880,8 @@ added unaltered. If <a href="#SkPath_addPath_2_mode">mode</a> is <a href="#SkPat
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_addPath_3"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void addPath(const SkPath& src, const SkMatrix& matrix, AddPathMode mode = kAppend_AddPathMode)
|
||||
</pre>
|
||||
@ -3864,7 +3898,7 @@ added unaltered. If <a href="#SkPath_addPath_3_mode">mode</a> is <a href="#SkPat
|
||||
<table> <tr> <td><a name="SkPath_addPath_3_src"> <code><strong>src </strong></code> </a></td> <td>
|
||||
<a href="#Path">Path</a> <a href="#Verb">Verbs</a>, <a href="#Point">Points</a>, and <a href="#Weight">Conic Weights</a> to add</td>
|
||||
</tr> <tr> <td><a name="SkPath_addPath_3_matrix"> <code><strong>matrix </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_transform">transform</a> applied to <a href="#SkPath_addPath_3_src">src</a></td>
|
||||
transform applied to <a href="#SkPath_addPath_3_src">src</a></td>
|
||||
</tr> <tr> <td><a name="SkPath_addPath_3_mode"> <code><strong>mode </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_kAppend_AddPathMode">kAppend AddPathMode</a> or <a href="#SkPath_kExtend_AddPathMode">kExtend AddPathMode</a></td>
|
||||
</tr>
|
||||
@ -3876,7 +3910,7 @@ added unaltered. If <a href="#SkPath_addPath_3_mode">mode</a> is <a href="#SkPat
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_AddPathMode">AddPathMode</a> <a href="#SkPath_transform">transform</a> <a href="#SkPath_offset">offset</a> <a href="#SkPath_reverseAddPath">reverseAddPath</a>
|
||||
<a href="#SkPath_AddPathMode">AddPathMode</a> <a href="#SkPath_transform">transform</a><sup><a href="#SkPath_transform_2">[2]</a></sup> <a href="#SkPath_offset">offset</a><sup><a href="#SkPath_offset_2">[2]</a></sup> <a href="#SkPath_reverseAddPath">reverseAddPath</a>
|
||||
|
||||
---
|
||||
|
||||
@ -3903,7 +3937,7 @@ Reversed <a href="#SkPath_reverseAddPath_src">src</a> always appends a new <a hr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_AddPathMode">AddPathMode</a> <a href="#SkPath_transform">transform</a> <a href="#SkPath_offset">offset</a> <a href="#SkPath_addPath">addPath</a>
|
||||
<a href="#SkPath_AddPathMode">AddPathMode</a> <a href="#SkPath_transform">transform</a><sup><a href="#SkPath_transform_2">[2]</a></sup> <a href="#SkPath_offset">offset</a><sup><a href="#SkPath_offset_2">[2]</a></sup> <a href="#SkPath_addPath">addPath</a><sup><a href="#SkPath_addPath_2">[2]</a></sup><sup><a href="#SkPath_addPath_3">[3]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -3915,14 +3949,14 @@ void offset(SkScalar dx, SkScalar dy, SkPath* dst) const
|
||||
</pre>
|
||||
|
||||
Offset <a href="#Point_Array">Point Array</a> by (<a href="#SkPath_offset_dx">dx</a>, <a href="#SkPath_offset_dy">dy</a>). Offset <a href="#Path">Path</a> replaces <a href="#SkPath_offset_dst">dst</a>.
|
||||
If <a href="#SkPath_offset_dst">dst</a> is nullptr, <a href="#Path">Path</a> is replaced by <a href="#SkPath_offset">offset</a> data.
|
||||
If <a href="#SkPath_offset_dst">dst</a> is nullptr, <a href="#Path">Path</a> is replaced by offset data.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkPath_offset_dx"> <code><strong>dx </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> added to <a href="#Point_Array">Point Array</a> x coordinates</td>
|
||||
offset added to <a href="#Point_Array">Point Array</a> x coordinates</td>
|
||||
</tr> <tr> <td><a name="SkPath_offset_dy"> <code><strong>dy </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> added to <a href="#Point_Array">Point Array</a> y coordinates</td>
|
||||
offset added to <a href="#Point_Array">Point Array</a> y coordinates</td>
|
||||
</tr> <tr> <td><a name="SkPath_offset_dst"> <code><strong>dst </strong></code> </a></td> <td>
|
||||
overwritten, translated copy of <a href="#Path">Path</a>; may be nullptr</td>
|
||||
</tr>
|
||||
@ -3934,22 +3968,24 @@ overwritten, translated copy of <a href="#Path">Path</a>; may be nullptr</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_addPath">addPath</a> <a href="#SkPath_transform">transform</a>
|
||||
<a href="#SkPath_addPath">addPath</a><sup><a href="#SkPath_addPath_2">[2]</a></sup><sup><a href="#SkPath_addPath_3">[3]</a></sup> <a href="#SkPath_transform">transform</a><sup><a href="#SkPath_transform_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_offset_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void offset(SkScalar dx, SkScalar dy)
|
||||
</pre>
|
||||
|
||||
Offset <a href="#Point_Array">Point Array</a> by (<a href="#SkPath_offset_2_dx">dx</a>, <a href="#SkPath_offset_2_dy">dy</a>). <a href="#Path">Path</a> is replaced by <a href="#SkPath_offset">offset</a> data.
|
||||
Offset <a href="#Point_Array">Point Array</a> by (<a href="#SkPath_offset_2_dx">dx</a>, <a href="#SkPath_offset_2_dy">dy</a>). <a href="#Path">Path</a> is replaced by offset data.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkPath_offset_2_dx"> <code><strong>dx </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> added to <a href="#Point_Array">Point Array</a> x coordinates</td>
|
||||
offset added to <a href="#Point_Array">Point Array</a> x coordinates</td>
|
||||
</tr> <tr> <td><a name="SkPath_offset_2_dy"> <code><strong>dy </strong></code> </a></td> <td>
|
||||
<a href="#SkPath_offset">offset</a> added to <a href="#Point_Array">Point Array</a> y coordinates</td>
|
||||
offset added to <a href="#Point_Array">Point Array</a> y coordinates</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -3959,7 +3995,7 @@ Offset <a href="#Point_Array">Point Array</a> by (<a href="#SkPath_offset_2_dx">
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_addPath">addPath</a> <a href="#SkPath_transform">transform</a> <a href="#SkCanvas_translate">SkCanvas::translate()</a>
|
||||
<a href="#SkPath_addPath">addPath</a><sup><a href="#SkPath_addPath_2">[2]</a></sup><sup><a href="#SkPath_addPath_3">[3]</a></sup> <a href="#SkPath_transform">transform</a><sup><a href="#SkPath_transform_2">[2]</a></sup> <a href="#SkCanvas_translate">SkCanvas::translate()</a>
|
||||
|
||||
---
|
||||
|
||||
@ -3971,7 +4007,7 @@ void transform(const SkMatrix& matrix, SkPath* dst) const
|
||||
</pre>
|
||||
|
||||
Transform <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, and weight by <a href="#SkPath_transform_matrix">matrix</a>.
|
||||
<a href="#SkPath_transform">transform</a> may change <a href="#Verb">Verbs</a> and increase their number.
|
||||
transform may change <a href="#Verb">Verbs</a> and increase their number.
|
||||
Transformed <a href="#Path">Path</a> replaces <a href="#SkPath_transform_dst">dst</a>; if <a href="#SkPath_transform_dst">dst</a> is nullptr, original data
|
||||
is replaced.
|
||||
|
||||
@ -3990,16 +4026,18 @@ overwritten, transformed copy of <a href="#Path">Path</a>; may be nullptr</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_addPath">addPath</a> <a href="#SkPath_offset">offset</a> <a href="#SkCanvas_concat">SkCanvas::concat()</a> <a href="SkMatrix_Reference#SkMatrix">SkMatrix</a>
|
||||
<a href="#SkPath_addPath">addPath</a><sup><a href="#SkPath_addPath_2">[2]</a></sup><sup><a href="#SkPath_addPath_3">[3]</a></sup> <a href="#SkPath_offset">offset</a><sup><a href="#SkPath_offset_2">[2]</a></sup> <a href="#SkCanvas_concat">SkCanvas::concat()</a> <a href="SkMatrix_Reference#SkMatrix">SkMatrix</a>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_transform_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void transform(const SkMatrix& matrix)
|
||||
</pre>
|
||||
|
||||
Transform <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, and weight by <a href="#SkPath_transform_2_matrix">matrix</a>.
|
||||
<a href="#SkPath_transform">transform</a> may change <a href="#Verb">Verbs</a> and increase their number.
|
||||
transform may change <a href="#Verb">Verbs</a> and increase their number.
|
||||
<a href="#Path">Path</a> is replaced by transformed data.
|
||||
|
||||
### Parameters
|
||||
@ -4015,7 +4053,7 @@ Transform <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Arr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_addPath">addPath</a> <a href="#SkPath_offset">offset</a> <a href="#SkCanvas_concat">SkCanvas::concat()</a> <a href="SkMatrix_Reference#SkMatrix">SkMatrix</a>
|
||||
<a href="#SkPath_addPath">addPath</a><sup><a href="#SkPath_addPath_2">[2]</a></sup><sup><a href="#SkPath_addPath_3">[3]</a></sup> <a href="#SkPath_offset">offset</a><sup><a href="#SkPath_offset_2">[2]</a></sup> <a href="#SkCanvas_concat">SkCanvas::concat()</a> <a href="SkMatrix_Reference#SkMatrix">SkMatrix</a>
|
||||
|
||||
---
|
||||
|
||||
@ -4044,7 +4082,7 @@ storage for final <a href="SkPoint_Reference#Point">Point</a> in <a href="#Point
|
||||
|
||||
### Return Value
|
||||
|
||||
true if <a href="#Point_Array">Point Array</a> <a href="#SkPath_contains">contains</a> one or more <a href="#Point">Points</a>
|
||||
true if <a href="#Point_Array">Point Array</a> contains one or more <a href="#Point">Points</a>
|
||||
|
||||
### Example
|
||||
|
||||
@ -4060,7 +4098,7 @@ last point: 35.2786, 52.9772
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_setLastPt">setLastPt</a>
|
||||
<a href="#SkPath_setLastPt">setLastPt</a><sup><a href="#SkPath_setLastPt_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -4093,6 +4131,8 @@ set <a href="#SkPath_setLastPt_y">y</a>-coordinate of <a href="#Last_Point">Last
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_setLastPt_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void setLastPt(const SkPoint& p)
|
||||
</pre>
|
||||
@ -4127,22 +4167,22 @@ enum <a href="#SkPath_SegmentMask">SegmentMask</a> {
|
||||
};</pre>
|
||||
|
||||
<a href="#SkPath_SegmentMask">SegmentMask</a> constants correspond to each drawing <a href="#SkPath_Verb">Verb</a> type in <a href="#Path">Path</a>; for
|
||||
instance, if <a href="#Path">Path</a> only <a href="#SkPath_contains">contains</a> <a href="#Line">Lines</a>, only the <a href="#SkPath_kLine_SegmentMask">kLine SegmentMask</a> bit is set.
|
||||
instance, if <a href="#Path">Path</a> only contains <a href="#Line">Lines</a>, only the <a href="#SkPath_kLine_SegmentMask">kLine SegmentMask</a> bit is set.
|
||||
|
||||
### Constants
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><a name="SkPath_kLine_SegmentMask"> <code><strong>SkPath::kLine_SegmentMask </strong></code> </a></td><td>1</td><td>Set if <a href="#Verb_Array">Verb Array</a> <a href="#SkPath_contains">contains</a> <a href="#SkPath_kLine_Verb">kLine Verb</a>.</td>
|
||||
<td><a name="SkPath_kLine_SegmentMask"> <code><strong>SkPath::kLine_SegmentMask </strong></code> </a></td><td>1</td><td>Set if <a href="#Verb_Array">Verb Array</a> contains <a href="#SkPath_kLine_Verb">kLine Verb</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="SkPath_kQuad_SegmentMask"> <code><strong>SkPath::kQuad_SegmentMask </strong></code> </a></td><td>2</td><td>Set if <a href="#Verb_Array">Verb Array</a> <a href="#SkPath_contains">contains</a> <a href="#SkPath_kQuad_Verb">kQuad Verb</a>. Note that <a href="#SkPath_conicTo">conicTo</a> may add a <a href="#Quad">Quad</a>.</td>
|
||||
<td><a name="SkPath_kQuad_SegmentMask"> <code><strong>SkPath::kQuad_SegmentMask </strong></code> </a></td><td>2</td><td>Set if <a href="#Verb_Array">Verb Array</a> contains <a href="#SkPath_kQuad_Verb">kQuad Verb</a>. Note that <a href="#SkPath_conicTo">conicTo</a> may add a <a href="#Quad">Quad</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="SkPath_kConic_SegmentMask"> <code><strong>SkPath::kConic_SegmentMask </strong></code> </a></td><td>4</td><td>Set if <a href="#Verb_Array">Verb Array</a> <a href="#SkPath_contains">contains</a> <a href="#SkPath_kConic_Verb">kConic Verb</a>.</td>
|
||||
<td><a name="SkPath_kConic_SegmentMask"> <code><strong>SkPath::kConic_SegmentMask </strong></code> </a></td><td>4</td><td>Set if <a href="#Verb_Array">Verb Array</a> contains <a href="#SkPath_kConic_Verb">kConic Verb</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="SkPath_kCubic_SegmentMask"> <code><strong>SkPath::kCubic_SegmentMask </strong></code> </a></td><td>8</td><td>Set if <a href="#Verb_Array">Verb Array</a> <a href="#SkPath_contains">contains</a> <a href="#SkPath_kCubic_Verb">kCubic Verb</a>.</td>
|
||||
<td><a name="SkPath_kCubic_SegmentMask"> <code><strong>SkPath::kCubic_SegmentMask </strong></code> </a></td><td>8</td><td>Set if <a href="#Verb_Array">Verb Array</a> contains <a href="#SkPath_kCubic_Verb">kCubic Verb</a>.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -4173,8 +4213,8 @@ uint32_t getSegmentMasks() const
|
||||
</pre>
|
||||
|
||||
Returns a mask, where each set bit corresponds to a <a href="#SkPath_SegmentMask">SegmentMask</a> constant
|
||||
if <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> one or more <a href="#Verb">Verbs</a> of that type.
|
||||
Returns zero if <a href="#Path">Path</a> <a href="#SkPath_contains">contains</a> no <a href="#Line">Lines</a>, or <a href="#Curve">Curves</a>: <a href="#Quad">Quads</a>, <a href="#Conic">Conics</a>, or <a href="#Cubic">Cubics</a>.
|
||||
if <a href="#Path">Path</a> contains one or more <a href="#Verb">Verbs</a> of that type.
|
||||
Returns zero if <a href="#Path">Path</a> contains no <a href="#Line">Lines</a>, or <a href="#Curve">Curves</a>: <a href="#Quad">Quads</a>, <a href="#Conic">Conics</a>, or <a href="#Cubic">Cubics</a>.
|
||||
|
||||
<a href="#SkPath_getSegmentMasks">getSegmentMasks</a> returns a cached result; it is very fast.
|
||||
|
||||
@ -4292,10 +4332,12 @@ path.close();
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkRect_dump">SkRect::dump()</a> <a href="#SkRRect_dump">SkRRect::dump()</a> <a href="#SkPathMeasure_dump">SkPathMeasure::dump()</a>
|
||||
<a href="#SkRect_dump">SkRect::dump()</a><sup><a href="#SkRect_dump_2">[2]</a></sup> <a href="#SkRRect_dump">SkRRect::dump()</a> <a href="#SkPathMeasure_dump">SkPathMeasure::dump()</a>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_dump_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void dump() const
|
||||
</pre>
|
||||
@ -4322,7 +4364,7 @@ path is not equal to copy
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_dumpHex">dumpHex</a> <a href="#SkRect_dump">SkRect::dump()</a> <a href="#SkRRect_dump">SkRRect::dump()</a> <a href="#SkPathMeasure_dump">SkPathMeasure::dump()</a> <a href="#SkPath_writeToMemory">writeToMemory</a>
|
||||
<a href="#SkPath_dumpHex">dumpHex</a> <a href="#SkRect_dump">SkRect::dump()</a><sup><a href="#SkRect_dump_2">[2]</a></sup> <a href="#SkRRect_dump">SkRRect::dump()</a> <a href="#SkPathMeasure_dump">SkPathMeasure::dump()</a> <a href="#SkPath_writeToMemory">writeToMemory</a>
|
||||
|
||||
---
|
||||
|
||||
@ -4357,7 +4399,7 @@ path is equal to copy
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_dump">dump</a>
|
||||
<a href="#SkPath_dump">dump</a><sup><a href="#SkPath_dump_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -4402,7 +4444,7 @@ path is equal to copy
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_serialize">serialize</a> <a href="#SkPath_readFromMemory">readFromMemory</a> <a href="#SkPath_dump">dump</a> <a href="#SkPath_dumpHex">dumpHex</a>
|
||||
<a href="#SkPath_serialize">serialize</a> <a href="#SkPath_readFromMemory">readFromMemory</a> <a href="#SkPath_dump">dump</a><sup><a href="#SkPath_dump_2">[2]</a></sup> <a href="#SkPath_dumpHex">dumpHex</a>
|
||||
|
||||
---
|
||||
|
||||
@ -4439,7 +4481,7 @@ path is equal to copy
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPath_writeToMemory">writeToMemory</a> <a href="#SkPath_readFromMemory">readFromMemory</a> <a href="#SkPath_dump">dump</a> <a href="#SkPath_dumpHex">dumpHex</a>
|
||||
<a href="#SkPath_writeToMemory">writeToMemory</a> <a href="#SkPath_readFromMemory">readFromMemory</a> <a href="#SkPath_dump">dump</a><sup><a href="#SkPath_dump_2">[2]</a></sup> <a href="#SkPath_dumpHex">dumpHex</a>
|
||||
|
||||
---
|
||||
|
||||
@ -4505,7 +4547,7 @@ Empty <a href="#Path">Paths</a> have a <a href="#Generation_ID">Generation ID</a
|
||||
uint32_t getGenerationID() const
|
||||
</pre>
|
||||
|
||||
Returns a non-zero, globally <a href="#SkPath_unique">unique</a> value. A different value is returned
|
||||
Returns a non-zero, globally unique value. A different value is returned
|
||||
if <a href="#Verb_Array">Verb Array</a>, <a href="#Point_Array">Point Array</a>, or <a href="#Conic_Weight">Conic Weight</a> changes.
|
||||
|
||||
Setting <a href="#Fill_Type">Fill Type</a> does not change <a href="#Generation_ID">Generation ID</a>.
|
||||
@ -4514,7 +4556,7 @@ Each time the path is modified, a different <a href="#Generation_ID">Generation
|
||||
|
||||
### Return Value
|
||||
|
||||
non-zero, globally <a href="#SkPath_unique">unique</a> value
|
||||
non-zero, globally unique value
|
||||
|
||||
### Example
|
||||
|
||||
@ -4630,6 +4672,8 @@ iter is done
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_Iter_Iter_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
Iter(const SkPath& path, bool forceClose)
|
||||
</pre>
|
||||
@ -4732,7 +4776,7 @@ kDone_Verb
|
||||
Verb next(SkPoint pts[4], bool doConsumeDegenerates = true, bool exact = false)
|
||||
</pre>
|
||||
|
||||
Returns <a href="#SkPath_Iter_next">next</a> <a href="#SkPath_Verb">Verb</a> in <a href="#Verb_Array">Verb Array</a>, and advances <a href="#SkPath_Iter_Iter">Iter</a>.
|
||||
Returns next <a href="#SkPath_Verb">Verb</a> in <a href="#Verb_Array">Verb Array</a>, and advances <a href="#SkPath_Iter_Iter">Iter</a>.
|
||||
When <a href="#Verb_Array">Verb Array</a> is exhausted, returns <a href="#SkPath_kDone_Verb">kDone Verb</a>.
|
||||
|
||||
Zero to four <a href="#Point">Points</a> are stored in <a href="#SkPath_Iter_next_pts">pts</a>, depending on the returned <a href="#SkPath_Verb">Verb</a>.
|
||||
@ -4756,7 +4800,7 @@ skip zero length curves</td>
|
||||
|
||||
### Return Value
|
||||
|
||||
<a href="#SkPath_Iter_next">next</a> <a href="#SkPath_Verb">Verb</a> from <a href="#Verb_Array">Verb Array</a>
|
||||
next <a href="#SkPath_Verb">Verb</a> from <a href="#Verb_Array">Verb Array</a>
|
||||
|
||||
### Example
|
||||
|
||||
@ -4890,7 +4934,7 @@ bool isClosedContour() const
|
||||
|
||||
Returns true if subsequent calls to <a href="#SkPath_Iter_next">next</a> return <a href="#SkPath_kClose_Verb">kClose Verb</a> before returning
|
||||
<a href="#SkPath_kMove_Verb">kMove Verb</a>. if true, <a href="#Contour">Contour</a> <a href="#SkPath_Iter_Iter">Iter</a> is processing may end with <a href="#SkPath_kClose_Verb">kClose Verb</a>, or
|
||||
<a href="#SkPath_Iter_Iter">Iter</a> may have been initialized with force <a href="#SkPath_close">close</a> set to true.
|
||||
<a href="#SkPath_Iter_Iter">Iter</a> may have been initialized with force close set to true.
|
||||
|
||||
### Return Value
|
||||
|
||||
@ -4948,6 +4992,8 @@ Call <a href="#SkPath_RawIter_setPath">setPath</a> to initialize <a href="#SkPat
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPath_RawIter_RawIter_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
RawIter(const SkPath& path)
|
||||
</pre>
|
||||
@ -4992,7 +5038,7 @@ Sets <a href="#SkPath_Iter">Iter</a> to return elements of <a href="#Verb_Array"
|
||||
Verb next(SkPoint pts[4])
|
||||
</pre>
|
||||
|
||||
Returns <a href="#SkPath_RawIter_next">next</a> <a href="#SkPath_Verb">Verb</a> in <a href="#Verb_Array">Verb Array</a>, and advances <a href="#SkPath_RawIter_RawIter">RawIter</a>.
|
||||
Returns next <a href="#SkPath_Verb">Verb</a> in <a href="#Verb_Array">Verb Array</a>, and advances <a href="#SkPath_RawIter_RawIter">RawIter</a>.
|
||||
When <a href="#Verb_Array">Verb Array</a> is exhausted, returns <a href="#SkPath_kDone_Verb">kDone Verb</a>.
|
||||
Zero to four <a href="#Point">Points</a> are stored in <a href="#SkPath_RawIter_next_pts">pts</a>, depending on the returned <a href="#SkPath_Verb">Verb</a>.
|
||||
|
||||
@ -5005,7 +5051,7 @@ storage for <a href="SkPoint_Reference#Point">Point</a> data describing returned
|
||||
|
||||
### Return Value
|
||||
|
||||
<a href="#SkPath_RawIter_next">next</a> <a href="#SkPath_Verb">Verb</a> from <a href="#Verb_Array">Verb Array</a>
|
||||
next <a href="#SkPath_Verb">Verb</a> from <a href="#Verb_Array">Verb Array</a>
|
||||
|
||||
### Example
|
||||
|
||||
@ -5039,11 +5085,11 @@ kDone_Verb
|
||||
Verb peek() const
|
||||
</pre>
|
||||
|
||||
Returns <a href="#SkPath_RawIter_next">next</a> <a href="#SkPath_Verb">Verb</a>, but does not advance <a href="#SkPath_RawIter_RawIter">RawIter</a>.
|
||||
Returns next <a href="#SkPath_Verb">Verb</a>, but does not advance <a href="#SkPath_RawIter_RawIter">RawIter</a>.
|
||||
|
||||
### Return Value
|
||||
|
||||
<a href="#SkPath_RawIter_next">next</a> <a href="#SkPath_Verb">Verb</a> from <a href="#Verb_Array">Verb Array</a>
|
||||
next <a href="#SkPath_Verb">Verb</a> from <a href="#Verb_Array">Verb Array</a>
|
||||
|
||||
### Example
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -22,10 +22,10 @@ SkPoint Reference
|
||||
|
||||
| name | description |
|
||||
| --- | --- |
|
||||
| <a href="#SkPoint">SkPoint</a> <a href="#SkPoint_multiply_operator">operator*(SkScalar scale) const</a> | Returns <a href="#Point">Point</a> multiplied by <a href="#SkPoint_scale">scale</a>. |
|
||||
| <a href="#SkPoint">SkPoint</a> <a href="#SkPoint_add_operator">operator+(const SkPoint& a, const SkVector& b)</a> | Returns <a href="#Point">Point</a> <a href="#SkPoint_offset">offset</a> by <a href="SkPoint_Reference#Vector">Vector</a>. |
|
||||
| <a href="#SkPoint">SkPoint</a> <a href="#SkPoint_multiply_operator">operator*(SkScalar scale) const</a> | Returns <a href="#Point">Point</a> multiplied by scale. |
|
||||
| <a href="#SkPoint">SkPoint</a> <a href="#SkPoint_add_operator">operator+(const SkPoint& a, const SkVector& b)</a> | Returns <a href="#Point">Point</a> offset by <a href="SkPoint_Reference#Vector">Vector</a>. |
|
||||
| <a href="#SkPoint">SkPoint</a> <a href="#SkPoint_minus_operator">operator-() const</a> | Reverses sign of <a href="#Point">Point</a>. |
|
||||
| <a href="#SkPoint">SkPoint</a>& <a href="#SkPoint_multiplyby_operator">operator*=(SkScalar scale)</a> | Multiplies <a href="#Point">Point</a> by <a href="#SkPoint_scale">scale</a> factor. |
|
||||
| <a href="#SkPoint">SkPoint</a>& <a href="#SkPoint_multiplyby_operator">operator*=(SkScalar scale)</a> | Multiplies <a href="#Point">Point</a> by scale factor. |
|
||||
| <a href="SkPoint_Reference#SkVector">SkVector</a> <a href="#SkPoint_subtract_operator">operator-(const SkPoint& a, const SkPoint& b)</a> | Returns <a href="SkPoint_Reference#Vector">Vector</a> between <a href="#Point">Points</a>. |
|
||||
| bool <a href="#SkPoint_notequal_operator">operator!=(const SkPoint& a, const SkPoint& b)</a> | Returns true if <a href="#Point">Point</a> are unequal. |
|
||||
| bool <a href="#SkPoint_equal_operator">operator==(const SkPoint& a, const SkPoint& b)</a> | Returns true if <a href="#Point">Point</a> are equal. |
|
||||
@ -36,40 +36,40 @@ SkPoint Reference
|
||||
|
||||
| name | description |
|
||||
| --- | --- |
|
||||
| <a href="#SkPoint_CrossProduct">CrossProduct</a> | Returns <a href="#SkPoint_cross">cross</a> product. |
|
||||
| <a href="#SkPoint_CrossProduct">CrossProduct</a> | Returns cross product. |
|
||||
| <a href="#SkPoint_Distance">Distance</a> | Returns straight-line distance between points. |
|
||||
| <a href="#SkPoint_DotProduct">DotProduct</a> | Returns <a href="#SkPoint_dot">dot</a> product. |
|
||||
| <a href="#SkPoint_DotProduct">DotProduct</a> | Returns dot product. |
|
||||
| <a href="#SkPoint_Length">Length</a> | Returns straight-line distance to origin. |
|
||||
| <a href="#SkPoint_Make">Make</a> | Constructs from <a href="undocumented#SkScalar">SkScalar</a> inputs. |
|
||||
| <a href="#SkPoint_Normalize">Normalize</a> | Sets <a href="#SkPoint_length">length</a> to one, and returns prior <a href="#SkPoint_length">length</a>. |
|
||||
| <a href="#SkPoint_Normalize">Normalize</a> | Sets length to one, and returns prior length. |
|
||||
| <a href="#SkPoint_Offset">Offset</a> | Translates <a href="#Point">Point</a> array. |
|
||||
| <a href="#SkPoint_cross">cross</a> | Returns <a href="#SkPoint_cross">cross</a> product. |
|
||||
| <a href="#SkPoint_cross">cross</a> | Returns cross product. |
|
||||
| <a href="#SkPoint_distanceToOrigin">distanceToOrigin</a> | Returns straight-line distance to origin. |
|
||||
| <a href="#SkPoint_dot">dot</a> | Returns <a href="#SkPoint_dot">dot</a> product. |
|
||||
| <a href="#SkPoint_dot">dot</a> | Returns dot product. |
|
||||
| <a href="#SkPoint_equals">equals</a> | Returns true if <a href="#Point">Points</a> are equal. |
|
||||
| <a href="#SkPoint_isFinite">isFinite</a> | Returns true if no member is infinite or NaN. |
|
||||
| <a href="#SkPoint_isZero">isZero</a> | Returns true if both members equal zero. |
|
||||
| <a href="#SkPoint_iset">iset</a> | Sets to integer input. |
|
||||
| <a href="#SkPoint_length">length</a> | Returns straight-line distance to origin. |
|
||||
| <a href="#SkPoint_negate">negate</a> | Reverses the sign of both members. |
|
||||
| <a href="#SkPoint_normalize">normalize</a> | Sets <a href="#SkPoint_length">length</a> to one, preserving direction. |
|
||||
| <a href="#SkPoint_normalize">normalize</a> | Sets length to one, preserving direction. |
|
||||
| <a href="#SkPoint_offset">offset</a> | Translates <a href="#Point">Point</a>. |
|
||||
| <a href="#SkPoint_scale">scale</a> | Multiplies <a href="#Point">Point</a> by <a href="#SkPoint_scale">scale</a> factor. |
|
||||
| <a href="#SkPoint_scale">scale</a> | Multiplies <a href="#Point">Point</a> by scale factor. |
|
||||
| <a href="#SkPoint_set">set</a> | Sets to <a href="undocumented#SkScalar">SkScalar</a> input. |
|
||||
| <a href="#SkPoint_setAbs">setAbs</a> | Sets sign of both members to positive. |
|
||||
| <a href="#SkPoint_setLength">setLength</a> | Sets straight-line distance to origin. |
|
||||
| <a href="#SkPoint_setNormalize">setNormalize</a> | Sets <a href="#SkPoint_length">length</a> to one, in direction of (<a href="#SkPoint_x">x</a>, <a href="#SkPoint_y">y</a>). |
|
||||
| <a href="#SkPoint_setNormalize">setNormalize</a> | Sets length to one, in direction of (x, y). |
|
||||
| <a href="#SkPoint_x">x</a> | Returns <a href="#SkPoint_fX">fX</a>. |
|
||||
| <a href="#SkPoint_y">y</a> | Returns <a href="#SkPoint_fY">fY</a>. |
|
||||
|
||||
<a name="SkPoint_fX"> <code><strong>SkScalar fX</strong></code> </a>
|
||||
|
||||
<a href="#SkPoint_x">x</a>-axis value used by both <a href="#Point">Point</a> and <a href="SkPoint_Reference#Vector">Vector</a>. May contain any value, including
|
||||
x-axis value used by both <a href="#Point">Point</a> and <a href="SkPoint_Reference#Vector">Vector</a>. May contain any value, including
|
||||
infinities and NaN.
|
||||
|
||||
<a name="SkPoint_fY"> <code><strong>SkScalar fY</strong></code> </a>
|
||||
|
||||
<a href="#SkPoint_y">y</a>-axis value used by both <a href="#Point">Point</a> and <a href="SkPoint_Reference#Vector">Vector</a>. May contain any value, including
|
||||
y-axis value used by both <a href="#Point">Point</a> and <a href="SkPoint_Reference#Vector">Vector</a>. May contain any value, including
|
||||
infinities and NaN.
|
||||
|
||||
<a name="SkPoint_Make"></a>
|
||||
@ -79,20 +79,20 @@ infinities and NaN.
|
||||
static constexpr SkPoint Make(SkScalar x, SkScalar y)
|
||||
</pre>
|
||||
|
||||
Sets <a href="#SkPoint_fX">fX</a> to <a href="#SkPoint_x">x</a>, <a href="#SkPoint_fY">fY</a> to <a href="#SkPoint_y">y</a>. Used both to <a href="#SkPoint_set">set</a> <a href="#Point">Point</a> and <a href="SkPoint_Reference#Vector">Vector</a>.
|
||||
Sets <a href="#SkPoint_fX">fX</a> to x, <a href="#SkPoint_fY">fY</a> to y. Used both to set <a href="#Point">Point</a> and <a href="SkPoint_Reference#Vector">Vector</a>.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkPoint_Make_x"> <code><strong>x </strong></code> </a></td> <td>
|
||||
<a href="undocumented#SkScalar">SkScalar</a> <a href="#SkPoint_x">x</a>-axis value of constructed <a href="#Point">Point</a> or <a href="SkPoint_Reference#Vector">Vector</a></td>
|
||||
<a href="undocumented#SkScalar">SkScalar</a> x-axis value of constructed <a href="#Point">Point</a> or <a href="SkPoint_Reference#Vector">Vector</a></td>
|
||||
</tr> <tr> <td><a name="SkPoint_Make_y"> <code><strong>y </strong></code> </a></td> <td>
|
||||
<a href="undocumented#SkScalar">SkScalar</a> <a href="#SkPoint_y">y</a>-axis value of constructed <a href="#Point">Point</a> or <a href="SkPoint_Reference#Vector">Vector</a></td>
|
||||
<a href="undocumented#SkScalar">SkScalar</a> y-axis value of constructed <a href="#Point">Point</a> or <a href="SkPoint_Reference#Vector">Vector</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### Return Value
|
||||
|
||||
<a href="#Point">Point</a> (<a href="#SkPoint_x">x</a>, <a href="#SkPoint_y">y</a>)
|
||||
<a href="#Point">Point</a> (x, y)
|
||||
|
||||
### Example
|
||||
|
||||
@ -108,7 +108,7 @@ all equal
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPoint_set">set</a> <a href="#SkPoint_iset">iset</a> <a href="#SkIPoint_Make">SkIPoint::Make</a>
|
||||
<a href="#SkPoint_set">set</a> <a href="#SkPoint_iset">iset</a><sup><a href="#SkPoint_iset_2">[2]</a></sup> <a href="#SkIPoint_Make">SkIPoint::Make</a>
|
||||
|
||||
---
|
||||
|
||||
@ -119,7 +119,7 @@ all equal
|
||||
SkScalar x() const
|
||||
</pre>
|
||||
|
||||
Returns <a href="#SkPoint_x">x</a>-axis value of <a href="#Point">Point</a> or <a href="SkPoint_Reference#Vector">Vector</a>.
|
||||
Returns x-axis value of <a href="#Point">Point</a> or <a href="SkPoint_Reference#Vector">Vector</a>.
|
||||
|
||||
### Return Value
|
||||
|
||||
@ -150,7 +150,7 @@ pt1.fX == pt1.x()
|
||||
SkScalar y() const
|
||||
</pre>
|
||||
|
||||
Returns <a href="#SkPoint_y">y</a>-axis value of <a href="#Point">Point</a> or <a href="SkPoint_Reference#Vector">Vector</a>.
|
||||
Returns y-axis value of <a href="#Point">Point</a> or <a href="SkPoint_Reference#Vector">Vector</a>.
|
||||
|
||||
### Return Value
|
||||
|
||||
@ -213,7 +213,7 @@ pt.isZero() == true
|
||||
void set(SkScalar x, SkScalar y)
|
||||
</pre>
|
||||
|
||||
Sets <a href="#SkPoint_fX">fX</a> to <a href="#SkPoint_x">x</a> and <a href="#SkPoint_fY">fY</a> to <a href="#SkPoint_y">y</a>.
|
||||
Sets <a href="#SkPoint_fX">fX</a> to x and <a href="#SkPoint_fY">fY</a> to y.
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -238,7 +238,7 @@ pt1 == pt2
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPoint_iset">iset</a> <a href="#SkPoint_Make">Make</a>
|
||||
<a href="#SkPoint_iset">iset</a><sup><a href="#SkPoint_iset_2">[2]</a></sup> <a href="#SkPoint_Make">Make</a>
|
||||
|
||||
---
|
||||
|
||||
@ -249,11 +249,11 @@ pt1 == pt2
|
||||
void iset(int32_t x, int32_t y)
|
||||
</pre>
|
||||
|
||||
Sets <a href="#SkPoint_fX">fX</a> to <a href="#SkPoint_x">x</a> and <a href="#SkPoint_fY">fY</a> to <a href="#SkPoint_y">y</a>, promoting integers to <a href="undocumented#SkScalar">SkScalar</a> values.
|
||||
Sets <a href="#SkPoint_fX">fX</a> to x and <a href="#SkPoint_fY">fY</a> to y, promoting integers to <a href="undocumented#SkScalar">SkScalar</a> values.
|
||||
|
||||
Assigning a large integer value directly to <a href="#SkPoint_fX">fX</a> or <a href="#SkPoint_fY">fY</a> may cause a compiler
|
||||
error, triggered by narrowing conversion of int to <a href="undocumented#SkScalar">SkScalar</a>. This safely
|
||||
casts <a href="#SkPoint_x">x</a> and <a href="#SkPoint_y">y</a> to avoid the error.
|
||||
casts x and y to avoid the error.
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -274,6 +274,8 @@ new value for <a href="#SkPoint_fY">fY</a></td>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPoint_iset_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void iset(const SkIPoint& p)
|
||||
</pre>
|
||||
@ -354,7 +356,7 @@ pt: nan, -nan abs: nan, nan
|
||||
static void Offset(SkPoint points[], int count, const SkVector& offset)
|
||||
</pre>
|
||||
|
||||
Adds <a href="#SkPoint_offset">offset</a> to each <a href="#Point">Point</a> in <a href="#SkPoint_Offset_points">points</a> array with <a href="#SkPoint_Offset_count">count</a> entries.
|
||||
Adds offset to each <a href="#Point">Point</a> in <a href="#SkPoint_Offset_points">points</a> array with <a href="#SkPoint_Offset_count">count</a> entries.
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -377,11 +379,13 @@ entries in array</td>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPoint_Offset_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
static void Offset(SkPoint points[], int count, SkScalar dx, SkScalar dy)
|
||||
</pre>
|
||||
|
||||
Adds <a href="#SkPoint_offset">offset</a> (<a href="#SkPoint_Offset_2_dx">dx</a>, <a href="#SkPoint_Offset_2_dy">dy</a>) to each <a href="#Point">Point</a> in <a href="#SkPoint_Offset_2_points">points</a> array of <a href="#SkPoint_length">length</a> <a href="#SkPoint_Offset_2_count">count</a>.
|
||||
Adds offset (<a href="#SkPoint_Offset_2_dx">dx</a>, <a href="#SkPoint_Offset_2_dy">dy</a>) to each <a href="#Point">Point</a> in <a href="#SkPoint_Offset_2_points">points</a> array of length <a href="#SkPoint_Offset_2_count">count</a>.
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -413,7 +417,7 @@ added to <a href="#SkPoint_fY">fY</a> in <a href="#SkPoint_Offset_2_points">poin
|
||||
void offset(SkScalar dx, SkScalar dy)
|
||||
</pre>
|
||||
|
||||
Adds <a href="#SkPoint_offset">offset</a> (<a href="#SkPoint_offset_dx">dx</a>, <a href="#SkPoint_offset_dy">dy</a>) to <a href="#Point">Point</a>.
|
||||
Adds offset (<a href="#SkPoint_offset_dx">dx</a>, <a href="#SkPoint_offset_dy">dy</a>) to <a href="#Point">Point</a>.
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -430,7 +434,7 @@ added to <a href="#SkPoint_fY">fY</a></td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPoint_Offset">Offset</a> <a href="#SkPoint_addto_operator">operator+=(const SkVector& v)</a>
|
||||
<a href="#SkPoint_Offset">Offset</a><sup><a href="#SkPoint_Offset_2">[2]</a></sup> <a href="#SkPoint_addto_operator">operator+=(const SkVector& v)</a>
|
||||
|
||||
---
|
||||
|
||||
@ -458,7 +462,7 @@ straight-line distance to origin
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPoint_distanceToOrigin">distanceToOrigin</a> <a href="#SkPoint_Length">Length</a> <a href="#SkPoint_setLength">setLength</a> <a href="#SkPoint_Distance">Distance</a>
|
||||
<a href="#SkPoint_distanceToOrigin">distanceToOrigin</a> <a href="#SkPoint_Length">Length</a> <a href="#SkPoint_setLength">setLength</a><sup><a href="#SkPoint_setLength_2">[2]</a></sup> <a href="#SkPoint_Distance">Distance</a>
|
||||
|
||||
---
|
||||
|
||||
@ -486,7 +490,7 @@ straight-line distance to origin
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPoint_length">length</a> <a href="#SkPoint_Length">Length</a> <a href="#SkPoint_setLength">setLength</a> <a href="#SkPoint_Distance">Distance</a>
|
||||
<a href="#SkPoint_length">length</a> <a href="#SkPoint_Length">Length</a> <a href="#SkPoint_setLength">setLength</a><sup><a href="#SkPoint_setLength_2">[2]</a></sup> <a href="#SkPoint_Distance">Distance</a>
|
||||
|
||||
---
|
||||
|
||||
@ -498,12 +502,12 @@ bool normalize()
|
||||
</pre>
|
||||
|
||||
Scales (<a href="#SkPoint_fX">fX</a>, <a href="#SkPoint_fY">fY</a>) so that <a href="#SkPoint_length">length</a> returns one, while preserving ratio of <a href="#SkPoint_fX">fX</a> to <a href="#SkPoint_fY">fY</a>,
|
||||
if possible. If prior <a href="#SkPoint_length">length</a> is nearly zero, sets <a href="SkPoint_Reference#Vector">Vector</a> to (0, 0) and returns
|
||||
if possible. If prior length is nearly zero, sets <a href="SkPoint_Reference#Vector">Vector</a> to (0, 0) and returns
|
||||
false; otherwise returns true.
|
||||
|
||||
### Return Value
|
||||
|
||||
true if former <a href="#SkPoint_length">length</a> is not zero or nearly zero
|
||||
true if former length is not zero or nearly zero
|
||||
|
||||
### Example
|
||||
|
||||
@ -511,7 +515,7 @@ true if former <a href="#SkPoint_length">length</a> is not zero or nearly zero
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPoint_Normalize">Normalize</a> <a href="#SkPoint_setLength">setLength</a> <a href="#SkPoint_length">length</a> <a href="#SkPoint_Length">Length</a>
|
||||
<a href="#SkPoint_Normalize">Normalize</a> <a href="#SkPoint_setLength">setLength</a><sup><a href="#SkPoint_setLength_2">[2]</a></sup> <a href="#SkPoint_length">length</a> <a href="#SkPoint_Length">Length</a>
|
||||
|
||||
---
|
||||
|
||||
@ -522,8 +526,8 @@ true if former <a href="#SkPoint_length">length</a> is not zero or nearly zero
|
||||
bool setNormalize(SkScalar x, SkScalar y)
|
||||
</pre>
|
||||
|
||||
Sets <a href="SkPoint_Reference#Vector">Vector</a> to (<a href="#SkPoint_x">x</a>, <a href="#SkPoint_y">y</a>) scaled so <a href="#SkPoint_length">length</a> returns one, and so that
|
||||
(<a href="#SkPoint_fX">fX</a>, <a href="#SkPoint_fY">fY</a>) is proportional to (<a href="#SkPoint_x">x</a>, <a href="#SkPoint_y">y</a>). If (<a href="#SkPoint_x">x</a>, <a href="#SkPoint_y">y</a>) <a href="#SkPoint_length">length</a> is nearly zero,
|
||||
Sets <a href="SkPoint_Reference#Vector">Vector</a> to (x, y) scaled so <a href="#SkPoint_length">length</a> returns one, and so that
|
||||
(<a href="#SkPoint_fX">fX</a>, <a href="#SkPoint_fY">fY</a>) is proportional to (x, y). If (x, y) length is nearly zero,
|
||||
sets <a href="SkPoint_Reference#Vector">Vector</a> to (0, 0) and returns false; otherwise returns true.
|
||||
|
||||
### Parameters
|
||||
@ -537,7 +541,7 @@ proportional value for <a href="#SkPoint_fY">fY</a></td>
|
||||
|
||||
### Return Value
|
||||
|
||||
true if (<a href="#SkPoint_x">x</a>, <a href="#SkPoint_y">y</a>) <a href="#SkPoint_length">length</a> is not zero or nearly zero
|
||||
true if (x, y) length is not zero or nearly zero
|
||||
|
||||
### Example
|
||||
|
||||
@ -545,7 +549,7 @@ true if (<a href="#SkPoint_x">x</a>, <a href="#SkPoint_y">y</a>) <a href="#SkPoi
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPoint_normalize">normalize</a> <a href="#SkPoint_setLength">setLength</a>
|
||||
<a href="#SkPoint_normalize">normalize</a> <a href="#SkPoint_setLength">setLength</a><sup><a href="#SkPoint_setLength_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -556,8 +560,8 @@ true if (<a href="#SkPoint_x">x</a>, <a href="#SkPoint_y">y</a>) <a href="#SkPoi
|
||||
bool setLength(SkScalar length)
|
||||
</pre>
|
||||
|
||||
Scales <a href="SkPoint_Reference#Vector">Vector</a> so that <a href="#SkPoint_distanceToOrigin">distanceToOrigin</a> returns <a href="#SkPoint_length">length</a>, if possible. If former
|
||||
<a href="#SkPoint_length">length</a> is nearly zero, sets <a href="SkPoint_Reference#Vector">Vector</a> to (0, 0) and return false; otherwise returns
|
||||
Scales <a href="SkPoint_Reference#Vector">Vector</a> so that <a href="#SkPoint_distanceToOrigin">distanceToOrigin</a> returns length, if possible. If former
|
||||
length is nearly zero, sets <a href="SkPoint_Reference#Vector">Vector</a> to (0, 0) and return false; otherwise returns
|
||||
true.
|
||||
|
||||
### Parameters
|
||||
@ -569,7 +573,7 @@ straight-line distance to origin</td>
|
||||
|
||||
### Return Value
|
||||
|
||||
true if former <a href="#SkPoint_length">length</a> is not zero or nearly zero
|
||||
true if former length is not zero or nearly zero
|
||||
|
||||
### Example
|
||||
|
||||
@ -581,12 +585,14 @@ true if former <a href="#SkPoint_length">length</a> is not zero or nearly zero
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPoint_setLength_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
bool setLength(SkScalar x, SkScalar y, SkScalar length)
|
||||
</pre>
|
||||
|
||||
Sets <a href="SkPoint_Reference#Vector">Vector</a> to (<a href="#SkPoint_x">x</a>, <a href="#SkPoint_y">y</a>) scaled to <a href="#SkPoint_length">length</a>, if possible. If former
|
||||
<a href="#SkPoint_length">length</a> is nearly zero, sets <a href="SkPoint_Reference#Vector">Vector</a> to (0, 0) and return false; otherwise returns
|
||||
Sets <a href="SkPoint_Reference#Vector">Vector</a> to (x, y) scaled to length, if possible. If former
|
||||
length is nearly zero, sets <a href="SkPoint_Reference#Vector">Vector</a> to (0, 0) and return false; otherwise returns
|
||||
true.
|
||||
|
||||
### Parameters
|
||||
@ -602,7 +608,7 @@ straight-line distance to origin</td>
|
||||
|
||||
### Return Value
|
||||
|
||||
true if (<a href="#SkPoint_x">x</a>, <a href="#SkPoint_y">y</a>) <a href="#SkPoint_length">length</a> is not zero or nearly zero
|
||||
true if (x, y) length is not zero or nearly zero
|
||||
|
||||
### Example
|
||||
|
||||
@ -621,7 +627,7 @@ true if (<a href="#SkPoint_x">x</a>, <a href="#SkPoint_y">y</a>) <a href="#SkPoi
|
||||
void scale(SkScalar scale, SkPoint* dst) const
|
||||
</pre>
|
||||
|
||||
Sets <a href="#SkPoint_scale_dst">dst</a> to <a href="#Point">Point</a> times <a href="#SkPoint_scale">scale</a>. <a href="#SkPoint_scale_dst">dst</a> may be <a href="#Point">Point</a> to modify <a href="#Point">Point</a> in place.
|
||||
Sets <a href="#SkPoint_scale_dst">dst</a> to <a href="#Point">Point</a> times scale. <a href="#SkPoint_scale_dst">dst</a> may be <a href="#Point">Point</a> to modify <a href="#Point">Point</a> in place.
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -638,15 +644,17 @@ storage for scaled <a href="#Point">Point</a></td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPoint_multiply_operator">operator*(SkScalar scale) const</a> <a href="#SkPoint_multiplyby_operator">operator*=(SkScalar scale)</a> <a href="#SkPoint_setLength">setLength</a>
|
||||
<a href="#SkPoint_multiply_operator">operator*(SkScalar scale) const</a> <a href="#SkPoint_multiplyby_operator">operator*=(SkScalar scale)</a> <a href="#SkPoint_setLength">setLength</a><sup><a href="#SkPoint_setLength_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkPoint_scale_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void scale(SkScalar value)
|
||||
</pre>
|
||||
|
||||
Scales <a href="#Point">Point</a> in place by <a href="#SkPoint_scale">scale</a>.
|
||||
Scales <a href="#Point">Point</a> in place by scale.
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -661,7 +669,7 @@ factor to multiply <a href="#Point">Point</a> by</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPoint_multiply_operator">operator*(SkScalar scale) const</a> <a href="#SkPoint_multiplyby_operator">operator*=(SkScalar scale)</a> <a href="#SkPoint_setLength">setLength</a>
|
||||
<a href="#SkPoint_multiply_operator">operator*(SkScalar scale) const</a> <a href="#SkPoint_multiplyby_operator">operator*=(SkScalar scale)</a> <a href="#SkPoint_setLength">setLength</a><sup><a href="#SkPoint_setLength_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -790,7 +798,7 @@ Subtracts <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_subtra
|
||||
SkPoint operator*(SkScalar scale) _const
|
||||
</pre>
|
||||
|
||||
Returns <a href="#Point">Point</a> multiplied by <a href="#SkPoint_scale">scale</a>.
|
||||
Returns <a href="#Point">Point</a> multiplied by scale.
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -801,7 +809,7 @@ Returns <a href="#Point">Point</a> multiplied by <a href="#SkPoint_scale">scale<
|
||||
|
||||
### Return Value
|
||||
|
||||
<a href="#Point">Point</a> as (<a href="#SkPoint_fX">fX</a> * <a href="#SkPoint_scale">scale</a>, <a href="#SkPoint_fY">fY</a> * <a href="#SkPoint_scale">scale</a>)
|
||||
<a href="#Point">Point</a> as (<a href="#SkPoint_fX">fX</a> * scale, <a href="#SkPoint_fY">fY</a> * scale)
|
||||
|
||||
### Example
|
||||
|
||||
@ -809,7 +817,7 @@ Returns <a href="#Point">Point</a> multiplied by <a href="#SkPoint_scale">scale<
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPoint_multiplyby_operator">operator*=(SkScalar scale)</a> <a href="#SkPoint_scale">scale</a> <a href="#SkPoint_setLength">setLength</a> <a href="#SkPoint_setNormalize">setNormalize</a>
|
||||
<a href="#SkPoint_multiplyby_operator">operator*=(SkScalar scale)</a> <a href="#SkPoint_scale">scale</a><sup><a href="#SkPoint_scale_2">[2]</a></sup> <a href="#SkPoint_setLength">setLength</a><sup><a href="#SkPoint_setLength_2">[2]</a></sup> <a href="#SkPoint_setNormalize">setNormalize</a>
|
||||
|
||||
---
|
||||
|
||||
@ -820,8 +828,8 @@ Returns <a href="#Point">Point</a> multiplied by <a href="#SkPoint_scale">scale<
|
||||
SkPoint& operator*=(SkScalar scale)
|
||||
</pre>
|
||||
|
||||
Multiplies <a href="#Point">Point</a> by <a href="#SkPoint_scale">scale</a>. Sets <a href="#Point">Point</a> to:
|
||||
(<a href="#SkPoint_fX">fX</a> * <a href="#SkPoint_scale">scale</a>, <a href="#SkPoint_fY">fY</a> * <a href="#SkPoint_scale">scale</a>)
|
||||
Multiplies <a href="#Point">Point</a> by scale. Sets <a href="#Point">Point</a> to:
|
||||
(<a href="#SkPoint_fX">fX</a> * scale, <a href="#SkPoint_fY">fY</a> * scale)
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -840,7 +848,7 @@ reference to <a href="#Point">Point</a>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPoint_multiply_operator">operator*(SkScalar scale) const</a> <a href="#SkPoint_scale">scale</a> <a href="#SkPoint_setLength">setLength</a> <a href="#SkPoint_setNormalize">setNormalize</a>
|
||||
<a href="#SkPoint_multiply_operator">operator*(SkScalar scale) const</a> <a href="#SkPoint_scale">scale</a><sup><a href="#SkPoint_scale_2">[2]</a></sup> <a href="#SkPoint_setLength">setLength</a><sup><a href="#SkPoint_setLength_2">[2]</a></sup> <a href="#SkPoint_setNormalize">setNormalize</a>
|
||||
|
||||
---
|
||||
|
||||
@ -885,7 +893,7 @@ pt: nan, -1 finite: false
|
||||
bool equals(SkScalar x, SkScalar y) const
|
||||
</pre>
|
||||
|
||||
Returns true if <a href="#Point">Point</a> is equivalent to <a href="#Point">Point</a> constructed from (<a href="#SkPoint_x">x</a>, <a href="#SkPoint_y">y</a>).
|
||||
Returns true if <a href="#Point">Point</a> is equivalent to <a href="#Point">Point</a> constructed from (x, y).
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -898,7 +906,7 @@ value compared with <a href="#SkPoint_fY">fY</a></td>
|
||||
|
||||
### Return Value
|
||||
|
||||
true if <a href="#Point">Point</a> <a href="#SkPoint_equals">equals</a> (<a href="#SkPoint_x">x</a>, <a href="#SkPoint_y">y</a>)
|
||||
true if <a href="#Point">Point</a> equals (x, y)
|
||||
|
||||
### Example
|
||||
|
||||
@ -1049,10 +1057,10 @@ Can also be used to subtract <a href="SkPoint_Reference#Vector">Vector</a> from
|
||||
SkPoint operator+(const SkPoint& a, const SkVector& b)
|
||||
</pre>
|
||||
|
||||
Returns <a href="#Point">Point</a> resulting from <a href="#Point">Point</a> <a href="#SkPoint_add_operator_a">a</a> <a href="#SkPoint_offset">offset</a> by <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_add_operator_b">b</a>, computed as:
|
||||
Returns <a href="#Point">Point</a> resulting from <a href="#Point">Point</a> <a href="#SkPoint_add_operator_a">a</a> offset by <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_add_operator_b">b</a>, computed as:
|
||||
(<a href="#SkPoint_add_operator_a">a</a>.<a href="#SkPoint_fX">fX</a> + <a href="#SkPoint_add_operator_b">b</a>.<a href="#SkPoint_fX">fX</a>, <a href="#SkPoint_add_operator_a">a</a>.<a href="#SkPoint_fY">fY</a> + <a href="#SkPoint_add_operator_b">b</a>.<a href="#SkPoint_fY">fY</a>).
|
||||
|
||||
Can also be used to <a href="#SkPoint_offset">offset</a> <a href="#Point">Point</a> <a href="#SkPoint_add_operator_b">b</a> by <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_add_operator_a">a</a>, returning <a href="#Point">Point</a>.
|
||||
Can also be used to offset <a href="#Point">Point</a> <a href="#SkPoint_add_operator_b">b</a> by <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_add_operator_a">a</a>, returning <a href="#Point">Point</a>.
|
||||
Can also be used to add <a href="SkPoint_Reference#Vector">Vector</a> to <a href="SkPoint_Reference#Vector">Vector</a>, returning <a href="SkPoint_Reference#Vector">Vector</a>.
|
||||
|
||||
### Parameters
|
||||
@ -1066,7 +1074,7 @@ Can also be used to add <a href="SkPoint_Reference#Vector">Vector</a> to <a href
|
||||
|
||||
### Return Value
|
||||
|
||||
<a href="#Point">Point</a> equal to <a href="#SkPoint_add_operator_a">a</a> <a href="#SkPoint_offset">offset</a> by <a href="#SkPoint_add_operator_b">b</a>
|
||||
<a href="#Point">Point</a> equal to <a href="#SkPoint_add_operator_a">a</a> offset by <a href="#SkPoint_add_operator_b">b</a>
|
||||
|
||||
### Example
|
||||
|
||||
@ -1095,9 +1103,9 @@ sqrt(x * x + y * y)</pre>
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkPoint_Length_x"> <code><strong>x </strong></code> </a></td> <td>
|
||||
component of <a href="#SkPoint_length">length</a></td>
|
||||
component of length</td>
|
||||
</tr> <tr> <td><a name="SkPoint_Length_y"> <code><strong>y </strong></code> </a></td> <td>
|
||||
component of <a href="#SkPoint_length">length</a></td>
|
||||
component of length</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -1111,7 +1119,7 @@ straight-line distance to origin
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPoint_length">length</a> <a href="#SkPoint_Distance">Distance</a> <a href="#SkPoint_setLength">setLength</a>
|
||||
<a href="#SkPoint_length">length</a> <a href="#SkPoint_Distance">Distance</a> <a href="#SkPoint_setLength">setLength</a><sup><a href="#SkPoint_setLength_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1123,23 +1131,23 @@ static SkScalar Normalize(SkVector* vec)
|
||||
</pre>
|
||||
|
||||
Scales (<a href="#SkPoint_Normalize_vec">vec</a>-><a href="#SkPoint_fX">fX</a>, <a href="#SkPoint_Normalize_vec">vec</a>-><a href="#SkPoint_fY">fY</a>) so that <a href="#SkPoint_length">length</a> returns one, while preserving ratio of <a href="#SkPoint_Normalize_vec">vec</a>-><a href="#SkPoint_fX">fX</a> to <a href="#SkPoint_Normalize_vec">vec</a>-><a href="#SkPoint_fY">fY</a>,
|
||||
if possible. If original <a href="#SkPoint_length">length</a> is nearly zero, sets <a href="#SkPoint_Normalize_vec">vec</a> to (0, 0) and returns zero;
|
||||
otherwise, returns <a href="#SkPoint_length">length</a> of <a href="#SkPoint_Normalize_vec">vec</a> before <a href="#SkPoint_Normalize_vec">vec</a> is scaled.
|
||||
if possible. If original length is nearly zero, sets <a href="#SkPoint_Normalize_vec">vec</a> to (0, 0) and returns zero;
|
||||
otherwise, returns length of <a href="#SkPoint_Normalize_vec">vec</a> before <a href="#SkPoint_Normalize_vec">vec</a> is scaled.
|
||||
|
||||
Returned prior <a href="#SkPoint_length">length</a> may be <a href="undocumented#SK_ScalarInfinity">SK ScalarInfinity</a> if it can not be represented by <a href="undocumented#SkScalar">SkScalar</a>.
|
||||
Returned prior length may be <a href="undocumented#SK_ScalarInfinity">SK ScalarInfinity</a> if it can not be represented by <a href="undocumented#SkScalar">SkScalar</a>.
|
||||
|
||||
Note that <a href="#SkPoint_normalize">normalize</a> is faster if prior <a href="#SkPoint_length">length</a> is not required.
|
||||
Note that <a href="#SkPoint_normalize">normalize</a> is faster if prior length is not required.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkPoint_Normalize_vec"> <code><strong>vec </strong></code> </a></td> <td>
|
||||
normalized to unit <a href="#SkPoint_length">length</a></td>
|
||||
normalized to unit length</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### Return Value
|
||||
|
||||
original <a href="#SkPoint_Normalize_vec">vec</a> <a href="#SkPoint_length">length</a>
|
||||
original <a href="#SkPoint_Normalize_vec">vec</a> length
|
||||
|
||||
### Example
|
||||
|
||||
@ -1147,7 +1155,7 @@ original <a href="#SkPoint_Normalize_vec">vec</a> <a href="#SkPoint_length">leng
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPoint_normalize">normalize</a> <a href="#SkPoint_setLength">setLength</a> <a href="#SkPoint_Length">Length</a>
|
||||
<a href="#SkPoint_normalize">normalize</a> <a href="#SkPoint_setLength">setLength</a><sup><a href="#SkPoint_setLength_2">[2]</a></sup> <a href="#SkPoint_Length">Length</a>
|
||||
|
||||
---
|
||||
|
||||
@ -1179,7 +1187,7 @@ straight-line distance from <a href="#SkPoint_Distance_a">a</a> to <a href="#SkP
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkPoint_length">length</a> <a href="#SkPoint_setLength">setLength</a>
|
||||
<a href="#SkPoint_length">length</a> <a href="#SkPoint_setLength">setLength</a><sup><a href="#SkPoint_setLength_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1190,14 +1198,14 @@ straight-line distance from <a href="#SkPoint_Distance_a">a</a> to <a href="#SkP
|
||||
static SkScalar DotProduct(const SkVector& a, const SkVector& b)
|
||||
</pre>
|
||||
|
||||
Returns the <a href="#SkPoint_dot">dot</a> product of <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_DotProduct_a">a</a> and <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_DotProduct_b">b</a>.
|
||||
Returns the dot product of <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_DotProduct_a">a</a> and <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_DotProduct_b">b</a>.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkPoint_DotProduct_a"> <code><strong>a </strong></code> </a></td> <td>
|
||||
left side of <a href="#SkPoint_dot">dot</a> product</td>
|
||||
left side of dot product</td>
|
||||
</tr> <tr> <td><a name="SkPoint_DotProduct_b"> <code><strong>b </strong></code> </a></td> <td>
|
||||
right side of <a href="#SkPoint_dot">dot</a> product</td>
|
||||
right side of dot product</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -1222,18 +1230,18 @@ product of input magnitudes and cosine of the angle between them
|
||||
static SkScalar CrossProduct(const SkVector& a, const SkVector& b)
|
||||
</pre>
|
||||
|
||||
Returns the <a href="#SkPoint_cross">cross</a> product of <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_CrossProduct_a">a</a> and <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_CrossProduct_b">b</a>.
|
||||
Returns the cross product of <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_CrossProduct_a">a</a> and <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_CrossProduct_b">b</a>.
|
||||
|
||||
<a href="#SkPoint_CrossProduct_a">a</a> and <a href="#SkPoint_CrossProduct_b">b</a> form three-dimensional vectors with z equal to zero. The <a href="#SkPoint_cross">cross</a> product
|
||||
is <a href="#SkPoint_CrossProduct_a">a</a> three-dimensional vector with <a href="#SkPoint_x">x</a> and <a href="#SkPoint_y">y</a> equal to zero. The <a href="#SkPoint_cross">cross</a> product z
|
||||
term <a href="#SkPoint_equals">equals</a> the returned value.
|
||||
<a href="#SkPoint_CrossProduct_a">a</a> and <a href="#SkPoint_CrossProduct_b">b</a> form three-dimensional vectors with z equal to zero. The cross product
|
||||
is <a href="#SkPoint_CrossProduct_a">a</a> three-dimensional vector with x and y equal to zero. The cross product z
|
||||
term equals the returned value.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkPoint_CrossProduct_a"> <code><strong>a </strong></code> </a></td> <td>
|
||||
left side of <a href="#SkPoint_cross">cross</a> product</td>
|
||||
left side of cross product</td>
|
||||
</tr> <tr> <td><a name="SkPoint_CrossProduct_b"> <code><strong>b </strong></code> </a></td> <td>
|
||||
right side of <a href="#SkPoint_cross">cross</a> product</td>
|
||||
right side of cross product</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -1258,16 +1266,16 @@ area spanned by <a href="#Vector">Vectors</a> signed by angle direction
|
||||
SkScalar cross(const SkVector& vec) const
|
||||
</pre>
|
||||
|
||||
Returns the <a href="#SkPoint_cross">cross</a> product of <a href="SkPoint_Reference#Vector">Vector</a> and <a href="#SkPoint_cross_vec">vec</a>.
|
||||
Returns the cross product of <a href="SkPoint_Reference#Vector">Vector</a> and <a href="#SkPoint_cross_vec">vec</a>.
|
||||
|
||||
<a href="SkPoint_Reference#Vector">Vector</a> and <a href="#SkPoint_cross_vec">vec</a> form three-dimensional vectors with z equal to zero. The
|
||||
<a href="#SkPoint_cross">cross</a> product is a three-dimensional vector with <a href="#SkPoint_x">x</a> and <a href="#SkPoint_y">y</a> equal to zero.
|
||||
The <a href="#SkPoint_cross">cross</a> product z term <a href="#SkPoint_equals">equals</a> the returned value.
|
||||
cross product is a three-dimensional vector with x and y equal to zero.
|
||||
The cross product z term equals the returned value.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkPoint_cross_vec"> <code><strong>vec </strong></code> </a></td> <td>
|
||||
right side of <a href="#SkPoint_cross">cross</a> product</td>
|
||||
right side of cross product</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -1292,12 +1300,12 @@ area spanned by <a href="#Vector">Vectors</a> signed by angle direction
|
||||
SkScalar dot(const SkVector& vec) const
|
||||
</pre>
|
||||
|
||||
Returns the <a href="#SkPoint_dot">dot</a> product of <a href="SkPoint_Reference#Vector">Vector</a> and <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_dot_vec">vec</a>.
|
||||
Returns the dot product of <a href="SkPoint_Reference#Vector">Vector</a> and <a href="SkPoint_Reference#Vector">Vector</a> <a href="#SkPoint_dot_vec">vec</a>.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkPoint_dot_vec"> <code><strong>vec </strong></code> </a></td> <td>
|
||||
right side of <a href="#SkPoint_dot">dot</a> product</td>
|
||||
right side of dot product</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@ SkSurface Reference
|
||||
# <a name="SkSurface"></a> Class SkSurface
|
||||
<a href="#SkSurface">SkSurface</a> is responsible for managing the pixels that a canvas draws into. The pixels can be
|
||||
allocated either in CPU memory (a raster surface) or on the GPU (a <a href="undocumented#GrRenderTarget">GrRenderTarget</a> surface).
|
||||
<a href="#SkSurface">SkSurface</a> takes care of allocating a <a href="SkCanvas_Reference#SkCanvas">SkCanvas</a> that will <a href="#SkSurface_draw">draw</a> into the surface. Call
|
||||
<a href="#SkSurface">SkSurface</a> takes care of allocating a <a href="SkCanvas_Reference#SkCanvas">SkCanvas</a> that will draw into the surface. Call
|
||||
surface-><a href="#SkSurface_getCanvas">getCanvas</a> to use that canvas (but don't delete it, it is owned by the surface).
|
||||
<a href="#SkSurface">SkSurface</a> always has non-zero dimensions. If there is a request for a new surface, and either
|
||||
of the requested dimensions are zero, then nullptr will be returned.
|
||||
@ -28,12 +28,12 @@ of the requested dimensions are zero, then nullptr will be returned.
|
||||
| <a href="#SkSurface_MakeFromBackendTexture">MakeFromBackendTexture</a> | creates <a href="#Surface">Surface</a> from GPU-backed texture |
|
||||
| <a href="#SkSurface_MakeFromBackendTextureAsRenderTarget">MakeFromBackendTextureAsRenderTarget</a> | creates <a href="#Surface">Surface</a> from GPU-backed texture |
|
||||
| <a href="#SkSurface_MakeNull">MakeNull</a> | creates <a href="#Surface">Surface</a> without backing pixels |
|
||||
| <a href="#SkSurface_MakeRaster">MakeRaster</a> | creates <a href="#Surface">Surface</a> from <a href="undocumented#SkImageInfo">SkImageInfo</a> |
|
||||
| <a href="#SkSurface_MakeRasterDirect">MakeRasterDirect</a> | creates <a href="#Surface">Surface</a> from <a href="undocumented#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a> |
|
||||
| <a href="#SkSurface_MakeRasterDirectReleaseProc">MakeRasterDirectReleaseProc</a> | creates <a href="#Surface">Surface</a> from <a href="undocumented#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a> |
|
||||
| <a href="#SkSurface_MakeRasterN32Premul">MakeRasterN32Premul</a> | creates <a href="#Surface">Surface</a> from <a href="#SkSurface_width">width</a>, <a href="#SkSurface_height">height</a> matching output |
|
||||
| <a href="#SkSurface_MakeRaster">MakeRaster</a> | creates <a href="#Surface">Surface</a> from <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> |
|
||||
| <a href="#SkSurface_MakeRasterDirect">MakeRasterDirect</a> | creates <a href="#Surface">Surface</a> from <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a> |
|
||||
| <a href="#SkSurface_MakeRasterDirectReleaseProc">MakeRasterDirectReleaseProc</a> | creates <a href="#Surface">Surface</a> from <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a> |
|
||||
| <a href="#SkSurface_MakeRasterN32Premul">MakeRasterN32Premul</a> | creates <a href="#Surface">Surface</a> from width, height matching output |
|
||||
| <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a> | creates <a href="#Surface">Surface</a> pointing to new GPU memory buffer |
|
||||
| <a href="#SkCanvas_makeSurface">SkCanvas::makeSurface</a> | creates <a href="#Surface">Surface</a> matching <a href="SkCanvas_Reference#Canvas">Canvas</a> <a href="undocumented#Image_Info">Image Info</a>, <a href="#Properties">Surface Properties</a> |
|
||||
| <a href="#SkCanvas_makeSurface">SkCanvas::makeSurface</a> | creates <a href="#Surface">Surface</a> matching <a href="SkCanvas_Reference#Canvas">Canvas</a> <a href="SkImageInfo_Reference#Image_Info">Image Info</a>, <a href="#Properties">Surface Properties</a> |
|
||||
| <a href="#SkSurface_makeSurface">makeSurface</a> | creates a compatible <a href="#Surface">Surface</a> |
|
||||
|
||||
## <a name="Member_Functions"></a> Member Functions
|
||||
@ -44,10 +44,10 @@ of the requested dimensions are zero, then nullptr will be returned.
|
||||
| <a href="#SkSurface_MakeFromBackendTexture">MakeFromBackendTexture</a> | creates <a href="#Surface">Surface</a> from GPU-backed texture |
|
||||
| <a href="#SkSurface_MakeFromBackendTextureAsRenderTarget">MakeFromBackendTextureAsRenderTarget</a> | creates <a href="#Surface">Surface</a> from GPU-backed texture |
|
||||
| <a href="#SkSurface_MakeNull">MakeNull</a> | creates <a href="#Surface">Surface</a> without backing pixels |
|
||||
| <a href="#SkSurface_MakeRaster">MakeRaster</a> | creates <a href="#Surface">Surface</a> from <a href="undocumented#SkImageInfo">SkImageInfo</a> |
|
||||
| <a href="#SkSurface_MakeRasterDirect">MakeRasterDirect</a> | creates <a href="#Surface">Surface</a> from <a href="undocumented#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a> |
|
||||
| <a href="#SkSurface_MakeRasterDirectReleaseProc">MakeRasterDirectReleaseProc</a> | creates <a href="#Surface">Surface</a> from <a href="undocumented#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a> |
|
||||
| <a href="#SkSurface_MakeRasterN32Premul">MakeRasterN32Premul</a> | creates <a href="#Surface">Surface</a> from <a href="#SkSurface_width">width</a>, <a href="#SkSurface_height">height</a> matching output |
|
||||
| <a href="#SkSurface_MakeRaster">MakeRaster</a> | creates <a href="#Surface">Surface</a> from <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> |
|
||||
| <a href="#SkSurface_MakeRasterDirect">MakeRasterDirect</a> | creates <a href="#Surface">Surface</a> from <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a> |
|
||||
| <a href="#SkSurface_MakeRasterDirectReleaseProc">MakeRasterDirectReleaseProc</a> | creates <a href="#Surface">Surface</a> from <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a> |
|
||||
| <a href="#SkSurface_MakeRasterN32Premul">MakeRasterN32Premul</a> | creates <a href="#Surface">Surface</a> from width, height matching output |
|
||||
| <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a> | creates <a href="#Surface">Surface</a> pointing to new GPU memory buffer |
|
||||
| <a href="#SkSurface_characterize">characterize</a> | sets <a href="#Characterization">Surface Characterization</a> for threaded pre-processing |
|
||||
| <a href="#SkSurface_draw">draw</a> | draws <a href="#Surface">Surface</a> contents to canvas |
|
||||
@ -81,19 +81,19 @@ Allocates raster <a href="#Surface">Surface</a>. <a href="SkCanvas_Reference#Can
|
||||
<a href="#Surface">Surface</a> is returned if all parameters are valid.
|
||||
Valid parameters include:
|
||||
info dimensions are greater than zero;
|
||||
info contains <a href="undocumented#Image_Color_Type">Image Color Type</a> and <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a> supported by <a href="undocumented#Raster_Surface">Raster Surface</a>;
|
||||
info contains <a href="SkImageInfo_Reference#Color_Type">Color Type</a> and <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> supported by <a href="undocumented#Raster_Surface">Raster Surface</a>;
|
||||
<a href="#SkSurface_MakeRasterDirect_pixels">pixels</a> is not nullptr;
|
||||
<a href="#SkSurface_MakeRasterDirect_rowBytes">rowBytes</a> is large enough to contain info <a href="#SkSurface_width">width</a> <a href="#SkSurface_MakeRasterDirect_pixels">pixels</a> of <a href="undocumented#Image_Color_Type">Image Color Type</a>.
|
||||
<a href="#SkSurface_MakeRasterDirect_rowBytes">rowBytes</a> is large enough to contain info width <a href="#SkSurface_MakeRasterDirect_pixels">pixels</a> of <a href="SkImageInfo_Reference#Color_Type">Color Type</a>.
|
||||
|
||||
<a href="undocumented#Pixel">Pixel</a> buffer size should be info <a href="#SkSurface_height">height</a> times computed <a href="#SkSurface_MakeRasterDirect_rowBytes">rowBytes</a>.
|
||||
<a href="undocumented#Pixel">Pixel</a> buffer size should be info height times computed <a href="#SkSurface_MakeRasterDirect_rowBytes">rowBytes</a>.
|
||||
Pixels are not initialized.
|
||||
To access <a href="#SkSurface_MakeRasterDirect_pixels">pixels</a> after drawing, call <a href="#SkSurface_flush">flush</a> or <a href="#SkSurface_peekPixels">peekPixels</a>.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkSurface_MakeRasterDirect_imageInfo"> <code><strong>imageInfo </strong></code> </a></td> <td>
|
||||
<a href="#SkSurface_width">width</a>, <a href="#SkSurface_height">height</a>, <a href="undocumented#Image_Color_Type">Image Color Type</a>, <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>,
|
||||
of <a href="undocumented#Raster_Surface">Raster Surface</a>; <a href="#SkSurface_width">width</a> and <a href="#SkSurface_height">height</a> must be greater than zero</td>
|
||||
width, height, <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>,
|
||||
of <a href="undocumented#Raster_Surface">Raster Surface</a>; width and height must be greater than zero</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRasterDirect_pixels"> <code><strong>pixels </strong></code> </a></td> <td>
|
||||
pointer to destination <a href="#SkSurface_MakeRasterDirect_pixels">pixels</a> buffer</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRasterDirect_rowBytes"> <code><strong>rowBytes </strong></code> </a></td> <td>
|
||||
@ -124,7 +124,7 @@ may be nullptr</td>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkSurface_MakeRasterDirectReleaseProc">MakeRasterDirectReleaseProc</a> <a href="#SkSurface_MakeRaster">MakeRaster</a> <a href="#SkSurface_MakeRasterN32Premul">MakeRasterN32Premul</a> <a href="#SkCanvas_MakeRasterDirect">SkCanvas::MakeRasterDirect</a>
|
||||
<a href="#SkSurface_MakeRasterDirectReleaseProc">MakeRasterDirectReleaseProc</a> <a href="#SkSurface_MakeRaster">MakeRaster</a><sup><a href="#SkSurface_MakeRaster_2">[2]</a></sup> <a href="#SkSurface_MakeRasterN32Premul">MakeRasterN32Premul</a> <a href="#SkCanvas_MakeRasterDirect">SkCanvas::MakeRasterDirect</a>
|
||||
|
||||
---
|
||||
|
||||
@ -144,19 +144,19 @@ Allocates raster <a href="#Surface">Surface</a>. <a href="SkCanvas_Reference#Can
|
||||
<a href="#Surface">Surface</a> is returned if all parameters are valid.
|
||||
Valid parameters include:
|
||||
info dimensions are greater than zero;
|
||||
info contains <a href="undocumented#Image_Color_Type">Image Color Type</a> and <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a> supported by <a href="undocumented#Raster_Surface">Raster Surface</a>;
|
||||
info contains <a href="SkImageInfo_Reference#Color_Type">Color Type</a> and <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> supported by <a href="undocumented#Raster_Surface">Raster Surface</a>;
|
||||
<a href="#SkSurface_MakeRasterDirectReleaseProc_pixels">pixels</a> is not nullptr;
|
||||
<a href="#SkSurface_MakeRasterDirectReleaseProc_rowBytes">rowBytes</a> is large enough to contain info <a href="#SkSurface_width">width</a> <a href="#SkSurface_MakeRasterDirectReleaseProc_pixels">pixels</a> of <a href="undocumented#Image_Color_Type">Image Color Type</a>.
|
||||
<a href="#SkSurface_MakeRasterDirectReleaseProc_rowBytes">rowBytes</a> is large enough to contain info width <a href="#SkSurface_MakeRasterDirectReleaseProc_pixels">pixels</a> of <a href="SkImageInfo_Reference#Color_Type">Color Type</a>.
|
||||
|
||||
<a href="undocumented#Pixel">Pixel</a> buffer size should be info <a href="#SkSurface_height">height</a> times computed <a href="#SkSurface_MakeRasterDirectReleaseProc_rowBytes">rowBytes</a>.
|
||||
<a href="undocumented#Pixel">Pixel</a> buffer size should be info height times computed <a href="#SkSurface_MakeRasterDirectReleaseProc_rowBytes">rowBytes</a>.
|
||||
Pixels are not initialized.
|
||||
To access <a href="#SkSurface_MakeRasterDirectReleaseProc_pixels">pixels</a> after drawing, call <a href="#SkSurface_flush">flush</a> or <a href="#SkSurface_peekPixels">peekPixels</a>.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkSurface_MakeRasterDirectReleaseProc_imageInfo"> <code><strong>imageInfo </strong></code> </a></td> <td>
|
||||
<a href="#SkSurface_width">width</a>, <a href="#SkSurface_height">height</a>, <a href="undocumented#Image_Color_Type">Image Color Type</a>, <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>,
|
||||
of <a href="undocumented#Raster_Surface">Raster Surface</a>; <a href="#SkSurface_width">width</a> and <a href="#SkSurface_height">height</a> must be greater than zero</td>
|
||||
width, height, <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>,
|
||||
of <a href="undocumented#Raster_Surface">Raster Surface</a>; width and height must be greater than zero</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRasterDirectReleaseProc_pixels"> <code><strong>pixels </strong></code> </a></td> <td>
|
||||
pointer to destination <a href="#SkSurface_MakeRasterDirectReleaseProc_pixels">pixels</a> buffer</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRasterDirectReleaseProc_rowBytes"> <code><strong>rowBytes </strong></code> </a></td> <td>
|
||||
@ -192,7 +192,7 @@ expected release context
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkSurface_MakeRasterDirect">MakeRasterDirect</a> <a href="#SkSurface_MakeRasterN32Premul">MakeRasterN32Premul</a> <a href="#SkSurface_MakeRaster">MakeRaster</a>
|
||||
<a href="#SkSurface_MakeRasterDirect">MakeRasterDirect</a> <a href="#SkSurface_MakeRasterN32Premul">MakeRasterN32Premul</a> <a href="#SkSurface_MakeRaster">MakeRaster</a><sup><a href="#SkSurface_MakeRaster_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -212,8 +212,8 @@ Allocates and zeroes pixel memory. <a href="undocumented#Pixel">Pixel</a> memory
|
||||
<a href="#Surface">Surface</a> is returned if all parameters are valid.
|
||||
Valid parameters include:
|
||||
info dimensions are greater than zero;
|
||||
info contains <a href="undocumented#Image_Color_Type">Image Color Type</a> and <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a> supported by <a href="undocumented#Raster_Surface">Raster Surface</a>;
|
||||
<a href="#SkSurface_MakeRaster_rowBytes">rowBytes</a> is large enough to contain info <a href="#SkSurface_width">width</a> pixels of <a href="undocumented#Image_Color_Type">Image Color Type</a>, or is zero.
|
||||
info contains <a href="SkImageInfo_Reference#Color_Type">Color Type</a> and <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> supported by <a href="undocumented#Raster_Surface">Raster Surface</a>;
|
||||
<a href="#SkSurface_MakeRaster_rowBytes">rowBytes</a> is large enough to contain info width pixels of <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, or is zero.
|
||||
|
||||
If <a href="#SkSurface_MakeRaster_rowBytes">rowBytes</a> is not zero, subsequent images returned by <a href="#SkSurface_makeImageSnapshot">makeImageSnapshot</a>
|
||||
have the same <a href="#SkSurface_MakeRaster_rowBytes">rowBytes</a>.
|
||||
@ -221,8 +221,8 @@ have the same <a href="#SkSurface_MakeRaster_rowBytes">rowBytes</a>.
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkSurface_MakeRaster_imageInfo"> <code><strong>imageInfo </strong></code> </a></td> <td>
|
||||
<a href="#SkSurface_width">width</a>, <a href="#SkSurface_height">height</a>, <a href="undocumented#Image_Color_Type">Image Color Type</a>, <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>,
|
||||
of <a href="undocumented#Raster_Surface">Raster Surface</a>; <a href="#SkSurface_width">width</a> and <a href="#SkSurface_height">height</a> must be greater than zero</td>
|
||||
width, height, <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>,
|
||||
of <a href="undocumented#Raster_Surface">Raster Surface</a>; width and height must be greater than zero</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRaster_rowBytes"> <code><strong>rowBytes </strong></code> </a></td> <td>
|
||||
interval from one <a href="#Surface">Surface</a> row to the next; may be zero</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRaster_surfaceProps"> <code><strong>surfaceProps </strong></code> </a></td> <td>
|
||||
@ -255,6 +255,8 @@ may be nullptr</td>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkSurface_MakeRaster_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
static sk_sp<SkSurface> MakeRaster(const SkImageInfo& imageInfo,
|
||||
const SkSurfaceProps* props = nullptr)
|
||||
@ -268,13 +270,13 @@ Allocates and zeroes pixel memory. <a href="undocumented#Pixel">Pixel</a> memory
|
||||
<a href="#Surface">Surface</a> is returned if all parameters are valid.
|
||||
Valid parameters include:
|
||||
info dimensions are greater than zero;
|
||||
info contains <a href="undocumented#Image_Color_Type">Image Color Type</a> and <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a> supported by <a href="undocumented#Raster_Surface">Raster Surface</a>.
|
||||
info contains <a href="SkImageInfo_Reference#Color_Type">Color Type</a> and <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> supported by <a href="undocumented#Raster_Surface">Raster Surface</a>.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkSurface_MakeRaster_2_imageInfo"> <code><strong>imageInfo </strong></code> </a></td> <td>
|
||||
<a href="#SkSurface_width">width</a>, <a href="#SkSurface_height">height</a>, <a href="undocumented#Image_Color_Type">Image Color Type</a>, <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>,
|
||||
of <a href="undocumented#Raster_Surface">Raster Surface</a>; <a href="#SkSurface_width">width</a> and <a href="#SkSurface_height">height</a> must be greater than zero</td>
|
||||
width, height, <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>,
|
||||
of <a href="undocumented#Raster_Surface">Raster Surface</a>; width and height must be greater than zero</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRaster_2_props"> <code><strong>props </strong></code> </a></td> <td>
|
||||
LCD striping orientation and setting for device independent fonts;
|
||||
may be nullptr</td>
|
||||
@ -304,13 +306,13 @@ static sk_sp<SkSurface> MakeRasterN32Premul(int width, int height,
|
||||
</pre>
|
||||
|
||||
Allocates raster <a href="#Surface">Surface</a>. <a href="SkCanvas_Reference#Canvas">Canvas</a> returned by <a href="#Surface">Surface</a> draws directly into pixels.
|
||||
Allocates and zeroes pixel memory. <a href="undocumented#Pixel">Pixel</a> memory size is <a href="#SkSurface_height">height</a> times <a href="#SkSurface_width">width</a> times
|
||||
Allocates and zeroes pixel memory. <a href="undocumented#Pixel">Pixel</a> memory size is height times width times
|
||||
four. <a href="undocumented#Pixel">Pixel</a> memory is deleted when <a href="#Surface">Surface</a> is deleted.
|
||||
|
||||
Internally, sets <a href="undocumented#Image_Info">Image Info</a> to <a href="#SkSurface_width">width</a>, <a href="#SkSurface_height">height</a>, <a href="undocumented#Native_Color_Type">Native Color Type</a>, and
|
||||
<a href="undocumented#SkAlphaType">kPremul SkAlphaType</a>.
|
||||
Internally, sets <a href="SkImageInfo_Reference#Image_Info">Image Info</a> to width, height, <a href="SkImageInfo_Reference#Native_Color_Type">Native Color Type</a>, and
|
||||
<a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>.
|
||||
|
||||
<a href="#Surface">Surface</a> is returned if <a href="#SkSurface_width">width</a> and <a href="#SkSurface_height">height</a> are greater than zero.
|
||||
<a href="#Surface">Surface</a> is returned if width and height are greater than zero.
|
||||
|
||||
Use to create <a href="#Surface">Surface</a> that matches <a href="undocumented#SkPMColor">SkPMColor</a>, the native pixel arrangement on
|
||||
the platform. <a href="#Surface">Surface</a> drawn to output device skips converting its pixel format.
|
||||
@ -369,7 +371,7 @@ creates an intermediate MSAA <a href="#Surface">Surface</a> which is used for dr
|
||||
<a href="#Surface">Surface</a> is returned if all parameters are valid. <a href="#SkSurface_MakeFromBackendTexture_backendTexture">backendTexture</a> is valid if
|
||||
its pixel configuration agrees with <a href="#SkSurface_MakeFromBackendTexture_colorSpace">colorSpace</a> and <a href="#SkSurface_MakeFromBackendTexture_context">context</a>; for instance, if
|
||||
<a href="#SkSurface_MakeFromBackendTexture_backendTexture">backendTexture</a> has an sRGB configuration, then <a href="#SkSurface_MakeFromBackendTexture_context">context</a> must support sRGB,
|
||||
and <a href="#SkSurface_MakeFromBackendTexture_colorSpace">colorSpace</a> must be present. Further, <a href="#SkSurface_MakeFromBackendTexture_backendTexture">backendTexture</a> <a href="#SkSurface_width">width</a> and <a href="#SkSurface_height">height</a> must
|
||||
and <a href="#SkSurface_MakeFromBackendTexture_colorSpace">colorSpace</a> must be present. Further, <a href="#SkSurface_MakeFromBackendTexture_backendTexture">backendTexture</a> width and height must
|
||||
not exceed <a href="#SkSurface_MakeFromBackendTexture_context">context</a> capabilities, and the <a href="#SkSurface_MakeFromBackendTexture_context">context</a> must be able to support
|
||||
back-end textures.
|
||||
|
||||
@ -420,10 +422,12 @@ void draw(SkCanvas* canvas) {
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="undocumented#GrBackendTexture">GrBackendTexture</a> <a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a> <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a>
|
||||
<a href="undocumented#GrBackendTexture">GrBackendTexture</a> <a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a><sup><a href="#SkSurface_MakeFromBackendRenderTarget_2">[2]</a></sup> <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a><sup><a href="#SkSurface_MakeRenderTarget_2">[2]</a></sup><sup><a href="#SkSurface_MakeRenderTarget_3">[3]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkSurface_MakeFromBackendTexture_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
static sk_sp<SkSurface> MakeFromBackendTexture(GrContext* context,
|
||||
const GrBackendTexture& backendTexture,
|
||||
@ -440,7 +444,7 @@ creates an intermediate MSAA <a href="#Surface">Surface</a> which is used for dr
|
||||
<a href="#Surface">Surface</a> is returned if all parameters are valid. <a href="#SkSurface_MakeFromBackendTexture_2_backendTexture">backendTexture</a> is valid if
|
||||
its pixel configuration agrees with <a href="#SkSurface_MakeFromBackendTexture_2_colorSpace">colorSpace</a> and <a href="#SkSurface_MakeFromBackendTexture_2_context">context</a>; for instance, if
|
||||
<a href="#SkSurface_MakeFromBackendTexture_2_backendTexture">backendTexture</a> has an sRGB configuration, then <a href="#SkSurface_MakeFromBackendTexture_2_context">context</a> must support sRGB,
|
||||
and <a href="#SkSurface_MakeFromBackendTexture_2_colorSpace">colorSpace</a> must be present. Further, <a href="#SkSurface_MakeFromBackendTexture_2_backendTexture">backendTexture</a> <a href="#SkSurface_width">width</a> and <a href="#SkSurface_height">height</a> must
|
||||
and <a href="#SkSurface_MakeFromBackendTexture_2_colorSpace">colorSpace</a> must be present. Further, <a href="#SkSurface_MakeFromBackendTexture_2_backendTexture">backendTexture</a> width and height must
|
||||
not exceed <a href="#SkSurface_MakeFromBackendTexture_2_context">context</a> capabilities, and the <a href="#SkSurface_MakeFromBackendTexture_2_context">context</a> must be able to support
|
||||
back-end textures.
|
||||
|
||||
@ -457,10 +461,10 @@ one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>,
|
||||
</tr> <tr> <td><a name="SkSurface_MakeFromBackendTexture_2_sampleCnt"> <code><strong>sampleCnt </strong></code> </a></td> <td>
|
||||
samples per pixel, or 0 to disable full scene anti-aliasing</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeFromBackendTexture_2_colorType"> <code><strong>colorType </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#SkColorType">kUnknown SkColorType</a>, <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kRGB 565 SkColorType</a>, <a href="undocumented#SkColorType">kARGB 4444 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kRGBA 8888 SkColorType</a>, <a href="undocumented#SkColorType">kBGRA 8888 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="undocumented#SkColorType">kRGBA F16 SkColorType</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kRGB 565 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kARGB 4444 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kRGBA 8888 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kBGRA 8888 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kRGBA F16 SkColorType</a></td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeFromBackendTexture_2_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
|
||||
range of colors</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeFromBackendTexture_2_surfaceProps"> <code><strong>surfaceProps </strong></code> </a></td> <td>
|
||||
@ -497,7 +501,7 @@ void draw(SkCanvas* canvas) {
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="undocumented#GrBackendTexture">GrBackendTexture</a> <a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a> <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a>
|
||||
<a href="undocumented#GrBackendTexture">GrBackendTexture</a> <a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a><sup><a href="#SkSurface_MakeFromBackendRenderTarget_2">[2]</a></sup> <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a><sup><a href="#SkSurface_MakeRenderTarget_2">[2]</a></sup><sup><a href="#SkSurface_MakeRenderTarget_3">[3]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -518,7 +522,7 @@ valid for the lifetime of returned <a href="#Surface">Surface</a>.
|
||||
<a href="#Surface">Surface</a> is returned if all parameters are valid. <a href="#SkSurface_MakeFromBackendRenderTarget_backendRenderTarget">backendRenderTarget</a> is valid if
|
||||
its pixel configuration agrees with <a href="#SkSurface_MakeFromBackendRenderTarget_colorSpace">colorSpace</a> and <a href="#SkSurface_MakeFromBackendRenderTarget_context">context</a>; for instance, if
|
||||
<a href="#SkSurface_MakeFromBackendRenderTarget_backendRenderTarget">backendRenderTarget</a> has an sRGB configuration, then <a href="#SkSurface_MakeFromBackendRenderTarget_context">context</a> must support sRGB,
|
||||
and <a href="#SkSurface_MakeFromBackendRenderTarget_colorSpace">colorSpace</a> must be present. Further, <a href="#SkSurface_MakeFromBackendRenderTarget_backendRenderTarget">backendRenderTarget</a> <a href="#SkSurface_width">width</a> and <a href="#SkSurface_height">height</a> must
|
||||
and <a href="#SkSurface_MakeFromBackendRenderTarget_colorSpace">colorSpace</a> must be present. Further, <a href="#SkSurface_MakeFromBackendRenderTarget_backendRenderTarget">backendRenderTarget</a> width and height must
|
||||
not exceed <a href="#SkSurface_MakeFromBackendRenderTarget_context">context</a> capabilities, and the <a href="#SkSurface_MakeFromBackendRenderTarget_context">context</a> must be able to support
|
||||
back-end render targets.
|
||||
|
||||
@ -567,10 +571,12 @@ void draw(SkCanvas* canvas) {
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkSurface_MakeFromBackendTexture">MakeFromBackendTexture</a> <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a>
|
||||
<a href="#SkSurface_MakeFromBackendTexture">MakeFromBackendTexture</a><sup><a href="#SkSurface_MakeFromBackendTexture_2">[2]</a></sup> <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a><sup><a href="#SkSurface_MakeRenderTarget_2">[2]</a></sup><sup><a href="#SkSurface_MakeRenderTarget_3">[3]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkSurface_MakeFromBackendRenderTarget_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
static sk_sp<SkSurface> MakeFromBackendRenderTarget(GrContext* context,
|
||||
const GrBackendRenderTarget& backendRenderTarget,
|
||||
@ -585,7 +591,7 @@ valid for the lifetime of returned <a href="#Surface">Surface</a>.
|
||||
<a href="#Surface">Surface</a> is returned if all parameters are valid. <a href="#SkSurface_MakeFromBackendRenderTarget_2_backendRenderTarget">backendRenderTarget</a> is valid if
|
||||
its pixel configuration agrees with <a href="#SkSurface_MakeFromBackendRenderTarget_2_colorSpace">colorSpace</a> and <a href="#SkSurface_MakeFromBackendRenderTarget_2_context">context</a>; for instance, if
|
||||
<a href="#SkSurface_MakeFromBackendRenderTarget_2_backendRenderTarget">backendRenderTarget</a> has an sRGB configuration, then <a href="#SkSurface_MakeFromBackendRenderTarget_2_context">context</a> must support sRGB,
|
||||
and <a href="#SkSurface_MakeFromBackendRenderTarget_2_colorSpace">colorSpace</a> must be present. Further, <a href="#SkSurface_MakeFromBackendRenderTarget_2_backendRenderTarget">backendRenderTarget</a> <a href="#SkSurface_width">width</a> and <a href="#SkSurface_height">height</a> must
|
||||
and <a href="#SkSurface_MakeFromBackendRenderTarget_2_colorSpace">colorSpace</a> must be present. Further, <a href="#SkSurface_MakeFromBackendRenderTarget_2_backendRenderTarget">backendRenderTarget</a> width and height must
|
||||
not exceed <a href="#SkSurface_MakeFromBackendRenderTarget_2_context">context</a> capabilities, and the <a href="#SkSurface_MakeFromBackendRenderTarget_2_context">context</a> must be able to support
|
||||
back-end render targets.
|
||||
|
||||
@ -600,10 +606,10 @@ GPU intermediate memory buffer</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeFromBackendRenderTarget_2_origin"> <code><strong>origin </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>, <a href="undocumented#GrSurfaceOrigin">kTopLeft GrSurfaceOrigin</a></td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeFromBackendRenderTarget_2_colorType"> <code><strong>colorType </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#SkColorType">kUnknown SkColorType</a>, <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kRGB 565 SkColorType</a>, <a href="undocumented#SkColorType">kARGB 4444 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kRGBA 8888 SkColorType</a>, <a href="undocumented#SkColorType">kBGRA 8888 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="undocumented#SkColorType">kRGBA F16 SkColorType</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kRGB 565 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kARGB 4444 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kRGBA 8888 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kBGRA 8888 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kRGBA F16 SkColorType</a></td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeFromBackendRenderTarget_2_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
|
||||
range of colors</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeFromBackendRenderTarget_2_surfaceProps"> <code><strong>surfaceProps </strong></code> </a></td> <td>
|
||||
@ -640,7 +646,7 @@ void draw(SkCanvas* canvas) {
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkSurface_MakeFromBackendTexture">MakeFromBackendTexture</a> <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a>
|
||||
<a href="#SkSurface_MakeFromBackendTexture">MakeFromBackendTexture</a><sup><a href="#SkSurface_MakeFromBackendTexture_2">[2]</a></sup> <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a><sup><a href="#SkSurface_MakeRenderTarget_2">[2]</a></sup><sup><a href="#SkSurface_MakeRenderTarget_3">[3]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -708,10 +714,12 @@ void draw(SkCanvas* canvas) {SkPaint paint;
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a> <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a>
|
||||
<a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a><sup><a href="#SkSurface_MakeFromBackendRenderTarget_2">[2]</a></sup> <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a><sup><a href="#SkSurface_MakeRenderTarget_2">[2]</a></sup><sup><a href="#SkSurface_MakeRenderTarget_3">[3]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkSurface_MakeFromBackendTextureAsRenderTarget_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
static sk_sp<SkSurface> MakeFromBackendTextureAsRenderTarget(GrContext* context,
|
||||
const GrBackendTexture& backendTexture,
|
||||
@ -739,10 +747,10 @@ one of: <a href="undocumented#GrSurfaceOrigin">kBottomLeft GrSurfaceOrigin</a>,
|
||||
</tr> <tr> <td><a name="SkSurface_MakeFromBackendTextureAsRenderTarget_2_sampleCnt"> <code><strong>sampleCnt </strong></code> </a></td> <td>
|
||||
samples per pixel, or 0 to disable full scene anti-aliasing</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeFromBackendTextureAsRenderTarget_2_colorType"> <code><strong>colorType </strong></code> </a></td> <td>
|
||||
one of: <a href="undocumented#SkColorType">kUnknown SkColorType</a>, <a href="undocumented#SkColorType">kAlpha 8 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kRGB 565 SkColorType</a>, <a href="undocumented#SkColorType">kARGB 4444 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kRGBA 8888 SkColorType</a>, <a href="undocumented#SkColorType">kBGRA 8888 SkColorType</a>,
|
||||
<a href="undocumented#SkColorType">kGray 8 SkColorType</a>, <a href="undocumented#SkColorType">kRGBA F16 SkColorType</a></td>
|
||||
one of: <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kRGB 565 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kARGB 4444 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kRGBA 8888 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kBGRA 8888 SkColorType</a>,
|
||||
<a href="SkImageInfo_Reference#SkColorType">kGray 8 SkColorType</a>, <a href="SkImageInfo_Reference#SkColorType">kRGBA F16 SkColorType</a></td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeFromBackendTextureAsRenderTarget_2_colorSpace"> <code><strong>colorSpace </strong></code> </a></td> <td>
|
||||
range of colors</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeFromBackendTextureAsRenderTarget_2_surfaceProps"> <code><strong>surfaceProps </strong></code> </a></td> <td>
|
||||
@ -778,7 +786,7 @@ void draw(SkCanvas* canvas) {SkPaint paint;
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a> <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a>
|
||||
<a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a><sup><a href="#SkSurface_MakeFromBackendRenderTarget_2">[2]</a></sup> <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a><sup><a href="#SkSurface_MakeRenderTarget_2">[2]</a></sup><sup><a href="#SkSurface_MakeRenderTarget_3">[3]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -794,10 +802,10 @@ static sk_sp<SkSurface> MakeRenderTarget(GrContext* context, SkBudgeted bu
|
||||
</pre>
|
||||
|
||||
Returns offscreen <a href="#Surface">Surface</a> on GPU indicated by <a href="#SkSurface_MakeRenderTarget_context">context</a>. Allocates memory for
|
||||
pixels, based on the <a href="#SkSurface_width">width</a>, <a href="#SkSurface_height">height</a>, and <a href="undocumented#Image_Color_Type">Image Color Type</a> in ImageInfo. <a href="#SkSurface_MakeRenderTarget_budgeted">budgeted</a>
|
||||
pixels, based on the width, height, and <a href="SkImageInfo_Reference#Color_Type">Color Type</a> in ImageInfo. <a href="#SkSurface_MakeRenderTarget_budgeted">budgeted</a>
|
||||
selects whether allocation for offscreen pixels is tracked by <a href="#SkSurface_MakeRenderTarget_context">context</a>. <a href="#SkSurface_MakeRenderTarget_imageInfo">imageInfo</a>
|
||||
describes the pixel format in <a href="undocumented#Image_Color_Type">Image Color Type</a>, and transparency in
|
||||
<a href="undocumented#Image_Alpha_Type">Image Alpha Type</a>, and color matching in <a href="undocumented#Color_Space">Color Space</a>.
|
||||
describes the pixel format in <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, and transparency in
|
||||
<a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, and color matching in <a href="undocumented#Color_Space">Color Space</a>.
|
||||
|
||||
<a href="#SkSurface_MakeRenderTarget_sampleCount">sampleCount</a> requests the number of samples per pixel.
|
||||
Pass zero to disable Multi_Sample_Anti_Aliasing. The request is rounded
|
||||
@ -817,8 +825,8 @@ If SK_SUPPORT_GPU is defined as zero, has no effect and returns nullptr.
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRenderTarget_budgeted"> <code><strong>budgeted </strong></code> </a></td> <td>
|
||||
one of: <a href="#SkBudgeted_kNo">SkBudgeted::kNo</a>, <a href="#SkBudgeted_kYes">SkBudgeted::kYes</a></td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRenderTarget_imageInfo"> <code><strong>imageInfo </strong></code> </a></td> <td>
|
||||
<a href="#SkSurface_width">width</a>, <a href="#SkSurface_height">height</a>, <a href="undocumented#Image_Color_Type">Image Color Type</a>, <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>;
|
||||
<a href="#SkSurface_width">width</a>, or <a href="#SkSurface_height">height</a>, or both, may be zero</td>
|
||||
width, height, <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>;
|
||||
width, or height, or both, may be zero</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRenderTarget_sampleCount"> <code><strong>sampleCount </strong></code> </a></td> <td>
|
||||
samples per pixel, or 0 to disable full scene anti-aliasing</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRenderTarget_surfaceOrigin"> <code><strong>surfaceOrigin </strong></code> </a></td> <td>
|
||||
@ -841,10 +849,12 @@ hint that <a href="#Surface">Surface</a> will host <a href="undocumented#Mip_Map
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a> <a href="#SkSurface_MakeFromBackendTextureAsRenderTarget">MakeFromBackendTextureAsRenderTarget</a>
|
||||
<a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a><sup><a href="#SkSurface_MakeFromBackendRenderTarget_2">[2]</a></sup> <a href="#SkSurface_MakeFromBackendTextureAsRenderTarget">MakeFromBackendTextureAsRenderTarget</a><sup><a href="#SkSurface_MakeFromBackendTextureAsRenderTarget_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkSurface_MakeRenderTarget_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
static sk_sp<SkSurface> MakeRenderTarget(GrContext* context, SkBudgeted budgeted,
|
||||
const SkImageInfo& imageInfo, int sampleCount,
|
||||
@ -852,10 +862,10 @@ static sk_sp<SkSurface> MakeRenderTarget(GrContext* context, SkBudgeted bu
|
||||
</pre>
|
||||
|
||||
Returns offscreen <a href="#Surface">Surface</a> on GPU indicated by <a href="#SkSurface_MakeRenderTarget_2_context">context</a>. Allocates memory for
|
||||
pixels, based on the <a href="#SkSurface_width">width</a>, <a href="#SkSurface_height">height</a>, and <a href="undocumented#Image_Color_Type">Image Color Type</a> in ImageInfo. <a href="#SkSurface_MakeRenderTarget_2_budgeted">budgeted</a>
|
||||
pixels, based on the width, height, and <a href="SkImageInfo_Reference#Color_Type">Color Type</a> in ImageInfo. <a href="#SkSurface_MakeRenderTarget_2_budgeted">budgeted</a>
|
||||
selects whether allocation for offscreen pixels is tracked by <a href="#SkSurface_MakeRenderTarget_2_context">context</a>. <a href="#SkSurface_MakeRenderTarget_2_imageInfo">imageInfo</a>
|
||||
describes the pixel format in <a href="undocumented#Image_Color_Type">Image Color Type</a>, and transparency in
|
||||
<a href="undocumented#Image_Alpha_Type">Image Alpha Type</a>, and color matching in <a href="undocumented#Color_Space">Color Space</a>.
|
||||
describes the pixel format in <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, and transparency in
|
||||
<a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, and color matching in <a href="undocumented#Color_Space">Color Space</a>.
|
||||
|
||||
<a href="#SkSurface_MakeRenderTarget_2_sampleCount">sampleCount</a> requests the number of samples per pixel.
|
||||
Pass zero to disable Multi_Sample_Anti_Aliasing. The request is rounded
|
||||
@ -871,8 +881,8 @@ maximum supported count.
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRenderTarget_2_budgeted"> <code><strong>budgeted </strong></code> </a></td> <td>
|
||||
one of: <a href="#SkBudgeted_kNo">SkBudgeted::kNo</a>, <a href="#SkBudgeted_kYes">SkBudgeted::kYes</a></td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRenderTarget_2_imageInfo"> <code><strong>imageInfo </strong></code> </a></td> <td>
|
||||
<a href="#SkSurface_width">width</a>, <a href="#SkSurface_height">height</a>, <a href="undocumented#Image_Color_Type">Image Color Type</a>, <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>,
|
||||
of <a href="undocumented#Raster_Surface">Raster Surface</a>; <a href="#SkSurface_width">width</a>, or <a href="#SkSurface_height">height</a>, or both, may be zero</td>
|
||||
width, height, <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>,
|
||||
of <a href="undocumented#Raster_Surface">Raster Surface</a>; width, or height, or both, may be zero</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRenderTarget_2_sampleCount"> <code><strong>sampleCount </strong></code> </a></td> <td>
|
||||
samples per pixel, or 0 to disable Multi_Sample_Anti_Aliasing</td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRenderTarget_2_props"> <code><strong>props </strong></code> </a></td> <td>
|
||||
@ -894,20 +904,22 @@ or red green blue.</div></fiddle-embed></div>
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a> <a href="#SkSurface_MakeFromBackendTextureAsRenderTarget">MakeFromBackendTextureAsRenderTarget</a>
|
||||
<a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a><sup><a href="#SkSurface_MakeFromBackendRenderTarget_2">[2]</a></sup> <a href="#SkSurface_MakeFromBackendTextureAsRenderTarget">MakeFromBackendTextureAsRenderTarget</a><sup><a href="#SkSurface_MakeFromBackendTextureAsRenderTarget_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkSurface_MakeRenderTarget_3"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
static sk_sp<SkSurface> MakeRenderTarget(GrContext* context, SkBudgeted budgeted,
|
||||
const SkImageInfo& imageInfo)
|
||||
</pre>
|
||||
|
||||
Returns offscreen <a href="#Surface">Surface</a> on GPU indicated by <a href="#SkSurface_MakeRenderTarget_3_context">context</a>. Allocates memory for
|
||||
pixels, based on the <a href="#SkSurface_width">width</a>, <a href="#SkSurface_height">height</a>, and <a href="undocumented#Image_Color_Type">Image Color Type</a> in ImageInfo. <a href="#SkSurface_MakeRenderTarget_3_budgeted">budgeted</a>
|
||||
pixels, based on the width, height, and <a href="SkImageInfo_Reference#Color_Type">Color Type</a> in ImageInfo. <a href="#SkSurface_MakeRenderTarget_3_budgeted">budgeted</a>
|
||||
selects whether allocation for offscreen pixels is tracked by <a href="#SkSurface_MakeRenderTarget_3_context">context</a>. <a href="#SkSurface_MakeRenderTarget_3_imageInfo">imageInfo</a>
|
||||
describes the pixel format in <a href="undocumented#Image_Color_Type">Image Color Type</a>, and transparency in
|
||||
<a href="undocumented#Image_Alpha_Type">Image Alpha Type</a>, and color matching in <a href="undocumented#Color_Space">Color Space</a>.
|
||||
describes the pixel format in <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, and transparency in
|
||||
<a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, and color matching in <a href="undocumented#Color_Space">Color Space</a>.
|
||||
|
||||
<a href="#Surface">Surface</a> bottom-left corner is pinned to the origin.
|
||||
|
||||
@ -918,8 +930,8 @@ describes the pixel format in <a href="undocumented#Image_Color_Type">Image Colo
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRenderTarget_3_budgeted"> <code><strong>budgeted </strong></code> </a></td> <td>
|
||||
one of: <a href="#SkBudgeted_kNo">SkBudgeted::kNo</a>, <a href="#SkBudgeted_kYes">SkBudgeted::kYes</a></td>
|
||||
</tr> <tr> <td><a name="SkSurface_MakeRenderTarget_3_imageInfo"> <code><strong>imageInfo </strong></code> </a></td> <td>
|
||||
<a href="#SkSurface_width">width</a>, <a href="#SkSurface_height">height</a>, <a href="undocumented#Image_Color_Type">Image Color Type</a>, <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>,
|
||||
of <a href="undocumented#Raster_Surface">Raster Surface</a>; <a href="#SkSurface_width">width</a>, or <a href="#SkSurface_height">height</a>, or both, may be zero</td>
|
||||
width, height, <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>,
|
||||
of <a href="undocumented#Raster_Surface">Raster Surface</a>; width, or height, or both, may be zero</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -933,7 +945,7 @@ of <a href="undocumented#Raster_Surface">Raster Surface</a>; <a href="#SkSurface
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a> <a href="#SkSurface_MakeFromBackendTextureAsRenderTarget">MakeFromBackendTextureAsRenderTarget</a>
|
||||
<a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a><sup><a href="#SkSurface_MakeFromBackendRenderTarget_2">[2]</a></sup> <a href="#SkSurface_MakeFromBackendTextureAsRenderTarget">MakeFromBackendTextureAsRenderTarget</a><sup><a href="#SkSurface_MakeFromBackendTextureAsRenderTarget_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -958,7 +970,7 @@ one or greater</td>
|
||||
|
||||
### Return Value
|
||||
|
||||
<a href="#Surface">Surface</a> if <a href="#SkSurface_width">width</a> and <a href="#SkSurface_height">height</a> are positive; otherwise, nullptr
|
||||
<a href="#Surface">Surface</a> if width and height are positive; otherwise, nullptr
|
||||
|
||||
### Example
|
||||
|
||||
@ -975,7 +987,7 @@ surf->makeImageSnapshot() == nullptr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkSurface_MakeRaster">MakeRaster</a> <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a>
|
||||
<a href="#SkSurface_MakeRaster">MakeRaster</a><sup><a href="#SkSurface_MakeRaster_2">[2]</a></sup> <a href="#SkSurface_MakeRenderTarget">MakeRenderTarget</a><sup><a href="#SkSurface_MakeRenderTarget_2">[2]</a></sup><sup><a href="#SkSurface_MakeRenderTarget_3">[3]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1194,7 +1206,7 @@ GrBackendObject getTextureHandle(BackendHandleAccess backendHandleAccess)
|
||||
Returns the GPU back-end reference of the texture used by <a href="#Surface">Surface</a>, or zero
|
||||
if <a href="#Surface">Surface</a> is not backed by a GPU texture.
|
||||
|
||||
The returned texture handle is only valid until the next <a href="#SkSurface_draw">draw</a> into <a href="#Surface">Surface</a>,
|
||||
The returned texture handle is only valid until the next draw into <a href="#Surface">Surface</a>,
|
||||
or when <a href="#Surface">Surface</a> is deleted.
|
||||
|
||||
### Parameters
|
||||
@ -1232,7 +1244,7 @@ by <a href="#Surface">Surface</a> in <a href="#SkSurface_getRenderTargetHandle_b
|
||||
Return false if <a href="#Surface">Surface</a> is not backed by a GPU render target, and leaves
|
||||
<a href="#SkSurface_getRenderTargetHandle_backendObject">backendObject</a> unchanged.
|
||||
|
||||
The returned render target handle is only valid until the next <a href="#SkSurface_draw">draw</a> into <a href="#Surface">Surface</a>,
|
||||
The returned render target handle is only valid until the next draw into <a href="#Surface">Surface</a>,
|
||||
or when <a href="#Surface">Surface</a> is deleted.
|
||||
|
||||
In OpenGL this returns the frame buffer object ID.
|
||||
@ -1282,7 +1294,7 @@ drawing <a href="SkCanvas_Reference#Canvas">Canvas</a> for <a href="#Surface">Su
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkSurface_makeSurface">makeSurface</a> <a href="#SkSurface_makeImageSnapshot">makeImageSnapshot</a> <a href="#SkSurface_draw">draw</a>
|
||||
<a href="#SkSurface_makeSurface">makeSurface</a> <a href="#SkSurface_makeImageSnapshot">makeImageSnapshot</a> <a href="#SkSurface_draw">draw</a><sup><a href="#SkSurface_draw_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1297,14 +1309,14 @@ Returns a compatible <a href="#Surface">Surface</a>, or nullptr. Returned <a hre
|
||||
the same raster, GPU, or null properties as the original. Returned <a href="#Surface">Surface</a>
|
||||
does not share the same pixels.
|
||||
|
||||
Returns nullptr if <a href="#SkSurface_makeSurface_imageInfo">imageInfo</a> <a href="#SkSurface_width">width</a> or <a href="#SkSurface_height">height</a> are zero, or if <a href="#SkSurface_makeSurface_imageInfo">imageInfo</a>
|
||||
Returns nullptr if <a href="#SkSurface_makeSurface_imageInfo">imageInfo</a> width or height are zero, or if <a href="#SkSurface_makeSurface_imageInfo">imageInfo</a>
|
||||
is incompatible with <a href="#Surface">Surface</a>.
|
||||
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkSurface_makeSurface_imageInfo"> <code><strong>imageInfo </strong></code> </a></td> <td>
|
||||
<a href="#SkSurface_width">width</a>, <a href="#SkSurface_height">height</a>, <a href="undocumented#Image_Color_Type">Image Color Type</a>, <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>,
|
||||
of <a href="#Surface">Surface</a>; <a href="#SkSurface_width">width</a> and <a href="#SkSurface_height">height</a> must be greater than zero</td>
|
||||
width, height, <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>, <a href="undocumented#Color_Space">Color Space</a>,
|
||||
of <a href="#Surface">Surface</a>; width and height must be greater than zero</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -1318,7 +1330,7 @@ compatible <a href="#Surface">Surface</a> or nullptr
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkSurface_makeImageSnapshot">makeImageSnapshot</a> <a href="#SkSurface_getCanvas">getCanvas</a> <a href="#SkSurface_draw">draw</a>
|
||||
<a href="#SkSurface_makeImageSnapshot">makeImageSnapshot</a> <a href="#SkSurface_getCanvas">getCanvas</a> <a href="#SkSurface_draw">draw</a><sup><a href="#SkSurface_draw_2">[2]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1343,7 +1355,7 @@ are not captured. <a href="SkImage_Reference#Image">Image</a> allocation is acco
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkSurface_draw">draw</a> <a href="#SkSurface_getCanvas">getCanvas</a>
|
||||
<a href="#SkSurface_draw">draw</a><sup><a href="#SkSurface_draw_2">[2]</a></sup> <a href="#SkSurface_getCanvas">getCanvas</a>
|
||||
|
||||
---
|
||||
|
||||
@ -1390,7 +1402,7 @@ and so on; or nullptr</td>
|
||||
bool peekPixels(SkPixmap* pixmap)
|
||||
</pre>
|
||||
|
||||
Copies <a href="#Surface">Surface</a> pixel address, row bytes, and <a href="undocumented#Image_Info">Image Info</a> to <a href="SkPixmap_Reference#Pixmap">Pixmap</a>, if address
|
||||
Copies <a href="#Surface">Surface</a> pixel address, row bytes, and <a href="SkImageInfo_Reference#Image_Info">Image Info</a> to <a href="SkPixmap_Reference#Pixmap">Pixmap</a>, if address
|
||||
is available, and returns true. If pixel address is not available, return
|
||||
false and leave <a href="SkPixmap_Reference#Pixmap">Pixmap</a> unchanged.
|
||||
|
||||
@ -1413,7 +1425,7 @@ true if <a href="#Surface">Surface</a> has direct access to pixels
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkSurface_readPixels">readPixels</a>
|
||||
<a href="#SkSurface_readPixels">readPixels</a><sup><a href="#SkSurface_readPixels_2">[2]</a></sup><sup><a href="#SkSurface_readPixels_3">[3]</a></sup>
|
||||
|
||||
---
|
||||
|
||||
@ -1435,7 +1447,7 @@ Pixels are readable when <a href="#Surface">Surface</a> is raster, or backed by
|
||||
|
||||
The destination pixel storage must be allocated by the caller.
|
||||
|
||||
<a href="undocumented#Pixel">Pixel</a> values are converted only if <a href="undocumented#Image_Color_Type">Image Color Type</a> and <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a>
|
||||
<a href="undocumented#Pixel">Pixel</a> values are converted only if <a href="SkImageInfo_Reference#Color_Type">Color Type</a> and <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>
|
||||
do not match. Only pixels within both source and destination rectangles
|
||||
are copied. <a href="#SkSurface_readPixels_dst">dst</a> contents outside <a href="SkRect_Reference#Rect">Rect</a> intersection are unchanged.
|
||||
|
||||
@ -1474,6 +1486,8 @@ true if pixels were copied
|
||||
|
||||
---
|
||||
|
||||
<a name="SkSurface_readPixels_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY)
|
||||
</pre>
|
||||
@ -1489,7 +1503,7 @@ Pixels are readable when <a href="#Surface">Surface</a> is raster, or backed by
|
||||
|
||||
The destination pixel storage must be allocated by the caller.
|
||||
|
||||
<a href="undocumented#Pixel">Pixel</a> values are converted only if <a href="undocumented#Image_Color_Type">Image Color Type</a> and <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a>
|
||||
<a href="undocumented#Pixel">Pixel</a> values are converted only if <a href="SkImageInfo_Reference#Color_Type">Color Type</a> and <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>
|
||||
do not match. Only pixels within both source and destination rectangles
|
||||
are copied. <a href="#SkSurface_readPixels_2_dstPixels">dstPixels</a> contents outside <a href="SkRect_Reference#Rect">Rect</a> intersection are unchanged.
|
||||
|
||||
@ -1506,7 +1520,7 @@ Does not copy, and returns false if:
|
||||
### Parameters
|
||||
|
||||
<table> <tr> <td><a name="SkSurface_readPixels_2_dstInfo"> <code><strong>dstInfo </strong></code> </a></td> <td>
|
||||
<a href="#SkSurface_width">width</a>, <a href="#SkSurface_height">height</a>, <a href="undocumented#Image_Color_Type">Image Color Type</a>, and <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a> of <a href="#SkSurface_readPixels_2_dstPixels">dstPixels</a></td>
|
||||
width, height, <a href="SkImageInfo_Reference#Color_Type">Color Type</a>, and <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> of <a href="#SkSurface_readPixels_2_dstPixels">dstPixels</a></td>
|
||||
</tr> <tr> <td><a name="SkSurface_readPixels_2_dstPixels"> <code><strong>dstPixels </strong></code> </a></td> <td>
|
||||
storage for pixels; <a href="#SkSurface_readPixels_2_dstInfo">dstInfo</a>.<a href="#SkSurface_height">height</a> times <a href="#SkSurface_readPixels_2_dstRowBytes">dstRowBytes</a>, or larger</td>
|
||||
</tr> <tr> <td><a name="SkSurface_readPixels_2_dstRowBytes"> <code><strong>dstRowBytes </strong></code> </a></td> <td>
|
||||
@ -1534,6 +1548,8 @@ The copied quarter ovals overdraw the original oval.</div></fiddle-embed></div>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkSurface_readPixels_3"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
bool readPixels(const SkBitmap& dst, int srcX, int srcY)
|
||||
</pre>
|
||||
@ -1549,7 +1565,7 @@ Pixels are readable when <a href="#Surface">Surface</a> is raster, or backed by
|
||||
|
||||
The destination pixel storage must be allocated by the caller.
|
||||
|
||||
<a href="undocumented#Pixel">Pixel</a> values are converted only if <a href="undocumented#Image_Color_Type">Image Color Type</a> and <a href="undocumented#Image_Alpha_Type">Image Alpha Type</a>
|
||||
<a href="undocumented#Pixel">Pixel</a> values are converted only if <a href="SkImageInfo_Reference#Color_Type">Color Type</a> and <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>
|
||||
do not match. Only pixels within both source and destination rectangles
|
||||
are copied. <a href="#SkSurface_readPixels_3_dst">dst</a> contents outside <a href="SkRect_Reference#Rect">Rect</a> intersection are unchanged.
|
||||
|
||||
@ -1677,7 +1693,7 @@ with which they were created.
|
||||
|
||||
If <a href="#kNo">GrSemaphoresSubmitted::kNo</a> is returned, the GPU back-end did not create or
|
||||
add any semaphores to signal on the GPU; the caller should not instruct the GPU
|
||||
to <a href="#SkSurface_wait">wait</a> on any of the semaphores.
|
||||
to wait on any of the semaphores.
|
||||
|
||||
Pending surface commands are flushed regardless of the return result.
|
||||
|
||||
@ -1707,10 +1723,10 @@ one of: <a href="#kYes">GrSemaphoresSubmitted::kYes</a>, <a href="#kNo">GrSemaph
|
||||
bool wait(int numSemaphores, const GrBackendSemaphore* waitSemaphores)
|
||||
</pre>
|
||||
|
||||
Inserts a list of GPU semaphores that the current GPU-backed API must <a href="#SkSurface_wait">wait</a> on before
|
||||
Inserts a list of GPU semaphores that the current GPU-backed API must wait on before
|
||||
executing any more commands on the GPU for this surface. Skia will take ownership of the
|
||||
underlying semaphores and delete them once they have been signaled and waited on.
|
||||
If this call returns false, then the GPU back-end will not <a href="#SkSurface_wait">wait</a> on any passed in semaphores,
|
||||
If this call returns false, then the GPU back-end will not wait on any passed in semaphores,
|
||||
and the client will still own the semaphores.
|
||||
|
||||
### Parameters
|
||||
@ -1767,10 +1783,12 @@ true if supported
|
||||
|
||||
### See Also
|
||||
|
||||
<a href="#SkSurface_draw">draw</a> <a href="undocumented#SkSurfaceCharacterization">SkSurfaceCharacterization</a> <a href="undocumented#SkDeferredDisplayList">SkDeferredDisplayList</a>
|
||||
<a href="#SkSurface_draw">draw</a><sup><a href="#SkSurface_draw_2">[2]</a></sup> <a href="undocumented#SkSurfaceCharacterization">SkSurfaceCharacterization</a> <a href="undocumented#SkDeferredDisplayList">SkDeferredDisplayList</a>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkSurface_draw_2"></a>
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
bool draw(SkDeferredDisplayList* deferredDisplayList)
|
||||
</pre>
|
||||
|
@ -3500,6 +3500,14 @@
|
||||
"hash": "36a995442c081ee779ecab2962d36e69",
|
||||
"file": "SkPath_Reference",
|
||||
"name": "Path_2"
|
||||
},
|
||||
"SkAlphaType": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkAlphaType"
|
||||
},
|
||||
"SkAutoCanvasRestore_SkCanvas_star": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n SkPaint p;\n p.setAntiAlias(true);\n p.setTextSize(64);\n for (SkScalar sx : { -1, 1 } ) {\n for (SkScalar sy : { -1, 1 } ) {\n SkAutoCanvasRestore autoRestore(canvas, true);\n SkMatrix m = SkMatrix::MakeAll(sx, 1, 96, 0, sy, 64, 0, 0, 1);\n canvas->concat(m);\n canvas->drawString(\"R\", 0, 0, p);\n }\n }\n}",
|
||||
@ -4596,6 +4604,22 @@
|
||||
"hash": "8b128e067881f9251357653692fa28da",
|
||||
"file": "SkCanvas_Reference",
|
||||
"name": "SkCanvas::writePixels_2"
|
||||
},
|
||||
"SkColorType": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkColorType"
|
||||
},
|
||||
"SkDestinationSurfaceColorMode": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkDestinationSurfaceColorMode"
|
||||
},
|
||||
"SkIPoint_add_operator": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n auto draw_lines = [=](const SkIPoint pts[], size_t count, SkPaint& paint) -> void {\n for (size_t i = 0; i < count - 1; ++i) {\n SkPoint p0, p1;\n p0.iset(pts[i]);\n p1.iset(pts[i + 1]);\n canvas->drawLine(p0, p1, paint);\n }\n };\n SkIPoint points[] = { { 3, 1 }, { 4, 2 }, { 5, 1 }, { 7, 3 } };\n SkPaint paint;\n paint.setAntiAlias(true);\n paint.setStyle(SkPaint::kStroke_Style);\n canvas->scale(30, 15);\n draw_lines(points, SK_ARRAY_COUNT(points), paint);\n SkIPoint mod = {4, 1};\n for (auto& point : points) {\n point = point + mod;\n mod.fX -= 1;\n mod.fY += 1;\n }\n paint.setColor(SK_ColorRED);\n draw_lines(points, SK_ARRAY_COUNT(points), paint);\n}",
|
||||
@ -4628,6 +4652,318 @@
|
||||
"hash": "a01e533dc7ab34ed728dc4e7a5f1f0ee",
|
||||
"file": "SkIPoint_Reference",
|
||||
"name": "SkIPoint::operator-=(const SkIVector& v)"
|
||||
},
|
||||
"SkImageInfo_ByteSizeOverflowed": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::ByteSizeOverflowed"
|
||||
},
|
||||
"SkImageInfo_Make": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::Make"
|
||||
},
|
||||
"SkImageInfo_MakeA8": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::MakeA8"
|
||||
},
|
||||
"SkImageInfo_MakeN32": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::MakeN32"
|
||||
},
|
||||
"SkImageInfo_MakeN32Premul": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::MakeN32Premul"
|
||||
},
|
||||
"SkImageInfo_MakeN32Premul_2": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::MakeN32Premul_2"
|
||||
},
|
||||
"SkImageInfo_MakeS32": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::MakeS32"
|
||||
},
|
||||
"SkImageInfo_MakeUnknown": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::MakeUnknown"
|
||||
},
|
||||
"SkImageInfo_MakeUnknown_2": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::MakeUnknown_2"
|
||||
},
|
||||
"SkImageInfo_alphaType": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::alphaType"
|
||||
},
|
||||
"SkImageInfo_bounds": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::bounds()"
|
||||
},
|
||||
"SkImageInfo_bytesPerPixel": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::bytesPerPixel"
|
||||
},
|
||||
"SkImageInfo_colorSpace": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::colorSpace"
|
||||
},
|
||||
"SkImageInfo_colorType": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::colorType"
|
||||
},
|
||||
"SkImageInfo_computeByteSize": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::computeByteSize"
|
||||
},
|
||||
"SkImageInfo_computeMinByteSize": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::computeMinByteSize"
|
||||
},
|
||||
"SkImageInfo_computeOffset": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::computeOffset"
|
||||
},
|
||||
"SkImageInfo_dimensions": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::dimensions()"
|
||||
},
|
||||
"SkImageInfo_empty_constructor": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::SkImageInfo()"
|
||||
},
|
||||
"SkImageInfo_equal1_operator": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::operator==(const SkImageInfo& other)_const"
|
||||
},
|
||||
"SkImageInfo_flatten": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::flatten()"
|
||||
},
|
||||
"SkImageInfo_gammaCloseToSRGB": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::gammaCloseToSRGB"
|
||||
},
|
||||
"SkImageInfo_height": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::height()"
|
||||
},
|
||||
"SkImageInfo_isEmpty": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::isEmpty"
|
||||
},
|
||||
"SkImageInfo_isOpaque": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::isOpaque"
|
||||
},
|
||||
"SkImageInfo_makeAlphaType": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::makeAlphaType"
|
||||
},
|
||||
"SkImageInfo_makeColorSpace": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::makeColorSpace"
|
||||
},
|
||||
"SkImageInfo_makeColorType": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::makeColorType"
|
||||
},
|
||||
"SkImageInfo_makeWH": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::makeWH"
|
||||
},
|
||||
"SkImageInfo_minRowBytes": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::minRowBytes"
|
||||
},
|
||||
"SkImageInfo_minRowBytes64": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::minRowBytes64"
|
||||
},
|
||||
"SkImageInfo_notequal1_operator": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::operator!=(const SkImageInfo& other)_const"
|
||||
},
|
||||
"SkImageInfo_refColorSpace": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::refColorSpace"
|
||||
},
|
||||
"SkImageInfo_reset": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::reset()"
|
||||
},
|
||||
"SkImageInfo_shiftPerPixel": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::shiftPerPixel"
|
||||
},
|
||||
"SkImageInfo_unflatten": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::unflatten()"
|
||||
},
|
||||
"SkImageInfo_validRowBytes": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::validRowBytes"
|
||||
},
|
||||
"SkImageInfo_validate": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::validate()"
|
||||
},
|
||||
"SkImageInfo_width": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkImageInfo::width()"
|
||||
},
|
||||
"SkImage_DeferredTextureImageUsageParams": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
@ -6716,6 +7052,14 @@
|
||||
"hash": "c9033080af68efc0f270d748f1c0e011",
|
||||
"file": "SkSurface_Reference",
|
||||
"name": "SkSurface::wait()"
|
||||
},
|
||||
"SkYUVColorSpace": {
|
||||
"code": "void draw(SkCanvas* canvas) {\n // incomplete\n}",
|
||||
"width": 256,
|
||||
"height": 256,
|
||||
"hash": "882e8e0103048009a25cfc20400492f7",
|
||||
"file": "SkImageInfo_Reference",
|
||||
"name": "SkYUVColorSpace"
|
||||
}
|
||||
}
|
||||
var canvas
|
||||
|
@ -378,75 +378,6 @@ void flush()
|
||||
|
||||
# <a name="SkISize"></a> Struct SkISize
|
||||
|
||||
# <a name="Image_Alpha_Type"></a> Image Alpha Type
|
||||
|
||||
## <a name="SkAlphaType"></a> Enum SkAlphaType
|
||||
|
||||
### Constants
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><a name="kUnknown_SkAlphaType"> <code><strong>kUnknown_SkAlphaType </strong></code> </a></td><td>0</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="kOpaque_SkAlphaType"> <code><strong>kOpaque_SkAlphaType </strong></code> </a></td><td>1</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="kPremul_SkAlphaType"> <code><strong>kPremul_SkAlphaType </strong></code> </a></td><td>2</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="kUnpremul_SkAlphaType"> <code><strong>kUnpremul_SkAlphaType </strong></code> </a></td><td>3</td><td></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
# <a name="Image_Color_Type"></a> Image Color Type
|
||||
|
||||
## <a name="Native_Color_Type"></a> Native Color Type
|
||||
|
||||
## <a name="SkColorType"></a> Enum SkColorType
|
||||
|
||||
### Constants
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><a name="kUnknown_SkColorType"> <code><strong>kUnknown_SkColorType </strong></code> </a></td><td>0</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="kAlpha_8_SkColorType"> <code><strong>kAlpha_8_SkColorType </strong></code> </a></td><td>1</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="kRGB_565_SkColorType"> <code><strong>kRGB_565_SkColorType </strong></code> </a></td><td>2</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="kARGB_4444_SkColorType"> <code><strong>kARGB_4444_SkColorType </strong></code> </a></td><td>3</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="kRGBA_8888_SkColorType"> <code><strong>kRGBA_8888_SkColorType </strong></code> </a></td><td>4</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="kBGRA_8888_SkColorType"> <code><strong>kBGRA_8888_SkColorType </strong></code> </a></td><td>5</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="kIndex_8_SkColorType"> <code><strong>kIndex_8_SkColorType </strong></code> </a></td><td>6</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="kGray_8_SkColorType"> <code><strong>kGray_8_SkColorType </strong></code> </a></td><td>7</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="kRGBA_F16_SkColorType"> <code><strong>kRGBA_F16_SkColorType </strong></code> </a></td><td>8</td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### Constants
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><a name="kN32_SkColorType"> <code><strong>kN32_SkColorType </strong></code> </a></td><td>4</td><td></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
# <a name="Image_Filter"></a> Image Filter
|
||||
|
||||
## <a name="Scaling"></a> Scaling
|
||||
@ -462,139 +393,6 @@ void toString(SkString* str) const
|
||||
|
||||
---
|
||||
|
||||
# <a name="Image_Info"></a> Image Info
|
||||
|
||||
# <a name="SkImageInfo"></a> Struct SkImageInfo
|
||||
|
||||
<a name="SkImageInfo_empty_constructor"></a>
|
||||
## SkImageInfo
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
SkImageInfo()
|
||||
</pre>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImageInfo_MakeN32Premul"></a>
|
||||
## MakeN32Premul
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
static SkImageInfo MakeN32Premul(int width, int height, sk_sp<SkColorSpace> cs = nullptr)
|
||||
</pre>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImageInfo_makeColorSpace"></a>
|
||||
## makeColorSpace
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
SkImageInfo makeColorSpace(sk_sp<SkColorSpace> cs) const
|
||||
</pre>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImageInfo_minRowBytes"></a>
|
||||
## minRowBytes
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
size_t minRowBytes() const
|
||||
</pre>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImageInfo_isOpaque"></a>
|
||||
## isOpaque
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
bool isOpaque() const
|
||||
</pre>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImageInfo_bytesPerPixel"></a>
|
||||
## bytesPerPixel
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
int bytesPerPixel() const
|
||||
</pre>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImageInfo_height"></a>
|
||||
## height
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
int height() const
|
||||
</pre>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImageInfo_width"></a>
|
||||
## width
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
int width() const
|
||||
</pre>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImageInfo_colorType"></a>
|
||||
## colorType
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
SkColorType colorType() const
|
||||
</pre>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImageInfo_alphaType"></a>
|
||||
## alphaType
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
SkAlphaType alphaType() const
|
||||
</pre>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImageInfo_colorSpace"></a>
|
||||
## colorSpace
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
SkColorSpace* colorSpace() const
|
||||
</pre>
|
||||
|
||||
---
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
bool isOpaque() const
|
||||
</pre>
|
||||
|
||||
---
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
size_t minRowBytes() const
|
||||
</pre>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImageInfo_computeByteSize"></a>
|
||||
## computeByteSize
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
size_t computeByteSize(size_t rowBytes) const
|
||||
</pre>
|
||||
|
||||
---
|
||||
|
||||
<a name="SkImageInfo_validate"></a>
|
||||
## validate
|
||||
|
||||
<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
|
||||
void validate() const
|
||||
</pre>
|
||||
|
||||
---
|
||||
|
||||
# <a name="Image_Scaling"></a> Image Scaling
|
||||
|
||||
# <a name="Left_Side_Bearing"></a> Left Side Bearing
|
||||
@ -808,6 +606,9 @@ template <typename D, typename S> inline bool SkTFitsIn(S s)
|
||||
<tr>
|
||||
<td><a name="SK_MaxS32"> <code><strong>SK_MaxS32 </strong></code> </a></td><td>to be written</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a name="SK_MaxSizeT"> <code><strong>SK_MaxSizeT </strong></code> </a></td><td>to be written</td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
# <a name="OS_X"></a> OS X
|
||||
|
@ -7,6 +7,10 @@
|
||||
|
||||
#include "bookmaker.h"
|
||||
|
||||
#ifdef SK_BUILD_FOR_WIN
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
DEFINE_string2(status, a, "", "File containing status of documentation. (Use in place of -b -i)");
|
||||
DEFINE_string2(bmh, b, "", "Path to a *.bmh file or a directory.");
|
||||
DEFINE_bool2(catalog, c, false, "Write example catalog.htm. (Requires -b -f -r)");
|
||||
@ -1054,7 +1058,17 @@ void TextParser::reportWarning(const char* errorStr) const {
|
||||
spaces -= lineLen;
|
||||
lineLen = err.lineLength();
|
||||
}
|
||||
SkDebugf("\n%s(%zd): error: %s\n", fFileName.c_str(), err.fLineCount, errorStr);
|
||||
string fileName;
|
||||
#ifdef SK_BUILD_FOR_WIN
|
||||
TCHAR pathChars[MAX_PATH];
|
||||
DWORD pathLen = GetCurrentDirectory(MAX_PATH, pathChars);
|
||||
for (DWORD index = 0; index < pathLen; ++index) {
|
||||
fileName += pathChars[index] == (char)pathChars[index] ? (char)pathChars[index] : '?';
|
||||
}
|
||||
fileName += '\\';
|
||||
#endif
|
||||
fileName += fFileName;
|
||||
SkDebugf("\n%s(%zd): error: %s\n", fileName.c_str(), err.fLineCount, errorStr);
|
||||
if (0 == lineLen) {
|
||||
SkDebugf("[blank line]\n");
|
||||
} else {
|
||||
@ -1598,6 +1612,9 @@ int main(int argc, char** const argv) {
|
||||
}
|
||||
bmhParser.reset();
|
||||
if (!FLAGS_bmh.isEmpty()) {
|
||||
if (FLAGS_tokens) {
|
||||
IncludeParser::RemoveFile(FLAGS_bmh[0], FLAGS_include[0]);
|
||||
}
|
||||
if (!bmhParser.parseFile(FLAGS_bmh[0], ".bmh")) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ enum class KeyWord {
|
||||
kElse,
|
||||
kEndif,
|
||||
kEnum,
|
||||
kError,
|
||||
kFloat,
|
||||
kFriend,
|
||||
kIf,
|
||||
@ -1163,6 +1164,7 @@ public:
|
||||
kYes, // resolved, output
|
||||
kOut, // not resolved, but output
|
||||
kLiteral, // output untouched (FIXME: is this really different from kOut?)
|
||||
kClone, // resolved, output, with references to clones as well
|
||||
};
|
||||
|
||||
enum class Exemplary {
|
||||
@ -1190,6 +1192,7 @@ public:
|
||||
#define R_Y Resolvable::kYes
|
||||
#define R_N Resolvable::kNo
|
||||
#define R_O Resolvable::kOut
|
||||
#define R_C Resolvable::kClone
|
||||
|
||||
#define E_Y Exemplary::kYes
|
||||
#define E_N Exemplary::kNo
|
||||
@ -1231,7 +1234,7 @@ public:
|
||||
, { "List", nullptr, MarkType::kList, R_Y, E_N, M(Method) | M_CSST | M_E | M_D }
|
||||
, { "Literal", nullptr, MarkType::kLiteral, R_N, E_N, M(Code) }
|
||||
, { "", nullptr, MarkType::kMarkChar, R_N, E_N, 0 }
|
||||
, { "Member", nullptr, MarkType::kMember, R_Y, E_N, M(Class) | M(Struct) }
|
||||
, { "Member", nullptr, MarkType::kMember, R_Y, E_N, M_CSST }
|
||||
, { "Method", &fMethodMap, MarkType::kMethod, R_Y, E_Y, M_CSST }
|
||||
, { "NoExample", nullptr, MarkType::kNoExample, R_O, E_N, M_CSST | M_E | M(Method) }
|
||||
, { "Outdent", nullptr, MarkType::kOutdent, R_N, E_N, M(Code) }
|
||||
@ -1241,7 +1244,7 @@ public:
|
||||
, { "Return", nullptr, MarkType::kReturn, R_Y, E_N, M(Method) }
|
||||
, { "", nullptr, MarkType::kRoot, R_Y, E_N, 0 }
|
||||
, { "", nullptr, MarkType::kRow, R_Y, E_N, M(Table) | M(List) }
|
||||
, { "SeeAlso", nullptr, MarkType::kSeeAlso, R_Y, E_N,
|
||||
, { "SeeAlso", nullptr, MarkType::kSeeAlso, R_C, E_N,
|
||||
M_CSST | M_E | M(Method) | M(Typedef) }
|
||||
, { "Set", nullptr, MarkType::kSet, R_N, E_N, M(Example) | M(NoExample) }
|
||||
, { "StdOut", nullptr, MarkType::kStdOut, R_N, E_N, M(Example) | M(NoExample) }
|
||||
@ -1475,7 +1478,7 @@ public:
|
||||
IClassDefinition* defineClass(const Definition& includeDef, const string& className);
|
||||
void dumpClassTokens(IClassDefinition& classDef);
|
||||
void dumpComment(const Definition& );
|
||||
void dumpEnum(const Definition& );
|
||||
void dumpEnum(const Definition& , const string& name);
|
||||
void dumpMethod(const Definition& );
|
||||
void dumpMember(const Definition& );
|
||||
bool dumpTokens(const string& directory);
|
||||
@ -1523,7 +1526,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
string name(path);
|
||||
return parseInclude(name);
|
||||
return this->parseInclude(name);
|
||||
}
|
||||
|
||||
bool parseInclude(const string& name);
|
||||
@ -1549,6 +1552,9 @@ public:
|
||||
this->addDefinition(container);
|
||||
}
|
||||
|
||||
static void RemoveFile(const char* docs, const char* includes);
|
||||
static void RemoveOneFile(const char* docs, const char* includesFileOrPath);
|
||||
|
||||
void reset() override {
|
||||
INHERITED::resetCommon();
|
||||
fRootTopic = nullptr;
|
||||
@ -1679,6 +1685,14 @@ public:
|
||||
this->lf(1);
|
||||
}
|
||||
|
||||
void writeTableRow(size_t pad1, const string& col1, size_t pad2, const string& col2) {
|
||||
this->lf(1);
|
||||
string row = "# " + col1 + string(pad1 - col1.length(), ' ') + " # " +
|
||||
col2 + string(pad2 - col2.length(), ' ') + " ##";
|
||||
this->writeString(row);
|
||||
this->lf(1);
|
||||
}
|
||||
|
||||
void writeTableTrailer() {
|
||||
this->lf(1);
|
||||
this->writeString("#Table ##");
|
||||
@ -1816,6 +1830,7 @@ public:
|
||||
void enumHeaderOut(const RootDefinition* root, const Definition& child);
|
||||
void enumMembersOut(const RootDefinition* root, Definition& child);
|
||||
void enumSizeItems(const Definition& child);
|
||||
Definition* findMemberCommentBlock(const vector<Definition*>& bmhChildren, const string& name) const;
|
||||
int lookupMethod(const PunctuationState punctuation, const Word word,
|
||||
const int start, const int run, int lastWrite,
|
||||
const char* data, bool hasIndirection);
|
||||
@ -1991,7 +2006,8 @@ private:
|
||||
const Definition* findParamType();
|
||||
const Definition* isDefined(const TextParser& parser, const string& ref, bool report) const;
|
||||
string linkName(const Definition* ) const;
|
||||
string linkRef(const string& leadingSpaces, const Definition*, const string& ref) const;
|
||||
string linkRef(const string& leadingSpaces, const Definition*, const string& ref,
|
||||
BmhParser::Resolvable ) const;
|
||||
void markTypeOut(Definition* );
|
||||
void mdHeaderOut(int depth) { mdHeaderOutLF(depth, 2); }
|
||||
void mdHeaderOutLF(int depth, int lf);
|
||||
|
@ -6,6 +6,8 @@
|
||||
*/
|
||||
|
||||
#include "bookmaker.h"
|
||||
#include "SkOSFile.h"
|
||||
#include "SkOSPath.h"
|
||||
|
||||
const IncludeKey kKeyWords[] = {
|
||||
{ "", KeyWord::kNone, KeyProperty::kNone },
|
||||
@ -22,6 +24,7 @@ const IncludeKey kKeyWords[] = {
|
||||
{ "else", KeyWord::kElse, KeyProperty::kPreprocessor },
|
||||
{ "endif", KeyWord::kEndif, KeyProperty::kPreprocessor },
|
||||
{ "enum", KeyWord::kEnum, KeyProperty::kObject },
|
||||
{ "error", KeyWord::kError, KeyProperty::kPreprocessor },
|
||||
{ "float", KeyWord::kFloat, KeyProperty::kNumber },
|
||||
{ "friend", KeyWord::kFriend, KeyProperty::kModifier },
|
||||
{ "if", KeyWord::kIf, KeyProperty::kPreprocessor },
|
||||
@ -156,6 +159,7 @@ bool IncludeParser::checkForWord() {
|
||||
// these do not link to other # directives
|
||||
case KeyWord::kDefine:
|
||||
case KeyWord::kInclude:
|
||||
case KeyWord::kError:
|
||||
break;
|
||||
// these start a # directive link
|
||||
case KeyWord::kIf:
|
||||
@ -527,7 +531,7 @@ void IncludeParser::dumpClassTokens(IClassDefinition& classDef) {
|
||||
switch (token.fMarkType) {
|
||||
case MarkType::kEnum:
|
||||
case MarkType::kEnumClass:
|
||||
this->dumpEnum(token);
|
||||
this->dumpEnum(token, token.fName);
|
||||
break;
|
||||
case MarkType::kMethod:
|
||||
this->dumpMethod(token);
|
||||
@ -582,8 +586,9 @@ void IncludeParser::dumpComment(const Definition& token) {
|
||||
Definition methodName;
|
||||
TextParser methodParser(token.fFileName, token.fContentStart, token.fContentEnd,
|
||||
token.fLineCount);
|
||||
bool debugCode = methodParser.skipExact("SkDEBUGCODE(");
|
||||
if (MarkType::kMethod == token.fMarkType) {
|
||||
methodName.fName = string(token.fContentStart,
|
||||
methodName.fName = debugCode ? token.fName : string(token.fContentStart,
|
||||
(int) (token.fContentEnd - token.fContentStart));
|
||||
methodHasReturn = !methodParser.startsWith("void ")
|
||||
&& !methodParser.startsWith("static void ")
|
||||
@ -731,8 +736,8 @@ void IncludeParser::dumpComment(const Definition& token) {
|
||||
}
|
||||
}
|
||||
|
||||
void IncludeParser::dumpEnum(const Definition& token) {
|
||||
this->writeTag("Enum", token.fName);
|
||||
void IncludeParser::dumpEnum(const Definition& token, const string& name) {
|
||||
this->writeTag("Enum", name);
|
||||
this->lf(2);
|
||||
this->writeString("#Code");
|
||||
this->lfAlways(1);
|
||||
@ -896,40 +901,29 @@ bool IncludeParser::dumpTokens(const string& dir, const string& skClassName) {
|
||||
}
|
||||
this->lf(2);
|
||||
string className(skClassName.substr(2));
|
||||
vector<string> sortedClasses;
|
||||
size_t maxLen = 0;
|
||||
vector<string> classNames;
|
||||
vector<string> constNames;
|
||||
vector<string> constructorNames;
|
||||
vector<string> memberNames;
|
||||
vector<string> operatorNames;
|
||||
size_t classMaxLen = 0;
|
||||
size_t constMaxLen = 0;
|
||||
size_t constructorMaxLen = 0;
|
||||
size_t memberMaxLen = 0;
|
||||
size_t operatorMaxLen = 0;
|
||||
for (const auto& oneClass : fIClassMap) {
|
||||
if (skClassName + "::" != oneClass.first.substr(0, skClassName.length() + 2)) {
|
||||
continue;
|
||||
}
|
||||
string structName = oneClass.first.substr(skClassName.length() + 2);
|
||||
maxLen = SkTMax(maxLen, structName.length());
|
||||
sortedClasses.emplace_back(structName);
|
||||
classMaxLen = SkTMax(classMaxLen, structName.length());
|
||||
classNames.emplace_back(structName);
|
||||
}
|
||||
this->writeTag("Topic", "Overview");
|
||||
this->lf(2);
|
||||
this->writeTag("Subtopic", "Subtopics");
|
||||
this->writeEndTag("ToDo", "manually add subtopics");
|
||||
this->writeTableHeader("topics", 0, "description");
|
||||
this->writeTableTrailer();
|
||||
this->writeEndTag();
|
||||
this->lf(2);
|
||||
if (maxLen) {
|
||||
this->writeTag("Subtopic", "Structs");
|
||||
this->writeTableHeader("description", maxLen, "struct");
|
||||
for (auto& name : sortedClasses) {
|
||||
this->writeTableRow(maxLen, name);
|
||||
}
|
||||
this->writeTableTrailer();
|
||||
this->writeEndTag("Subtopic");
|
||||
this->lf(2);
|
||||
for (const auto& oneEnum : fIEnumMap) {
|
||||
string enumName = oneEnum.first;
|
||||
constMaxLen = SkTMax(constMaxLen, enumName.length());
|
||||
constNames.emplace_back(enumName);
|
||||
}
|
||||
maxLen = 0;
|
||||
size_t constructorMax = 0;
|
||||
size_t operatorMax = 0;
|
||||
vector<string> sortedNames;
|
||||
vector<string> constructorNames;
|
||||
vector<string> operatorNames;
|
||||
for (const auto& token : classMap.fTokens) {
|
||||
if (Definition::Type::kMark != token.fType || MarkType::kMethod != token.fMarkType) {
|
||||
continue;
|
||||
@ -940,13 +934,13 @@ bool IncludeParser::dumpTokens(const string& dir, const string& skClassName) {
|
||||
}
|
||||
if ((name.substr(0, 2) == "Sk" && 2 == name.find(className)) || '~' == name[0]) {
|
||||
name = string(token.fContentStart, (int) (token.fContentEnd - token.fContentStart));
|
||||
constructorMax = SkTMax(constructorMax, name.length());
|
||||
constructorMaxLen = SkTMax(constructorMaxLen, name.length());
|
||||
constructorNames.emplace_back(name);
|
||||
continue;
|
||||
}
|
||||
if (name.substr(0, 8) == "operator") {
|
||||
name = string(token.fContentStart, (int) (token.fContentEnd - token.fContentStart));
|
||||
operatorMax = SkTMax(operatorMax, name.length());
|
||||
operatorMaxLen = SkTMax(operatorMaxLen, name.length());
|
||||
operatorNames.emplace_back(name);
|
||||
continue;
|
||||
}
|
||||
@ -958,45 +952,119 @@ bool IncludeParser::dumpTokens(const string& dir, const string& skClassName) {
|
||||
}
|
||||
size_t paren = name.find('(');
|
||||
size_t funcLen = string::npos == paren ? name.length() : paren;
|
||||
maxLen = SkTMax(maxLen, funcLen);
|
||||
sortedNames.emplace_back(name);
|
||||
memberMaxLen = SkTMax(memberMaxLen, funcLen);
|
||||
memberNames.emplace_back(name);
|
||||
}
|
||||
if (constructorMax) {
|
||||
std::sort(constructorNames.begin(), constructorNames.end());
|
||||
this->writeTag("Subtopic", "Constructors");
|
||||
this->writeTableHeader("description", constructorMax, "function");
|
||||
for (auto& name : constructorNames) {
|
||||
this->writeTableRow(constructorMax, name);
|
||||
}
|
||||
this->writeTableTrailer();
|
||||
this->writeEndTag("Subtopic");
|
||||
this->lf(2);
|
||||
this->writeTag("Topic", "Overview");
|
||||
this->lf(2);
|
||||
this->writeTag("Subtopic", "Subtopics");
|
||||
string classesName = classMaxLen ? "Classes_and_Structs" : "";
|
||||
string constsName = constructorMaxLen ? "Constants" : "";
|
||||
string constructorsName = constructorMaxLen ? "Constructors" : "";
|
||||
string membersName = memberMaxLen ? "Member_Functions" : "";
|
||||
string operatorsName = operatorMaxLen ? "Operators" : "";
|
||||
size_t nameLen = SkTMax(classesName.size(), SkTMax(constsName.size(),
|
||||
SkTMax(constructorsName.size(), SkTMax(membersName.size(), operatorsName.size()))));
|
||||
this->writeTableHeader("name", nameLen, "description");
|
||||
string classDesc = classMaxLen ? "embedded struct and class members" : "";
|
||||
string constDesc = constMaxLen ? "enum and enum class, const values" : "";
|
||||
string constructorDesc = constructorMaxLen ? "functions that construct " + className : "";
|
||||
string memberDesc = memberMaxLen ? "static functions and member methods" : "";
|
||||
string operatorDesc = operatorMaxLen ? "operator overloading methods" : "";
|
||||
size_t descLen = SkTMax(classDesc.size(), SkTMax(constDesc.size(), SkTMax(constructorDesc.size(),
|
||||
SkTMax(memberDesc.size(), operatorDesc.size()))));
|
||||
if (classMaxLen) {
|
||||
this->writeTableRow(nameLen, classesName, descLen, classDesc);
|
||||
}
|
||||
if (operatorMax) {
|
||||
std::sort(operatorNames.begin(), operatorNames.end());
|
||||
this->writeTag("Subtopic", "Operators");
|
||||
this->writeTableHeader("description", operatorMax, "function");
|
||||
for (auto& name : operatorNames) {
|
||||
this->writeTableRow(operatorMax, name);
|
||||
}
|
||||
this->writeTableTrailer();
|
||||
this->writeEndTag("Subtopic");
|
||||
this->lf(2);
|
||||
if (constMaxLen) {
|
||||
this->writeTableRow(nameLen, constsName, descLen, constDesc);
|
||||
}
|
||||
std::sort(sortedNames.begin(), sortedNames.end());
|
||||
this->writeTag("Subtopic", "Member_Functions");
|
||||
this->writeTableHeader("description", maxLen, "function");
|
||||
for (auto& name : sortedNames) {
|
||||
size_t paren = name.find('(');
|
||||
size_t funcLen = string::npos == paren ? name.length() : paren;
|
||||
this->writeTableRow(maxLen, name.substr(0, funcLen));
|
||||
if (constructorMaxLen) {
|
||||
this->writeTableRow(nameLen, constructorsName, descLen, constructorDesc);
|
||||
}
|
||||
if (memberMaxLen) {
|
||||
this->writeTableRow(nameLen, membersName, descLen, memberDesc);
|
||||
}
|
||||
if (operatorMaxLen) {
|
||||
this->writeTableRow(nameLen, operatorsName, descLen, operatorDesc);
|
||||
}
|
||||
this->writeTableTrailer();
|
||||
this->writeEndTag("Subtopic");
|
||||
this->writeEndTag();
|
||||
this->lf(2);
|
||||
if (classMaxLen) {
|
||||
std::sort(classNames.begin(), classNames.end());
|
||||
this->writeTag("Subtopic", "Classes_and_Structs");
|
||||
this->writeTableHeader("name", classMaxLen, "description");
|
||||
for (auto& name : classNames) {
|
||||
this->writeTableRow(classMaxLen, name);
|
||||
}
|
||||
this->writeTableTrailer();
|
||||
this->writeEndTag("Subtopic");
|
||||
this->lf(2);
|
||||
}
|
||||
if (constMaxLen) {
|
||||
std::sort(constNames.begin(), constNames.end());
|
||||
this->writeTag("Subtopic", "Constants");
|
||||
this->writeTableHeader("name", constMaxLen, "description");
|
||||
for (auto& name : constNames) {
|
||||
this->writeTableRow(constMaxLen, name);
|
||||
}
|
||||
this->writeTableTrailer();
|
||||
this->writeEndTag("Subtopic");
|
||||
this->lf(2);
|
||||
}
|
||||
if (constructorMaxLen) {
|
||||
std::sort(constructorNames.begin(), constructorNames.end());
|
||||
this->writeTag("Subtopic", "Constructors");
|
||||
this->writeTableHeader("name", constructorMaxLen, "description");
|
||||
for (auto& name : constructorNames) {
|
||||
this->writeTableRow(constructorMaxLen, name);
|
||||
}
|
||||
this->writeTableTrailer();
|
||||
this->writeEndTag("Subtopic");
|
||||
this->lf(2);
|
||||
}
|
||||
if (operatorMaxLen) {
|
||||
std::sort(operatorNames.begin(), operatorNames.end());
|
||||
this->writeTag("Subtopic", "Operators");
|
||||
this->writeTableHeader("name", operatorMaxLen, "description");
|
||||
for (auto& name : operatorNames) {
|
||||
this->writeTableRow(operatorMaxLen, name);
|
||||
}
|
||||
this->writeTableTrailer();
|
||||
this->writeEndTag("Subtopic");
|
||||
this->lf(2);
|
||||
}
|
||||
if (memberMaxLen) {
|
||||
std::sort(memberNames.begin(), memberNames.end());
|
||||
this->writeTag("Subtopic", "Member_Functions");
|
||||
this->writeTableHeader("name", memberMaxLen, "description");
|
||||
for (auto& name : memberNames) {
|
||||
size_t paren = name.find('(');
|
||||
size_t funcLen = string::npos == paren ? name.length() : paren;
|
||||
this->writeTableRow(memberMaxLen, name.substr(0, funcLen));
|
||||
}
|
||||
this->writeTableTrailer();
|
||||
this->writeEndTag("Subtopic");
|
||||
this->lf(2);
|
||||
}
|
||||
this->writeEndTag("Topic");
|
||||
this->lf(2);
|
||||
|
||||
for (auto& oneEnum : fIEnumMap) {
|
||||
this->writeString(
|
||||
"# ------------------------------------------------------------------------------");
|
||||
this->dumpEnum(oneEnum.second, oneEnum.first);
|
||||
this->lf(2);
|
||||
this->writeTag("Example");
|
||||
this->lfcr();
|
||||
this->writeString("// incomplete");
|
||||
this->writeEndTag();
|
||||
this->lf(2);
|
||||
this->writeTag("SeeAlso", "incomplete");
|
||||
this->lf(2);
|
||||
this->writeEndTag("Enum", oneEnum.first);
|
||||
this->lf(2);
|
||||
}
|
||||
for (auto& oneClass : fIClassMap) {
|
||||
if (skClassName + "::" != oneClass.first.substr(0, skClassName.length() + 2)) {
|
||||
continue;
|
||||
@ -1231,10 +1299,13 @@ bool IncludeParser::parseDefine() {
|
||||
}
|
||||
|
||||
bool IncludeParser::parseEnum(Definition* child, Definition* markupDef) {
|
||||
if (!markupDef) {
|
||||
return child->reportError<bool>("no support for global enum declaration");
|
||||
}
|
||||
string nameStr;
|
||||
TextParser parser(child);
|
||||
parser.skipToEndBracket('{');
|
||||
if (parser.eof()) {
|
||||
return true; // if enum is a forward declaration, do nothing
|
||||
}
|
||||
parser.next();
|
||||
string nameStr;
|
||||
if (child->fTokens.size() > 0) {
|
||||
auto token = child->fTokens.begin();
|
||||
if (Definition::Type::kKeyWord == token->fType && KeyWord::kClass == token->fKeyWord) {
|
||||
@ -1244,26 +1315,42 @@ bool IncludeParser::parseEnum(Definition* child, Definition* markupDef) {
|
||||
nameStr += string(token->fStart, token->fContentEnd - token->fStart);
|
||||
}
|
||||
}
|
||||
markupDef->fTokens.emplace_back(MarkType::kEnum, child->fContentStart, child->fContentEnd,
|
||||
child->fLineCount, markupDef);
|
||||
Definition* markupChild = &markupDef->fTokens.back();
|
||||
Definition* markupChild;
|
||||
if (!markupDef) {
|
||||
auto finder = fIEnumMap.find(nameStr);
|
||||
if (fIEnumMap.end() != finder) {
|
||||
return child->reportError<bool>("duplicate global enum name");
|
||||
}
|
||||
markupChild = &fIEnumMap[nameStr];
|
||||
markupChild->fContentStart = child->fContentStart;
|
||||
markupChild->fName = nameStr;
|
||||
markupChild->fFiddle = nameStr;
|
||||
markupChild->fContentEnd = child->fContentEnd;
|
||||
markupChild->fFileName = child->fFileName;
|
||||
markupChild->fLineCount = child->fLineCount;
|
||||
} else {
|
||||
markupDef->fTokens.emplace_back(MarkType::kEnum, child->fContentStart, child->fContentEnd,
|
||||
child->fLineCount, markupDef);
|
||||
markupChild = &markupDef->fTokens.back();
|
||||
}
|
||||
SkASSERT(KeyWord::kNone == markupChild->fKeyWord);
|
||||
markupChild->fKeyWord = KeyWord::kEnum;
|
||||
TextParser enumName(child);
|
||||
enumName.skipExact("enum ");
|
||||
enumName.skipWhiteSpace();
|
||||
if (enumName.skipExact("class ")) {
|
||||
enumName.skipWhiteSpace();
|
||||
markupChild->fMarkType = MarkType::kEnumClass;
|
||||
}
|
||||
const char* nameStart = enumName.fChar;
|
||||
enumName.skipToSpace();
|
||||
markupChild->fName = markupDef->fName + "::" +
|
||||
string(nameStart, (size_t) (enumName.fChar - nameStart));
|
||||
if (markupDef) {
|
||||
markupChild->fName = markupDef->fName + "::";
|
||||
}
|
||||
markupChild->fName += string(nameStart, (size_t) (enumName.fChar - nameStart));
|
||||
if (!this->findComments(*child, markupChild)) {
|
||||
return false;
|
||||
}
|
||||
TextParser parser(child);
|
||||
parser.skipToEndBracket('{');
|
||||
parser.next();
|
||||
const char* dataEnd;
|
||||
do {
|
||||
parser.skipWhiteSpace();
|
||||
@ -1314,6 +1401,10 @@ bool IncludeParser::parseEnum(Definition* child, Definition* markupDef) {
|
||||
if ('=' == parser.peek()) {
|
||||
parser.skipToEndBracket(',');
|
||||
}
|
||||
if (!parser.eof() && '#' == parser.peek()) {
|
||||
// fixme: handle preprecessor, but just skip it for now
|
||||
continue;
|
||||
}
|
||||
if (parser.eof() || ',' != parser.peek()) {
|
||||
return this->reportError<bool>("enum member must end with comma 2");
|
||||
}
|
||||
@ -1370,11 +1461,13 @@ bool IncludeParser::parseEnum(Definition* child, Definition* markupDef) {
|
||||
// FIXME: ? add comment as well ?
|
||||
markupChild->fChildren.push_back(member);
|
||||
}
|
||||
IClassDefinition& classDef = fIClassMap[markupDef->fName];
|
||||
SkASSERT(classDef.fStart);
|
||||
string uniqueName = this->uniqueName(classDef.fEnums, nameStr);
|
||||
markupChild->fName = uniqueName;
|
||||
classDef.fEnums[uniqueName] = markupChild;
|
||||
if (markupDef) {
|
||||
IClassDefinition& classDef = fIClassMap[markupDef->fName];
|
||||
SkASSERT(classDef.fStart);
|
||||
string uniqueName = this->uniqueName(classDef.fEnums, nameStr);
|
||||
markupChild->fName = uniqueName;
|
||||
classDef.fEnums[uniqueName] = markupChild;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1700,6 +1793,7 @@ bool IncludeParser::parseObject(Definition* child, Definition* markupDef) {
|
||||
if (child->boilerplateEndIf()) {
|
||||
break;
|
||||
}
|
||||
case KeyWord::kError:
|
||||
case KeyWord::kInclude:
|
||||
// ignored for now
|
||||
break;
|
||||
@ -1812,7 +1906,7 @@ bool IncludeParser::parseChar() {
|
||||
if (KeyWord::kNone == keyWord) {
|
||||
return this->reportError<bool>("unhandled preprocessor directive");
|
||||
}
|
||||
if (KeyWord::kInclude == keyWord || KeyWord::kDefine == keyWord) {
|
||||
if (KeyWord::kInclude == keyWord || KeyWord::kDefine == keyWord || KeyWord::kError == keyWord) {
|
||||
this->popBracket();
|
||||
}
|
||||
} else if (Bracket::kSlashSlash == this->topBracket()) {
|
||||
@ -2221,3 +2315,36 @@ void IncludeParser::validate() const {
|
||||
}
|
||||
IncludeParser::ValidateKeyWords();
|
||||
}
|
||||
|
||||
void IncludeParser::RemoveFile(const char* docs, const char* includes) {
|
||||
if (!sk_isdir(includes)) {
|
||||
IncludeParser::RemoveOneFile(docs, includes);
|
||||
} else {
|
||||
SkOSFile::Iter it(includes, ".h");
|
||||
for (SkString file; it.next(&file); ) {
|
||||
SkString p = SkOSPath::Join(includes, file.c_str());
|
||||
const char* hunk = p.c_str();
|
||||
if (!SkStrEndsWith(hunk, ".h")) {
|
||||
continue;
|
||||
}
|
||||
IncludeParser::RemoveOneFile(docs, hunk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IncludeParser::RemoveOneFile(const char* docs, const char* includesFile) {
|
||||
const char* lastForward = strrchr(includesFile, '/');
|
||||
const char* lastBackward = strrchr(includesFile, '\\');
|
||||
const char* last = lastForward > lastBackward ? lastForward : lastBackward;
|
||||
if (!last) {
|
||||
last = includesFile;
|
||||
} else {
|
||||
last += 1;
|
||||
}
|
||||
SkString baseName(last);
|
||||
SkASSERT(baseName.endsWith(".h"));
|
||||
baseName.remove(baseName.size() - 2, 2);
|
||||
baseName.append("_Reference.bmh");
|
||||
SkString fullName = SkOSPath::Join(docs, baseName.c_str());
|
||||
remove(fullName.c_str());
|
||||
}
|
||||
|
@ -669,6 +669,24 @@ void IncludeWriter::structOut(const Definition* root, const Definition& child,
|
||||
this->writeCommentTrailer();
|
||||
}
|
||||
|
||||
Definition* IncludeWriter::findMemberCommentBlock(const vector<Definition*>& bmhChildren,
|
||||
const string& name) const {
|
||||
for (auto memberDef : bmhChildren) {
|
||||
if (memberDef->fName.length() - name.length() == memberDef->fName.find(name)) {
|
||||
return memberDef;
|
||||
}
|
||||
}
|
||||
for (auto memberDef : bmhChildren) {
|
||||
if (MarkType::kSubtopic == memberDef->fMarkType || MarkType::kTopic == memberDef->fMarkType) {
|
||||
Definition* result = this->findMemberCommentBlock(memberDef->fChildren, name);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Definition* IncludeWriter::structMemberOut(const Definition* memberStart, const Definition& child) {
|
||||
const char* blockStart = !fWroteMethod && fDeferComment ? fLastComment->fContentEnd : fStart;
|
||||
const char* blockEnd = fWroteMethod && fDeferComment ? fDeferComment->fStart - 1 :
|
||||
@ -679,21 +697,16 @@ Definition* IncludeWriter::structMemberOut(const Definition* memberStart, const
|
||||
fIndentNext = false;
|
||||
}
|
||||
fWroteMethod = false;
|
||||
const char* commentStart = nullptr;
|
||||
ptrdiff_t commentLen = 0;
|
||||
string name(child.fContentStart, (int) (child.fContentEnd - child.fContentStart));
|
||||
bool isShort = false;
|
||||
Definition* commentBlock = nullptr;
|
||||
for (auto memberDef : fBmhStructDef->fChildren) {
|
||||
if (memberDef->fName.length() - name.length() == memberDef->fName.find(name)) {
|
||||
commentStart = memberDef->fContentStart;
|
||||
commentLen = memberDef->fContentEnd - commentStart;
|
||||
isShort = memberDef->fShort;
|
||||
commentBlock = memberDef;
|
||||
SkASSERT(!isShort || memberDef->fChildren.size() == 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Definition* commentBlock = this->findMemberCommentBlock(fBmhStructDef->fChildren, name);
|
||||
if (!commentBlock) {
|
||||
return memberStart->reportError<Definition*>("member missing comment block");
|
||||
}
|
||||
const char* commentStart = commentBlock->fContentStart;
|
||||
ptrdiff_t commentLen = commentBlock->fContentEnd - commentStart;
|
||||
bool isShort = commentBlock->fShort;
|
||||
SkASSERT(!isShort || commentBlock->fChildren.size() == 0);
|
||||
|
||||
if (!isShort) {
|
||||
this->writeCommentHeader();
|
||||
bool wroteLineFeed = false;
|
||||
|
@ -34,6 +34,15 @@ static string preformat(const string& orig) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static bool all_lower(const string& ref) {
|
||||
for (auto ch : ref) {
|
||||
if (!islower(ch)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// FIXME: preserve inter-line spaces and don't add new ones
|
||||
string MdOut::addReferences(const char* refStart, const char* refEnd,
|
||||
BmhParser::Resolvable resolvable) {
|
||||
@ -128,8 +137,12 @@ string MdOut::addReferences(const char* refStart, const char* refEnd,
|
||||
}
|
||||
ref = fullRef;
|
||||
}
|
||||
}
|
||||
result += linkRef(leadingSpaces, def, ref);
|
||||
} else if (BmhParser::Resolvable::kClone != resolvable &&
|
||||
all_lower(ref) && (t.eof() || '(' != t.peek())) {
|
||||
add_ref(leadingSpaces, ref, &result);
|
||||
continue;
|
||||
}
|
||||
result += linkRef(leadingSpaces, def, ref, resolvable);
|
||||
continue;
|
||||
}
|
||||
if (!t.eof() && '(' == t.peek()) {
|
||||
@ -141,7 +154,7 @@ string MdOut::addReferences(const char* refStart, const char* refEnd,
|
||||
ref = string(start, t.fChar - start);
|
||||
if (const Definition* def = this->isDefined(t, ref, true)) {
|
||||
SkASSERT(def->fFiddle.length());
|
||||
result += linkRef(leadingSpaces, def, ref);
|
||||
result += linkRef(leadingSpaces, def, ref, resolvable);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -168,7 +181,7 @@ string MdOut::addReferences(const char* refStart, const char* refEnd,
|
||||
// will also need to see if Example Description matches var in example
|
||||
const Definition* def;
|
||||
if (fMethod && (def = fMethod->hasParam(ref))) {
|
||||
result += linkRef(leadingSpaces, def, ref);
|
||||
result += linkRef(leadingSpaces, def, ref, resolvable);
|
||||
fLastParam = def;
|
||||
distFromParam = 0;
|
||||
continue;
|
||||
@ -183,7 +196,7 @@ string MdOut::addReferences(const char* refStart, const char* refEnd,
|
||||
if (paramType) {
|
||||
string fullName = paramType->fName + "::" + ref;
|
||||
if (paramType->hasMatch(fullName)) {
|
||||
result += linkRef(leadingSpaces, paramType, ref);
|
||||
result += linkRef(leadingSpaces, paramType, ref, resolvable);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -199,23 +212,23 @@ string MdOut::addReferences(const char* refStart, const char* refEnd,
|
||||
}
|
||||
auto topicIter = fBmhParser.fTopicMap.find(ref);
|
||||
if (topicIter != fBmhParser.fTopicMap.end()) {
|
||||
result += linkRef(leadingSpaces, topicIter->second, ref);
|
||||
result += linkRef(leadingSpaces, topicIter->second, ref, resolvable);
|
||||
continue;
|
||||
}
|
||||
bool startsSentence = t.sentenceEnd(start);
|
||||
if (!t.eof() && ' ' != t.peek()) {
|
||||
add_ref(leadingSpaces, ref, &result);
|
||||
add_ref(leadingSpaces, ref, &result);
|
||||
continue;
|
||||
}
|
||||
if (t.fChar + 1 >= t.fEnd || (!isupper(t.fChar[1]) && startsSentence)) {
|
||||
add_ref(leadingSpaces, ref, &result);
|
||||
add_ref(leadingSpaces, ref, &result);
|
||||
continue;
|
||||
}
|
||||
if (isupper(t.fChar[1]) && startsSentence) {
|
||||
TextParser next(t.fFileName, &t.fChar[1], t.fEnd, t.fLineCount);
|
||||
string nextWord(next.fChar, next.wordEnd() - next.fChar);
|
||||
if (this->isDefined(t, nextWord, true)) {
|
||||
add_ref(leadingSpaces, ref, &result);
|
||||
add_ref(leadingSpaces, ref, &result);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -229,7 +242,7 @@ string MdOut::addReferences(const char* refStart, const char* refEnd,
|
||||
string prefixed = root->fName + prefix + ref;
|
||||
if (const Definition* def = root->find(prefixed,
|
||||
RootDefinition::AllowParens::kYes)) {
|
||||
result += linkRef(leadingSpaces, def, ref);
|
||||
result += linkRef(leadingSpaces, def, ref, resolvable);
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
@ -608,8 +621,8 @@ string MdOut::linkName(const Definition* ref) const {
|
||||
// for now, hard-code to html links
|
||||
// def should not include SkXXX_
|
||||
string MdOut::linkRef(const string& leadingSpaces, const Definition* def,
|
||||
const string& ref) const {
|
||||
string buildup;
|
||||
const string& ref, BmhParser::Resolvable resolvable) const {
|
||||
string buildup;
|
||||
const string* str = &def->fFiddle;
|
||||
SkASSERT(str->length() > 0);
|
||||
size_t under = str->find('_');
|
||||
@ -659,7 +672,32 @@ string MdOut::linkRef(const string& leadingSpaces, const Definition* def,
|
||||
if (ref.length() > 2 && islower(ref[0]) && "()" == ref.substr(ref.length() - 2)) {
|
||||
refOut = refOut.substr(0, refOut.length() - 2);
|
||||
}
|
||||
return leadingSpaces + "<a href=\"" + buildup + "\">" + refOut + "</a>";
|
||||
string result = leadingSpaces + "<a href=\"" + buildup + "\">" + refOut + "</a>";
|
||||
if (BmhParser::Resolvable::kClone == resolvable && MarkType::kMethod == def->fMarkType &&
|
||||
def->fCloned && !def->fClone) {
|
||||
bool found = false;
|
||||
string match = def->fName;
|
||||
if ("()" == match.substr(match.length() - 2)) {
|
||||
match = match.substr(0, match.length() - 2);
|
||||
}
|
||||
match += '_';
|
||||
auto classIter = fBmhParser.fClassMap.find(classPart);
|
||||
if (fBmhParser.fClassMap.end() != classIter) {
|
||||
for (char num = '2'; num <= '9'; ++num) {
|
||||
string clone = match + num;
|
||||
const auto& leafIter = classIter->second.fLeaves.find(clone);
|
||||
if (leafIter != classIter->second.fLeaves.end()) {
|
||||
result += "<sup><a href=\"" + buildup + "_" + num + "\">[" + num + "]</a></sup>";
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (!found) {
|
||||
SkDebugf("");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void MdOut::markTypeOut(Definition* def) {
|
||||
@ -842,13 +880,13 @@ void MdOut::markTypeOut(Definition* def) {
|
||||
string method_name = def->methodName();
|
||||
string formattedStr = def->formatFunction();
|
||||
|
||||
if (!def->isClone()) {
|
||||
this->lfAlways(2);
|
||||
FPRINTF("<a name=\"%s\"></a>", def->fFiddle.c_str());
|
||||
this->lfAlways(2);
|
||||
FPRINTF("<a name=\"%s\"></a>", def->fFiddle.c_str());
|
||||
if (!def->isClone()) {
|
||||
this->mdHeaderOutLF(2, 1);
|
||||
FPRINTF("%s", method_name.c_str());
|
||||
this->lf(2);
|
||||
}
|
||||
}
|
||||
this->lf(2);
|
||||
|
||||
// TODO: put in css spec that we can define somewhere else (if markup supports that)
|
||||
// TODO: 50em below should match limit = 80 in formatFunction()
|
||||
|
@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include "bookmaker.h"
|
||||
|
||||
#include "SkOSFile.h"
|
||||
#include "SkOSPath.h"
|
||||
|
||||
|
@ -67,18 +67,8 @@ protected:
|
||||
continue;
|
||||
}
|
||||
auto& cs = rootChild;
|
||||
auto overview = this->findOverview(cs);
|
||||
if (!overview) {
|
||||
return false;
|
||||
}
|
||||
Definition* constructors = nullptr;
|
||||
for (auto& overChild : overview->fChildren) {
|
||||
if ("Constructors" == overChild->fName) {
|
||||
constructors = overChild;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (constructors && MarkType::kSubtopic != constructors->fMarkType) {
|
||||
auto constructors = this->findTopic("Constructors", Optional::kYes);
|
||||
if (constructors && MarkType::kSubtopic != constructors->fMarkType) {
|
||||
return constructors->reportError<bool>("expected #Subtopic Constructors");
|
||||
}
|
||||
vector<string> constructorEntries;
|
||||
@ -141,56 +131,47 @@ protected:
|
||||
// Check that summary contains all methods
|
||||
bool checkMethodSummary() {
|
||||
// look for struct or class in fChildren
|
||||
for (auto& rootChild : fRoot->fChildren) {
|
||||
if (!this->isStructOrClass(rootChild)) {
|
||||
Definition* cs = nullptr;
|
||||
for (auto& rootChild : fRoot->fChildren) {
|
||||
if (!this->isStructOrClass(rootChild)) {
|
||||
continue;
|
||||
}
|
||||
cs = rootChild;
|
||||
// expect Overview as Topic in every main class or struct or its parent
|
||||
}
|
||||
if (!cs) {
|
||||
return true; // topics may not have included classes or structs
|
||||
}
|
||||
auto memberFunctions = this->findTopic("Member_Functions", Optional::kNo);
|
||||
if (MarkType::kSubtopic != memberFunctions->fMarkType) {
|
||||
return memberFunctions->reportError<bool>("expected #Subtopic Member_Functions");
|
||||
}
|
||||
vector<string> methodEntries; // build map of overview entries
|
||||
if (!this->collectEntries(memberFunctions, &methodEntries)) {
|
||||
return false;
|
||||
}
|
||||
// mark corresponding methods as visited (may be more than one per entry)
|
||||
for (auto& csChild : cs->fChildren) {
|
||||
if (MarkType::kMethod != csChild->fMarkType) {
|
||||
// only check methods for now
|
||||
continue;
|
||||
}
|
||||
auto& cs = rootChild;
|
||||
// expect Overview as Topic in every main class or struct
|
||||
auto overview = this->findOverview(cs);
|
||||
if (!overview) {
|
||||
if (Definition::MethodType::kConstructor == csChild->fMethodType) {
|
||||
continue;
|
||||
}
|
||||
if (Definition::MethodType::kDestructor == csChild->fMethodType) {
|
||||
continue;
|
||||
}
|
||||
if (Definition::MethodType::kOperator == csChild->fMethodType) {
|
||||
continue;
|
||||
}
|
||||
string name;
|
||||
if (!this->childName(csChild, &name)) {
|
||||
return false;
|
||||
}
|
||||
Definition* memberFunctions = nullptr;
|
||||
for (auto& overChild : overview->fChildren) {
|
||||
if ("Member_Functions" == overChild->fName) {
|
||||
memberFunctions = overChild;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!memberFunctions) {
|
||||
return overview->reportError<bool>("missing #Subtopic Member_Functions");
|
||||
}
|
||||
if (MarkType::kSubtopic != memberFunctions->fMarkType) {
|
||||
return memberFunctions->reportError<bool>("expected #Subtopic Member_Functions");
|
||||
}
|
||||
vector<string> overviewEntries; // build map of overview entries
|
||||
if (!this->collectEntries(memberFunctions, &overviewEntries)) {
|
||||
return false;
|
||||
}
|
||||
// mark corresponding methods as visited (may be more than one per entry)
|
||||
for (auto& csChild : cs->fChildren) {
|
||||
if (MarkType::kMethod != csChild->fMarkType) {
|
||||
// only check methods for now
|
||||
continue;
|
||||
}
|
||||
if (Definition::MethodType::kConstructor == csChild->fMethodType) {
|
||||
continue;
|
||||
}
|
||||
if (Definition::MethodType::kDestructor == csChild->fMethodType) {
|
||||
continue;
|
||||
}
|
||||
if (Definition::MethodType::kOperator == csChild->fMethodType) {
|
||||
continue;
|
||||
}
|
||||
string name;
|
||||
if (!this->childName(csChild, &name)) {
|
||||
return false;
|
||||
}
|
||||
if (overviewEntries.end() ==
|
||||
std::find(overviewEntries.begin(), overviewEntries.end(), name)) {
|
||||
return csChild->reportError<bool>("missing method in Member_Functions");
|
||||
}
|
||||
if (methodEntries.end() ==
|
||||
std::find(methodEntries.begin(), methodEntries.end(), name)) {
|
||||
return csChild->reportError<bool>("missing method in Member_Functions");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@ -203,17 +184,7 @@ protected:
|
||||
continue;
|
||||
}
|
||||
auto& cs = rootChild;
|
||||
auto overview = this->findOverview(cs);
|
||||
if (!overview) {
|
||||
return false;
|
||||
}
|
||||
Definition* operators = nullptr;
|
||||
for (auto& overChild : overview->fChildren) {
|
||||
if ("Operators" == overChild->fName) {
|
||||
operators = overChild;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const Definition* operators = this->findTopic("Operators", Optional::kYes);
|
||||
if (operators && MarkType::kSubtopic != operators->fMarkType) {
|
||||
return operators->reportError<bool>("expected #Subtopic Operators");
|
||||
}
|
||||
@ -260,22 +231,12 @@ protected:
|
||||
if (!overview) {
|
||||
return false;
|
||||
}
|
||||
Definition* subtopics = nullptr;
|
||||
Definition* relatedFunctions = nullptr;
|
||||
for (auto& overChild : overview->fChildren) {
|
||||
if ("Subtopics" == overChild->fName) {
|
||||
subtopics = overChild;
|
||||
} else if ("Related_Functions" == overChild->fName) {
|
||||
relatedFunctions = overChild;
|
||||
}
|
||||
}
|
||||
if (!subtopics) {
|
||||
return overview->reportError<bool>("missing #Subtopic Subtopics");
|
||||
}
|
||||
const Definition* subtopics = this->findTopic("Subtopics", Optional::kNo);
|
||||
if (MarkType::kSubtopic != subtopics->fMarkType) {
|
||||
return subtopics->reportError<bool>("expected #Subtopic Subtopics");
|
||||
}
|
||||
if (relatedFunctions && MarkType::kSubtopic != relatedFunctions->fMarkType) {
|
||||
const Definition* relatedFunctions = this->findTopic("Related_Functions", Optional::kYes);
|
||||
if (relatedFunctions && MarkType::kSubtopic != relatedFunctions->fMarkType) {
|
||||
return relatedFunctions->reportError<bool>("expected #Subtopic Related_Functions");
|
||||
}
|
||||
vector<string> subtopicEntries;
|
||||
@ -337,23 +298,57 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
static const Definition* overview_def(const Definition* parent) {
|
||||
Definition* overview = nullptr;
|
||||
if (parent) {
|
||||
for (auto& csChild : parent->fChildren) {
|
||||
if ("Overview" == csChild->fName) {
|
||||
if (overview) {
|
||||
return csChild->reportError<const Definition*>("expected only one Overview");
|
||||
}
|
||||
overview = csChild;
|
||||
}
|
||||
}
|
||||
}
|
||||
return overview;
|
||||
}
|
||||
|
||||
const Definition* findOverview(const Definition* parent) {
|
||||
// expect Overview as Topic in every main class or struct
|
||||
Definition* overview = nullptr;
|
||||
for (auto& csChild : parent->fChildren) {
|
||||
if ("Overview" == csChild->fName) {
|
||||
if (overview) {
|
||||
return csChild->reportError<const Definition*>("expected only one Overview");
|
||||
}
|
||||
overview = csChild;
|
||||
}
|
||||
}
|
||||
const Definition* overview = overview_def(parent);
|
||||
const Definition* parentOverview = overview_def(parent->fParent);
|
||||
if (overview && parentOverview) {
|
||||
return overview->reportError<const Definition*>("expected only one Overview 2");
|
||||
}
|
||||
overview = overview ? overview : parentOverview;
|
||||
if (!overview) {
|
||||
return parent->reportError<const Definition*>("missing #Topic Overview");
|
||||
}
|
||||
return overview;
|
||||
}
|
||||
|
||||
enum class Optional {
|
||||
kNo,
|
||||
kYes,
|
||||
};
|
||||
|
||||
const Definition* findTopic(string name, Optional optional) {
|
||||
string topicKey = fRoot->fName + '_' + name;
|
||||
auto topicKeyIter = fBmhParser.fTopicMap.find(topicKey);
|
||||
if (fBmhParser.fTopicMap.end() == topicKeyIter) {
|
||||
// TODO: remove this and require member functions outside of overview
|
||||
topicKey = fRoot->fName + "_Overview_" + name; // legacy form for now
|
||||
topicKeyIter = fBmhParser.fTopicMap.find(topicKey);
|
||||
if (fBmhParser.fTopicMap.end() == topicKeyIter) {
|
||||
if (Optional::kNo == optional) {
|
||||
return fRoot->reportError<Definition*>("missing subtopic");
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
return topicKeyIter->second;
|
||||
}
|
||||
|
||||
bool collectEntries(const Definition* entries, vector<string>* strings) {
|
||||
const Definition* table = nullptr;
|
||||
for (auto& child : entries->fChildren) {
|
||||
|
Loading…
Reference in New Issue
Block a user