auto table generation

Replace manually entered summary tables with ones that are populated
and sorted by bookmaker. This introduces a slight regression for
anonymous enums but fixes a lot of bugs and omissions.

The format is

#Topic somethingTopical
#Populate
##

where somethingTopical is one of Subtopics, Constructors, Constants,
Classes_and_Structs, Members, Member_Functions, and Related_Functions.

Fix the bad formatting in SkCanvas reference. The #Error tag was
was corrupting the markdown table. Remove the tag and replace it
with #NoExample.

Next up: revise self-check to know about populated topics.

TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=102080
Bug: skia:6898
Change-Id: Idef5d1c14c740c18a81d6a5106182788dd2a09e1
Reviewed-on: https://skia-review.googlesource.com/102080
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
This commit is contained in:
Cary Clark 2018-02-01 09:37:32 -05:00 committed by Skia Commit-Bot
parent 4dab72f606
commit 08895c4814
36 changed files with 1482 additions and 2211 deletions

View File

@ -1,44 +1,24 @@
#Topic Automatic_Canvas_Restore
#Subtopic Overview
#Subtopic Subtopics
#Populate
##
##
#Class SkAutoCanvasRestore
Stack helper class calls SkCanvas::restoreToCount() when SkAutoCanvasRestore
goes out of scope. Use this to guarantee that the canvas is restored to a known
state.
#Topic Overview
#Subtopic Subtopics
#ToDo manually add subtopics ##
#Table
#Legend
# name # description ##
#Legend ##
# Constructors # functions that construct SkAutoCanvasRestore ##
# Member_Functions # static functions and member methods ##
#Table ##
#Subtopic ##
#Subtopic Constructors
#Table
#Legend
# name # description ##
#Legend ##
# SkAutoCanvasRestore(SkCanvas* canvas, bool doSave) # preserves Canvas save count ##
# ~SkAutoCanvasRestore() # restores Canvas to saved state ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Member_Functions
#Table
#Legend
# name # description ##
#Legend ##
# restore() # restores Canvas to saved state ##
#Table ##
#Subtopic ##
#Topic Overview ##
#Populate
##
#Method SkAutoCanvasRestore(SkCanvas* canvas, bool doSave)

View File

@ -2,6 +2,12 @@
#Alias Bitmaps
#Alias Bitmap_Reference
#Subtopic Overview
#Subtopic Subtopics
#Populate
##
##
#Class SkBitmap
Bitmap describes a two-dimensional raster pixel array. Bitmap is built on
@ -24,7 +30,8 @@ pixels. Declaring SkBitmap const affects Bitmap configuration, not its contents.
Bitmap is not thread safe. Each thread must have its own copy of Bitmap fields,
although threads may share the underlying pixel array.
#Topic Row_Bytes
#Subtopic Row_Bytes
#Line # interval from one row to the next ##
Bitmap pixels may be contiguous, or may have a gap at the end of each row.
Row_Bytes is the interval from one row to the next. Row_Bytes may be specified;
sometimes passing zero will compute the Row_Bytes from the row width and the
@ -32,132 +39,30 @@ number of bytes in a pixel. Row_Bytes may be larger than the row requires. This
is useful to position one or more Bitmaps within a shared pixel array.
##
#Topic Overview
#Subtopic Subtopics
#ToDo manually add subtopics ##
#Table
#Legend
# name # description ##
#Legend ##
# Classes_and_Structs # embedded struct and class members ##
# Constructors # functions that construct SkPath ##
# Member_Functions # static functions and member methods ##
# Operators # operator overloading methods ##
#Table ##
#Subtopic Related_Functions
#Populate
##
#Subtopic Classes_and_Structs
#Table
#Legend
# name # description ##
#Legend ##
# Allocator # ##
# HeapAllocator # ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Constructors
#Table
#Legend
# name # description ##
#Legend ##
# SkBitmap() # constructs with default values ##
# SkBitmap(SkBitmap&& src) # takes ownership of pixels ##
# SkBitmap(const SkBitmap& src) # shares ownership of pixels ##
# ~SkBitmap() # releases ownership of pixels ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Operators
#Table
#Legend
# name # description ##
#Legend ##
# operator=(SkBitmap&& src) # takes ownership of pixels ##
# operator=(const SkBitmap& src) # shares ownership of pixels ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Member_Functions
#Table
#Legend
# name # description ##
#Legend ##
# ComputeIsOpaque # returns true if all pixels are opaque ##
# allocN32Pixels # allocates compatible Color_ARGB pixels, or aborts ##
# allocPixels # allocates pixels from Image_Info, or aborts ##
# allocPixelsFlags # allocates pixels from Image_Info with options, or aborts ##
# alphaType # returns Image_Info Alpha_Type ##
# bounds() # returns width() and height() as Rectangle ##
# bytesPerPixel # returns number of bytes in pixel based on Color_Type ##
# colorSpace # returns Image_Info Color_Space ##
# colorType # returns Image_Info Color_Type ##
# computeByteSize # returns size required for pixels ##
# dimensions() # returns width() and height() ##
# drawsNothing # returns true if no width(), no height(), or no Pixel_Ref ##
# empty() # returns true if Image_Info has zero width() or height() ##
# erase() # writes Color to rectangle of pixels ##
# eraseARGB # writes Color to pixels ##
# eraseArea # deprecated ##
# eraseColor # writes Color to pixels ##
# eraseRGB # deprecated ##
# extractAlpha # creates Bitmap containing Alpha of pixels ##
# extractSubset # creates Bitmap, sharing pixels if possible ##
# getAddr # returns readable pixel address as void pointer ##
# getAddr16 # returns readable pixel address as 16-bit pointer ##
# getAddr32 # returns readable pixel address as 32-bit pointer ##
# getAddr8 # returns readable pixel address as 8-bit pointer ##
# getBounds # returns width() and height() as Rectangle ##
# getColor # returns one pixel as Unpremultiplied Color ##
# getGenerationID # returns unique ID ##
# getPixels # returns address of pixels ##
# getSubset # returns bounds offset by origin ##
# hasHardwareMipMap # returns Mip_Map support present; Android only ##
# height() # returns pixel row count ##
# info() # returns Image_Info ##
# installMaskPixels # creates Pixel_Ref from Mask ##
# installPixels # creates Pixel_Ref, with optional release function ##
# isImmutable # returns true if pixels will not change ##
# isNull # returns true if Pixel_Ref is nullptr ##
# isOpaque # returns true if Image_Info describes opaque pixels ##
# isVolatile # returns true if pixels should not be cached ##
# notifyPixelsChanged # marks pixels as changed, altering the unique ID ##
# peekPixels # returns Pixmap if possible ##
# pixelRef # returns Pixel_Ref, or nullptr ##
# pixelRefOrigin # returns offset within Pixel_Ref ##
# pixmap() # returns Pixmap ##
# readPixels # copies and converts pixels ##
# readyToDraw # returns true if address of pixels is not nullptr ##
# refColorSpace # returns Image_Info Color_Space ##
# reset() # sets to default values, releases pixel ownership ##
# rowBytes # returns interval between rows in bytes ##
# rowBytesAsPixels # returns interval between rows in pixels ##
# setAlphaType # sets Alpha_Type of shared pixels ##
# setHasHardwareMipMap # sets Mip_Map support present; Android only ##
# setImmutable # marks that pixels will not change ##
# setInfo # sets height, width, Color_Type, and so on, releasing pixels ##
# setIsVolatile # marks if pixels should not be cached ##
# setPixelRef # sets Pixel_Ref and offset ##
# setPixels # sets Pixel_Ref without an offset ##
# shiftPerPixel # returns bit shift from pixels to bytes ##
# swap() # exchanges Bitmap pair ##
# toString # converts Bitmap to machine readable form ##
# tryAllocN32Pixels # allocates compatible Color_ARGB pixels if possible ##
# tryAllocPixels # allocates pixels from Image_Info if possible ##
# tryAllocPixelsFlags # allocates pixels from Image_Info with options if possible ##
# validate() # asserts if Bitmap is invalid (debug only) ##
# width() # returns pixel column count ##
# writePixels # copies and converts pixels ##
#Table ##
#Subtopic ##
#Topic ##
#Populate
##
# ------------------------------------------------------------------------------
#Class Allocator
#Line # abstract subclass of HeapAllocator ##
#Code
class Allocator : public SkRefCnt {
public:
@ -191,6 +96,7 @@ or setPixelRef was called.
# ------------------------------------------------------------------------------
#Class HeapAllocator
#Line # allocates pixel memory from heap ##
#Code
class HeapAllocator : public Allocator {
@ -236,7 +142,7 @@ pixel address = 0x560ddd0ac670
##
#class HeapAllocator ##
#Class HeapAllocator ##
# ------------------------------------------------------------------------------
@ -731,13 +637,13 @@ Returns zero if colorType( is kUnknown_SkColorType.
bitmap.bytesPerPixel());
}
#StdOut
color: kUnknown_SkColorType bytesPerPixel: 0
color: kAlpha_8_SkColorType bytesPerPixel: 1
color: kRGB_565_SkColorType bytesPerPixel: 2
color: kARGB_4444_SkColorType bytesPerPixel: 2
color: kRGBA_8888_SkColorType bytesPerPixel: 4
color: kBGRA_8888_SkColorType bytesPerPixel: 4
color: kGray_8_SkColorType bytesPerPixel: 1
color: kUnknown_SkColorType bytesPerPixel: 0
color: kAlpha_8_SkColorType bytesPerPixel: 1
color: kRGB_565_SkColorType bytesPerPixel: 2
color: kARGB_4444_SkColorType bytesPerPixel: 2
color: kRGBA_8888_SkColorType bytesPerPixel: 4
color: kBGRA_8888_SkColorType bytesPerPixel: 4
color: kGray_8_SkColorType bytesPerPixel: 1
color: kRGBA_F16_SkColorType bytesPerPixel: 8
##
##

View File

@ -1,6 +1,12 @@
#Topic Canvas
#Alias Canvas_Reference
#Subtopic Overview
#Subtopic Subtopics
#Populate
##
##
#Class SkCanvas
Canvas provides an interface for drawing, and how the drawing is clipped and transformed.
@ -24,153 +30,29 @@ destination.
Canvas can be constructed to draw to Bitmap without first creating Raster_Surface.
This approach may be deprecated in the future.
#Topic Overview
#Subtopic Subtopics
#Table
#Legend
# name # description ##
#Legend ##
# Classes_and_Structs # embedded struct and class members ##
# Constants # enum and enum class, const values ##
# Constructors # functions that construct SkPath ##
# Member_Functions # static functions and member methods ##
#Table ##
#Subtopic ##
#Subtopic Related_Functions
#Populate
##
#Subtopic Constants
#Table
#Legend
# name # description ##
#Legend ##
# Lattice::Flags # controls Lattice transparency ##
# PointMode # sets drawPoints options ##
# SaveLayerFlags # sets SaveLayerRec options ##
# SrcRectConstraint # sets drawImageRect options ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Classes_and_Structs
#Table
#Legend
# name # description ##
#Legend ##
# Lattice # divides Bitmap, Image into a rectangular grid ##
# SaveLayerRec # contains state to create Layer ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Constructors
Create the desired type of Surface to obtain its Canvas when possible. Constructors are useful
when no Surface is required, and some helpers implicitly create Raster_Surface.
#Table
#Legend
# name # description ##
#Legend ##
# MakeRasterDirect # creates from SkImageInfo and Pixel_Storage ##
# MakeRasterDirectN32 # creates from image data and Pixel_Storage ##
# SkCanvas() # creates with no Surface, no dimensions ##
# SkCanvas(SkBaseDevice* device) # to be deprecated ##
# SkCanvas(const SkBitmap& bitmap) # uses existing Bitmap ##
# SkCanvas(const SkBitmap& bitmap, ColorBehavior behavior) # Android framework only ##
# SkCanvas(const SkBitmap& bitmap, const SkSurfaceProps& props) # uses existing Bitmap and Surface_Properties ##
# SkCanvas(int width, int height, const SkSurfaceProps* props = nullptr) # no Surface, set dimensions, Surface_Properties ##
# ~SkCanvas() # draws saved Layers, frees resources ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Member_Functions
#Table
#Legend
# name # description ##
#Legend ##
# MakeRasterDirect # creates from SkImageInfo and Pixel_Storage ##
# MakeRasterDirectN32 # creates from image data and Pixel_Storage ##
# accessTopLayerPixels # returns writable pixel access if available ##
# accessTopRasterHandle # returns context that tracks Clip and Matrix ##
# androidFramework_setDeviceClipRestriction # for use by Android framework ##
# clear() # fills Clip with Color ##
# clipPath # combines Clip with Path ##
# clipRRect # combines Clip with Round_Rect ##
# clipRect # combines Clip with Rect ##
# clipRegion # combines Clip with Region ##
# concat() # multiplies Matrix by Matrix ##
# discard() # makes Canvas contents undefined ##
# drawAnnotation # associates a Rect with a key-value pair ##
# drawArc # draws Arc using Clip, Matrix, and Paint ##
# drawAtlas # draws sprites using Clip, Matrix, and Paint ##
# drawBitmap # draws Bitmap at (x, y) position ##
# drawBitmapLattice # draws proportionally stretched Bitmap ##
# drawBitmapNine # draws Nine_Patch Bitmap ##
# drawBitmapRect # draws Bitmap, source Rect to destination Rect ##
# drawCircle # draws Circle using Clip, Matrix, and Paint ##
# drawColor # fills Clip with Color and Blend_Mode ##
# drawDRRect # draws double Round_Rect stroked or filled ##
# drawDrawable # draws Drawable, encapsulated drawing commands ##
# drawIRect # draws IRect using Clip, Matrix, and Paint ##
# drawImage # draws Image at (x, y) position ##
# drawImageLattice # draws proportionally stretched Image ##
# drawImageNine # draws Nine_Patch Image ##
# drawImageRect # draws Image, source Rect to destination Rect ##
# drawLine # draws line segment between two points ##
# drawOval # draws Oval using Clip, Matrix, and Paint ##
# drawPaint # fills Clip with Paint ##
# drawPatch # draws Coons_Patch ##
# drawPath # draws Path using Clip, Matrix, and Paint ##
# drawPicture # draws Picture using Clip and Matrix ##
# drawPoint # draws point at (x, y) position ##
# drawPoints # draws array as points, lines, polygon ##
# drawPosText # draws text at array of (x, y) positions ##
# drawPosTextH # draws text at x positions with common baseline ##
# drawRRect # draws Round_Rect using Clip, Matrix, and Paint ##
# drawRect # draws Rect using Clip, Matrix, and Paint ##
# drawRegion # draws Region using Clip, Matrix, and Paint ##
# drawRoundRect # draws Round_Rect using Clip, Matrix, and Paint ##
# drawString # draws null terminated string at (x, y) using font advance ##
# drawText # draws text at (x, y), using font advance ##
# drawTextBlob # draws text with arrays of positions and Paint ##
# drawTextOnPath # draws text following Path contour ##
# drawTextOnPathHV # draws text following Path with offsets ##
# drawTextRSXform # draws text with array of RSXform ##
# drawVertices # draws Vertices, a triangle mesh ##
# flush() # triggers execution of all pending draw operations ##
# getBaseLayerSize # returns size of base Layer in global coordinates ##
# getDeviceClipBounds # returns IRect bounds of Clip ##
# getDrawFilter # legacy; to be deprecated ##
# getGrContext # returns GPU_Context of the GPU_Surface ##
# getLocalClipBounds # returns Clip bounds in source coordinates ##
# getMetaData # associates additional data with the canvas ##
# getProps # copies Surface_Properties if available ##
# getSaveCount # returns depth of stack containing Clip and Matrix ##
# getTotalMatrix # returns Matrix ##
# imageInfo # returns Image_Info for Canvas ##
# isClipEmpty # returns if Clip is empty ##
# isClipRect # returns if Clip is Rect and not empty ##
# makeSurface # creates Surface matching SkImageInfo and SkSurfaceProps ##
# peekPixels # returns if Canvas has direct access to its pixels ##
# quickReject # returns if Rect is outside Clip ##
# readPixels # copies and converts rectangle of pixels from Canvas ##
# resetMatrix # resets Matrix to identity ##
# restore() # restores changes to Clip and Matrix, pops save stack ##
# restoreToCount # restores changes to Clip and Matrix to given depth ##
# rotate() # rotates Matrix ##
# save() # saves Clip and Matrix on stack ##
# saveLayer # saves Clip and Matrix on stack; creates Layer ##
# saveLayerAlpha # saves Clip and Matrix on stack; creates Layer; sets opacity ##
# saveLayerPreserveLCDTextRequests # saves Clip and Matrix on stack; creates Layer for LCD text ##
# scale() # scales Matrix ##
# setAllowSimplifyClip # experimental ##
# setDrawFilter # legacy; to be deprecated ##
# setMatrix # sets Matrix ##
# skew() # skews Matrix ##
# translate() # translates Matrix ##
# writePixels # copies and converts rectangle of pixels to Canvas ##
#Table ##
#Subtopic ##
#Topic Overview ##
#Populate
##
# ------------------------------------------------------------------------------
@ -424,10 +306,8 @@ Used by child classes of SkCanvas.
#Return Canvas that can be used to draw into device ##
#Example
#Error "Unsure how to create a meaningful example."
SkPDFCanvas::SkPDFCanvas(const sk_sp<SkPDFDevice>& dev)
: SkCanvas(dev.get()) {}
#ToDo unsure how to create a meaningful example ##
#NoExample
##
#ToDo either remove doc or figure out a way to fiddle it ##
@ -501,7 +381,7 @@ The actual output depends on the installed fonts.
##
#EnumClass ColorBehavior
#Line # Android framework only ##
#Private
Android framework only.
##
@ -748,8 +628,8 @@ In an overview section on managing the GPU, include:
for posterity: this doesn't show a difference: fiddle.skia.org/c/@flushfail
##
#Example
#Error "haven't thought of a useful example to put here"
#ToDo haven't thought of a useful example to put here ##
#NoExample
##
#SeeAlso peekPixels SkSurface::flush() GrContext::flush() SkSurface::prepareForExternalIO GrContext::abandonContext()
@ -1371,7 +1251,8 @@ void draw(SkCanvas* canvas) {
##
# ------------------------------------------------------------------------------
#Topic State_Stack
#Subtopic State_Stack
#Line # stack of state for hierarchical drawing ##
Canvas maintains a stack of state that allows hierarchical drawing, commonly used
to implement windows and views. The initial state has an identity matrix and and
@ -1573,13 +1454,14 @@ depth = 1
##
#Topic State_Stack ##
#Subtopic State_Stack ##
# ------------------------------------------------------------------------------
#Topic Layer
#Subtopic Layer
#Substitute layer
#Alias Layers
#Line # temporary Bitmap to draw into ##
Layer allocates a temporary Bitmap to draw into. When the drawing is
complete, the Bitmap is drawn into the Canvas.
@ -1791,8 +1673,13 @@ Call restoreToCount with returned value to restore this and subsequent saves.
##
#Enum
#ToDo
add new markup to associate typedef SaveLayerFlags with Enum so that, for
documentation purposes, this enum is named rather than anonymous
##
#Enum
#Line # sets SaveLayerRec options ##
#Code
enum {
kIsOpaque_SaveLayerFlag = 1 << 0,
@ -1860,7 +1747,7 @@ void draw(SkCanvas* canvas) {
##
#Struct SaveLayerRec
#Line # contains the state used to create the Layer ##
#Code
struct SaveLayerRec {
SaveLayerRec*(...
@ -2096,10 +1983,11 @@ Outside of the circle the mandrill is brightened.
##
#Topic Layer ##
#Subtopic Layer ##
# ------------------------------------------------------------------------------
#Topic Matrix
#Subtopic Matrix
#Line # coordinate transformation ##
#Method void translate(SkScalar dx, SkScalar dy)
@ -2414,10 +2302,11 @@ This does not account for translation by Device or Surface.
##
#Topic Matrix ##
#Subtopic Matrix ##
# ------------------------------------------------------------------------------
#Topic Clip
#Subtopic Clip
#Line # stack of clipping Paths ##
Clip is built from a stack of clipping paths. Each Path in the
stack can be constructed from one or more Path_Contour elements. The
@ -3102,7 +2991,7 @@ Unlike getLocalClipBounds, bounds is not outset.
##
#Topic Clip ##
#Subtopic Clip ##
# ------------------------------------------------------------------------------
@ -3211,6 +3100,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Enum PointMode
#Line # sets drawPoints options ##
#Code
enum PointMode {
@ -3933,7 +3823,8 @@ void draw(SkCanvas* canvas) {
##
# ------------------------------------------------------------------------------
#Topic Draw_Image
#Subtopic Draw_Image
#Line # draws Image to Canvas ##
drawImage, drawImageRect, and drawImageNine can be called with a bare pointer or
a smart pointer as a convenience. The pairs of calls are otherwise identical.
@ -4020,6 +3911,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Enum SrcRectConstraint
#Line # sets drawImageRect options ##
#Code
enum SrcRectConstraint {
@ -4833,7 +4725,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Struct Lattice
#Line # divides Bitmap or Image into a rectangular grid ##
#Code
struct Lattice {
enum RectType ...
@ -5098,7 +4990,7 @@ void draw(SkCanvas* canvas) {
##
#Topic Draw_Image ##
#Subtopic Draw_Image ##
# ------------------------------------------------------------------------------

View File

@ -1,54 +1,39 @@
#Topic IPoint16
#Alias IPoint16_Reference
#Subtopic Overview
#Subtopic Subtopics
#Populate
##
##
#Struct SkIPoint16
SkIPoint16 holds two 16 bit integer coordinates.
#Topic Overview
#Subtopic Subtopics
#ToDo manually add subtopics ##
#Table
#Legend
# name # description ##
#Legend ##
# Constructors # functions that construct SkIPoint16 ##
# Member_Functions # static functions and member methods ##
#Table ##
#Subtopic ##
#Subtopic Constructors
#Table
#Legend
# name # description ##
#Legend ##
# Make # constructs from integer inputs ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Member_Functions
#Table
#Legend
# name # description ##
#Legend ##
# Make # constructs from integer inputs ##
# set() # sets to integer input ##
# x() # returns fX ##
# y() # returns fY ##
#Table ##
#Subtopic ##
#Populate
##
#Topic Overview ##
#Subtopic Members
#Populate
#Member int16_t fX
#Line # x-axis value ##
x-axis value used by IPoint16
##
#Member int16_t fY
#Line # y-axis value ##
y-axis value used by IPoint16
##
#Subtopic Members ##
# ------------------------------------------------------------------------------
#Method static constexpr SkIPoint16 Make(int x, int y)

View File

@ -2,72 +2,43 @@
#Alias IPoints
#Alias IPoint_Reference
#Subtopic Overview
#Subtopic Subtopics
#Populate
##
##
#Struct SkIPoint
SkIPoint holds two 32 bit integer coordinates.
#Topic Overview
#Subtopic Subtopics
#ToDo manually add subtopics ##
#Table
#Legend
# name # description ##
#Legend ##
# Constructors # functions that construct SkIPoint16 ##
# Member_Functions # static functions and member methods ##
# Operators # operator overloading methods ##
#Table ##
#Subtopic ##
#Subtopic Constructors
#Table
#Legend
# name # description ##
#Legend ##
# Make # constructs from integer inputs ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Operators
#Table
#Legend
# name # description ##
#Legend ##
# operator+(const SkIPoint& a, const SkIVector& b) # returns IPoint offset by IVector ##
# operator-()_const # reverses sign of IPoint ##
# operator-(const SkIPoint& a, const SkIPoint& b) # returns IVector between IPoints ##
# operator!=(const SkIPoint& a, const SkIPoint& b) # returns true if IPoints are unequal ##
# operator==(const SkIPoint& a, const SkIPoint& b) # returns true if IPoints are equal ##
# operator+=(const SkIVector& v) # adds IVector to IPoint ##
# operator-=(const SkIVector& v) # subtracts IVector from IPoint ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Member_Functions
#Table
#Legend
# name # description ##
#Legend ##
# Make # constructs from integer inputs ##
# equals() # returns true if members are equal ##
# isZero # returns true if both members equal zero ##
# set() # sets to integer input ##
# x() # returns fX ##
# y() # returns fY ##
#Table ##
#Subtopic ##
#Populate
##
#Topic Overview ##
#Subtopic Members
#Populate
#Member int32_t fX
#Line # x-axis value ##
x-axis value used by IPoint.
##
#Member int32_t fY
#Line # y-axis value ##
y-axis value used by IPoint.
##
#Subtopic Members ##
# ------------------------------------------------------------------------------
#Method static constexpr SkIPoint Make(int32_t x, int32_t y)

View File

@ -2,23 +2,12 @@
#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 ##
#Subtopic Overview
#Subtopic Subtopics
#Populate
##
##
#Topic Overview ##
#Struct SkIRect
SkIRect holds four 32 bit integer coordinates describing the upper and
@ -43,75 +32,32 @@ its top, it is considered empty.
#Subtopic ##
#Subtopic Member_Functions
#Table
#Legend
# name # description ##
#Legend ##
# EmptyIRect # returns immutable bounds of (0, 0, 0, 0) ##
# Intersects # returns true if areas overlap ##
# IntersectsNoEmptyCheck # returns true if areas overlap skips empty check ##
# 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) ##
# bottom() # returns larger bounds in y, if sorted ##
# centerX # returns midpoint in x ##
# centerY # returns midpoint in y ##
# contains() # returns true if points are equal or inside ##
# containsNoEmptyCheck # returns true if points are equal or inside skips empty check ##
# 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 ##
# 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 ##
# isEmpty64 # returns true if width or height are zero or negative ##
# join() # sets to union of bounds ##
# left() # returns smaller bounds in x, if sorted ##
# 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 ##
# offset() # translates sides without changing width and height ##
# offsetTo # translates to (x, y) without changing width and height ##
# outset() # moves the sides symmetrically about the center ##
# quickReject # returns true if rectangles do not intersect ##
# right() # returns larger bounds in x, if sorted ##
# set() # sets to (left, top, right, bottom) ##
# setEmpty # sets to (0, 0, 0, 0) ##
# setLTRB # sets to SkScalar input (left, top, right, bottom) ##
# setXYWH # sets to (x, y, width, height) ##
# size() # returns ISize (width, height) ##
# sort() # orders sides from smaller to larger ##
# top() # returns smaller bounds in y, if sorted ##
# width() # returns span in x ##
# width64 # returns span in y as int64_t ##
# x() # returns bounds left ##
# y() # returns bounds top ##
#Table ##
#Populate
#Subtopic ##
#Subtopic Members
#Populate
#Member int32_t fLeft
#Line # smaller x-axis bounds ##
May contain any value. The smaller of the horizontal values when sorted.
When equal to or greater than fRight, IRect is empty.
##
#Member int32_t fTop
#Line # smaller y-axis bounds ##
May contain any value. The smaller of the horizontal values when sorted.
When equal to or greater than fBottom, IRect is empty.
##
#Member int32_t fRight
#Line # larger x-axis bounds ##
May contain any value. The larger of the vertical values when sorted.
When equal to or less than fLeft, IRect is empty.
##
#Member int32_t fBottom
#Line # larger y-axis bounds ##
May contain any value. The larger of the vertical values when sorted.
When equal to or less than fTop, IRect is empty.
##
@ -119,21 +65,7 @@ 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 ##
#Populate
# ------------------------------------------------------------------------------
@ -708,13 +640,7 @@ sorted: {20, 40, 20, 50} is empty
##
#Subtopic Operators
#Table
#Legend
# name # description ##
#Legend ##
# operator!=(const SkIRect& a, const SkIRect& b) # returns true if members are unequal ##
# operator==(const SkIRect& a, const SkIRect& b) # returns true if members are equal ##
#Table ##
#Populate
# ------------------------------------------------------------------------------
@ -770,7 +696,7 @@ test != sorted
##
#Subtopic ##
#Subtopic Operators ##
# ------------------------------------------------------------------------------
@ -922,6 +848,7 @@ rect: -10, 35, 5, 60 isEmpty: false
##
#Subtopic Inset_Outset_Offset
#Line # moves sides ##
#Table
#Legend
@ -1186,6 +1113,7 @@ rect: 5, 1, 55, 86
#Subtopic Inset_Outset_Offset ##
#Subtopic Intersection
#Line # set to shared bounds ##
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;

View File

@ -1,39 +1,23 @@
#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 Overview
#Subtopic Subtopics
#Populate
##
##
#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 ##
#Populate
##
# ------------------------------------------------------------------------------
#Topic Alpha_Type
#Subtopic Alpha_Type
#Line # incomplete ##
#Alias Alpha_Type
#Alias Alpha_Types
#Enum SkAlphaType
#Line # incomplete ##
#Code
enum SkAlphaType {
@ -70,17 +54,17 @@ generate this on output.
#SeeAlso incomplete
#Enum SkAlphaType ##
#Topic ##
#Subtopic Alpha_Type ##
# ------------------------------------------------------------------------------
#Topic Color_Type
#Subtopic Native_Color_Type
#Subtopic Color_Type
#Line # incomplete ##
#Alias Native_Color_Type
#Substitute native SkColorType
##
#Alias Color_Type
#Alias Color_Types
#Enum SkColorType
#Line # incomplete ##
#Code
enum SkColorType {
@ -136,10 +120,11 @@ for 32 bit pixels.
#SeeAlso incomplete
#Enum SkColorType ##
#Topic ##
#Subtopic Color_Type ##
# ------------------------------------------------------------------------------
#Enum SkYUVColorSpace
#Line # incomplete ##
#Code
enum SkYUVColorSpace {
@ -174,6 +159,7 @@ range. See http://en.wikipedia.org/wiki/Rec._709 for details.
# ------------------------------------------------------------------------------
#EnumClass SkDestinationSurfaceColorMode
#Line # incomplete ##
#Code
enum class SkDestinationSurfaceColorMode {
@ -203,75 +189,16 @@ Describe an image's dimensions and pixel type.
Used for both src images and render-targets (surfaces).
#Subtopic Operators
#Table
#Legend
# name # description ##
#Legend ##
# operator!=(const SkImageInfo& other)_const # ##
# operator==(const SkImageInfo& other)_const # ##
#Table ##
#Subtopic ##
#Populate
##
#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 ##
#Populate
##
#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 ##
#Populate
##
# ------------------------------------------------------------------------------
@ -450,8 +377,6 @@ Sets colortype to kN32_SkColorType, and the alphatype to premul.
#Method ##
#Subtopic Constructors ##
# ------------------------------------------------------------------------------
@ -941,4 +866,4 @@ Returns true if the result of computeByteSize (or computeMinByteSize) overflowed
#Struct SkImageInfo ##
#Topic ImageInfo ##
#Topic Image_Info ##

View File

@ -1,6 +1,12 @@
#Topic Image
#Alias Image_Reference
#Subtopic Overview
#Subtopic Subtopics
#Populate
##
##
#Class SkImage
Image describes a two dimensional array of pixels to draw. The pixels may be
@ -18,123 +24,44 @@ GPU_Texture, YUV_ColorSpace data, or hardware buffer. Encoded streams supported
include BMP, GIF, HEIF, ICO, JPEG, PNG, WBMP, WebP. Supported encodings details
vary with platform.
#Topic Raster_Image
#Subtopic Raster_Image
#Alias Raster_Image
#Line # pixels unencoded in Raster_Bitmap ##
Raster_Image pixels are unencoded in a Raster_Bitmap. These pixels may be read
directly and in most cases written to, although edited pixels may not be drawn
if Image has been copied internally.
##
#Topic Texture_Image
#Subtopic Texture_Image
#Line # pixels located on GPU ##
Texture_Image are located on GPU and pixels are not accessible. Texture_Image
are allocated optimally for best performance. Raster_Image may
be drawn to GPU_Surface, but pixels are uploaded from CPU to GPU downgrading
performance.
##
#Topic Lazy_Image
#Subtopic Lazy_Image
#Line # deferred pixel buffer ##
Lazy_Image defer allocating buffer for Image pixels and decoding stream until
Image is drawn. Lazy_Image caches result if possible to speed up repeated
drawing.
##
#Topic Overview
#Subtopic Related_Functions
#Populate
##
#Subtopic Subtopics
#ToDo manually add subtopics ##
#Table
#Legend
# topics # description ##
#Legend ##
#Table ##
#Subtopic Classes_and_Structs
#Populate
##
#Subtopic Constructors
#Table
#Legend
# name # description ##
#Legend ##
# MakeBackendTextureFromSkImage # Creates GPU_Texture from Image. ##
# MakeCrossContextFromEncoded # Creates Image from encoded data, and uploads to GPU. ##
# MakeCrossContextFromPixmap # Creates Image from Pixmap, and uploads to GPU. ##
# MakeFromAHardwareBuffer # Creates Image from Android hardware buffer. ##
# MakeFromAdoptedTexture # Creates Image from GPU_Texture, managed internally. ##
# MakeFromBitmap # Creates Image from Bitmap, sharing or copying pixels. ##
# MakeFromDeferredTextureImageData # To be deprecated. ##
# MakeFromEncoded # Creates Image from encoded data. ##
# MakeFromGenerator # Creates Image from a stream of data. ##
# MakeFromNV12TexturesCopy # Creates Image from YUV_ColorSpace data in two planes. ##
# MakeFromPicture # Creates Image from Picture. ##
# MakeFromRaster # Creates Image from Pixmap, with release. ##
# MakeFromTexture # Creates Image from GPU_Texture, managed externally. ##
# MakeFromYUVTexturesCopy # Creates Image from YUV_ColorSpace data in three planes. ##
# MakeRasterCopy # Creates Image from Pixmap and copied pixels. ##
# MakeRasterData # Creates Image from Image_Info and shared pixels. ##
# SkSurface::makeImageSnapshot # Creates Image capturing Surface contents. ##
# makeColorSpace # Creates Image matching Color_Space if possible. ##
# makeNonTextureImage # Creates Image without dependency on GPU_Texture. ##
# makeRasterImage # Creates Image compatible with Raster_Surface if possible. ##
# makeSubset # Creates Image containing part of original. ##
# makeTextureImage # Creates Image matching Color_Space if possible. ##
# makeWithFilter # Creates filtered, clipped Image. ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Member_Functions
#Table
#Legend
# description # function ##
#Legend ##
# MakeBackendTextureFromSkImage # Creates GPU_Texture from Image. ##
# MakeCrossContextFromEncoded # Creates Image from encoded data, and uploads to GPU. ##
# MakeCrossContextFromPixmap # Creates Image from Pixmap, and uploads to GPU. ##
# MakeFromAHardwareBuffer # Creates Image from Android hardware buffer. ##
# MakeFromAdoptedTexture # Creates Image from GPU_Texture, managed internally. ##
# MakeFromBitmap # Creates Image from Bitmap, sharing or copying pixels. ##
# MakeFromDeferredTextureImageData # To be deprecated. ##
# MakeFromEncoded # Creates Image from encoded data. ##
# MakeFromGenerator # Creates Image from a stream of data. ##
# MakeFromNV12TexturesCopy # Creates Image from YUV_ColorSpace data in two planes. ##
# MakeFromPicture # Creates Image from Picture. ##
# MakeFromRaster # Creates Image from Pixmap, with release. ##
# MakeFromTexture # Creates Image from GPU_Texture, managed externally. ##
# MakeFromYUVTexturesCopy # Creates Image from YUV_ColorSpace data in three planes. ##
# MakeRasterCopy # Creates Image from Pixmap and copied pixels. ##
# MakeRasterData # Creates Image from Image_Info and shared pixels. ##
# alphaType # Returns Alpha_Type. ##
# asLegacyBitmap # Returns as Raster_Bitmap. ##
# bounds() # Returns width() and height() as Rectangle. ##
# colorSpace # Returns Color_Space. ##
# dimensions() # Returns width() and height(). ##
# encodeToData # Returns encoded Image as SkData. ##
# getDeferredTextureImageData # To be deprecated. ##
# getTexture # Deprecated. ##
# getTextureHandle # Returns GPU reference to Image as texture. ##
# height() # Returns pixel row count. ##
# isAlphaOnly # Returns if pixels represent a transparency mask. ##
# isLazyGenerated # Returns if Image is created as needed. ##
# isOpaque # Returns if Alpha_Type is kOpaque_SkAlphaType. ##
# isTextureBacked # Returns if Image was created from GPU_Texture. ##
# isValid # Returns if Image can draw to Raster_Surface or GPU_Context. ##
# makeColorSpace # Creates Image matching Color_Space if possible. ##
# makeNonTextureImage # Creates Image without dependency on GPU_Texture. ##
# makeRasterImage # Creates Image compatible with Raster_Surface if possible. ##
# makeShader # Creates Shader, Paint element that can tile Image. ##
# makeSubset # Creates Image containing part of original. ##
# makeTextureImage # Creates Image matching Color_Space if possible. ##
# makeWithFilter # Creates filtered, clipped Image. ##
# peekPixels # Returns Pixmap if possible. ##
# readPixels # Copies and converts pixels. ##
# refColorSpace # Returns Image_Info Color_Space. ##
# refEncodedData # Returns Image encoded in SkData if present. ##
# scalePixels # Scales and converts one Image to another. ##
# toString # Converts Image to machine readable form. ##
# uniqueID # Identifier for Image. ##
# width() # Returns pixel column count. ##
#Table ##
#Subtopic ##
#Topic ##
#Populate
##
#Typedef SkImageInfo Info
@ -2222,6 +2149,7 @@ By translating canvas by returned offset, Image appears stationary.
# ------------------------------------------------------------------------------
#Struct DeferredTextureImageUsageParams
#Line # to be deprecated ##
Used only by Chrome; to be deprecated.

View File

@ -2,6 +2,12 @@
#Alias Matrices
#Alias Matrix_Reference
#Subtopic Overview
#Subtopic Subtopics
#Populate
##
##
#Class SkMatrix
Matrix holds a 3x3 matrix for transforming coordinates. This allows mapping
@ -16,140 +22,23 @@ initializes all Matrix elements with the corresponding mapping.
Matrix includes a hidden variable that classifies the type of matrix to
improve performance. Matrix is not thread safe unless getType is called first.
#Topic Overview
#Subtopic Subtopics
#ToDo manually add subtopics ##
#Table
#Legend
# topics # description ##
#Legend ##
#Table ##
#Subtopic Constructors
#Populate
##
#Subtopic Constructors
#Table
#Legend
# name # description ##
#Legend ##
# MakeAll # Constructs all nine values. ##
# MakeRectToRect # Constructs from source Rect to destination Rect. ##
# MakeScale # Constructs from scale in x and y. ##
# MakeTrans # Constructs from translate in x and y. ##
#Table ##
#Subtopic ##
#Subtopic Operators
#Table
#Legend
# function # description ##
#Legend ##
# operator!=(const SkMatrix& a, const SkMatrix& b) # Returns true if members are unequal. ##
# operator==(const SkMatrix& a, const SkMatrix& b) # Returns true if members are equal. ##
# operator[](int index) # Returns writable reference to Matrix value. ##
# operator[](int index)_const # Returns Matrix value. ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Member_Functions
#Table
#Legend
# function # description ##
#Legend ##
# Concat # Returns the concatenation of Matrix pair. ##
# I # Returns a reference to a const identity Matrix. ##
# InvalidMatrix # Returns a reference to a const invalid Matrix. ##
# MakeAll # Constructs all nine values. ##
# MakeRectToRect # Constructs from source Rect to destination Rect. ##
# MakeScale # Constructs from scale in x and y. ##
# MakeTrans # Constructs from translate in x and y. ##
# SetAffineIdentity # Sets 3x2 array to identity. ##
# asAffine # Copies to 3x2 array. ##
# cheapEqualTo # Compares Matrix pair using memcmp(). ##
# decomposeScale # Separates scale if possible. ##
# dirtyMatrixTypeCache # Sets internal cache to unknown state. ##
# dump() # Sends text representation using floats to standard output. ##
# fixedStepInX # Returns step in x for a position in y. ##
# get() # Returns one of nine Matrix values. ##
# get9 # Returns all nine Matrix values. ##
# getMaxScale # Returns maximum scaling, if possible. ##
# getMinMaxScales # Returns minimum and maximum scaling, if possible. ##
# getMinScale # Returns minimum scaling, if possible. ##
# getPerspX # Returns input x perspective factor. ##
# getPerspY # Returns input y perspective factor. ##
# getScaleX # Returns horizontal scale factor. ##
# getScaleY # Returns vertical scale factor. ##
# getSkewX # Returns horizontal skew factor. ##
# getSkewY # Returns vertical skew factor. ##
# getTranslateX # Returns horizontal translation. ##
# getTranslateY # Returns vertical translation. ##
# getType # Returns transform complexity. ##
# hasPerspective # Returns if transform includes perspective. ##
# invert() # Returns inverse, if possible. ##
# isFinite # Returns if all Matrix values are not infinity, NaN. ##
# isFixedStepInX # Returns if transformation supports fixed step in x. ##
# isIdentity # Returns if matrix equals the identity Matrix .##
# isScaleTranslate # Returns if transform is limited to scale and translate. ##
# isSimilarity # Returns if transform is limited to square scale and rotation. ##
# isTranslate # Returns if transform is limited to translate. ##
# mapHomogeneousPoints # Maps Point3 array. ##
# mapPoints # Maps Point array. ##
# mapRadius # Returns mean radius of mapped Circle. ##
# mapRect # Returns bounds of mapped Rect. ##
# mapRectScaleTranslate # Returns bounds of mapped Rect. ##
# mapRectToQuad # Maps Rect to Point array. ##
# mapVector # Maps Vector. ##
# mapVectors # Maps Vector array. ##
# mapXY # Maps Point. ##
# postConcat # Post-multiplies Matrix by Matrix parameter. ##
# postIDiv # Post-multiplies Matrix by inverse scale. ##
# postRotate # Post-multiplies Matrix by rotation. ##
# postScale # Post-multiplies Matrix by scale. ##
# postSkew # Post-multiplies Matrix by skew. ##
# postTranslate # Post-multiplies Matrix by translation. ##
# preConcat # Pre-multiplies Matrix by Matrix parameter.##
# preRotate # Pre-multiplies Matrix by rotation. ##
# preScale # Pre-multiplies Matrix by scale. ##
# preSkew # Pre-multiplies Matrix by skew. ##
# preTranslate # Pre-multiplies Matrix by translation. ##
# preservesAxisAlignment # Returns if mapping restricts to 90 degree multiples and mirroring. ##
# preservesRightAngles # Returns if mapped 90 angle remains 90 degrees. ##
# rectStaysRect # Returns if mapped Rect can be represented by another Rect. ##
# reset() # Sets Matrix to identity. ##
# set() # Sets one value. ##
# set9 # Sets all values from Scalar array. ##
# setAffine # Sets left two columns. ##
# setAll # Sets all values from parameters. ##
# setConcat # Sets to Matrix parameter multiplied by Matrix parameter. ##
# setIdentity # Sets Matrix to identity. ##
# setPerspX # Sets input x perspective factor. ##
# setPerspY # Sets input y perspective factor. ##
# setPolyToPoly # Sets to map one to four points to an equal array of points. ##
# setRSXform # Sets to rotate, scale, and translate. ##
# setRectToRect # Sets to map one Rect to another. ##
# setRotate # Sets to rotate about a point. ##
# setScale # Sets to scale about a point. ##
# setScaleTranslate # Sets to scale and translate. ##
# setScaleX # Sets horizontal scale factor. ##
# setScaleY # Sets vertical scale factor ##
# setSinCos # Sets to rotate and scale about a point. ##
# setSkew # Sets to skew about a point. ##
# setSkewX # Sets horizontal skew factor. ##
# setSkewY # Sets vertical skew factor. ##
# setTranslate # Sets to translate in x and y. ##
# setTranslateX # Sets horizontal translation. ##
# setTranslateY # Sets vertical translation. ##
# toString # Converts Matrix to machine readable form. ##
#Table ##
#Subtopic ##
#Topic ##
#Populate
##
# ------------------------------------------------------------------------------
#Method static SkMatrix SK_WARN_UNUSED_RESULT MakeScale(SkScalar sx, SkScalar sy)
#Line # Constructs from scale in x and y. ##
#Line # constructs from scale in x and y ##
Sets Matrix to scale by (sx, sy). Returned matrix is:
#Code
@ -205,7 +94,7 @@ canvas->drawBitmap(source, 0, 0);
#Method static SkMatrix SK_WARN_UNUSED_RESULT MakeTrans(SkScalar dx, SkScalar dy)
#Line # Constructs from translate in x and y. ##
#Line # constructs from translate in x and y ##
Sets Matrix to translate by (dx, dy). Returned matrix is:
#Code
@ -238,7 +127,7 @@ for (int i = 0; i < 4; ++i) {
#Method static SkMatrix SK_WARN_UNUSED_RESULT MakeAll(SkScalar scaleX, SkScalar skewX, SkScalar transX,
SkScalar skewY, SkScalar scaleY, SkScalar transY,
SkScalar pers0, SkScalar pers1, SkScalar pers2)
#Line # Constructs all nine values. ##
#Line # constructs all nine values ##
Sets Matrix to:
@ -353,7 +242,7 @@ after setPolyToPoly: kTranslate_Mask kScale_Mask kAffine_Mask kPerspective_Mask
#Method TypeMask getType() const
#Line # Returns transform complexity. ##
#Line # returns transform complexity ##
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 kPerspective_Mask is set, all
@ -383,7 +272,7 @@ set all flags hex: f decimal: 15
#Method bool isIdentity() const
#Line # Returns if matrix equals the identity Matrix . ##
#Line # returns if matrix equals the identity Matrix ##
Returns true if Matrix is identity. Identity matrix is:
#Code
@ -415,7 +304,7 @@ is identity: false
#Method bool isScaleTranslate() const
#Line # Returns if transform is limited to scale and translate. ##
#Line # returns if transform is limited to scale and translate ##
Returns true if Matrix at most scales and translates. Matrix may be identity,
contain only scale elements, only translate elements, or both. Matrix form is:
@ -452,7 +341,7 @@ is scale-translate: true
#Method bool isTranslate() const
#Line # Returns if transform is limited to translate. ##
#Line # returns if transform is limited to translate ##
Returns true if Matrix is identity, or translates. Matrix form is:
#Code
@ -488,7 +377,7 @@ is translate: false
#Method bool rectStaysRect() const
#Line # Returns if mapped Rect can be represented by another Rect. ##
#Line # returns if mapped Rect can be represented by another Rect ##
Returns true Matrix maps Rect to another Rect. If true, Matrix is identity,
or scales, or rotates a multiple of 90 degrees, or mirrors in x or y. In all
cases, Matrix may also have translation. Matrix form is either:
@ -538,7 +427,7 @@ rectStaysRect: true
#Method bool preservesAxisAlignment() const
#Line # Returns if mapping restricts to 90 degree multiples and mirroring. ##
#Line # returns if mapping restricts to 90 degree multiples and mirroring ##
Returns true Matrix maps Rect to another Rect. If true, Matrix is identity,
or scales, or rotates a multiple of 90 degrees, or mirrors in x or y. In all
@ -589,7 +478,7 @@ preservesAxisAlignment: true
#Method bool hasPerspective() const
#Line # Returns if transform includes perspective. ##
#Line # returns if transform includes perspective ##
Returns true if the matrix contains perspective elements. Matrix form is:
#Code
@ -628,7 +517,7 @@ canvas->drawString(string, 0, source.bounds().height() + 48, paint);
#Method bool isSimilarity(SkScalar tol = SK_ScalarNearlyZero) const
#Line # Returns if transform is limited to square scale and rotation. ##
#Line # returns if transform is limited to square scale and rotation ##
Returns true if Matrix contains only translation, rotation, reflection, and
uniform scale.
Returns false if Matrix contains different scales, skewing, perspective, or
@ -680,7 +569,7 @@ with isSimilarity false reveals the pair not visible through the matrix.
#Method bool preservesRightAngles(SkScalar tol = SK_ScalarNearlyZero) const
#Line # Returns if mapped 90 angle remains 90 degrees. ##
#Line # returns if mapped 90 angle remains 90 degrees ##
Returns true if Matrix contains only translation, rotation, reflection, and
scale. Scale may differ along rotated axes.
Returns false if Matrix skewing, perspective, or degenerate forms that collapse
@ -846,7 +735,7 @@ vertical translation
#Method SkScalar operator[](int index)_const
#Line # Returns Matrix value. ##
#Line # returns Matrix value ##
Returns one matrix value. Asserts if index is out of range and SK_DEBUG is
defined.
@ -875,7 +764,7 @@ matrix[SkMatrix::kMScaleY] == 24
#Method SkScalar get(int index) const
#Line # Returns one of nine Matrix values. ##
#Line # returns one of nine Matrix values ##
Returns one matrix value. Asserts if index is out of range and SK_DEBUG is
defined.
@ -906,7 +795,7 @@ matrix.get(SkMatrix::kMSkewY) == 24
#Method SkScalar getScaleX() const
#Line # Returns horizontal scale factor. ##
#Line # returns horizontal scale factor ##
Returns scale factor multiplied by x input, contributing to x output.
With mapPoints, scales Points along the x-axis.
@ -929,7 +818,7 @@ matrix.getScaleX() == 42
#Method SkScalar getScaleY() const
#Line # Returns vertical scale factor. ##
#Line # returns vertical scale factor ##
Returns scale factor multiplied by y input, contributing to y output.
With mapPoints, scales Points along the y-axis.
@ -952,7 +841,7 @@ matrix.getScaleY() == 24
#Method SkScalar getSkewY() const
#Line # Returns vertical skew factor. ##
#Line # returns vertical skew factor ##
Returns scale factor multiplied by x input, contributing to y output.
With mapPoints, skews Points along the y-axis.
Skew x and y together can rotate Points.
@ -976,7 +865,7 @@ matrix.getSkewY() == 24
#Method SkScalar getSkewX() const
#Line # Returns horizontal skew factor. ##
#Line # returns horizontal skew factor ##
Returns scale factor multiplied by y input, contributing to x output.
With mapPoints, skews Points along the x-axis.
Skew x and y together can rotate Points.
@ -1000,7 +889,7 @@ matrix.getSkewX() == 42
#Method SkScalar getTranslateX() const
#Line # Returns horizontal translation. ##
#Line # returns horizontal translation ##
Returns translation contributing to x output.
With mapPoints, moves Points along the x-axis.
@ -1023,7 +912,7 @@ matrix.getTranslateX() == 42
#Method SkScalar getTranslateY() const
#Line # Returns vertical translation. ##
#Line # returns vertical translation ##
Returns translation contributing to y output.
With mapPoints, moves Points along the y-axis.
@ -1046,7 +935,7 @@ matrix.getTranslateY() == 24
#Method SkScalar getPerspX() const
#Line # Returns input x perspective factor. ##
#Line # returns input x perspective factor ##
Returns factor scaling input x relative to input y.
#Return input x perspective factor ##
@ -1077,7 +966,7 @@ Returns factor scaling input x relative to input y.
#Method SkScalar getPerspY() const
#Line # Returns input y perspective factor. ##
#Line # returns input y perspective factor ##
Returns factor scaling input y relative to input x.
@ -1109,7 +998,7 @@ Returns factor scaling input y relative to input x.
#Method SkScalar& operator[](int index)
#Line # Returns writable reference to Matrix value. ##
#Line # returns writable reference to Matrix value ##
Returns writable Matrix value. Asserts if index is out of range and SK_DEBUG is
defined. Clears internal cache anticipating that caller will change Matrix value.
@ -1149,7 +1038,7 @@ after dirty cache: x = 66
#Method void set(int index, SkScalar value)
#Line # Sets one value. ##
#Line # sets one value ##
Sets Matrix value. Asserts if index is out of range and SK_DEBUG is
defined. Safer than operator[]; internal cache is always maintained.
@ -1181,7 +1070,7 @@ after 2nd skew x mod: x = 66
#Method void setScaleX(SkScalar v)
#Line # Sets horizontal scale factor. ##
#Line # sets horizontal scale factor ##
Sets horizontal scale factor.
#Param v horizontal scale factor to store ##
@ -1207,7 +1096,7 @@ canvas->drawString("x scale", 0, 48, paint);
#Method void setScaleY(SkScalar v)
#Line # Sets vertical scale factor ##
#Line # sets vertical scale factor ##
Sets vertical scale factor.
#Param v vertical scale factor to store ##
@ -1233,7 +1122,7 @@ canvas->drawString("y scale", 12, 48, paint);
#Method void setSkewY(SkScalar v)
#Line # Sets vertical skew factor. ##
#Line # sets vertical skew factor ##
Sets vertical skew factor.
#Param v vertical skew factor to store ##
@ -1259,7 +1148,7 @@ canvas->drawString("y skew", 12, 48, paint);
#Method void setSkewX(SkScalar v)
#Line # Sets horizontal skew factor. ##
#Line # sets horizontal skew factor ##
Sets horizontal skew factor.
#Param v horizontal skew factor to store ##
@ -1285,7 +1174,7 @@ canvas->drawString("x skew", 36, 48, paint);
#Method void setTranslateX(SkScalar v)
#Line # Sets horizontal translation. ##
#Line # sets horizontal translation ##
Sets horizontal translation.
#Param v horizontal translation to store ##
@ -1311,7 +1200,7 @@ canvas->drawString("x translate", 8, 24, paint);
#Method void setTranslateY(SkScalar v)
#Line # Sets vertical translation. ##
#Line # sets vertical translation ##
Sets vertical translation.
#Param v vertical translation to store ##
@ -1337,7 +1226,7 @@ canvas->drawString("y translate", 8, 24, paint);
#Method void setPerspX(SkScalar v)
#Line # Sets input x perspective factor. ##
#Line # sets input x perspective factor ##
Sets input x perspective factor, which causes mapXY to vary input x inversely
proportional to input y.
@ -1365,7 +1254,7 @@ for (SkScalar perspX : { -.003f, 0.f, .003f, .012f } ) {
#Method void setPerspY(SkScalar v)
#Line # Sets input y perspective factor. ##
#Line # sets input y perspective factor ##
Sets input y perspective factor, which causes mapXY to vary input y inversely
proportional to input x.
@ -1394,7 +1283,7 @@ for (SkScalar perspX : { -.003f, 0.f, .003f, .012f } ) {
#Method void setAll(SkScalar scaleX, SkScalar skewX, SkScalar transX,
SkScalar skewY, SkScalar scaleY, SkScalar transY,
SkScalar persp0, SkScalar persp1, SkScalar persp2)
#Line # Sets all values from parameters. ##
#Line # sets all values from parameters ##
Sets all values from parameters. Sets matrix to:
@ -1439,7 +1328,7 @@ Sets all values from parameters. Sets matrix to:
#Method void get9(SkScalar buffer[9]) const
#Line # Returns all nine Matrix values. ##
#Line # returns all nine Matrix values ##
Copies nine Scalar values contained by Matrix into buffer, in member value
ascending order: kMScaleX, kMSkewX, kMTransX, kMSkewY, kMScaleY, kMTransY,
kMPersp0, kMPersp1, kMPersp2.
@ -1468,7 +1357,7 @@ SkDebugf("{%g, %g, %g},\n{%g, %g, %g},\n{%g, %g, %g}\n", b[0], b[1], b[2],
#Method void set9(const SkScalar buffer[9])
#Line # Sets all values from Scalar array. ##
#Line # sets all values from Scalar array ##
Sets Matrix to nine Scalar values in buffer, in member value ascending order:
kMScaleX, kMSkewX, kMTransX, kMSkewY, kMScaleY, kMTransY, kMPersp0, kMPersp1,
kMPersp2.
@ -1505,7 +1394,7 @@ canvas->drawBitmap(source, 0, 0);
#Method void reset()
#Line # Sets Matrix to identity. ##
#Line # sets Matrix to identity ##
Sets Matrix to identity; which has no effect on mapped Points. Sets Matrix to:
#Code
@ -1535,7 +1424,7 @@ m.isIdentity(): true
#Method void setIdentity()
#Line # Sets Matrix to identity. ##
#Line # sets Matrix to identity ##
Sets Matrix to identity; which has no effect on mapped Points. Sets Matrix to:
#Code
@ -1565,7 +1454,7 @@ m.isIdentity(): true
#Method void setTranslate(SkScalar dx, SkScalar dy)
#Line # Sets to translate in x and y. ##
#Line # sets to translate in x and y ##
Sets Matrix to translate by (dx, dy).
#Param dx horizontal translation ##
@ -1615,7 +1504,7 @@ canvas->drawString("translate", 8, 24, paint);
#Method void setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
#Line # Sets to scale about a point. ##
#Line # sets to scale about a point ##
Sets Matrix to scale by sx and sy, about a pivot point at (px, py).
The pivot point is unchanged when mapped with Matrix.
@ -1678,7 +1567,7 @@ Sets Matrix to scale by sx and sy about at pivot point at (0, 0).
#Method void setRotate(SkScalar degrees, SkScalar px, SkScalar py)
#Line # Sets to rotate about a point. ##
#Line # sets to rotate about a point ##
Sets Matrix to rotate by degrees about a pivot point at (px, py).
The pivot point is unchanged when mapped with Matrix.
@ -1739,7 +1628,7 @@ Positive degrees rotates clockwise.
#Method void setSinCos(SkScalar sinValue, SkScalar cosValue,
SkScalar px, SkScalar py)
#Line # Sets to rotate and scale about a point. ##
#Line # sets to rotate and scale about a point ##
Sets Matrix to rotate by sinValue and cosValue, about a pivot point at (px, py).
The pivot point is unchanged when mapped with Matrix.
@ -1809,7 +1698,7 @@ Canvas needs offset after applying Matrix to pivot about Rect center.
#Method SkMatrix& setRSXform(const SkRSXform& rsxForm)
#Line # Sets to rotate, scale, and translate. ##
#Line # sets to rotate, scale, and translate ##
Sets Matrix to rotate, scale, and translate using a compressed matrix form.
Vector (rsxForm.fSSin, rsxForm.fSCos) describes the angle of rotation relative
@ -1846,7 +1735,7 @@ Canvas needs offset after applying Matrix to pivot about Rect center.
#Method void setSkew(SkScalar kx, SkScalar ky, SkScalar px, SkScalar py)
#Line # Sets to skew about a point. ##
#Line # sets to skew about a point ##
Sets Matrix to skew by kx and ky, about a pivot point at (px, py).
The pivot point is unchanged when mapped with Matrix.
@ -1907,7 +1796,7 @@ Sets Matrix to skew by kx and ky, about a pivot point at (0, 0).
#Method void setConcat(const SkMatrix& a, const SkMatrix& b)
#Line # Sets to Matrix parameter multiplied by Matrix parameter. ##
#Line # sets to Matrix parameter multiplied by Matrix parameter ##
Sets Matrix to Matrix a multiplied by Matrix b. Either a or b may be this.
Given:
@ -1955,7 +1844,7 @@ canvas->drawBitmap(source, 0, 0);
#Method void preTranslate(SkScalar dx, SkScalar dy)
#Line # Pre-multiplies Matrix by translation. ##
#Line # pre-multiplies Matrix by translation ##
Sets Matrix to Matrix multiplied by Matrix constructed from translation (dx, dy).
This can be thought of as moving the point to be mapped before applying Matrix.
@ -2012,7 +1901,7 @@ Matrix * T(dx, dy) = | D E F | | 0 1 dy | = | D E D*dx+E*dy+F |
#Method void preScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
#Line # Pre-multiplies Matrix by scale. ##
#Line # pre-multiplies Matrix by scale ##
Sets Matrix to Matrix multiplied by Matrix constructed from scaling by (sx, sy)
about pivot point (px, py).
This can be thought of as scaling about a pivot point before applying Matrix.
@ -2111,7 +2000,7 @@ canvas->drawBitmap(source, 0, 0);
#Method void preRotate(SkScalar degrees, SkScalar px, SkScalar py)
#Line # Pre-multiplies Matrix by rotation. ##
#Line # pre-multiplies Matrix by rotation ##
Sets Matrix to Matrix multiplied by Matrix constructed from rotating by degrees
about pivot point (px, py).
This can be thought of as rotating about a pivot point before applying Matrix.
@ -2222,7 +2111,7 @@ canvas->drawBitmap(source, 0, 0);
#Method void preSkew(SkScalar kx, SkScalar ky, SkScalar px, SkScalar py)
#Line # Pre-multiplies Matrix by skew. ##
#Line # pre-multiplies Matrix by skew ##
Sets Matrix to Matrix multiplied by Matrix constructed from skewing by (kx, ky)
about pivot point (px, py).
This can be thought of as skewing about a pivot point before applying Matrix.
@ -2321,7 +2210,7 @@ canvas->drawBitmap(source, 0, 0);
#Method void preConcat(const SkMatrix& other)
#Line # Pre-multiplies Matrix by Matrix parameter. ##
#Line # pre-multiplies Matrix by Matrix parameter ##
Sets Matrix to Matrix multiplied by Matrix other.
This can be thought of mapping by other before applying Matrix.
@ -2369,7 +2258,7 @@ canvas->drawBitmap(source, 0, 0);
#Method void postTranslate(SkScalar dx, SkScalar dy)
#Line # Post-multiplies Matrix by translation. ##
#Line # post-multiplies Matrix by translation ##
Sets Matrix to Matrix constructed from translation (dx, dy) multiplied by Matrix.
This can be thought of as moving the point to be mapped after applying Matrix.
@ -2429,7 +2318,7 @@ Compare with preTranslate example.
#Method void postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
#Line # Post-multiplies Matrix by scale. ##
#Line # post-multiplies Matrix by scale ##
Sets Matrix to Matrix constructed from scaling by (sx, sy) about pivot point
(px, py), multiplied by Matrix.
This can be thought of as scaling about a pivot point after applying Matrix.
@ -2528,7 +2417,7 @@ canvas->drawBitmap(source, 0, 0);
#Method bool postIDiv(int divx, int divy)
#Line # Post-multiplies Matrix by inverse scale. ##
#Line # post-multiplies Matrix by inverse scale ##
Sets Matrix to Matrix constructed from scaling by
#Formula
(1/divx, 1/divy)
@ -2587,7 +2476,7 @@ canvas->drawBitmap(source, 0, 0);
#Method void postRotate(SkScalar degrees, SkScalar px, SkScalar py)
#Line # Post-multiplies Matrix by rotation. ##
#Line # post-multiplies Matrix by rotation ##
Sets Matrix to Matrix constructed from rotating by degrees about pivot point
(px, py), multiplied by Matrix.
This can be thought of as rotating about a pivot point after applying Matrix.
@ -2698,7 +2587,7 @@ canvas->drawBitmap(source, 0, 0);
#Method void postSkew(SkScalar kx, SkScalar ky, SkScalar px, SkScalar py)
#Line # Post-multiplies Matrix by skew. ##
#Line # post-multiplies Matrix by skew ##
Sets Matrix to Matrix constructed from skewing by (kx, ky) about pivot point
(px, py), multiplied by Matrix.
This can be thought of as skewing about a pivot point after applying Matrix.
@ -2797,7 +2686,7 @@ canvas->drawBitmap(source, 0, 0);
#Method void postConcat(const SkMatrix& other)
#Line # Post-multiplies Matrix by Matrix parameter. ##
#Line # post-multiplies Matrix by Matrix parameter ##
Sets Matrix to Matrix other multiplied by Matrix.
This can be thought of mapping by other after applying Matrix.
@ -2908,7 +2797,7 @@ how Matrix maps to the side or center of the destination Rect.
#Method bool setRectToRect(const SkRect& src, const SkRect& dst, ScaleToFit stf)
#Line # Sets to map one Rect to another. ##
#Line # sets to map one Rect to another ##
Sets Matrix to scale and translate src Rect to dst Rect. stf selects whether
mapping completely fills dst or preserves the aspect ratio, and how to align
src within dst. Returns false if src is empty, and sets Matrix to identity.
@ -2963,7 +2852,7 @@ src: 1, 2, 3, 4 dst: 5, 6, 8, 9 success: true
#Method static SkMatrix MakeRectToRect(const SkRect& src, const SkRect& dst, ScaleToFit stf)
#Line # Constructs from source Rect to destination Rect. ##
#Line # constructs from source Rect to destination Rect ##
Returns Matrix set to scale and translate src Rect to dst Rect. stf selects
whether mapping completely fills dst or preserves the aspect ratio, and how to
align src within dst. Returns the identity Matrix if src is empty. If dst is
@ -3016,7 +2905,7 @@ src: 1, 2, 3, 4 dst: 5, 6, 8, 9
#Method bool setPolyToPoly(const SkPoint src[], const SkPoint dst[], int count)
#Line # Sets to map one to four points to an equal array of points. ##
#Line # sets to map one to four points to an equal array of points ##
Sets Matrix to map src to dst. count must be zero or greater, and four or less.
If count is zero, sets Matrix to identity and returns true.
@ -3067,7 +2956,7 @@ perspective.
#Method bool SK_WARN_UNUSED_RESULT invert(SkMatrix* inverse) const
#Line # Returns inverse, if possible. ##
#Line # returns inverse, if possible ##
Sets inverse to reciprocal matrix, returning true if Matrix can be inverted.
Geometrically, if Matrix maps from source to destination, inverse Matrix
maps from destination to source. If Matrix can not be inverted, inverse is
@ -3104,7 +2993,7 @@ unchanged.
#Method static void SetAffineIdentity(SkScalar affine[6])
#Line # Sets 3x2 array to identity. ##
#Line # sets 3x2 array to identity ##
Fills affine with identity values in column major order.
Sets affine to:
@ -3139,7 +3028,7 @@ ScaleX: 1 SkewY: 0 SkewX: 0 ScaleY: 1 TransX: 0 TransY: 0
#Method bool SK_WARN_UNUSED_RESULT asAffine(SkScalar affine[6]) const
#Line # Copies to 3x2 array. ##
#Line # copies to 3x2 array ##
Fills affine in column major order. Sets affine to:
#Code
@ -3177,7 +3066,7 @@ ScaleX: 2 SkewY: 5 SkewX: 3 ScaleY: 6 TransX: 4 TransY: 7
#Method void setAffine(const SkScalar affine[6])
#Line # Sets left two columns. ##
#Line # sets left two columns ##
Sets Matrix to affine values, passed in column major order. Given affine,
column, then row, as:
@ -3225,7 +3114,7 @@ ScaleX: 2 SkewY: 5 SkewX: 3 ScaleY: 6 TransX: 4 TransY: 7
#Method void mapPoints(SkPoint dst[], const SkPoint src[], int count) const
#Line # Maps Point array. ##
#Line # maps Point array ##
Maps src Point array of length count to dst Point array of equal or greater
length. Points are mapped by multiplying each Point by Matrix. Given:
@ -3339,7 +3228,7 @@ Matrix * pt = |D E F| |y| = |Ax+By+C Dx+Ey+F Gx+Hy+I| = ------- , -------
#Method void mapHomogeneousPoints(SkPoint3 dst[], const SkPoint3 src[], int count) const
#Line # Maps Point3 array. ##
#Line # maps Point3 array ##
Maps src Point3 array of length count to dst Point3 array, which must of length count or
greater. Point3 array is mapped by multiplying each Point3 by Matrix. Given:
@ -3397,7 +3286,7 @@ Matrix * src = |D E F| |y| = |Ax+By+Cz Dx+Ey+Fz Gx+Hy+Iz|
#Method void mapXY(SkScalar x, SkScalar y, SkPoint* result) const
#Line # Maps Point. ##
#Line # maps Point ##
Maps Point (x, y) to result. Point is mapped by multiplying by Matrix. Given:
#Code
@ -3492,7 +3381,7 @@ canvas->drawBitmap(source, 0, 0);
#Method void mapVectors(SkVector dst[], const SkVector src[], int count) const
#Line # Maps Vector array. ##
#Line # maps Vector array ##
Maps src Vector array of length count to Vector Point array of equal or greater
length. Vectors are mapped by multiplying each Vector by Matrix, treating
Matrix translation as zero. Given:
@ -3611,7 +3500,7 @@ Matrix * vec = |D E 0| |y| = |Ax+By Dx+Ey Gx+Hy+I| = ------- , -------
#Method void mapVector(SkScalar dx, SkScalar dy, SkVector* result) const
#Line # Maps Vector. ##
#Line # maps Vector ##
Maps Vector (x, y) to result. Vector is mapped by multiplying by Matrix,
treating Matrix translation as zero. Given:
@ -3711,7 +3600,7 @@ Matrix * vec = |D E 0| |dy| = |A*dx+B*dy D*dx+E*dy G*dx+H*dy+I| = ----------- ,
#Method bool mapRect(SkRect* dst, const SkRect& src) const
#Line # Returns bounds of mapped Rect. ##
#Line # returns bounds of mapped Rect ##
Sets dst to bounds of src corners mapped by Matrix.
Returns true if mapped corners are dst corners.
@ -3775,7 +3664,7 @@ Returned value is the same as calling rectStaysRect.
#Method void mapRectToQuad(SkPoint dst[4], const SkRect& rect) const
#Line # Maps Rect to Point array. ##
#Line # maps Rect to Point array ##
Maps four corners of rect to dst. Points are mapped by multiplying each
rect corner by Matrix. rect corner is processed in this order:
(rect.fLeft, rect.fTop), (rect.fRight, rect.fTop), (rect.fRight, rect.fBottom),
@ -3832,7 +3721,7 @@ Matrix * pt = |D E F| |y| = |Ax+By+C Dx+Ey+F Gx+Hy+I| = ------- , -------
#Method void mapRectScaleTranslate(SkRect* dst, const SkRect& src) const
#Line # Returns bounds of mapped Rect. ##
#Line # returns bounds of mapped Rect ##
Sets dst to bounds of src corners mapped by Matrix. If matrix contains
elements other than scale or translate: asserts if SK_DEBUG is defined;
otherwise, results are undefined.
@ -3861,7 +3750,7 @@ otherwise, results are undefined.
#Method SkScalar mapRadius(SkScalar radius) const
#Line # Returns mean radius of mapped Circle. ##
#Line # returns mean radius of mapped Circle ##
Returns geometric mean radius of ellipse formed by constructing Circle of
size radius, and mapping constructed Circle with Matrix. The result squared is
equal to the major axis length times the minor axis length.
@ -3917,7 +3806,7 @@ the area enclosed by the ellipse major and minor axes.
#Method bool isFixedStepInX() const
#Line # Returns if transformation supports fixed step in x. ##
#Line # returns if transformation supports fixed step in x ##
Returns true if a unit step in x at some y mapped through Matrix can be
represented by a constant Vector. Returns true if getType returns kIdentity_Mask,
or combinations of: kTranslate_Mask, kScale_Mask, and kAffine_Mask.
@ -3966,7 +3855,7 @@ isFixedStepInX: false
#Method SkVector fixedStepInX(SkScalar y) const
#Line # Returns step in x for a position in y. ##
#Line # returns step in x for a position in y ##
Returns Vector representing a unit step in x at y mapped through Matrix.
If isFixedStepInX is false, returned value is undefined.
@ -4006,7 +3895,7 @@ If isFixedStepInX is false, returned value is undefined.
#Method bool cheapEqualTo(const SkMatrix& m) const
#Line # Compares Matrix pair using memcmp(). ##
#Line # compares Matrix pair using memcmp() ##
Returns true if Matrix equals m, using an efficient comparison.
Returns false when the sign of zero values is the different; when one
@ -4052,7 +3941,7 @@ both NaN: a != b a.cheapEqualTo(b): true
#Method bool operator==(const SkMatrix& a, const SkMatrix& b)
#Line # Returns true if members are equal. ##
#Line # returns true if members are equal ##
Compares a and b; returns true if a and b are numerically equal. Returns true
even if sign of zero values are different. Returns false if either Matrix
contains NaN, even if the other Matrix also contains NaN.
@ -4085,7 +3974,7 @@ identity: a == b a.cheapEqualTo(b): true
#Method bool operator!=(const SkMatrix& a, const SkMatrix& b)
#Line # Returns true if members are unequal. ##
#Line # returns true if members are unequal ##
Compares a and b; returns true if a and b are not numerically equal. Returns false
even if sign of zero values are different. Returns true if either Matrix
contains NaN, even if the other Matrix also contains NaN.
@ -4114,7 +4003,7 @@ contains NaN, even if the other Matrix also contains NaN.
#Method void dump() const
#Line # Sends text representation using floats to standard output. ##
#Line # sends text representation using floats to standard output ##
Writes text representation of Matrix to standard output. Floating point values
are written with limited precision; it may not be possible to reconstruct
original Matrix from output.
@ -4142,7 +4031,7 @@ matrix != nearlyEqual
#Method void toString(SkString* str) const
#Line # Converts Matrix to machine readable form. ##
#Line # converts Matrix to machine readable form ##
Creates string representation of Matrix. Floating point values
are written with limited precision; it may not be possible to reconstruct
original Matrix from output.
@ -4175,7 +4064,7 @@ matrix != nearlyEqual
#Method SkScalar getMinScale() const
#Line # Returns minimum scaling, if possible. ##
#Line # returns minimum scaling, if possible ##
Returns the minimum scaling factor of Matrix by decomposing the scaling and
skewing elements.
Returns -1 if scale factor overflows or Matrix contains perspective.
@ -4200,7 +4089,7 @@ matrix.getMinScale() 24
#Method SkScalar getMaxScale() const
#Line # Returns maximum scaling, if possible. ##
#Line # returns maximum scaling, if possible ##
Returns the maximum scaling factor of Matrix by decomposing the scaling and
skewing elements.
Returns -1 if scale factor overflows or Matrix contains perspective.
@ -4225,7 +4114,7 @@ matrix.getMaxScale() 42
#Method bool SK_WARN_UNUSED_RESULT getMinMaxScales(SkScalar scaleFactors[2]) const
#Line # Returns minimum and maximum scaling, if possible. ##
#Line # returns minimum and maximum scaling, if possible ##
Sets scaleFactors[0] to the minimum scaling factor, and scaleFactors[1] to the
maximum scaling factor. Scaling factors are computed by decomposing
the Matrix scaling and skewing elements.
@ -4257,7 +4146,7 @@ matrix.getMinMaxScales() false 2 2
#Method bool decomposeScale(SkSize* scale, SkMatrix* remaining = nullptr) const
#Line # Separates scale if possible. ##
#Line # separates scale if possible ##
Decomposes Matrix into scale components and whatever remains. Returns false if
Matrix could not be decomposed.
@ -4311,7 +4200,7 @@ success: true scale: 0.5, 0.25
#Method static const SkMatrix& I()
#Line # Returns a reference to a const identity Matrix. ##
#Line # returns a reference to a const identity Matrix ##
Returns reference to const identity Matrix. Returned Matrix is set to:
#Code
@ -4344,7 +4233,7 @@ m2 == m3
#Method static const SkMatrix& InvalidMatrix()
#Line # Returns a reference to a const invalid Matrix. ##
#Line # returns a reference to a const invalid Matrix ##
Returns reference to a const Matrix with invalid values. Returned Matrix is set
to:
@ -4372,7 +4261,7 @@ scaleX 3.40282e+38
#Method static SkMatrix Concat(const SkMatrix& a, const SkMatrix& b)
#Line # Returns the concatenation of Matrix pair. ##
#Line # returns the concatenation of Matrix pair ##
Returns Matrix a multiplied by Matrix b.
Given:
@ -4423,7 +4312,7 @@ canvas->drawBitmap(source, 0, 0);
#Method void dirtyMatrixTypeCache()
#Line # Sets internal cache to unknown state. ##
#Line # sets internal cache to unknown state ##
Sets internal cache to unknown state. Use to force update after repeated
modifications to Matrix element reference returned by operator[](int index).
@ -4454,7 +4343,7 @@ after dirty cache: x = 66
#Method void setScaleTranslate(SkScalar sx, SkScalar sy, SkScalar tx, SkScalar ty)
#Line # Sets to scale and translate. ##
#Line # sets to scale and translate ##
Initializes Matrix with scale and translate elements.
#Code
@ -4486,7 +4375,7 @@ matrix.dump();
#Method bool isFinite() const
#Line # Returns if all Matrix values are not infinity, NaN. ##
#Line # returns if all Matrix values are not infinity, NaN ##
Returns true if all elements of the matrix are finite. Returns false if any
element is infinity, or NaN.

View File

@ -1,6 +1,12 @@
#Topic Paint
#Alias Paint_Reference
#Subtopic Overview
#Subtopic Subtopics
#Populate
##
##
#Class SkPaint
Paint controls options applied when drawing and measuring. Paint collects all
@ -29,230 +35,33 @@ Paint describes a single color, a single font, a single image quality, and so on
Multiple colors are drawn either by using multiple paints or with objects like
Shader attached to Paint.
#Topic Overview
#Subtopic Subtopics
#Table
#Legend
# name # description ##
#Legend ##
# Classes_and_Structs # embedded struct and class members ##
# Constants # enum and enum class, const values ##
# Constructors # list of functions that construct SkPath ##
# Member_Functions # list of static functions and member methods ##
# Operators # operator overloading methods ##
# Related_Functions # similar methods grouped together ##
#Table ##
#Subtopic ##
#Subtopic Related_Functions
#Table
#Legend
# name # description ##
#Legend ##
# Anti-alias # approximating coverage with transparency ##
# Automatic_Hinting # always adjust glyph paths ##
# Blend_Mode_Methods # get and set Blend_Mode ##
# Color_Filter_Methods # get and set Color_Filter ##
# Color_Methods # get and set Color ##
# Destructor # paint termination ##
# Device_Text # increase precision of glyph position ##
# Dither # distributing color error ##
# Draw_Looper_Methods # get and set Draw_Looper ##
# Fake_Bold # approximate font styles ##
# Fast_Bounds # approximate area required by Paint ##
# Fill_Path # make Path from Path_Effect, stroking ##
# Filter_Quality_Methods # get and set Filter_Quality ##
# Flags # attributes represented by single bits ##
# Font_Embedded_Bitmaps # custom sized bitmap Glyphs ##
# Font_Metrics # common glyph dimensions ##
# Full_Hinting_Spacing # glyph spacing affected by hinting ##
# Hinting # glyph outline adjustment ##
# Image_Filter_Methods # get and set Image_Filter ##
# Initializers # constructors and initialization ##
# Management # paint copying, moving, comparing ##
# Mask_Filter_Methods # get and set Mask_Filter ##
# Measure_Text # width, height, bounds of text ##
# Miter_Limit # maximum length of stroked corners ##
# Path_Effect_Methods # get and set Path_Effect ##
# Shader_Methods # get and set Shader ##
# Stroke_Cap # decorations at ends of open strokes ##
# Stroke_Join # decoration at corners of strokes ##
# Stroke_Width # thickness perpendicular to geometry ##
# Style # geometry filling, stroking ##
# Text_Align # text placement relative to position ##
# Text_Encoding # text encoded as characters or Glyphs ##
# Text_Intercepts # advanced underline, strike through ##
# Text_Path # geometry of Glyphs ##
# Text_Scale_X # text horizontal scale ##
# Text_Size # overall height in points ##
# Text_Skew_X # text horizontal slant ##
# Typeface_Methods # get and set Typeface ##
# Vertical_Text # orient text from top to bottom ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Constants
#Table
#Legend
# name # description ##
#Legend ##
# Align # glyph locations relative to text position ##
# Cap # start and end geometry on stroked shapes ##
# Flags # values described by bits and masks ##
# FontMetrics::FontMetricsFlags # valid Font_Metrics ##
# Hinting # level of glyph outline adjustment ##
# Join # corner geometry on stroked shapes ##
# Style # stroke, fill, or both ##
# TextEncoding # character or glyph encoded size ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Classes_and_Structs
#Table
#Legend
# name # description ##
#Legend ##
# FontMetrics # typeface values ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Constructors
#Table
#Legend
# name # description ##
#Legend ##
# SkPaint() # constructs with default values ##
# SkPaint(SkPaint&& paint) # moves paint without copying it ##
# SkPaint(const SkPaint& paint) # makes a shallow copy ##
# ~SkPaint() # decreases Reference_Count of owned objects ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Operators
#Table
#Legend
# name # description ##
#Legend ##
# operator!=(const SkPaint& a, const SkPaint& b) # compares paints for inequality ##
# operator=(SkPaint&& paint) # moves paint without copying it ##
# operator=(const SkPaint& paint) # makes a shallow copy ##
# operator==(const SkPaint& a, const SkPaint& b) # compares paints for equality ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Member_Functions
#Table
#Legend
# name # description ##
#Legend ##
# breakText # returns text that fits in a width ##
# canComputeFastBounds # returns true if settings allow for fast bounds computation ##
# computeFastBounds # returns fill bounds for quick reject tests ##
# computeFastStrokeBounds # returns stroke bounds for quick reject tests ##
# containsText # returns if all text corresponds to Glyphs ##
# countText # returns number of Glyphs in text ##
# doComputeFastBounds # returns bounds for quick reject tests ##
# flatten() # serializes into a buffer ##
# getAlpha # returns Color_Alpha, color opacity ##
# getBlendMode # returns Blend_Mode, how colors combine with Device ##
# getColor # returns Color_Alpha and Color_RGB, one drawing color ##
# getColorFilter # returns Color_Filter, how colors are altered ##
# getDrawLooper # returns Draw_Looper, multiple layers ##
# getFillPath # returns fill path equivalent to stroke ##
# getFilterQuality # returns Filter_Quality, image filtering level ##
# getFlags # returns Flags stored in a bit field ##
# getFontBounds # returns union all glyph bounds ##
# getFontMetrics # returns Typeface metrics scaled by text size ##
# getFontSpacing # returns recommended spacing between lines ##
# getHash # returns a shallow hash for equality checks ##
# getHinting # returns Hinting, glyph outline adjustment level ##
# getImageFilter # returns Image_Filter, alter pixels; blur ##
# getMaskFilter # returns Mask_Filter, alterations to Mask_Alpha ##
# getPathEffect # returns Path_Effect, modifications to path geometry; dashing ##
# getPosTextHIntercepts # returns where lines intersect horizontally positioned text; underlines ##
# getPosTextIntercepts # returns where lines intersect positioned text; underlines ##
# getPosTextPath # returns Path equivalent to positioned text ##
# getShader # returns Shader, multiple drawing colors; gradients ##
# getStrokeCap # returns Cap, the area drawn at path ends ##
# getStrokeJoin # returns Join, geometry on path corners ##
# getStrokeMiter # returns Miter_Limit, angles with sharp corners ##
# getStrokeWidth # returns thickness of the stroke ##
# getStyle # returns Style: stroke, fill, or both ##
# getTextAlign # returns Align: left, center, or right ##
# getTextBlobIntercepts # returns where lines intersect Text_Blob; underlines ##
# getTextEncoding # returns character or glyph encoded size ##
# getTextIntercepts # returns where lines intersect text; underlines ##
# getTextPath # returns Path equivalent to text ##
# getTextScaleX # returns the text horizontal scale; condensed text ##
# getTextSize # returns text size in points ##
# getTextSkewX # returns the text horizontal skew; oblique text ##
# getTextWidths # returns advance and bounds for each glyph in text ##
# getTypeface # returns Typeface, font description ##
# glyphsToUnichars # converts Glyphs into text ##
# isAntiAlias # returns true if Anti-alias is set ##
# isAutohinted # returns true if Glyphs are always hinted ##
# isDevKernText # returns true if Full_Hinting_Spacing is set ##
# isDither # returns true if Dither is set ##
# isEmbeddedBitmapText # returns true if Font_Embedded_Bitmaps is set ##
# isFakeBoldText # returns true if Fake_Bold is set ##
# isLCDRenderText # returns true if LCD_Text is set ##
# isSrcOver # returns true if Blend_Mode is SkBlendMode::kSrcOver ##
# isSubpixelText # returns true if Subpixel_Text is set ##
# isVerticalText # returns true if Vertical_Text is set ##
# measureText # returns advance width and bounds of text ##
# nothingToDraw # returns true if Paint prevents all drawing ##
# refColorFilter # references Color_Filter, how colors are altered ##
# refDrawLooper # references Draw_Looper, multiple layers ##
# refImageFilter # references Image_Filter, alter pixels; blur ##
# refMaskFilter # references Mask_Filter, alterations to Mask_Alpha ##
# refPathEffect # references Path_Effect, modifications to path geometry; dashing ##
# refShader # references Shader, multiple drawing colors; gradients ##
# refTypeface # references Typeface, font description ##
# reset() # sets to default values ##
# setARGB # sets color by component ##
# setAlpha # sets Color_Alpha, color opacity ##
# setAntiAlias # sets or clears Anti-alias ##
# setAutohinted # sets Glyphs to always be hinted ##
# setBlendMode # sets Blend_Mode, how colors combine with destination ##
# setColor # sets Color_Alpha and Color_RGB, one drawing color ##
# setColorFilter # sets Color_Filter, alters color ##
# setDevKernText # sets or clears Full_Hinting_Spacing ##
# setDither # sets or clears Dither ##
# setDrawLooper # sets Draw_Looper, multiple layers ##
# setEmbeddedBitmapText # sets or clears Font_Embedded_Bitmaps ##
# setFakeBoldText # sets or clears Fake_Bold ##
# setFilterQuality # sets Filter_Quality, the image filtering level ##
# setFlags # sets multiple Flags in a bit field ##
# setHinting # sets Hinting, glyph outline adjustment level ##
# setImageFilter # sets Image_Filter, alter pixels; blur ##
# setLCDRenderText # sets or clears LCD_Text ##
# setMaskFilter # sets Mask_Filter, alterations to Mask_Alpha ##
# setPathEffect # sets Path_Effect, modifications to path geometry; dashing ##
# setShader # sets Shader, multiple drawing colors; gradients ##
# setStrokeCap # sets Cap, the area drawn at path ends ##
# setStrokeJoin # sets Join, geometry on path corners ##
# setStrokeMiter # sets Miter_Limit, angles with sharp corners ##
# setStrokeWidth # sets thickness of the stroke ##
# setStyle # sets Style: stroke, fill, or both ##
# setSubpixelText # sets or clears Subpixel_Text ##
# setTextAlign # sets Align: left, center, or right ##
# setTextEncoding # sets character or glyph encoded size ##
# setTextScaleX # sets the text horizontal scale; condensed text ##
# setTextSize # sets text size in points ##
# setTextSkewX # sets the text horizontal skew; oblique text ##
# setTypeface # sets Typeface, font description ##
# setVerticalText # sets or clears Vertical_Text ##
# textToGlyphs # converts text into glyph indices ##
# toString # converts Paint to machine readable form ##
# unflatten() # populates from a serialized stream ##
#Table ##
#Subtopic ##
#Topic Overview ##
#Populate
##
# ------------------------------------------------------------------------------
#Topic Initializers
#Subtopic Initializers
#Line # constructors and initialization ##
#Method SkPaint()
@ -406,14 +215,12 @@ Paint with the result of SkPaint().
##
#Topic ##
#Subtopic Initializers ##
# ------------------------------------------------------------------------------
#Topic Destructor
#Method ~SkPaint()
#In Destructor
#Line # decreases Reference_Count of owned objects ##
Decreases Paint Reference_Count of owned objects: Typeface, Path_Effect, Shader,
Mask_Filter, Color_Filter, Draw_Looper, and Image_Filter. If the
@ -424,9 +231,10 @@ objects containing Reference_Count go to zero, they are deleted.
##
##
# ------------------------------------------------------------------------------
#Topic Management
#Subtopic Management
#Line # paint copying, moving, comparing ##
#Method SkPaint& operator=(const SkPaint& paint)
@ -630,12 +438,14 @@ by the client.
##
#Topic Management ##
#Subtopic Management ##
# ------------------------------------------------------------------------------
#Topic Hinting
#Subtopic Hinting
#Line # glyph outline adjustment ##
#Enum Hinting
#Line # level of glyph outline adjustment ##
#Code
enum Hinting {
@ -751,11 +561,13 @@ Set SkPaintDefaults_Hinting at compile time to change the default setting.
##
##
#Topic ##
#Subtopic Hinting ##
# ------------------------------------------------------------------------------
#Topic Flags
#Subtopic Flags
#Line # attributes represented by single bits ##
#Enum Flags
#Line # values described by bits and masks ##
#Code
enum Flags {
@ -828,6 +640,7 @@ Flags default to all flags clear, disabling the associated feature.
#Enum ##
#Enum ReserveFlags
#Line # values described by bits and masks ##
#Private
To be deprecated; only valid for Android framework.
@ -896,9 +709,9 @@ All Flags members may be cleared, or one or more may be set.
##
#Topic ##
#Subtopic Flags ##
# ------------------------------------------------------------------------------
#Topic Anti-alias
#Subtopic Anti-alias
#Alias Anti-alias # permit hyphen in topic name, should probably not substitute hyphen with _
#In Related_Functions
#Line # approximating coverage with transparency ##
@ -1006,9 +819,10 @@ at compile time.
##
#Topic ##
#Subtopic Antialias ##
# ------------------------------------------------------------------------------
#Topic Dither
#Subtopic Dither
#Line # distributing color error ##
Dither increases fidelity by adjusting the color of adjacent pixels.
This can help to smooth color transitions and reducing banding in gradients.
@ -1139,9 +953,10 @@ void draw(SkCanvas* canvas) {
#SeeAlso Gradient Color_RGB-565
#Topic ##
#Subtopic Dither ##
# ------------------------------------------------------------------------------
#Topic Device_Text
#Subtopic Device_Text
#Line # increase precision of glyph position ##
LCD_Text and Subpixel_Text increase the precision of glyph position.
@ -1186,9 +1001,11 @@ kLCDRenderText_Flag or kSubpixelText_Flag (or both) at compile time.
canvas->scale(9, 9);
canvas->drawBitmap(bitmap, 4, -1);
##
#Subtopic Device_Text ##
#Subtopic Linear_Text
#Alias Linear_Text # makes this a top level name, since it is under subtopic Device_Text
#Alias Linear_Text
#Line # selects text rendering as Glyph or Path ##
Linear_Text selects whether text is rendered as a Glyph or as a Path.
If kLinearText_Flag is set, it has the same effect as setting Hinting to kNormal_Hinting.
@ -1196,6 +1013,7 @@ If kLinearText_Flag is clear, it is the same as setting Hinting to kNo_Hinting.
#Method bool isLinearText() const
#Line # returns true if text is converted to Path ##
#In Linear_Text
If true, text is converted to Path before drawing and measuring.
@ -1227,6 +1045,7 @@ If kLinearText_Flag is clear, it is the same as setting Hinting to kNo_Hinting.
#Method void setLinearText(bool linearText)
#Line # converts to Path before draw or measure ##
#In Linear_Text
If true, text is converted to Path before drawing and measuring.
By default, kLinearText_Flag is clear.
@ -1259,10 +1078,11 @@ If kLinearText_Flag is clear, it is the same as setting Hinting to kNo_Hinting.
#SeeAlso isLinearText Hinting
##
#Subtopic ##
#Subtopic Linear_Text ##
#Subtopic Subpixel_Text
#Alias Subpixel_Text # makes this a top level name, since it is under subtopic Device_Text
#Alias Subpixel_Text
#Line # uses pixel transparency to represent fractional offset ##
Flags kSubpixelText_Flag uses the pixel transparency to represent a fractional offset.
As the opaqueness
@ -1318,9 +1138,10 @@ SkDebugf("paint.isSubpixelText() %c= !!(paint.getFlags() & SkPaint::kSubpixelTex
##
#Subtopic ##
#Subtopic Subpixel_Text ##
#Subtopic LCD_Text
#Line # text relying on the order of Color_RGB stripes ##
#Alias LCD_Text # makes this a top level name, since it is under subtopic Device_Text
When set, Flags kLCDRenderText_Flag takes advantage of the organization of Color_RGB stripes that
@ -1380,11 +1201,11 @@ SkDebugf("paint.isLCDRenderText() %c= !!(paint.getFlags() & SkPaint::kLCDRenderT
##
#Subtopic ##
#Subtopic LCD_Text ##
#Topic ##
# ------------------------------------------------------------------------------
#Topic Font_Embedded_Bitmaps
#Subtopic Font_Embedded_Bitmaps
#Line # custom sized bitmap Glyphs ##
#Alias Font_Embedded_Bitmaps # long-winded enough, alias so I don't type Paint_Font_...
Font_Embedded_Bitmaps allows selecting custom sized bitmap Glyphs.
@ -1483,9 +1304,10 @@ kEmbeddedBitmapText_Flag at compile time.
##
#Topic ##
#Subtopic Font_Embedded_Bitmaps ##
# ------------------------------------------------------------------------------
#Topic Automatic_Hinting
#Subtopic Automatic_Hinting
#Line # always adjust glyph paths ##
#Substitute auto-hinting
If Hinting is set to kNormal_Hinting or kFull_Hinting, Automatic_Hinting
@ -1564,9 +1386,10 @@ Automatic_Hinting only affects platforms that use FreeType as the Font_Manager.
##
#Topic ##
#Subtopic Automatic_Hinting ##
# ------------------------------------------------------------------------------
#Topic Vertical_Text
#Subtopic Vertical_Text
#Line # orient text from top to bottom ##
Text may be drawn by positioning each glyph, or by positioning the first glyph and
using Font_Advance to position subsequent Glyphs. By default, each successive glyph
@ -1655,10 +1478,11 @@ void draw(SkCanvas* canvas) {
##
#Topic ##
#Subtopic Vertical_Text ##
# ------------------------------------------------------------------------------
#Topic Fake_Bold
#Subtopic Fake_Bold
#Line # approximate font styles ##
Fake_Bold approximates the bold font style accompanying a normal font when a bold font face
is not available. Skia does not provide font substitution; it is up to the client to find the
@ -1741,10 +1565,11 @@ void draw(SkCanvas* canvas) {
##
#Topic ##
#Subtopic Fake_Bold ##
# ------------------------------------------------------------------------------
#Topic Full_Hinting_Spacing
#Subtopic Full_Hinting_Spacing
#Line # glyph spacing affected by hinting ##
#Alias Full_Hinting_Spacing # long winded enough -- maybe things with two underscores auto-aliased?
if Hinting is set to kFull_Hinting, Full_Hinting_Spacing adjusts the character
@ -1800,9 +1625,10 @@ a specific pair of characters is adjusted using data in the font Kerning tables.
##
#Topic ##
#Subtopic Full_Hinting_Spacing ##
# ------------------------------------------------------------------------------
#Topic Filter_Quality_Methods
#Subtopic Filter_Quality_Methods
#Line # get and set Filter_Quality ##
Filter_Quality trades speed for image filtering when the image is scaled.
A lower Filter_Quality draws faster, but has less fidelity.
@ -1888,9 +1714,10 @@ Does not check to see if quality is valid.
##
#Topic ##
#Subtopic Filter_Quality_Methods ##
# ------------------------------------------------------------------------------
#Topic Color_Methods
#Subtopic Color_Methods
#Line # get and set Color ##
#Table
#Legend
@ -1986,8 +1813,10 @@ a different arrangement.
#SeeAlso SkColor setARGB SkColorSetARGB
##
#Subtopic Color_Methods ##
#Subtopic Alpha_Methods
#Line # get and set Alpha ##
Color_Alpha sets the transparency independent of Color_RGB: Color_RGB_Red, Color_RGB_Blue, and Color_RGB_Green.
@ -2035,7 +1864,7 @@ Color_Alpha sets the transparency independent of Color_RGB: Color_RGB_Red, Color
##
#Subtopic ##
#Subtopic Alpha_Methods ##
#Method void setARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
@ -2064,10 +1893,9 @@ Color_Alpha sets the transparency independent of Color_RGB: Color_RGB_Red, Color
##
#Topic Color_Methods ##
# ------------------------------------------------------------------------------
#Topic Style
#Subtopic Style
#Line # geometry filling, stroking ##
Style specifies if the geometry is filled, stroked, or both filled and stroked.
Some shapes ignore Style and are always drawn filled or stroked.
@ -2079,13 +1907,14 @@ Set Style to kStroke_Style to stroke the shape.
# ------------------------------------------------------------------------------
#Subtopic Fill
#Line # fill and stroke ##
#ToDo write up whatever generalities make sense to describe filling ##
#SeeAlso Path_Fill_Type
#Subtopic ##
#Subtopic Fill ##
#Subtopic Stroke
#Line # lines and curves with width ##
The stroke covers the area described by following the shape edge with a pen or brush of
Stroke_Width. The area covered where the shape starts and stops is described by Stroke_Cap.
The area covered where the shape turns a corner is described by Stroke_Join.
@ -2093,9 +1922,10 @@ The stroke is centered on the shape; it extends equally on either side of the sh
As Stroke_Width gets smaller, the drawn path frame is thinner. Stroke_Width less than one
may have gaps, and if kAntiAlias_Flag is set, Color_Alpha will increase to visually decrease coverage.
#Subtopic ##
#Subtopic Stroke ##
#Subtopic Hairline
#Line # lines and curves with minimal width ##
#Alias Hairline # maybe should be Stroke_Hairline ?
Stroke_Width of zero has a special meaning and switches drawing to use Hairline.
@ -2110,9 +1940,10 @@ pixel. If kAntiAlias_Flag is set, transparency is applied twice, resulting in a
GPU-backed implementations apply transparency at a later drawing stage, avoiding double hit pixels
while stroking.
#Subtopic ##
#Subtopic Hairline ##
#Enum Style
#Line # stroke, fill, or both ##
#Code
enum Style {
@ -2154,10 +1985,10 @@ a fill draw.
and the set Path_Fill_Type is ignored.
##
#Enum ##
#Enum Style ##
#Enum
#Line # number of Style defines ##
#Code
enum {
kStyleCount = kStrokeAndFill_Style + 1,
@ -2235,10 +2066,11 @@ May be used to verify that Style is a legal value.
##
#SeeAlso Path_Fill_Type Path_Effect Style_Fill Style_Stroke
#Topic Style ##
#Subtopic Style ##
# ------------------------------------------------------------------------------
#Topic Stroke_Width
#Subtopic Stroke_Width
#Line # thickness perpendicular to geometry ##
Stroke_Width sets the width for stroking. The width is the thickness
of the stroke perpendicular to the path direction when the paint style is
@ -2318,9 +2150,10 @@ The default width for the paint is zero.
##
#Topic ##
#Subtopic Stroke_Width ##
# ------------------------------------------------------------------------------
#Topic Miter_Limit
#Subtopic Miter_Limit
#Line # maximum length of stroked corners ##
Miter_Limit specifies the maximum miter length,
relative to the stroke width.
@ -2446,11 +2279,13 @@ Here are some miter limits and the angles that triggers them.
##
#Topic ##
#Subtopic Miter_Limit ##
# ------------------------------------------------------------------------------
#Topic Stroke_Cap
#Subtopic Stroke_Cap
#Line # decorations at ends of open strokes ##
#Enum Cap
#Line # start and end geometry on stroked shapes ##
#Code
enum Cap {
@ -2572,9 +2407,10 @@ Stroke_Cap is kButt_Cap by default.
#SeeAlso Stroke_Cap getStrokeCap
##
#Topic ##
#Subtopic Stroke_Cap ##
# ------------------------------------------------------------------------------
#Topic Stroke_Join
#Subtopic Stroke_Join
#Line # decoration at corners of strokes ##
Stroke_Join draws at the sharp corners of an open or closed Path_Contour.
@ -2602,6 +2438,7 @@ the following curve, the pair of curves meet at Stroke_Join.
##
#Enum Join
#Line # corner geometry on stroked shapes ##
#Code
enum Join {
kMiter_Join,
@ -2727,9 +2564,10 @@ void draw(SkCanvas* canvas) {
#SeeAlso Miter_Limit
#Topic Stroke_Join ##
#Subtopic Stroke_Join ##
# ------------------------------------------------------------------------------
#Topic Fill_Path
#Subtopic Fill_Path
#Line # make Path from Path_Effect, stroking ##
Fill_Path creates a Path by applying the Path_Effect, followed by the Style_Stroke.
@ -2832,9 +2670,10 @@ returns false since Hairline has no filled equivalent.
#SeeAlso Style_Stroke Stroke_Width Path_Effect
#Topic ##
#Subtopic Fill_Path ##
# ------------------------------------------------------------------------------
#Topic Shader_Methods
#Subtopic Shader_Methods
#Line # get and set Shader ##
Shader defines the colors used when drawing a shape.
Shader may be an image, a gradient, or a computed fill.
@ -2960,9 +2799,10 @@ void draw(SkCanvas* canvas) {
##
#Topic ##
#Subtopic Shader_Methods ##
# ------------------------------------------------------------------------------
#Topic Color_Filter_Methods
#Subtopic Color_Filter_Methods
#Line # get and set Color_Filter ##
Color_Filter alters the color used when drawing a shape.
Color_Filter may apply Blend_Mode, transform the color through a matrix, or composite multiple filters.
@ -3059,9 +2899,10 @@ Increments filter Reference_Count by one.
##
#Topic ##
#Subtopic Color_Filter_Methods ##
# ------------------------------------------------------------------------------
#Topic Blend_Mode_Methods
#Subtopic Blend_Mode_Methods
#Line # get and set Blend_Mode ##
Blend_Mode describes how Color combines with the destination color.
The default setting, SkBlendMode::kSrcOver, draws the source color
@ -3161,9 +3002,10 @@ void draw(SkCanvas* canvas) {
##
#Topic ##
#Subtopic Blend_Mode_Methods ##
# ------------------------------------------------------------------------------
#Topic Path_Effect_Methods
#Subtopic Path_Effect_Methods
#Line # get and set Path_Effect ##
Path_Effect modifies the path geometry before drawing it.
Path_Effect may implement dashing, custom fill effects and custom stroke effects.
@ -3258,9 +3100,10 @@ Increments pathEffect Reference_Count by one.
##
#Topic ##
#Subtopic Path_Effect_Methods ##
# ------------------------------------------------------------------------------
#Topic Mask_Filter_Methods
#Subtopic Mask_Filter_Methods
#Line # get and set Mask_Filter ##
Mask_Filter uses coverage of the shape drawn to create Mask_Alpha.
Mask_Filter takes a Mask, and returns a Mask.
@ -3353,9 +3196,10 @@ Increments maskFilter Reference_Count by one.
##
#Topic ##
#Subtopic Mask_Filter_Methods ##
# ------------------------------------------------------------------------------
#Topic Typeface_Methods
#Subtopic Typeface_Methods
#Line # get and set Typeface ##
Typeface identifies the font used when drawing and measuring text.
Typeface may be specified by name, from a file, or from a data stream.
@ -3453,9 +3297,10 @@ typeface Reference_Count by one.
##
#Topic ##
#Subtopic Typeface_Methods ##
# ------------------------------------------------------------------------------
#Topic Image_Filter_Methods
#Subtopic Image_Filter_Methods
#Line # get and set Image_Filter ##
Image_Filter operates on the pixel representation of the shape, as modified by Paint
with Blend_Mode set to SkBlendMode::kSrcOver. Image_Filter creates a new bitmap,
@ -3568,9 +3413,10 @@ Increments imageFilter Reference_Count by one.
##
#Topic ##
#Subtopic Image_Filter_Methods ##
# ------------------------------------------------------------------------------
#Topic Draw_Looper_Methods
#Subtopic Draw_Looper_Methods
#Line # get and set Draw_Looper ##
Draw_Looper sets a modifier that communicates state from one Draw_Layer
to another to construct the draw.
@ -3653,6 +3499,7 @@ Set Draw_Looper to nullptr to prevent Draw_Looper from modifying the draw.
#Method SkDrawLooper* getLooper() const
#Line # deprecated ##
#In Draw_Looper_Methods
Deprecated.
@ -3692,6 +3539,7 @@ Increments drawLooper Reference_Count by one.
#Method void setLooper(sk_sp<SkDrawLooper> drawLooper)
#Line # deprecated ##
#In Draw_Looper_Methods
Deprecated.
@ -3703,11 +3551,13 @@ Deprecated.
##
#Topic ##
#Subtopic Draw_Looper_Methods ##
# ------------------------------------------------------------------------------
#Topic Text_Align
#Subtopic Text_Align
#Line # text placement relative to position ##
#Enum Align
#Line # glyph locations relative to text position ##
#Code
enum Align {
kLeft_Align,
@ -3750,6 +3600,7 @@ Align defaults to kLeft_Align.
#Enum ##
#Enum
#Line # number of Text_Align values ##
#Code
enum {
@ -3848,9 +3699,10 @@ Align defaults to kLeft_Align.
##
#Topic ##
#Subtopic Text_Align ##
# ------------------------------------------------------------------------------
#Topic Text_Size
#Subtopic Text_Size
#Line # overall height in points ##
Text_Size adjusts the overall text size in points.
Text_Size can be set to any positive value or zero.
@ -3902,9 +3754,10 @@ Set SkPaintDefaults_TextSize at compile time to change the default setting.
##
#Topic ##
#Subtopic Text_Size ##
# ------------------------------------------------------------------------------
#Topic Text_Scale_X
#Subtopic Text_Scale_X
#Line # text horizontal scale ##
Text_Scale_X adjusts the text horizontal scale.
Text scaling approximates condensed and expanded type faces when the actual face
@ -3961,9 +3814,10 @@ Text_Scale_X defaults to 1.
##
#Topic ##
#Subtopic Text_Scale_X ##
#Topic Text_Skew_X
#Subtopic Text_Skew_X
#Line # text horizontal slant ##
Text_Skew_X adjusts the text horizontal slant.
@ -4020,12 +3874,14 @@ Text_Skew_X defaults to 0.
##
#Topic ##
#Subtopic Text_Skew_X ##
# ------------------------------------------------------------------------------
#Topic Text_Encoding
#Subtopic Text_Encoding
#Line # text encoded as characters or Glyphs ##
#Enum TextEncoding
#Line # character or glyph encoded size ##
#Code
enum TextEncoding {
@ -4152,9 +4008,10 @@ void draw(SkCanvas* canvas) {
##
#Topic ##
#Subtopic Text_Encoding ##
# ------------------------------------------------------------------------------
#Topic Font_Metrics
#Subtopic Font_Metrics
#Line # common glyph dimensions ##
Font_Metrics describe dimensions common to the Glyphs in Typeface.
The dimensions are computed by Font_Manager from font data and do not take
@ -4209,6 +4066,7 @@ void draw(SkCanvas* canvas) {
##
#Struct FontMetrics
#Line # values computed by Font_Manager using Typeface ##
#Code
struct FontMetrics {
@ -4258,6 +4116,7 @@ void draw(SkCanvas* canvas) {
are valid, since their value may be zero.
#Enum FontMetricsFlags
#Line # valid Font_Metrics ##
#Code
enum FontMetricsFlags {
@ -4534,7 +4393,7 @@ FontMetrics::fTop, FontMetrics::fXMax, FontMetrics::fBottom }.
##
#Topic ##
#Subtopic Font_Metrics ##
# ------------------------------------------------------------------------------
#Method int textToGlyphs(const void* text, size_t byteLength,
@ -4708,7 +4567,8 @@ text contains an invalid UTF-8 sequence, zero is returned.
##
# ------------------------------------------------------------------------------
#Topic Measure_Text
#Subtopic Measure_Text
#Line # width, height, bounds of text ##
#Method SkScalar measureText(const void* text, size_t length, SkRect* bounds) const
@ -4886,9 +4746,10 @@ text contains an invalid UTF-8 sequence, zero is returned.
##
#Topic ##
#Subtopic Measure_Text ##
# ------------------------------------------------------------------------------
#Topic Text_Path
#Subtopic Text_Path
#Line # geometry of Glyphs ##
Text_Path describes the geometry of Glyphs used to draw text.
@ -4966,9 +4827,10 @@ pos contains a position for each glyph.
##
#Topic ##
#Subtopic Text_Path ##
# ------------------------------------------------------------------------------
#Topic Text_Intercepts
#Subtopic Text_Intercepts
#Line # advanced underline, strike through ##
Text_Intercepts describe the intersection of drawn text Glyphs with a pair
of lines parallel to the text advance. Text_Intercepts permits creating a
@ -5203,7 +5065,7 @@ void draw(SkCanvas* canvas) {
##
#Topic ##
#Subtopic Text_Intercepts ##
# ------------------------------------------------------------------------------
#Method bool nothingToDraw() const
@ -5244,7 +5106,8 @@ void draw(SkCanvas* canvas) {
##
# ------------------------------------------------------------------------------
#Topic Fast_Bounds
#Subtopic Fast_Bounds
#Line # approximate area required by Paint ##
#Private
To be made private.
##
@ -5335,7 +5198,7 @@ Paint may draw to.
#Return fast computed bounds ##
##
#Topic Fast_Bounds ##
#Subtopic Fast_Bounds Fast_Bounds ##
# ------------------------------------------------------------------------------
#Method void toString(SkString* str) const

View File

@ -2,6 +2,12 @@
#Alias Path_Reference
#Alias Paths
#Subtopic Overview
#Subtopic Subtopics
#Populate
##
##
Path contains Lines and Curves which can be stroked or filled. Contour is
composed of a series of connected Lines and Curves. Path may contain zero,
one, or more Contours.
@ -77,6 +83,8 @@ its contents until it is edited, to reduce memory use and improve performance.
#Subtopic Contour
#Alias Contours
#Line # loop of lines and curves ##
Contour contains one or more Verbs, and as many Points as
are required to satisfy Verb_Array. First Verb in Path is always
SkPath::kMove_Verb; each SkPath::kMove_Verb that follows starts a new Contour.
@ -134,6 +142,7 @@ void draw(SkCanvas* canvas) {
#Subtopic Zero_Length
#Alias Zero_Length_Contour
#Line # consideration when contour has no length ##
Contour length is distance traveled from first Point to Last_Point,
plus, if Contour is closed, distance from Last_Point to first Point.
Even if Contour length is zero, stroked Lines are drawn if Paint_Stroke_Cap
@ -182,181 +191,35 @@ overlapping contours.
Internally, Path lazily computes metrics likes bounds and convexity. Call
SkPath::updateBoundsCache to make Path thread safe.
#Topic Overview
#Subtopic Subtopics
#Table
#Legend
# name # description ##
#Legend ##
# Classes_and_Structs # embedded struct and class members ##
# Constants # enum and enum class, const values ##
# Constructors # functions that construct SkPath ##
# Member_Functions # static functions and member methods ##
# Operators # operator overloading methods ##
# Related_Functions # similar methods grouped together ##
#Table ##
#Subtopic ##
#Subtopic Related_Functions
#Table
#Legend
# name # description ##
#Legend ##
# Conic # conic section defined by three points and a weight ##
# Conic_Weight # strength of control Point in Conic ##
# Contour # loop of lines and curves ##
# Convexity # if Path is concave or convex ##
# Cubic_Bezier # third order curve defined by four points ##
# Direction # Path contour orientation ##
# Fill_Type # Path fill rule, normal and inverted ##
# Last_Point # final Point in Contour ##
# Point_Array # end points and control points for lines and curves ##
# Quadratic_Bezier # parabolic section defined by three points ##
# Verb_Array # line and curve type for points ##
# Verbs # Path line and curve type ##
# Zero_Length_Contour # consideration when contour has no length ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Constants
#Table
#Legend
# name # description ##
#Legend ##
# AddPathMode # sets addPath options ##
# ArcSize # used by arcTo variation ##
# Convexity # returns if Path is convex or concave ##
# Direction # sets Contour clockwise or counterclockwise ##
# FillType # sets winding rule and inverse fill ##
# SegmentMask # returns Verb types in Path ##
# Verb # controls how Path Points are interpreted ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Classes_and_Structs
#Table
#Legend
# name # description ##
#Legend ##
# Iter # iterates through lines and curves, skipping degenerates ##
# RawIter # iterates through lines and curves, including degenerates ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Constructors
#Table
#Legend
# name # description ##
#Legend ##
# SkPath() # constructs with default values ##
# SkPath(const SkPath& path) # makes a shallow copy ##
# ~SkPath() # decreases Reference_Count of owned objects ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Operators
#Table
#Legend
# name # description ##
#Legend ##
# operator!=(const SkPath& a, const SkPath& b) # compares paths for inequality ##
# operator=(const SkPath& path) # makes a shallow copy ##
# operator==(const SkPath& a, const SkPath& b) # compares paths for equality ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Member_Functions
#Table
#Legend
# name # description ##
#Legend ##
# ConvertConicToQuads # approximates Conic with Quad array ##
# ConvertToNonInverseFillType # returns Fill_Type representing inside geometry ##
# IsCubicDegenerate # returns if Cubic is very small ##
# IsInverseFillType # returns if Fill_Type represents outside geometry ##
# IsLineDegenerate # returns if Line is very small ##
# IsQuadDegenerate # returns if Quad is very small ##
# addArc # adds one Contour containing Arc ##
# addCircle # adds one Contour containing Circle ##
# addOval # adds one Contour containing Oval ##
# addPath # adds contents of Path ##
# addPoly # adds one Contour containing connected lines ##
# addRRect # adds one Contour containing Round_Rect ##
# addRect # adds one Contour containing Rect ##
# addRoundRect # adds one Contour containing Round_Rect with common corner radii ##
# arcTo # appends Arc ##
# close() # makes last Contour a loop ##
# computeTightBounds # returns extent of geometry ##
# conicTo # appends Conic ##
# conservativelyContainsRect # returns true if Rect may be inside ##
# contains() # returns if Point is in fill area ##
# countPoints # returns Point_Array length ##
# countVerbs # returns Verb_Array length ##
# cubicTo # appends Cubic ##
# dump() # sends text representation using floats to standard output ##
# dumpHex # sends text representation using hexadecimal to standard output ##
# getBounds # returns maximum and minimum of Point_Array ##
# getConvexity # returns geometry convexity, computing if necessary ##
# getConvexityOrUnknown # returns geometry convexity if known ##
# getFillType # returns Fill_Type: winding, even-odd, inverse ##
# getGenerationID # returns unique ID ##
# getLastPt # returns Last_Point ##
# getPoint # returns entry from Point_Array ##
# getPoints # returns Point_Array ##
# getSegmentMasks # returns types in Verb_Array ##
# getVerbs # returns Verb_Array ##
# incReserve # reserves space for additional data ##
# interpolate() # interpolates between Path pair ##
# isConvex # returns if geometry is convex ##
# isEmpty # returns if verb count is zero ##
# isFinite # returns if all Point values are finite ##
# isInterpolatable # returns if pair contains equal counts of Verb_Array and Weights ##
# isInverseFillType # returns if Fill_Type fills outside geometry ##
# isLastContourClosed # returns if final Contour forms a loop ##
# isLine # returns if describes Line ##
# isNestedFillRects # returns if describes Rect pair, one inside the other ##
# isOval # returns if describes Oval ##
# isRRect # returns if describes Round_Rect ##
# isRect # returns if describes Rect ##
# isValid # returns if data is internally consistent ##
# isVolatile # returns if Device should not cache ##
# lineTo # appends Line ##
# moveTo # starts Contour ##
# offset() # translates Point_Array ##
# pathRefIsValid # to be deprecated ##
# quadTo # appends Quad ##
# rArcTo # appends Arc relative to Last_Point ##
# rConicTo # appends Conic relative to Last_Point ##
# rCubicTo # appends Cubic relative to Last_Point ##
# rLineTo # appends Line relative to Last_Point ##
# rMoveTo # starts Contour relative to Last_Point ##
# rQuadTo # appends Quad relative to Last_Point ##
# readFromMemory # Initializes from buffer ##
# reset() # removes Verb_Array, Point_Array, and Weights; frees memory ##
# reverseAddPath # adds contents of Path back to front ##
# rewind() # removes Verb_Array, Point_Array, and Weights, keeping memory ##
# serialize() # copies data to buffer ##
# setConvexity # sets if geometry is convex to avoid future computation ##
# setFillType # sets Fill_Type: winding, even-odd, inverse ##
# setIsConvex # deprecated ##
# setIsVolatile # sets if Device should not cache ##
# setLastPt # replaces Last_Point ##
# swap() # exchanges Path pair ##
# toggleInverseFillType # toggles Fill_Type between inside and outside geometry ##
# transform() # applies Matrix to Point_Array and Weights ##
# unique() # returns if data has single owner ##
# updateBoundsCache # refreshes result of getBounds ##
# writeToMemory # copies data to buffer ##
#Table ##
#Subtopic Path_Member_Functions ##
#Topic Overview ##
#Populate
##
#Subtopic Verb
#Alias Verbs
#Line # line and curve type ##
#Enum Verb
#Line # controls how Path Points are interpreted ##
#Code
enum Verb {
@ -449,9 +312,11 @@ verbs: kMove_Verb kLine_Verb kQuad_Verb kClose_Verb kMove_Verb kCubic_Verb kConi
# ------------------------------------------------------------------------------
#Subtopic Direction
#Line # Path contour orientation ##
#Alias Directions
#Enum Direction
#Line # sets Contour clockwise or counterclockwise ##
#Code
enum Direction {
@ -827,8 +692,10 @@ To be deprecated; only valid for Android framework.
# ------------------------------------------------------------------------------
#Subtopic Fill_Type
#Line # Path fill rule, normal and inverted ##
#Enum FillType
#Line # sets winding rule and inverse fill ##
#Code
enum FillType {
@ -1055,8 +922,10 @@ canvas->drawPath(path, paint);
# ------------------------------------------------------------------------------
#Subtopic Convexity
#Line # if Path is concave or convex ##
#Enum Convexity
#Line # returns if Path is convex or concave ##
#Code
enum Convexity : uint8_t {
@ -1816,6 +1685,7 @@ second move is not line
# ------------------------------------------------------------------------------
#Subtopic Point_Array
#Line # end points and control points for lines and curves ##
#Substitute SkPoint array
Point_Array contains Points satisfying the allocated Points for
@ -1943,6 +1813,7 @@ point 1: (10,10)
# ------------------------------------------------------------------------------
#Subtopic Verb_Array
#Line # line and curve type for points ##
Verb_Array always starts with kMove_Verb.
If kClose_Verb is not the last entry, it is always followed by kMove_Verb;
@ -2480,6 +2351,7 @@ void draw(SkCanvas* canvas) {
#Alias Quads
#Alias Quadratic_Bezier
#Alias Quadratic_Beziers
#Line # Bezier_Curve described by second-order polynomial ##
Quad describes a quadratic Bezier, a second-order curve identical to a section
of a parabola. Quad begins at a start Point, curves towards a control Point,
@ -2649,6 +2521,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Topic Conic
#Line # conic section defined by three points and a weight ##
#Alias Conics
Conic describes a conical section: a piece of an ellipse, or a piece of a
@ -2662,6 +2535,7 @@ may be inspected with Iter, or with RawIter.
#Subtopic Weight
#Alias Conic_Weights
#Alias Weights
#Line # strength of Conic control Point ##
Weight determines both the strength of the control Point and the type of Conic.
If Weight is exactly one, then Conic is identical to Quad; it is always a
@ -2944,6 +2818,7 @@ void draw(SkCanvas* canvas) {
#Alias Cubics
#Alias Cubic_Bezier
#Alias Cubic_Beziers
#Line # Bezier_Curve described by third-order polynomial ##
Cubic describes a Bezier_Curve segment described by a third-order polynomial.
Cubic begins at a start Point, curving towards the first control Point;
@ -3101,8 +2976,8 @@ to Point_Array.
# ------------------------------------------------------------------------------
#Topic Arc
#Subtopic Arc
#Line # part of Oval or Circle ##
Arc can be constructed in a number of ways. Arc may be described by part of Oval and angles,
by start point and end point, and by radius and tangent lines. Each construction has advantages,
and some constructions correspond to Arc drawing in graphics standards.
@ -3548,6 +3423,7 @@ line (156,20),(200,20)
# ------------------------------------------------------------------------------
#Enum ArcSize
#Line # used by arcTo variation ##
#Code
enum ArcSize {
@ -4626,6 +4502,7 @@ void draw(SkCanvas* canvas) {
# ------------------------------------------------------------------------------
#Enum AddPathMode
#Line # sets addPath options ##
#Code
enum AddPathMode {
@ -4944,6 +4821,7 @@ Path is replaced by transformed data.
# ------------------------------------------------------------------------------
#Subtopic Last_Point
#Line # final Point in Contour ##
Path is defined cumulatively, often by adding a segment to the end of last
Contour. Last_Point of Contour is shared as first Point of added Line or Curve.
@ -5036,6 +4914,7 @@ Last_Point can be read and written directly with getLastPt and setLastPt.
# ------------------------------------------------------------------------------
#Enum SegmentMask
#Line # returns Verb types in Path ##
#Code
enum SegmentMask {
@ -5391,7 +5270,7 @@ length = 68; returned by readFromMemory = 64
# ------------------------------------------------------------------------------
#Topic Generation_ID
#Alias Generation_IDs
#Line # value reflecting contents change ##
Generation_ID provides a quick way to check if Verb_Array, Point_Array, or
Conic_Weight has changed. Generation_ID is not a hash; identical Paths will
not necessarily have matching Generation_IDs.
@ -5472,6 +5351,7 @@ empty genID = 1
# ------------------------------------------------------------------------------
#Class Iter
#Line # Path data iterator ##
Iterates through Verb_Array, and associated Point_Array and Conic_Weight.
Provides options to treat open Contours as closed, and to ignore
@ -5865,6 +5745,7 @@ with close(), forceClose is true : isClosedContour returns true
#Class Iter ##
#Class RawIter
#Line # Path raw data iterator ##
Iterates through Verb_Array, and associated Point_Array and Conic_Weight.
Verb_Array, Point_Array, and Conic_Weight are returned unaltered.

View File

@ -1,6 +1,12 @@
#Topic Pixmap
#Alias Pixmap_Reference
#Subtopic Overview
#Subtopic Subtopics
#Populate
##
##
#Class SkPixmap
Pixmap provides a utility to pair SkImageInfo with pixels and row bytes.
@ -14,86 +20,20 @@ pixels referenced by Pixmap.
Pixmap does not try to manage the lifetime of the pixel memory. Use Pixel_Ref
to manage pixel memory; Pixel_Ref is safe across threads.
#Topic Overview
#Subtopic Subtopics
#Table
#Legend
# name # description ##
#Legend ##
# Constructors # list of functions that construct SkPath ##
# Member_Functions # list of static functions and member methods ##
# Related_Functions # similar methods grouped together ##
#Table ##
#Subtopic Related_Functions
#Populate
##
#Subtopic Related_Functions
#Table
#Legend
# name # description ##
#Legend ##
# Image_Info_Access # returns all or part of Image_Info ##
# Initialization # sets fields for use ##
# Readable_Address # returns read only pixels ##
# Reader # examine pixel value ##
# Writable_Address # returns writable pixels ##
# Writer # copy to pixel values ##
#Table ##
#Subtopic ##
#Subtopic Constructors
#Table
#Legend
# # description ##
#Legend ##
# SkPixmap() # constructs with default values ##
# SkPixmap(const SkImageInfo& info, const void* addr, size_t rowBytes) # constructs from Image_Info, pixels ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Member_Functions
#Table
#Legend
# name # description ##
#Legend ##
# addr() # returns readable pixel address as void pointer ##
# addr16 # returns readable pixel address as 16-bit pointer ##
# addr32 # returns readable pixel address as 32-bit pointer ##
# addr64 # returns readable pixel address as 64-bit pointer ##
# addr8 # returns readable pixel address as 8-bit pointer ##
# addrF16 # returns readable pixel component address as 16-bit pointer ##
# alphaType # returns Image_Info Alpha_Type ##
# bounds() # returns width and height as Rectangle ##
# colorSpace # returns Image_Info Color_Space ##
# colorType # returns Image_Info Color_Type ##
# computeByteSize # returns size required for pixels ##
# computeIsOpaque # returns true if all pixels are opaque ##
# erase() # writes Color to pixels ##
# extractSubset # sets pointer to portion of original ##
# getColor # returns one pixel as Unpremultiplied Color ##
# height() # returns pixel row count ##
# info() # returns Image_Info ##
# isOpaque # returns true if Image_Info describes opaque pixels ##
# readPixels # copies and converts pixels ##
# reset() # reuses existing Pixmap with replacement values ##
# rowBytes # returns interval between rows in bytes ##
# rowBytesAsPixels # returns interval between rows in pixels ##
# scalePixels # scales and converts pixels ##
# setColorSpace # sets Image_Info Color_Space ##
# shiftPerPixel # returns bit shift from pixels to bytes ##
# width() # returns pixel column count ##
# writable_addr # returns writable pixel address as void pointer ##
# writable_addr16 # returns writable pixel address as 16-bit pointer ##
# writable_addr32 # returns writable pixel address as 32-bit pointer ##
# writable_addr64 # returns writable pixel address as 64-bit pointer ##
# writable_addr8 # returns writable pixel address as 8-bit pointer ##
# writable_addrF16 # returns writable pixel component address as 16-bit pointer ##
#Table ##
#Subtopic ##
#Topic Overview ##
#Populate
##
#Subtopic Initialization
#Line # sets fields for use ##
# ------------------------------------------------------------------------------
@ -377,6 +317,7 @@ void draw(SkCanvas* canvas) {
#Subtopic Initialization ##
#Subtopic Image_Info_Access
#Line # returns all or part of Image_Info ##
# ------------------------------------------------------------------------------
@ -803,6 +744,7 @@ width: 1000000 height: 1000000 computeByteSize: 4999999000000
#Subtopic Image_Info_Access ##
#Subtopic Reader
#Line # examine pixel value ##
# ------------------------------------------------------------------------------
@ -919,6 +861,7 @@ Unpremultiplied:
#Subtopic Reader ##
#Subtopic Readable_Address
#Line # returns read only pixels ##
# ------------------------------------------------------------------------------
@ -1294,6 +1237,7 @@ pixmap.addrF16(1, 2) == &storage[1 * wordsPerPixel + 2 * rowWords]
#Subtopic Readable_Address ##
#Subtopic Writable_Address
#Line # returns writable pixels ##
# ------------------------------------------------------------------------------
@ -1587,6 +1531,7 @@ is drawn after overwriting bottom half float color with top half float color.
#Subtopic Writable_Address ##
#Subtopic Writer
#Line # copy to pixel values ##
# ------------------------------------------------------------------------------

View File

@ -2,95 +2,48 @@
#Alias Points
#Alias Point_Reference
#Struct SkPoint
#Topic Overview
#Subtopic Subtopics
#ToDo manually add subtopics ##
#Table
#Legend
# topics # description ##
#Legend ##
#Table ##
#Subtopic Overview
#Subtopic Subtopics
#Populate
##
##
#Struct SkPoint
#Subtopic Constructors
#Table
#Legend
# name # description ##
#Legend ##
# Make # Constructs from SkScalar inputs. ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Operators
#Table
#Legend
# name # description ##
#Legend ##
# SkPoint operator*(SkScalar scale)_const # Returns Point multiplied by scale. ##
# SkPoint operator+(const SkPoint& a, const SkVector& b) # Returns Point offset by Vector. ##
# SkPoint operator-()_const # Reverses sign of Point. ##
# SkPoint& operator*=(SkScalar scale) # Multiplies Point by scale factor. ##
# SkVector operator-(const SkPoint& a, const SkPoint& b) # Returns Vector between Points. ##
# bool operator!=(const SkPoint& a, const SkPoint& b) # Returns true if Point are unequal. ##
# bool operator==(const SkPoint& a, const SkPoint& b) # Returns true if Point are equal. ##
# void operator+=(const SkVector& v) # Adds Vector to Point. ##
# void operator-=(const SkVector& v) # Subtracts Vector from Point. ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Member_Functions
#Table
#Legend
# name # description ##
#Legend ##
# CrossProduct # Returns cross product. ##
# Distance # Returns straight-line distance between points. ##
# DotProduct # Returns dot product. ##
# Length # Returns straight-line distance to origin. ##
# Make # Constructs from SkScalar inputs. ##
# Normalize # Sets length to one, and returns prior length. ##
# Offset # Translates Point array. ##
# cross() # Returns cross product. ##
# distanceToOrigin # Returns straight-line distance to origin. ##
# dot() # Returns dot product. ##
# equals() # Returns true if Points are equal. ##
# isFinite # Returns true if no member is infinite or NaN. ##
# isZero # Returns true if both members equal zero. ##
# iset() # Sets to integer input. ##
# length() # Returns straight-line distance to origin. ##
# negate() # Reverses the sign of both members. ##
# normalize() # Sets length to one, preserving direction. ##
# offset() # Translates Point. ##
# scale() # Multiplies Point by scale factor. ##
# set() # Sets to SkScalar input. ##
# setAbs # Sets sign of both members to positive. ##
# setLength # Sets straight-line distance to origin. ##
# setNormalize # Sets length to one, in direction of (x, y). ##
# x() # Returns fX. ##
# y() # Returns fY. ##
#Table ##
#Subtopic ##
#Populate
##
#Topic ##
#Subtopic Members
#Populate
#Member SkScalar fX
#Line # x-axis value ##
x-axis value used by both Point and Vector. May contain any value, including
infinities and NaN.
##
#Member SkScalar fY
#Line # y-axis value ##
y-axis value used by both Point and Vector. May contain any value, including
infinities and NaN.
##
#Subtopic Members ##
# ------------------------------------------------------------------------------
#Method static constexpr SkPoint Make(SkScalar x, SkScalar y)
#Line # Constructs from SkScalar inputs. ##
#Line # constructs from SkScalar inputs ##
Sets fX to x, fY to y. Used both to set Point and Vector.
#Param x SkScalar x-axis value of constructed Point or Vector ##
@ -117,7 +70,7 @@ all equal
#Method SkScalar x() const
#Line # Returns fX. ##
#Line # returns fX ##
Returns x-axis value of Point or Vector.
#Return fX ##
@ -138,7 +91,7 @@ pt1.fX == pt1.x()
#Method SkScalar y() const
#Line # Returns fY. ##
#Line # returns fY ##
Returns y-axis value of Point or Vector.
#Return fY ##
@ -159,7 +112,7 @@ pt1.fY == pt1.y()
#Method bool isZero() const
#Line # Returns true if both members equal zero. ##
#Line # returns true if both members equal zero ##
Returns true if fX and fY are both zero.
#Return true if fX is zero and fY is zero ##
@ -183,7 +136,7 @@ pt.isZero() == true
#Method void set(SkScalar x, SkScalar y)
#Line # Sets to SkScalar input. ##
#Line # sets to SkScalar input ##
Sets fX to x and fY to y.
#Param x new value for fX ##
@ -206,7 +159,7 @@ pt1 == pt2
#Method void iset(int32_t x, int32_t y)
#Line # Sets to integer input. ##
#Line # sets to integer input ##
Sets fX to x and fY to y, promoting integers to SkScalar values.
Assigning a large integer value directly to fX or fY may cause a compiler
@ -258,7 +211,7 @@ fPt: -2.14748e+09, 2.14748e+09
#Method void setAbs(const SkPoint& pt)
#Line # Sets sign of both members to positive. ##
#Line # sets sign of both members to positive ##
Sets fX to absolute value of pt.fX; and fY to absolute value of pt.fY.
#Param pt members providing magnitude for fX and fY ##
@ -288,7 +241,7 @@ pt: nan, -nan abs: nan, nan
#Method static void Offset(SkPoint points[], int count, const SkVector& offset)
#Line # Translates Point array. ##
#Line # translates Point array ##
Adds offset to each Point in points array with count entries.
#Param points Point array ##
@ -346,7 +299,7 @@ Adds offset (dx, dy) to each Point in points array of length count.
#Method void offset(SkScalar dx, SkScalar dy)
#Line # Translates Point. ##
#Line # translates Point ##
Adds offset (dx, dy) to Point.
#Param dx added to fX ##
@ -376,7 +329,7 @@ Adds offset (dx, dy) to Point.
#Method SkScalar length() const
#Line # Returns straight-line distance to origin. ##
#Line # returns straight-line distance to origin ##
Returns the Euclidean_Distance from origin, computed as:
#Code
#Literal
@ -411,7 +364,7 @@ sqrt(fX * fX + fY * fY)
#Method SkScalar distanceToOrigin() const
#Line # Returns straight-line distance to origin. ##
#Line # returns straight-line distance to origin ##
Returns the Euclidean_Distance from origin, computed as:
#Code
#Literal
@ -447,7 +400,7 @@ sqrt(fX * fX + fY * fY)
#Method bool normalize()
#Line # Sets length to one, preserving direction. ##
#Line # sets length to one, preserving direction ##
Scales (fX, fY) so that length() returns one, while preserving ratio of fX to fY,
if possible. If prior length is nearly zero, sets Vector to (0, 0) and returns
false; otherwise returns true.
@ -479,7 +432,7 @@ false; otherwise returns true.
#Method bool setNormalize(SkScalar x, SkScalar y)
#Line # Sets length to one, in direction of (x, y). ##
#Line # sets length to one, in direction of (x, y) ##
Sets Vector to (x, y) scaled so length() returns one, and so that
(fX, fY) is proportional to (x, y). If (x, y) length is nearly zero,
sets Vector to (0, 0) and returns false; otherwise returns true.
@ -516,7 +469,7 @@ sets Vector to (0, 0) and returns false; otherwise returns true.
#Method bool setLength(SkScalar length)
#Line # Sets straight-line distance to origin. ##
#Line # sets straight-line distance to origin ##
Scales Vector so that distanceToOrigin returns length, if possible. If former
length is nearly zero, sets Vector to (0, 0) and return false; otherwise returns
true.
@ -589,7 +542,7 @@ true.
#Method void scale(SkScalar scale, SkPoint* dst) const
#Line # Multiplies Point by scale factor. ##
#Line # multiplies Point by scale factor ##
Sets dst to Point times scale. dst may be Point to modify Point in place.
#Param scale factor to multiply Point by ##
@ -641,7 +594,7 @@ Scales Point in place by scale.
#Method void negate()
#Line # Reverses the sign of both members. ##
#Line # reverses the sign of both members ##
Changes the sign of fX and fY.
#Example
@ -669,6 +622,7 @@ pt: nan, -nan negate: -nan, nan
#Method SkPoint operator-()_const
#Line # reverses sign of Point ##
Returns Point changing the signs of fX and fY.
#Return Point as (-fX, -fY) ##
@ -697,6 +651,7 @@ pt: nan, -nan negate: -nan, nan
#Method void operator+=(const SkVector& v)
#Line # adds Vector to Point ##
Adds Vector v to Point. Sets Point to:
#Formula
(fX + v.fX, fY + v.fY)
@ -730,6 +685,7 @@ Adds Vector v to Point. Sets Point to:
#Method void operator-=(const SkVector& v)
#Line # subtracts Vector from Point ##
Subtracts Vector v from Point. Sets Point to:
#Formula
(fX - v.fX, fY - v.fY)
@ -763,6 +719,7 @@ Subtracts Vector v from Point. Sets Point to:
#Method SkPoint operator*(SkScalar scale)_const
#Line # returns Point multiplied by scale ##
Returns Point multiplied by scale.
#Param scale Scalar to multiply by ##
@ -795,6 +752,7 @@ Returns Point multiplied by scale.
#Method SkPoint& operator*=(SkScalar scale)
#Line # multiplies Point by scale factor ##
Multiplies Point by scale. Sets Point to:
#Formula
(fX * scale, fY * scale)
@ -830,7 +788,7 @@ Multiplies Point by scale. Sets Point to:
#Method bool isFinite() const
#Line # Returns true if no member is infinite or NaN. ##
#Line # returns true if no member is infinite or NaN ##
Returns true if both fX and fY are measurable values.
#Return true for values other than infinities and NaN ##
@ -856,7 +814,7 @@ pt: nan, -1 finite: false
#Method bool equals(SkScalar x, SkScalar y) const
#Line # Returns true if Points are equal. ##
#Line # returns true if Points are equal ##
Returns true if Point is equivalent to Point constructed from (x, y).
#Param x value compared with fX ##
@ -885,6 +843,7 @@ pt: nan, -1 != pt
#Method bool operator==(const SkPoint& a, const SkPoint& b)
#Line # returns true if Point are equal ##
Returns true if a is equivalent to b.
#Param a Point to compare ##
@ -913,6 +872,7 @@ pt: nan, -1 != pt
#Method bool operator!=(const SkPoint& a, const SkPoint& b)
#Line # returns true if Point are unequal ##
Returns true if a is not equivalent to b.
#Param a Point to compare ##
@ -941,6 +901,7 @@ pt: nan, -1 != pt
#Method SkVector operator-(const SkPoint& a, const SkPoint& b)
#Line # returns Vector between Points ##
Returns Vector from b to a, computed as
#Formula
(a.fX - b.fX, a.fY - b.fY)
@ -979,6 +940,7 @@ Can also be used to subtract Vector from Vector, returning Vector.
#Method SkPoint operator+(const SkPoint& a, const SkVector& b)
#Line # returns Point offset by Vector ##
Returns Point resulting from Point a offset by Vector b, computed as:
#Formula
(a.fX + b.fX, a.fY + b.fY)
@ -1021,7 +983,7 @@ Can also be used to add Vector to Vector, returning Vector.
#Method static SkScalar Length(SkScalar x, SkScalar y)
#Line # Returns straight-line distance to origin. ##
#Line # returns straight-line distance to origin ##
Returns the Euclidean_Distance from origin, computed as:
#Code
#Literal
@ -1059,7 +1021,7 @@ sqrt(x * x + y * y)
#Method static SkScalar Normalize(SkVector* vec)
#Line # Sets length to one, and returns prior length. ##
#Line # sets length to one, and returns prior length ##
Scales (vec->fX, vec->fY) so that length() returns one, while preserving ratio of vec->fX to vec->fY,
if possible. If original length is nearly zero, sets vec to (0, 0) and returns zero;
otherwise, returns length of vec before vec is scaled.
@ -1099,7 +1061,7 @@ Note that normalize() is faster if prior length is not required.
#Method static SkScalar Distance(const SkPoint& a, const SkPoint& b)
#Line # Returns straight-line distance between points. ##
#Line # returns straight-line distance between points ##
Returns the Euclidean_Distance between a and b.
#Param a line end point ##
@ -1134,7 +1096,7 @@ Returns the Euclidean_Distance between a and b.
#Method static SkScalar DotProduct(const SkVector& a, const SkVector& b)
#Line # Returns dot product. ##
#Line # returns dot product ##
Returns the dot product of Vector a and Vector b.
#Param a left side of dot product ##
@ -1166,7 +1128,7 @@ Returns the dot product of Vector a and Vector b.
#Method static SkScalar CrossProduct(const SkVector& a, const SkVector& b)
#Line # Returns cross product. ##
#Line # returns cross product ##
Returns the cross product of Vector a and Vector b.
a and b form three-dimensional vectors with z equal to zero. The cross product
@ -1206,7 +1168,7 @@ term equals the returned value.
#Method SkScalar cross(const SkVector& vec) const
#Line # Returns cross product. ##
#Line # returns cross product ##
Returns the cross product of Vector and vec.
Vector and vec form three-dimensional vectors with z equal to zero. The
@ -1245,7 +1207,7 @@ The cross product z term equals the returned value.
#Method SkScalar dot(const SkVector& vec) const
#Line # Returns dot product. ##
#Line # returns dot product ##
Returns the dot product of Vector and Vector vec.
#Param vec right side of dot product ##

View File

@ -2,23 +2,12 @@
#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 ##
#Subtopic Overview
#Subtopic Subtopics
#Populate
##
##
#Topic Overview ##
#Struct SkRect
SkRect holds four SkScalar coordinates describing the upper and
@ -32,102 +21,36 @@ SkRect can be constructed from int values to avoid compiler warnings that
integer input cannot convert to SkScalar without loss of precision.
#Subtopic Related_Functions
#Table
#Legend
# name # description ##
#Legend ##
# 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 ##
#Populate
#Subtopic ##
#Subtopic Member_Functions
#Table
#Legend
# description # function ##
#Legend ##
# Intersects # returns true if areas overlap ##
# 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) ##
# asScalars # returns pointer to members as array ##
# bottom() # returns larger bounds in y, if sorted ##
# centerX # returns midpoint in x ##
# centerY # returns midpoint in y ##
# contains() # returns true if points are equal or inside ##
# dump() # sends text representation to standard output using floats ##
# dumpHex # sends text representation to standard output using hexadecimal ##
# height() # returns span in y ##
# inset() # moves the sides symmetrically about the center ##
# intersect() # sets to shared area; returns true if not empty ##
# intersects() # returns true if areas overlap ##
# 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 ##
# iset() # sets to int input (left, top, right, bottom) ##
# isetWH # sets to int input (0, 0, width, height) ##
# join() # sets to union of bounds ##
# joinNonEmptyArg # sets to union of bounds, asserting that argument is not empty ##
# joinPossiblyEmptyRect # sets to union of bounds. Skips empty check for both ##
# left() # returns smaller bounds in x, if sorted ##
# 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 ##
# offset() # translates sides without changing width and height ##
# offsetTo # translates to (x, y) without changing width and height ##
# outset() # moves the sides symmetrically about the center ##
# right() # returns larger bounds in x, if sorted ##
# round() # sets members to nearest integer value ##
# roundIn # sets members to nearest integer value towards opposite ##
# roundOut # sets members to nearest integer value away from opposite ##
# set() # sets to SkScalar input (left, top, right, bottom) and others ##
# setBounds # sets to upper and lower limits of Point array ##
# setBoundsCheck # sets to upper and lower limits of Point array ##
# 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) ##
# sort() # orders sides from smaller to larger ##
# toQuad # returns four corners as Point ##
# top() # returns smaller bounds in y, if sorted ##
# width() # returns span in x ##
# x() # returns bounds left ##
# y() # returns bounds top ##
#Table ##
#Subtopic ##
#Populate
##
#Subtopic Members
#Populate
#Member SkScalar fLeft
#Line # smaller x-axis bounds ##
May contain any value, including infinities and NaN. The smaller of the
horizontal values when sorted. When equal to or greater than fRight, Rect is empty.
##
#Member SkScalar fTop
#Line # smaller y-axis bounds ##
May contain any value, including infinities and NaN. The smaller of the
vertical values when sorted. When equal to or greater than fBottom, Rect is empty.
##
#Member SkScalar fRight
#Line # larger x-axis bounds ##
May contain any value, including infinities and NaN. The larger of the
horizontal values when sorted. When equal to or less than fLeft, Rect is empty.
##
#Member SkScalar fBottom
#Line # larger y-axis bounds ##
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.
##
@ -433,6 +356,7 @@ than fBottom.
#Subtopic Constructors ##
#Subtopic Properties
#Line # side values, center, validity ##
#Table
#Legend
@ -904,6 +828,7 @@ test with NaN is not equal to itself
#Subtopic Operators ##
#Subtopic As_Points
#Line # conversion to and from Points ##
#Table
#Legend
@ -1037,6 +962,7 @@ added: nan, 8 count: 4 rect: 0, 0, 0, 0 success: false
#Subtopic As_Points ##
#Subtopic Set
#Line # replaces all values ##
#Table
#Legend
@ -1309,6 +1235,7 @@ rect: -15, 0, 0, 25 isEmpty: false
#Subtopic Set ##
#Subtopic From_Integers
#Line # set Scalar values from integer input ##
#Table
#Legend
@ -1382,6 +1309,7 @@ rect2: {0, 0, 1, 2}
#Subtopic From_Integers ##
#Subtopic Inset_Outset_Offset
#Line # moves sides ##
#Table
#Legend
@ -1646,6 +1574,7 @@ rect: 5, 1, 55, 86
#Subtopic Inset_Outset_Offset ##
#Subtopic Intersection
#Line # set to shared bounds ##
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;
@ -1932,6 +1861,7 @@ Returns false if either a or b is empty, or do not intersect.
#Subtopic Intersection ##
#Subtopic Join
#Line # set to union of bounds ##
#Table
#Legend
@ -2073,6 +2003,7 @@ sorted: 10, 0, 55, 100
#Subtopic Join ##
#Subtopic Rounding
#Line # adjust to integer bounds ##
#Table
#Legend
@ -2265,6 +2196,7 @@ round: 30, 50, 41, 61
#Subtopic Rounding ##
#Subtopic Sorting
#Line # orders sides ##
#Table
#Legend

View File

@ -1,6 +1,12 @@
#Topic Surface
#Alias Surface_Reference
#Subtopic Overview
#Subtopic Subtopics
#Populate
##
##
#Class SkSurface
SkSurface is responsible for managing the pixels that a canvas draws into. The pixels can be
@ -10,74 +16,13 @@ surface->getCanvas() to use that canvas (but don't delete it, it is owned by the
SkSurface 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.
#Topic Overview
#Subtopic Subtopics
#ToDo manually add subtopics ##
#Table
#Legend
# topics # description ##
#Legend ##
# Constructors # functions that construct SkIPoint16 ##
# Member_Functions # static functions and member methods ##
#Table ##
#Subtopic Constructors
#Populate
##
#Subtopic Constructors
#Table
#Legend
# name # description ##
#Legend ##
# MakeFromBackendRenderTarget # creates Surface from GPU memory buffer ##
# MakeFromBackendTexture # creates Surface from GPU-backed texture ##
# MakeFromBackendTextureAsRenderTarget # creates Surface from GPU-backed texture ##
# MakeNull # creates Surface without backing pixels ##
# MakeRaster # creates Surface from SkImageInfo ##
# MakeRasterDirect # creates Surface from SkImageInfo and Pixel_Storage ##
# MakeRasterDirectReleaseProc # creates Surface from SkImageInfo and Pixel_Storage ##
# MakeRasterN32Premul # creates Surface from width, height matching output ##
# MakeRenderTarget # creates Surface pointing to new GPU memory buffer ##
# SkCanvas::makeSurface # creates Surface matching Canvas Image_Info, Surface_Properties ##
# makeSurface # creates a compatible Surface ##
#Table ##
#Subtopic ##
#Subtopic Member_Functions
#Table
#Legend
# description # function ##
#Legend ##
# MakeFromBackendRenderTarget # creates Surface from GPU memory buffer ##
# MakeFromBackendTexture # creates Surface from GPU-backed texture ##
# MakeFromBackendTextureAsRenderTarget # creates Surface from GPU-backed texture ##
# MakeNull # creates Surface without backing pixels ##
# MakeRaster # creates Surface from SkImageInfo ##
# MakeRasterDirect # creates Surface from SkImageInfo and Pixel_Storage ##
# MakeRasterDirectReleaseProc # creates Surface from SkImageInfo and Pixel_Storage ##
# MakeRasterN32Premul # creates Surface from width, height matching output ##
# MakeRenderTarget # creates Surface pointing to new GPU memory buffer ##
# characterize() # sets Surface_Characterization for threaded pre-processing ##
# draw() # draws Surface contents to canvas ##
# flush() # resolve pending I/O ##
# flushAndSignalSemaphores # resolve pending I/O, and signal ##
# generationID # returns unique ID ##
# getCanvas # returns Canvas that draws into Surface ##
# getRenderTargetHandle # returns the GPU reference to render target ##
# getTextureHandle # returns the GPU reference to texture ##
# height() # returns pixel row count ##
# makeImageSnapshot # creates Image capturing Surface contents ##
# makeSurface # creates a compatible Surface ##
# notifyContentWillChange # notifies that contents will be changed outside of Skia ##
# peekPixels # copies Surface parameters to Pixmap ##
# prepareForExternalIO # to be deprecated ##
# props() # returns Surface_Properties ##
# readPixels # copies Rect of pixels ##
# wait() # rause commands until signaled ##
# width() # returns pixel column count ##
#Table ##
#Subtopic ##
#Topic ##
#Populate
##
# ------------------------------------------------------------------------------

View File

@ -3,29 +3,29 @@ SkAutoCanvasRestore Reference
# <a name="Automatic_Canvas_Restore"></a> Automatic Canvas Restore
# <a name="SkAutoCanvasRestore"></a> Class SkAutoCanvasRestore
Stack helper class calls
# <a name="Overview"></a> Overview
## <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| <a href="SkAutoCanvasRestore_Reference#Automatic_Canvas_Restore_Overview_Constructors">Constructors</a> | functions that construct <a href="#SkAutoCanvasRestore">SkAutoCanvasRestore</a> |
| <a href="SkAutoCanvasRestore_Reference#Automatic_Canvas_Restore_Overview_Member_Functions">Member Functions</a> | static functions and member methods |
| --- | --- |
| <a href="SkAutoCanvasRestore_Reference#Automatic_Canvas_Restore_Constructors">Constructors</a> | functions that construct <a href="SkAutoCanvasRestore_Reference#SkAutoCanvasRestore">SkAutoCanvasRestore</a> |
| <a href="SkAutoCanvasRestore_Reference#Automatic_Canvas_Restore_Member_Functions">Member Functions</a> | static functions and member methods |
# <a name="SkAutoCanvasRestore"></a> Class SkAutoCanvasRestore
Stack helper class calls
## <a name="Constructors"></a> Constructors
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkAutoCanvasRestore_SkCanvas_star">SkAutoCanvasRestore(SkCanvas* canvas, bool doSave)</a> | preserves <a href="SkCanvas_Reference#Canvas">Canvas</a> save count |
| | restores <a href="SkCanvas_Reference#Canvas">Canvas</a> to saved state |
| <a href="#SkAutoCanvasRestore_destructor">~SkAutoCanvasRestore()</a> | restores <a href="SkCanvas_Reference#Canvas">Canvas</a> to saved state |
## <a name="Member_Functions"></a> Member Functions
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkAutoCanvasRestore_restore">restore</a> | restores <a href="SkCanvas_Reference#Canvas">Canvas</a> to saved state |
<a name="SkAutoCanvasRestore_SkCanvas_star"></a>
@ -84,6 +84,7 @@ void restore()
</pre>
Restores <a href="SkCanvas_Reference#Canvas">Canvas</a> to saved state immediately. Subsequent calls and
<a href="#SkAutoCanvasRestore_destructor">~SkAutoCanvasRestore</a> have no effect.
### Example

View File

@ -3,6 +3,19 @@ SkBitmap Reference
# <a name="Bitmap"></a> Bitmap
## <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| <a href="#Classes_and_Structs">Classes and Structs</a> | embedded struct and class members |
| Constants | enum and enum class, const values |
| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkBitmap_Reference#SkBitmap">SkBitmap</a> |
| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="#Operators">Operators</a> | operator overloading methods |
| <a href="#Related_Functions">Related Functions</a> | similar methods grouped together |
# <a name="SkBitmap"></a> Class SkBitmap
<a href="#Bitmap">Bitmap</a> describes a two-dimensional raster pixel array. <a href="#Bitmap">Bitmap</a> is built on
<a href="SkImageInfo_Reference#Image_Info">Image Info</a>, containing integer width and height, <a href="SkImageInfo_Reference#Color_Type">Color Type</a> and <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a>
@ -24,51 +37,47 @@ pixels. Declaring <a href="#SkBitmap">SkBitmap</a> const affects <a href="#Bitma
<a href="#Bitmap">Bitmap</a> is not thread safe. Each thread must have its own copy of <a href="#Bitmap">Bitmap</a> fields,
although threads may share the underlying pixel array.
# <a name="Row_Bytes"></a> Row Bytes
## <a name="Row_Bytes"></a> Row Bytes
<a href="#Bitmap">Bitmap</a> pixels may be contiguous, or may have a gap at the end of each row.
<a href="#Row_Bytes">Row Bytes</a> is the interval from one row to the next. <a href="#Row_Bytes">Row Bytes</a> may be specified;
sometimes passing zero will compute the <a href="#Row_Bytes">Row Bytes</a> from the row width and the
number of bytes in a pixel. <a href="#Row_Bytes">Row Bytes</a> may be larger than the row requires. This
is useful to position one or more <a href="#Bitmap">Bitmaps</a> within a shared pixel array.
# <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
## <a name="Related_Functions"></a> Related Functions
| name | description |
| --- | --- |
| <a href="#Overview_Classes_and_Structs">Classes and Structs</a> | embedded struct and class members |
| <a href="#Overview_Constructors">Constructors</a> | functions that construct <a href="SkPath_Reference#SkPath">SkPath</a> |
| <a href="#Overview_Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="#Overview_Operators">Operators</a> | operator overloading methods |
| --- | --- |
| <a href="#Row_Bytes">Row Bytes</a> | interval from one row to the next |
## <a name="Classes_and_Structs"></a> Classes and Structs
| name | description |
| --- | --- |
| <a href="#SkBitmap_Allocator">Allocator</a> | |
| <a href="#SkBitmap_HeapAllocator">HeapAllocator</a> | |
| --- | --- |
| <a href="#SkBitmap_Allocator">Allocator</a> | abstract subclass of <a href="#SkBitmap_HeapAllocator">HeapAllocator</a> |
| <a href="#SkBitmap_HeapAllocator">HeapAllocator</a> | allocates pixel memory from heap |
## <a name="Constructors"></a> Constructors
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkBitmap_empty_constructor">SkBitmap()</a> | constructs with default values |
| <a href="#SkBitmap_move_SkBitmap">SkBitmap(SkBitmap&& src)</a> | takes ownership of pixels |
| <a href="#SkBitmap_copy_const_SkBitmap">SkBitmap(const SkBitmap& src)</a> | shares ownership of pixels |
| | releases ownership of pixels |
| <a href="#SkBitmap_destructor">~SkBitmap()</a> | releases ownership of pixels |
## <a name="Operators"></a> Operators
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkBitmap_move_operator">operator=(SkBitmap&& src)</a> | takes ownership of pixels |
| <a href="#SkBitmap_copy_operator">operator=(const SkBitmap& src)</a> | shares ownership of pixels |
## <a name="Member_Functions"></a> Member Functions
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkBitmap_ComputeIsOpaque">ComputeIsOpaque</a> | returns true if all pixels are opaque |
| <a href="#SkBitmap_allocN32Pixels">allocN32Pixels</a> | allocates compatible <a href="#ARGB">Color ARGB</a> pixels, or aborts |
| <a href="#SkBitmap_allocPixels">allocPixels</a> | allocates pixels from <a href="SkImageInfo_Reference#Image_Info">Image Info</a>, or aborts |
@ -1854,7 +1863,7 @@ contains width, height, <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a
bool SK_WARN_UNUSED_RESULT tryAllocN32Pixels(int width, int height, bool isOpaque = false)
</pre>
Sets <a href="SkImageInfo_Reference#Image_Info">Image Info</a> to width, height, and <a href="SkImageInfo_Reference#Native_Color_Type">Native Color Type</a>; and allocates
Sets <a href="SkImageInfo_Reference#Image_Info">Image Info</a> to width, height, and <a href="SkImageInfo_Reference#Color_Type">Native Color Type</a>; and allocates
pixel memory. If <a href="#SkBitmap_isOpaque">isOpaque</a> is true, sets <a href="SkImageInfo_Reference#Image_Info">Image Info</a> to <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>;
otherwise, sets to <a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>.
@ -1898,7 +1907,7 @@ true if pixel storage is allocated
void allocN32Pixels(int width, int height, bool isOpaque = false)
</pre>
Sets <a href="SkImageInfo_Reference#Image_Info">Image Info</a> to width, height, and the <a href="SkImageInfo_Reference#Native_Color_Type">Native Color Type</a>; and allocates
Sets <a href="SkImageInfo_Reference#Image_Info">Image Info</a> to width, height, and the <a href="SkImageInfo_Reference#Color_Type">Native Color Type</a>; and allocates
pixel memory. If <a href="#SkBitmap_isOpaque">isOpaque</a> is true, sets <a href="SkImageInfo_Reference#Image_Info">Image Info</a> to <a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>;
otherwise, sets to <a href="SkImageInfo_Reference#SkAlphaType">kOpaque SkAlphaType</a>.

View File

@ -3,6 +3,18 @@ SkCanvas Reference
# <a name="Canvas"></a> Canvas
## <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| <a href="#Classes_and_Structs">Classes and Structs</a> | embedded struct and class members |
| <a href="#Constants">Constants</a> | enum and enum class, const values |
| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkCanvas_Reference#SkCanvas">SkCanvas</a> |
| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="#Related_Functions">Related Functions</a> | similar methods grouped together |
# <a name="SkCanvas"></a> Class SkCanvas
<a href="#Canvas">Canvas</a> provides an interface for drawing, and how the drawing is clipped and transformed.
<a href="#Canvas">Canvas</a> contains a stack of <a href="#Matrix">Matrix</a> and <a href="#Clip">Clip</a> values.
@ -25,40 +37,39 @@ destination.
<a href="#Canvas">Canvas</a> can be constructed to draw to <a href="SkBitmap_Reference#Bitmap">Bitmap</a> without first creating <a href="undocumented#Raster_Surface">Raster Surface</a>.
This approach may be deprecated in the future.
# <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
## <a name="Related_Functions"></a> Related Functions
| name | description |
| --- | --- |
| <a href="#Overview_Classes_and_Structs">Classes and Structs</a> | embedded struct and class members |
| <a href="#Overview_Constants">Constants</a> | enum and enum class, const values |
| <a href="#Overview_Constructors">Constructors</a> | functions that construct <a href="SkPath_Reference#SkPath">SkPath</a> |
| <a href="#Overview_Member_Functions">Member Functions</a> | static functions and member methods |
| --- | --- |
| <a href="#Clip">Clip</a> | stack of clipping <a href="#Path">Paths</a> |
| <a href="#Draw_Image">Draw Image</a> | draws <a href="SkImage_Reference#Image">Image</a> to <a href="#Canvas">Canvas</a> |
| <a href="#Layer">Layer</a> | temporary <a href="SkBitmap_Reference#Bitmap">Bitmap</a> to draw into |
| <a href="#Matrix">Matrix</a> | coordinate transformation |
| <a href="#State_Stack">State Stack</a> | stack of state for hierarchical drawing |
## <a name="Constants"></a> Constants
| name | description |
| --- | --- |
| Lattice::Flags | controls <a href="#SkCanvas_Lattice">Lattice</a> transparency |
| --- | --- |
| <a href="#SkCanvas_ColorBehavior">ColorBehavior</a> | Android framework only |
| <a href="#SkCanvas_PointMode">PointMode</a> | sets <a href="#SkCanvas_drawPoints">drawPoints</a> options |
| <a href="#SkCanvas_SaveLayerFlags">SaveLayerFlags</a> | sets <a href="#SkCanvas_SaveLayerRec">SaveLayerRec</a> options |
| <a href="#SkCanvas_SrcRectConstraint">SrcRectConstraint</a> | sets <a href="#SkCanvas_drawImageRect">drawImageRect</a> options |
| _anonymous | sets <a href="#SkCanvas_SaveLayerRec">SaveLayerRec</a> options |
## <a name="Classes_and_Structs"></a> Classes and Structs
| name | description |
| --- | --- |
| <a href="#SkCanvas_Lattice">Lattice</a> | divides <a href="SkBitmap_Reference#Bitmap">Bitmap</a>, <a href="SkImage_Reference#Image">Image</a> into a rectangular grid |
| <a href="#SkCanvas_SaveLayerRec">SaveLayerRec</a> | contains state to create <a href="#Layer">Layer</a> |
| --- | --- |
| <a href="#SkCanvas_Lattice">Lattice</a> | divides <a href="SkBitmap_Reference#Bitmap">Bitmap</a> or <a href="SkImage_Reference#Image">Image</a> into a rectangular grid |
| <a href="#SkCanvas_SaveLayerRec">SaveLayerRec</a> | contains the state used to create the <a href="#Layer">Layer</a> |
## <a name="Constructors"></a> Constructors
Create the desired type of <a href="SkSurface_Reference#Surface">Surface</a> to obtain its <a href="#Canvas">Canvas</a> when possible. <a href="#Overview_Constructors">Constructors</a> are useful
Create the desired type of <a href="SkSurface_Reference#Surface">Surface</a> to obtain its <a href="#Canvas">Canvas</a> when possible. <a href="#Constructors">Constructors</a> are useful
when no <a href="SkSurface_Reference#Surface">Surface</a> is required, and some helpers implicitly create <a href="undocumented#Raster_Surface">Raster Surface</a>.
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkCanvas_MakeRasterDirect">MakeRasterDirect</a> | creates from <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a> |
| <a href="#SkCanvas_MakeRasterDirectN32">MakeRasterDirectN32</a> | creates from image data and <a href="#Storage">Pixel Storage</a> |
| <a href="#SkCanvas_empty_constructor">SkCanvas()</a> | creates with no <a href="SkSurface_Reference#Surface">Surface</a>, no dimensions |
@ -67,12 +78,13 @@ when no <a href="SkSurface_Reference#Surface">Surface</a> is required, and some
| <a href="#SkCanvas_const_SkBitmap">SkCanvas(const SkBitmap& bitmap, ColorBehavior behavior)</a> | Android framework only |
| <a href="#SkCanvas_const_SkBitmap_const_SkSurfaceProps">SkCanvas(const SkBitmap& bitmap, const SkSurfaceProps& props)</a> | uses existing <a href="SkBitmap_Reference#Bitmap">Bitmap</a> and <a href="undocumented#Surface_Properties">Surface Properties</a> |
| <a href="#SkCanvas_int_int_const_SkSurfaceProps_star">SkCanvas(int width, int height, const SkSurfaceProps* props = nullptr)</a> | no <a href="SkSurface_Reference#Surface">Surface</a>, set dimensions, <a href="undocumented#Surface_Properties">Surface Properties</a> |
| | draws saved <a href="#Layer">Layers</a>, frees resources |
| <a href="#SkCanvas_makeSurface">makeSurface</a> | creates <a href="SkSurface_Reference#Surface">Surface</a> matching <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> and <a href="undocumented#SkSurfaceProps">SkSurfaceProps</a> |
| <a href="#SkCanvas_destructor">~SkCanvas()</a> | draws saved <a href="#Layer">Layers</a>, frees resources |
## <a name="Member_Functions"></a> Member Functions
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkCanvas_MakeRasterDirect">MakeRasterDirect</a> | creates from <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> and <a href="#Storage">Pixel Storage</a> |
| <a href="#SkCanvas_MakeRasterDirectN32">MakeRasterDirectN32</a> | creates from image data and <a href="#Storage">Pixel Storage</a> |
| <a href="#SkCanvas_accessTopLayerPixels">accessTopLayerPixels</a> | returns writable pixel access if available |
@ -391,11 +403,6 @@ specifies a <a href="#SkCanvas_copy_SkBaseDevice_star_device">device</a> for the
<a href="#Canvas">Canvas</a> that can be used to draw into <a href="#SkCanvas_copy_SkBaseDevice_star_device">device</a>
### Example
<pre style="padding: 1em 1em 1em 1em; font-size: 13px width: 62.5em; background-color: #f0f0f0">
void draw(SkCanvas* canvas) {</fiddle-embed></div>
### See Also
<a href="#SkCanvas_MakeRasterDirect">MakeRasterDirect</a> <a href="#SkRasterHandleAllocator_MakeCanvas">SkRasterHandleAllocator::MakeCanvas</a> <a href="#SkSurface_getCanvas">SkSurface::getCanvas</a> <a href="undocumented#SkCreateColorSpaceXformCanvas">SkCreateColorSpaceXformCanvas</a>
@ -693,11 +700,6 @@ If <a href="#Canvas">Canvas</a> is associated with <a href="undocumented#GPU_Sur
If <a href="#Canvas">Canvas</a> is associated with <a href="undocumented#Raster_Surface">Raster Surface</a>, has no effect; raster draw
operations are never deferred.
### Example
<pre style="padding: 1em 1em 1em 1em; font-size: 13px width: 62.5em; background-color: #f0f0f0">
void draw(SkCanvas* canvas) {</fiddle-embed></div>
### See Also
<a href="#SkCanvas_peekPixels">peekPixels</a> <a href="#SkSurface_flush">SkSurface::flush()</a> <a href="#flush">GrContext::flush()</a> <a href="#SkSurface_prepareForExternalIO">SkSurface::prepareForExternalIO</a> GrContext::abandonContext()
@ -1295,7 +1297,8 @@ true if pixels were written to <a href="#Canvas">Canvas</a>
---
# <a name="State_Stack"></a> State Stack
## <a name="State_Stack"></a> State Stack
<a href="#Canvas">Canvas</a> maintains a stack of state that allows hierarchical drawing, commonly used
to implement windows and views. The initial state has an identity matrix and and
an infinite clip. Even with a wide-open clip, drawing is constrained by the
@ -1459,7 +1462,8 @@ depth = 1
---
# <a name="Layer"></a> Layer
## <a name="Layer"></a> Layer
<a href="#Layer">Layer</a> allocates a temporary <a href="SkBitmap_Reference#Bitmap">Bitmap</a> to draw into. When the drawing is
complete, the <a href="SkBitmap_Reference#Bitmap">Bitmap</a> is drawn into the <a href="#Canvas">Canvas</a>.
@ -1968,7 +1972,7 @@ Outside of the circle the mandrill is brightened.</div></fiddle-embed></div>
---
# <a name="Matrix"></a> Matrix
## <a name="Matrix"></a> Matrix
<a name="SkCanvas_translate"></a>
## translate
@ -2261,7 +2265,8 @@ isIdentity true
---
# <a name="Clip"></a> Clip
## <a name="Clip"></a> Clip
<a href="#Clip">Clip</a> is built from a stack of clipping paths. Each <a href="SkPath_Reference#Path">Path</a> in the
stack can be constructed from one or more <a href="#Contour">Path Contour</a> elements. The
<a href="#Contour">Path Contour</a> may be composed of any number of <a href="#Verb">Path Verb</a> segments. Each
@ -3654,7 +3659,8 @@ Third bottom column shows inverse winding fills area outside both contours.</div
---
# <a name="Draw_Image"></a> Draw Image
## <a name="Draw_Image"></a> Draw Image
<a href="#SkCanvas_drawImage">drawImage</a>, <a href="#SkCanvas_drawImageRect">drawImageRect</a>, and <a href="#SkCanvas_drawImageNine">drawImageNine</a> can be called with a bare pointer or
a smart pointer as a convenience. The pairs of calls are otherwise identical.

View File

@ -3,33 +3,41 @@ SkIPoint16 Reference
# <a name="IPoint16"></a> IPoint16
# <a name="SkIPoint16"></a> Struct SkIPoint16
<a href="#SkIPoint16">SkIPoint16</a> holds two 16 bit integer coordinates.
# <a name="Overview"></a> Overview
## <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| <a href="#Overview_Constructors">Constructors</a> | functions that construct <a href="#SkIPoint16">SkIPoint16</a> |
| <a href="#Overview_Member_Functions">Member Functions</a> | static functions and member methods |
| --- | --- |
| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkIPoint16_Reference#SkIPoint16">SkIPoint16</a> |
| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="#Members">Members</a> | member values |
# <a name="SkIPoint16"></a> Struct SkIPoint16
<a href="#SkIPoint16">SkIPoint16</a> holds two 16 bit integer coordinates.
## <a name="Constructors"></a> Constructors
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkIPoint16_Make">Make</a> | constructs from integer inputs |
## <a name="Member_Functions"></a> Member Functions
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkIPoint16_Make">Make</a> | constructs from integer inputs |
| <a href="#SkIPoint16_set">set</a> | sets to integer input |
| <a href="#SkIPoint16_x">x</a> | returns <a href="#SkIPoint16_fX">fX</a> |
| <a href="#SkIPoint16_y">y</a> | returns <a href="#SkIPoint16_fY">fY</a> |
## <a name="Members"></a> Members
| name | description |
| --- | --- |
| <a href="#SkIPoint16_fX">fX</a> | x-axis value |
| <a href="#SkIPoint16_fY">fY</a> | y-axis value |
<a name="SkIPoint16_fX"> <code><strong>int16_t fX</strong></code> </a>
x-axis value used by <a href="#IPoint16">IPoint16</a>

View File

@ -3,41 +3,42 @@ SkIPoint Reference
# <a name="IPoint"></a> IPoint
# <a name="SkIPoint"></a> Struct SkIPoint
<a href="#SkIPoint">SkIPoint</a> holds two 32 bit integer coordinates.
# <a name="Overview"></a> Overview
## <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| <a href="#Overview_Constructors">Constructors</a> | functions that construct <a href="SkIPoint16_Reference#SkIPoint16">SkIPoint16</a> |
| <a href="#Overview_Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="#Overview_Operators">Operators</a> | operator overloading methods |
| --- | --- |
| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkIPoint_Reference#SkIPoint">SkIPoint</a> |
| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="#Members">Members</a> | member values |
| <a href="#Operators">Operators</a> | operator overloading methods |
# <a name="SkIPoint"></a> Struct SkIPoint
<a href="#SkIPoint">SkIPoint</a> holds two 32 bit integer coordinates.
## <a name="Constructors"></a> Constructors
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkIPoint_Make">Make</a> | constructs from integer inputs |
## <a name="Operators"></a> Operators
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkIPoint_notequal_operator">operator!=(const SkIPoint& a, const SkIPoint& b)</a> | returns true if <a href="#IPoint">IPoints</a> are unequal |
| <a href="#SkIPoint_add_operator">operator+(const SkIPoint& a, const SkIVector& b)</a> | returns <a href="#IPoint">IPoint</a> offset by <a href="SkIPoint_Reference#IVector">IVector</a> |
| <a href="#SkIPoint_addto_operator">operator+=(const SkIVector& v)</a> | adds <a href="SkIPoint_Reference#IVector">IVector</a> to <a href="#IPoint">IPoint</a> |
| <a href="#SkIPoint_minus_operator">operator-() const</a> | reverses sign of <a href="#IPoint">IPoint</a> |
| <a href="#SkIPoint_subtract_operator">operator-(const SkIPoint& a, const SkIPoint& b)</a> | returns <a href="SkIPoint_Reference#IVector">IVector</a> between <a href="#IPoint">IPoints</a> |
| <a href="#SkIPoint_notequal_operator">operator!=(const SkIPoint& a, const SkIPoint& b)</a> | returns true if <a href="#IPoint">IPoints</a> are unequal |
| <a href="#SkIPoint_equal_operator">operator==(const SkIPoint& a, const SkIPoint& b)</a> | returns true if <a href="#IPoint">IPoints</a> are equal |
| <a href="#SkIPoint_addto_operator">operator+=(const SkIVector& v)</a> | adds <a href="SkIPoint_Reference#IVector">IVector</a> to <a href="#IPoint">IPoint</a> |
| <a href="#SkIPoint_subtractfrom_operator">operator-=(const SkIVector& v)</a> | subtracts <a href="SkIPoint_Reference#IVector">IVector</a> from <a href="#IPoint">IPoint</a> |
| <a href="#SkIPoint_equal_operator">operator==(const SkIPoint& a, const SkIPoint& b)</a> | returns true if <a href="#IPoint">IPoints</a> are equal |
## <a name="Member_Functions"></a> Member Functions
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkIPoint_Make">Make</a> | constructs from integer inputs |
| <a href="#SkIPoint_equals">equals</a> | returns true if members are equal |
| <a href="#SkIPoint_isZero">isZero</a> | returns true if both members equal zero |
@ -45,6 +46,13 @@ SkIPoint Reference
| <a href="#SkIPoint_x">x</a> | returns <a href="#SkIPoint_fX">fX</a> |
| <a href="#SkIPoint_y">y</a> | returns <a href="#SkIPoint_fY">fY</a> |
## <a name="Members"></a> Members
| name | description |
| --- | --- |
| <a href="#SkIPoint_fX">fX</a> | x-axis value |
| <a href="#SkIPoint_fY">fY</a> | y-axis value |
<a name="SkIPoint_fX"> <code><strong>int32_t fX</strong></code> </a>
x-axis value used by <a href="#IPoint">IPoint</a>.

View File

@ -3,12 +3,12 @@ SkIRect Reference
# <a name="IRect"></a> IRect
# <a name="Overview"></a> Overview
## <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| --- | --- |
| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkIRect_Reference#SkIRect">SkIRect</a> |
| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="#Members">Members</a> | member values |
@ -37,7 +37,7 @@ its top, it is considered empty.
## <a name="Member_Functions"></a> Member Functions
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkIRect_EmptyIRect">EmptyIRect</a> | returns immutable bounds of (0, 0, 0, 0) |
| <a href="#SkIRect_Intersects">Intersects</a> | returns true if areas overlap |
| <a href="#SkIRect_IntersectsNoEmptyCheck">IntersectsNoEmptyCheck</a> | returns true if areas overlap skips empty check |
@ -85,6 +85,13 @@ its top, it is considered empty.
## <a name="Members"></a> Members
| name | description |
| --- | --- |
| <a href="#SkIRect_fBottom">fBottom</a> | larger y-axis bounds |
| <a href="#SkIRect_fLeft">fLeft</a> | smaller x-axis bounds |
| <a href="#SkIRect_fRight">fRight</a> | larger x-axis bounds |
| <a href="#SkIRect_fTop">fTop</a> | smaller y-axis bounds |
<a name="SkIRect_fLeft"> <code><strong>int32_t fLeft</strong></code> </a>
May contain any value. The smaller of the horizontal values when sorted.
@ -108,7 +115,7 @@ When equal to or less than <a href="#SkIRect_fTop">fTop</a>, <a href="#IRect">IR
## <a name="Constructors"></a> Constructors
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkIRect_MakeEmpty">MakeEmpty</a> | returns bounds of (0, 0, 0, 0) |
| <a href="#SkIRect_MakeLTRB">MakeLTRB</a> | constructs from int left, top, right, bottom |
| <a href="#SkIRect_MakeLargest">MakeLargest</a> | deprecated |
@ -828,7 +835,7 @@ sorted: {20, 40, 20, 50} is empty
## <a name="Operators"></a> Operators
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkIRect_notequal_operator">operator!=(const SkIRect& a, const SkIRect& b)</a> | returns true if members are unequal |
| <a href="#SkIRect_equal_operator">operator==(const SkIRect& a, const SkIRect& b)</a> | returns true if members are equal |

View File

@ -3,27 +3,22 @@ SkImageInfo Reference
# <a name="Image_Info"></a> Image Info
# <a name="Overview"></a> Overview
## <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| <a href="SkImageInfo_Reference#Image_Info_Overview_Constants">Constants</a> | enum and enum class, const values |
| <a href="SkImageInfo_Reference#Image_Info_Constructors">Constructors</a> | functions that construct ImageInfo |
| --- | --- |
| <a href="SkImageInfo_Reference#Image_Info_Constructors">Constructors</a> | functions that construct <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> |
| <a href="SkImageInfo_Reference#Image_Info_Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="SkImageInfo_Reference#Image_Info_Operators">Operators</a> | operator overloading methods |
## <a name="Constants"></a> Constants
| name | description |
| --- | --- |
| <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> | encoding for pixel transparency |
| <a href="SkImageInfo_Reference#Color_Type">Color Type</a> | encoding for pixel color components |
| <a href="SkImageInfo_Reference#SkDestinationSurfaceColorMode">SkDestinationSurfaceColorMode</a> | |
| <a href="SkImageInfo_Reference#SkYUVColorSpace">SkYUVColorSpace</a> | |
| --- | --- |
# <a name="Alpha_Type"></a> Alpha Type
## <a name="Alpha_Type"></a> Alpha Type
## <a name="SkAlphaType"></a> Enum SkAlphaType
@ -69,9 +64,7 @@ incomplete
# <a name="Color_Type"></a> Color Type
## <a name="Native_Color_Type"></a> Native Color Type
## <a name="Color_Type"></a> Color Type
## <a name="SkColorType"></a> Enum SkColorType
@ -225,58 +218,58 @@ Used for both src images and render-targets (surfaces).
## <a name="Operators"></a> Operators
| name | description |
| --- | --- |
| <a href="#SkImageInfo_notequal1_operator">operator!=(const SkImageInfo& other) const</a> | |
| <a href="#SkImageInfo_equal1_operator">operator==(const SkImageInfo& other) const</a> | |
| --- | --- |
| <a href="#SkImageInfo_notequal1_operator">operator!=(const SkImageInfo& other) const</a> | incomplete |
| <a href="#SkImageInfo_equal1_operator">operator==(const SkImageInfo& other) const</a> | incomplete |
## <a name="Member_Functions"></a> Member Functions
| name | description |
| --- | --- |
| <a href="#SkImageInfo_ByteSizeOverflowed">ByteSizeOverflowed</a> | |
| --- | --- |
| <a href="#SkImageInfo_ByteSizeOverflowed">ByteSizeOverflowed</a> | incomplete |
| <a href="#SkImageInfo_Make">Make</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> from dimensions, <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> |
| <a href="#SkImageInfo_MakeA8">MakeA8</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a> |
| <a href="#SkImageInfo_MakeN32">MakeN32</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#Native_Color_Type">Native Color Type</a> |
| <a href="#SkImageInfo_MakeN32Premul">MakeN32Premul</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#Native_Color_Type">Native Color Type</a>, <a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a> |
| <a href="#SkImageInfo_MakeS32">MakeS32</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#Native_Color_Type">Native Color Type</a>, sRGB <a href="undocumented#Color_Space">Color Space</a> |
| <a href="#SkImageInfo_MakeN32">MakeN32</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#Color_Type">Native Color Type</a> |
| <a href="#SkImageInfo_MakeN32Premul">MakeN32Premul</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#Color_Type">Native Color Type</a>, <a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a> |
| <a href="#SkImageInfo_MakeS32">MakeS32</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#Color_Type">Native Color Type</a>, sRGB <a href="undocumented#Color_Space">Color Space</a> |
| <a href="#SkImageInfo_MakeUnknown">MakeUnknown</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a> |
| <a href="#SkImageInfo_alphaType">alphaType</a> | |
| <a href="#SkImageInfo_bounds">bounds</a> | |
| <a href="#SkImageInfo_bytesPerPixel">bytesPerPixel</a> | |
| <a href="#SkImageInfo_colorSpace">colorSpace</a> | |
| <a href="#SkImageInfo_colorType">colorType</a> | |
| <a href="#SkImageInfo_computeByteSize">computeByteSize</a> | |
| <a href="#SkImageInfo_computeMinByteSize">computeMinByteSize</a> | |
| <a href="#SkImageInfo_computeOffset">computeOffset</a> | |
| <a href="#SkImageInfo_dimensions">dimensions</a> | |
| <a href="#SkImageInfo_flatten">flatten</a> | |
| <a href="#SkImageInfo_gammaCloseToSRGB">gammaCloseToSRGB</a> | |
| <a href="#SkImageInfo_height">height</a> | |
| <a href="#SkImageInfo_isEmpty">isEmpty</a> | |
| <a href="#SkImageInfo_isOpaque">isOpaque</a> | |
| <a href="#SkImageInfo_alphaType">alphaType</a> | incomplete |
| <a href="#SkImageInfo_bounds">bounds</a> | incomplete |
| <a href="#SkImageInfo_bytesPerPixel">bytesPerPixel</a> | incomplete |
| <a href="#SkImageInfo_colorSpace">colorSpace</a> | incomplete |
| <a href="#SkImageInfo_colorType">colorType</a> | incomplete |
| <a href="#SkImageInfo_computeByteSize">computeByteSize</a> | incomplete |
| <a href="#SkImageInfo_computeMinByteSize">computeMinByteSize</a> | incomplete |
| <a href="#SkImageInfo_computeOffset">computeOffset</a> | incomplete |
| <a href="#SkImageInfo_dimensions">dimensions</a> | incomplete |
| <a href="#SkImageInfo_flatten">flatten</a> | incomplete |
| <a href="#SkImageInfo_gammaCloseToSRGB">gammaCloseToSRGB</a> | incomplete |
| <a href="#SkImageInfo_height">height</a> | incomplete |
| <a href="#SkImageInfo_isEmpty">isEmpty</a> | incomplete |
| <a href="#SkImageInfo_isOpaque">isOpaque</a> | incomplete |
| <a href="#SkImageInfo_makeAlphaType">makeAlphaType</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with changed <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> |
| <a href="#SkImageInfo_makeColorSpace">makeColorSpace</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with changed <a href="undocumented#Color_Space">Color Space</a> |
| <a href="#SkImageInfo_makeColorType">makeColorType</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with changed <a href="SkImageInfo_Reference#Color_Type">Color Type</a> |
| <a href="#SkImageInfo_makeWH">makeWH</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with changed dimensions |
| <a href="#SkImageInfo_minRowBytes">minRowBytes</a> | |
| <a href="#SkImageInfo_minRowBytes64">minRowBytes64</a> | |
| <a href="#SkImageInfo_refColorSpace">refColorSpace</a> | |
| <a href="#SkImageInfo_reset">reset</a> | |
| <a href="#SkImageInfo_shiftPerPixel">shiftPerPixel</a> | |
| <a href="#SkImageInfo_unflatten">unflatten</a> | |
| <a href="#SkImageInfo_validRowBytes">validRowBytes</a> | |
| <a href="#SkImageInfo_validate">validate</a> | |
| <a href="#SkImageInfo_width">width</a> | |
| <a href="#SkImageInfo_minRowBytes">minRowBytes</a> | incomplete |
| <a href="#SkImageInfo_minRowBytes64">minRowBytes64</a> | incomplete |
| <a href="#SkImageInfo_refColorSpace">refColorSpace</a> | incomplete |
| <a href="#SkImageInfo_reset">reset</a> | incomplete |
| <a href="#SkImageInfo_shiftPerPixel">shiftPerPixel</a> | incomplete |
| <a href="#SkImageInfo_unflatten">unflatten</a> | incomplete |
| <a href="#SkImageInfo_validRowBytes">validRowBytes</a> | incomplete |
| <a href="#SkImageInfo_validate">validate</a> | incomplete |
| <a href="#SkImageInfo_width">width</a> | incomplete |
## <a name="Constructors"></a> Constructors
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkImageInfo_Make">Make</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> from dimensions, <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> |
| <a href="#SkImageInfo_MakeA8">MakeA8</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#SkColorType">kAlpha 8 SkColorType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a> |
| <a href="#SkImageInfo_MakeN32">MakeN32</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#Native_Color_Type">Native Color Type</a> |
| <a href="#SkImageInfo_MakeN32Premul">MakeN32Premul</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#Native_Color_Type">Native Color Type</a>, <a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a> |
| <a href="#SkImageInfo_MakeS32">MakeS32</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#Native_Color_Type">Native Color Type</a>, sRGB <a href="undocumented#Color_Space">Color Space</a> |
| <a href="#SkImageInfo_MakeN32">MakeN32</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#Color_Type">Native Color Type</a> |
| <a href="#SkImageInfo_MakeN32Premul">MakeN32Premul</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#Color_Type">Native Color Type</a>, <a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a> |
| <a href="#SkImageInfo_MakeS32">MakeS32</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#Color_Type">Native Color Type</a>, sRGB <a href="undocumented#Color_Space">Color Space</a> |
| <a href="#SkImageInfo_MakeUnknown">MakeUnknown</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a> |
| <a href="#SkImageInfo_empty_constructor">SkImageInfo()</a> | creates with zero dimensions, <a href="SkImageInfo_Reference#SkColorType">kUnknown SkColorType</a>, <a href="SkImageInfo_Reference#SkAlphaType">kUnknown SkAlphaType</a> |
| <a href="#SkImageInfo_makeAlphaType">makeAlphaType</a> | creates <a href="SkImageInfo_Reference#Image_Info">Image Info</a> with changed <a href="SkImageInfo_Reference#Alpha_Type">Alpha Type</a> |

View File

@ -3,6 +3,18 @@ SkImage Reference
# <a name="Image"></a> Image
## <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| <a href="#Classes_and_Structs">Classes and Structs</a> | embedded struct and class members |
| Constants | enum and enum class, const values |
| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkImage_Reference#SkImage">SkImage</a> |
| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="#Related_Functions">Related Functions</a> | similar methods grouped together |
# <a name="SkImage"></a> Class SkImage
<a href="#Image">Image</a> describes a two dimensional array of pixels to draw. The pixels may be
unencoded in a <a href="undocumented#Raster_Bitmap">Raster Bitmap</a>, encoded in a <a href="undocumented#Picture">Picture</a> or compressed data stream,
@ -19,33 +31,43 @@ or height returns <a href="#Image">Image</a> equal to nullptr.
include BMP, GIF, HEIF, ICO, JPEG, PNG, WBMP, WebP. Supported encodings details
vary with platform.
# <a name="Raster_Image"></a> Raster Image
## <a name="Raster_Image"></a> Raster Image
<a href="SkImage_Reference#Raster_Image">Raster Image</a> pixels are unencoded in a <a href="undocumented#Raster_Bitmap">Raster Bitmap</a>. These pixels may be read
directly and in most cases written to, although edited pixels may not be drawn
if <a href="#Image">Image</a> has been copied internally.
# <a name="Texture_Image"></a> Texture Image
## <a name="Texture_Image"></a> Texture Image
<a href="#Texture_Image">Texture Image</a> are located on GPU and pixels are not accessible. <a href="#Texture_Image">Texture Image</a>
are allocated optimally for best performance. <a href="SkImage_Reference#Raster_Image">Raster Image</a> may
be drawn to <a href="undocumented#GPU_Surface">GPU Surface</a>, but pixels are uploaded from CPU to GPU downgrading
performance.
# <a name="Lazy_Image"></a> Lazy Image
## <a name="Lazy_Image"></a> Lazy Image
<a href="#Lazy_Image">Lazy Image</a> defer allocating buffer for <a href="#Image">Image</a> pixels and decoding stream until
<a href="#Image">Image</a> is drawn. <a href="#Lazy_Image">Lazy Image</a> caches result if possible to speed up repeated
drawing.
# <a name="Overview"></a> Overview
## <a name="Related_Functions"></a> Related Functions
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| <a href="#Lazy_Image">Lazy Image</a> | deferred pixel buffer |
| <a href="SkImage_Reference#Raster_Image">Raster Image</a> | pixels unencoded in <a href="undocumented#Raster_Bitmap">Raster Bitmap</a> |
| <a href="#Texture_Image">Texture Image</a> | pixels located on GPU |
| topics | description |
| --- | --- |
## <a name="Classes_and_Structs"></a> Classes and Structs
| name | description |
| --- | --- |
| <a href="#SkImage_DeferredTextureImageUsageParams">DeferredTextureImageUsageParams</a> | to be deprecated |
## <a name="Constructors"></a> Constructors
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkImage_MakeBackendTextureFromSkImage">MakeBackendTextureFromSkImage</a> | Creates <a href="undocumented#GPU_Texture">GPU Texture</a> from <a href="#Image">Image</a>. |
| <a href="#SkImage_MakeCrossContextFromEncoded">MakeCrossContextFromEncoded</a> | Creates <a href="#Image">Image</a> from encoded data, and uploads to GPU. |
| <a href="#SkImage_MakeCrossContextFromPixmap">MakeCrossContextFromPixmap</a> | Creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixmap</a>, and uploads to GPU. |
@ -62,18 +84,18 @@ 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="#SkSurface_makeImageSnapshot">SkSurface::makeImageSnapshot</a> | Creates <a href="#Image">Image</a> capturing <a href="SkSurface_Reference#Surface">Surface</a> contents. |
| <a href="#SkImage_makeColorSpace">makeColorSpace</a> | Creates <a href="#Image">Image</a> matching <a href="undocumented#Color_Space">Color Space</a> if possible. |
| <a href="#SkImage_makeNonTextureImage">makeNonTextureImage</a> | Creates <a href="#Image">Image</a> without dependency on <a href="undocumented#GPU_Texture">GPU Texture</a>. |
| <a href="#SkImage_makeRasterImage">makeRasterImage</a> | Creates <a href="#Image">Image</a> compatible with <a href="undocumented#Raster_Surface">Raster Surface</a> if possible. |
| <a href="#SkImage_makeShader">makeShader</a> | Creates <a href="undocumented#Shader">Shader</a>, <a href="SkPaint_Reference#Paint">Paint</a> element that can tile <a href="#Image">Image</a>. |
| <a href="#SkImage_makeSubset">makeSubset</a> | Creates <a href="#Image">Image</a> containing part of original. |
| <a href="#SkImage_makeTextureImage">makeTextureImage</a> | Creates <a href="#Image">Image</a> matching <a href="undocumented#Color_Space">Color Space</a> if possible. |
| <a href="#SkImage_makeWithFilter">makeWithFilter</a> | Creates filtered, clipped <a href="#Image">Image</a>. |
## <a name="Member_Functions"></a> Member Functions
| description | function |
| --- | --- |
| name | description |
| --- | --- |
| <a href="#SkImage_MakeBackendTextureFromSkImage">MakeBackendTextureFromSkImage</a> | Creates <a href="undocumented#GPU_Texture">GPU Texture</a> from <a href="#Image">Image</a>. |
| <a href="#SkImage_MakeCrossContextFromEncoded">MakeCrossContextFromEncoded</a> | Creates <a href="#Image">Image</a> from encoded data, and uploads to GPU. |
| <a href="#SkImage_MakeCrossContextFromPixmap">MakeCrossContextFromPixmap</a> | Creates <a href="#Image">Image</a> from <a href="SkPixmap_Reference#Pixmap">Pixmap</a>, and uploads to GPU. |

View File

@ -3,6 +3,17 @@ SkMatrix Reference
# <a name="Matrix"></a> Matrix
## <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| Constants | enum and enum class, const values |
| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkMatrix_Reference#SkMatrix">SkMatrix</a> |
| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="#Operators">Operators</a> | operator overloading methods |
# <a name="SkMatrix"></a> Class SkMatrix
<a href="#Matrix">Matrix</a> holds a 3x3 matrix for transforming coordinates. This allows mapping
<a href="#Point">Points</a> and <a href="#Vector">Vectors</a> with translation, scaling, skewing, rotation, and
@ -16,119 +27,112 @@ initializes all <a href="#Matrix">Matrix</a> elements with the corresponding map
<a href="#Matrix">Matrix</a> includes a hidden variable that classifies the type of matrix to
improve performance. <a href="#Matrix">Matrix</a> is not thread safe unless <a href="#SkMatrix_getType">getType</a> is called first.
# <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| topics | description |
| --- | --- |
## <a name="Constructors"></a> Constructors
| name | description |
| --- | --- |
| <a href="#SkMatrix_MakeAll">MakeAll</a> | Constructs all nine values. |
| <a href="#SkMatrix_MakeRectToRect">MakeRectToRect</a> | Constructs from source <a href="SkRect_Reference#Rect">Rect</a> to destination <a href="SkRect_Reference#Rect">Rect</a>. |
| <a href="#SkMatrix_MakeScale">MakeScale</a> | Constructs from scale in x and y. |
| <a href="#SkMatrix_MakeTrans">MakeTrans</a> | Constructs from translate in x and y. |
| --- | --- |
| <a href="#SkMatrix_MakeAll">MakeAll</a> | constructs all nine values |
| <a href="#SkMatrix_MakeRectToRect">MakeRectToRect</a> | constructs from source <a href="SkRect_Reference#Rect">Rect</a> to destination <a href="SkRect_Reference#Rect">Rect</a> |
| <a href="#SkMatrix_MakeScale">MakeScale</a> | constructs from scale in x and y |
| <a href="#SkMatrix_MakeTrans">MakeTrans</a> | constructs from translate in x and y |
## <a name="Operators"></a> Operators
| function | description |
| --- | --- |
| <a href="#SkMatrix_notequal_operator">operator!=(const SkMatrix& a, const SkMatrix& b)</a> | Returns true if members are unequal. |
| <a href="#SkMatrix_equal_operator">operator==(const SkMatrix& a, const SkMatrix& b)</a> | Returns true if members are equal. |
| <a href="#SkMatrix_array1_operator">operator[](int index)</a> | Returns writable reference to <a href="#Matrix">Matrix</a> value. |
| <a href="#SkMatrix_array_operator">operator[](int index) const</a> | Returns <a href="#Matrix">Matrix</a> value. |
| name | description |
| --- | --- |
| <a href="#SkMatrix_notequal_operator">operator!=(const SkMatrix& a, const SkMatrix& b)</a> | returns true if members are unequal |
| <a href="#SkMatrix_equal_operator">operator==(const SkMatrix& a, const SkMatrix& b)</a> | returns true if members are equal |
| <a href="#SkMatrix_array1_operator">operator[](int index)</a> | returns writable reference to <a href="#Matrix">Matrix</a> value |
| <a href="#SkMatrix_array_operator">operator[](int index) const</a> | returns <a href="#Matrix">Matrix</a> value |
## <a name="Member_Functions"></a> Member Functions
| function | description |
| --- | --- |
| <a href="#SkMatrix_Concat">Concat</a> | Returns the concatenation of <a href="#Matrix">Matrix</a> pair. |
| I | Returns a reference to a const identity <a href="#Matrix">Matrix</a>. |
| <a href="#SkMatrix_InvalidMatrix">InvalidMatrix</a> | Returns a reference to a const invalid <a href="#Matrix">Matrix</a>. |
| <a href="#SkMatrix_MakeAll">MakeAll</a> | Constructs all nine values. |
| <a href="#SkMatrix_MakeRectToRect">MakeRectToRect</a> | Constructs from source <a href="SkRect_Reference#Rect">Rect</a> to destination <a href="SkRect_Reference#Rect">Rect</a>. |
| <a href="#SkMatrix_MakeScale">MakeScale</a> | Constructs from scale in x and y. |
| <a href="#SkMatrix_MakeTrans">MakeTrans</a> | Constructs from translate in x and y. |
| <a href="#SkMatrix_SetAffineIdentity">SetAffineIdentity</a> | Sets 3x2 array to identity. |
| <a href="#SkMatrix_asAffine">asAffine</a> | Copies to 3x2 array. |
| <a href="#SkMatrix_cheapEqualTo">cheapEqualTo</a> | Compares <a href="#Matrix">Matrix</a> pair using memcmp(). |
| <a href="#SkMatrix_decomposeScale">decomposeScale</a> | Separates scale if possible. |
| <a href="#SkMatrix_dirtyMatrixTypeCache">dirtyMatrixTypeCache</a> | Sets internal cache to unknown state. |
| <a href="#SkMatrix_dump">dump</a> | Sends text representation using floats to standard output. |
| <a href="#SkMatrix_fixedStepInX">fixedStepInX</a> | Returns step in x for a position in y. |
| <a href="#SkMatrix_get">get</a> | Returns one of nine <a href="#Matrix">Matrix</a> values. |
| <a href="#SkMatrix_get9">get9</a> | Returns all nine <a href="#Matrix">Matrix</a> values. |
| <a href="#SkMatrix_getMaxScale">getMaxScale</a> | Returns maximum scaling, if possible. |
| <a href="#SkMatrix_getMinMaxScales">getMinMaxScales</a> | Returns minimum and maximum scaling, if possible. |
| <a href="#SkMatrix_getMinScale">getMinScale</a> | Returns minimum scaling, if possible. |
| <a href="#SkMatrix_getPerspX">getPerspX</a> | Returns input x perspective factor. |
| <a href="#SkMatrix_getPerspY">getPerspY</a> | Returns input y perspective factor. |
| <a href="#SkMatrix_getScaleX">getScaleX</a> | Returns horizontal scale factor. |
| <a href="#SkMatrix_getScaleY">getScaleY</a> | Returns vertical scale factor. |
| <a href="#SkMatrix_getSkewX">getSkewX</a> | Returns horizontal skew factor. |
| <a href="#SkMatrix_getSkewY">getSkewY</a> | Returns vertical skew factor. |
| <a href="#SkMatrix_getTranslateX">getTranslateX</a> | Returns horizontal translation. |
| <a href="#SkMatrix_getTranslateY">getTranslateY</a> | Returns vertical translation. |
| <a href="#SkMatrix_getType">getType</a> | Returns transform complexity. |
| <a href="#SkMatrix_hasPerspective">hasPerspective</a> | Returns if transform includes perspective. |
| <a href="#SkMatrix_invert">invert</a> | Returns inverse, if possible. |
| <a href="#SkMatrix_isFinite">isFinite</a> | Returns if all <a href="#Matrix">Matrix</a> values are not infinity, NaN. |
| <a href="#SkMatrix_isFixedStepInX">isFixedStepInX</a> | Returns if transformation supports fixed step in x. |
| <a href="#SkMatrix_isIdentity">isIdentity</a> | Returns if matrix equals the identity <a href="#Matrix">Matrix</a> . |
| <a href="#SkMatrix_isScaleTranslate">isScaleTranslate</a> | Returns if transform is limited to scale and translate. |
| <a href="#SkMatrix_isSimilarity">isSimilarity</a> | Returns if transform is limited to square scale and rotation. |
| <a href="#SkMatrix_isTranslate">isTranslate</a> | Returns if transform is limited to translate. |
| <a href="#SkMatrix_mapHomogeneousPoints">mapHomogeneousPoints</a> | Maps <a href="undocumented#Point3">Point3</a> array. |
| <a href="#SkMatrix_mapPoints">mapPoints</a> | Maps <a href="SkPoint_Reference#Point">Point</a> array. |
| <a href="#SkMatrix_mapRadius">mapRadius</a> | Returns mean radius of mapped <a href="undocumented#Circle">Circle</a>. |
| <a href="#SkMatrix_mapRect">mapRect</a> | Returns bounds of mapped <a href="SkRect_Reference#Rect">Rect</a>. |
| <a href="#SkMatrix_mapRectScaleTranslate">mapRectScaleTranslate</a> | Returns bounds of mapped <a href="SkRect_Reference#Rect">Rect</a>. |
| <a href="#SkMatrix_mapRectToQuad">mapRectToQuad</a> | Maps <a href="SkRect_Reference#Rect">Rect</a> to <a href="SkPoint_Reference#Point">Point</a> array. |
| <a href="#SkMatrix_mapVector">mapVector</a> | Maps <a href="SkPoint_Reference#Vector">Vector</a>. |
| <a href="#SkMatrix_mapVectors">mapVectors</a> | Maps <a href="SkPoint_Reference#Vector">Vector</a> array. |
| <a href="#SkMatrix_mapXY">mapXY</a> | Maps <a href="SkPoint_Reference#Point">Point</a>. |
| <a href="#SkMatrix_postConcat">postConcat</a> | Post-multiplies <a href="#Matrix">Matrix</a> by <a href="#Matrix">Matrix</a> parameter. |
| <a href="#SkMatrix_postIDiv">postIDiv</a> | Post-multiplies <a href="#Matrix">Matrix</a> by inverse scale. |
| <a href="#SkMatrix_postRotate">postRotate</a> | Post-multiplies <a href="#Matrix">Matrix</a> by rotation. |
| <a href="#SkMatrix_postScale">postScale</a> | Post-multiplies <a href="#Matrix">Matrix</a> by scale. |
| <a href="#SkMatrix_postSkew">postSkew</a> | Post-multiplies <a href="#Matrix">Matrix</a> by skew. |
| <a href="#SkMatrix_postTranslate">postTranslate</a> | Post-multiplies <a href="#Matrix">Matrix</a> by translation. |
| <a href="#SkMatrix_preConcat">preConcat</a> | Pre-multiplies <a href="#Matrix">Matrix</a> by <a href="#Matrix">Matrix</a> parameter. |
| <a href="#SkMatrix_preRotate">preRotate</a> | Pre-multiplies <a href="#Matrix">Matrix</a> by rotation. |
| <a href="#SkMatrix_preScale">preScale</a> | Pre-multiplies <a href="#Matrix">Matrix</a> by scale. |
| <a href="#SkMatrix_preSkew">preSkew</a> | Pre-multiplies <a href="#Matrix">Matrix</a> by skew. |
| <a href="#SkMatrix_preTranslate">preTranslate</a> | Pre-multiplies <a href="#Matrix">Matrix</a> by translation. |
| <a href="#SkMatrix_preservesAxisAlignment">preservesAxisAlignment</a> | Returns if mapping restricts to 90 degree multiples and mirroring. |
| <a href="#SkMatrix_preservesRightAngles">preservesRightAngles</a> | Returns if mapped 90 angle remains 90 degrees. |
| <a href="#SkMatrix_rectStaysRect">rectStaysRect</a> | Returns if mapped <a href="SkRect_Reference#Rect">Rect</a> can be represented by another <a href="SkRect_Reference#Rect">Rect</a>. |
| <a href="#SkMatrix_reset">reset</a> | Sets <a href="#Matrix">Matrix</a> to identity. |
| <a href="#SkMatrix_set">set</a> | Sets one value. |
| <a href="#SkMatrix_set9">set9</a> | Sets all values from <a href="#Scalar">Scalar</a> array. |
| <a href="#SkMatrix_setAffine">setAffine</a> | Sets left two columns. |
| <a href="#SkMatrix_setAll">setAll</a> | Sets all values from parameters. |
| <a href="#SkMatrix_setConcat">setConcat</a> | Sets to <a href="#Matrix">Matrix</a> parameter multiplied by <a href="#Matrix">Matrix</a> parameter. |
| <a href="#SkMatrix_setIdentity">setIdentity</a> | Sets <a href="#Matrix">Matrix</a> to identity. |
| <a href="#SkMatrix_setPerspX">setPerspX</a> | Sets input x perspective factor. |
| <a href="#SkMatrix_setPerspY">setPerspY</a> | Sets input y perspective factor. |
| <a href="#SkMatrix_setPolyToPoly">setPolyToPoly</a> | Sets to map one to four points to an equal array of points. |
| <a href="#SkMatrix_setRSXform">setRSXform</a> | Sets to rotate, scale, and translate. |
| <a href="#SkMatrix_setRectToRect">setRectToRect</a> | Sets to map one <a href="SkRect_Reference#Rect">Rect</a> to another. |
| <a href="#SkMatrix_setRotate">setRotate</a> | Sets to rotate about a point. |
| <a href="#SkMatrix_setScale">setScale</a> | Sets to scale about a point. |
| <a href="#SkMatrix_setScaleTranslate">setScaleTranslate</a> | Sets to scale and translate. |
| <a href="#SkMatrix_setScaleX">setScaleX</a> | Sets horizontal scale factor. |
| <a href="#SkMatrix_setScaleY">setScaleY</a> | Sets vertical scale factor |
| <a href="#SkMatrix_setSinCos">setSinCos</a> | Sets to rotate and scale about a point. |
| <a href="#SkMatrix_setSkew">setSkew</a> | Sets to skew about a point. |
| <a href="#SkMatrix_setSkewX">setSkewX</a> | Sets horizontal skew factor. |
| <a href="#SkMatrix_setSkewY">setSkewY</a> | Sets vertical skew factor. |
| <a href="#SkMatrix_setTranslate">setTranslate</a> | Sets to translate in x and y. |
| <a href="#SkMatrix_setTranslateX">setTranslateX</a> | Sets horizontal translation. |
| <a href="#SkMatrix_setTranslateY">setTranslateY</a> | Sets vertical translation. |
| <a href="#SkMatrix_toString">toString</a> | Converts <a href="#Matrix">Matrix</a> to machine readable form. |
| name | description |
| --- | --- |
| <a href="#SkMatrix_Concat">Concat</a> | returns the concatenation of <a href="#Matrix">Matrix</a> pair |
| I | returns a reference to a const identity <a href="#Matrix">Matrix</a> |
| <a href="#SkMatrix_InvalidMatrix">InvalidMatrix</a> | returns a reference to a const invalid <a href="#Matrix">Matrix</a> |
| <a href="#SkMatrix_MakeAll">MakeAll</a> | constructs all nine values |
| <a href="#SkMatrix_MakeRectToRect">MakeRectToRect</a> | constructs from source <a href="SkRect_Reference#Rect">Rect</a> to destination <a href="SkRect_Reference#Rect">Rect</a> |
| <a href="#SkMatrix_MakeScale">MakeScale</a> | constructs from scale in x and y |
| <a href="#SkMatrix_MakeTrans">MakeTrans</a> | constructs from translate in x and y |
| <a href="#SkMatrix_SetAffineIdentity">SetAffineIdentity</a> | sets 3x2 array to identity |
| <a href="#SkMatrix_asAffine">asAffine</a> | copies to 3x2 array |
| <a href="#SkMatrix_cheapEqualTo">cheapEqualTo</a> | compares <a href="#Matrix">Matrix</a> pair using memcmp() |
| <a href="#SkMatrix_decomposeScale">decomposeScale</a> | separates scale if possible |
| <a href="#SkMatrix_dirtyMatrixTypeCache">dirtyMatrixTypeCache</a> | sets internal cache to unknown state |
| <a href="#SkMatrix_dump">dump</a> | sends text representation using floats to standard output |
| <a href="#SkMatrix_fixedStepInX">fixedStepInX</a> | returns step in x for a position in y |
| <a href="#SkMatrix_get">get</a> | returns one of nine <a href="#Matrix">Matrix</a> values |
| <a href="#SkMatrix_get9">get9</a> | returns all nine <a href="#Matrix">Matrix</a> values |
| <a href="#SkMatrix_getMaxScale">getMaxScale</a> | returns maximum scaling, if possible |
| <a href="#SkMatrix_getMinMaxScales">getMinMaxScales</a> | returns minimum and maximum scaling, if possible |
| <a href="#SkMatrix_getMinScale">getMinScale</a> | returns minimum scaling, if possible |
| <a href="#SkMatrix_getPerspX">getPerspX</a> | returns input x perspective factor |
| <a href="#SkMatrix_getPerspY">getPerspY</a> | returns input y perspective factor |
| <a href="#SkMatrix_getScaleX">getScaleX</a> | returns horizontal scale factor |
| <a href="#SkMatrix_getScaleY">getScaleY</a> | returns vertical scale factor |
| <a href="#SkMatrix_getSkewX">getSkewX</a> | returns horizontal skew factor |
| <a href="#SkMatrix_getSkewY">getSkewY</a> | returns vertical skew factor |
| <a href="#SkMatrix_getTranslateX">getTranslateX</a> | returns horizontal translation |
| <a href="#SkMatrix_getTranslateY">getTranslateY</a> | returns vertical translation |
| <a href="#SkMatrix_getType">getType</a> | returns transform complexity |
| <a href="#SkMatrix_hasPerspective">hasPerspective</a> | returns if transform includes perspective |
| <a href="#SkMatrix_invert">invert</a> | returns inverse, if possible |
| <a href="#SkMatrix_isFinite">isFinite</a> | returns if all <a href="#Matrix">Matrix</a> values are not infinity, NaN |
| <a href="#SkMatrix_isFixedStepInX">isFixedStepInX</a> | returns if transformation supports fixed step in x |
| <a href="#SkMatrix_isIdentity">isIdentity</a> | returns if matrix equals the identity <a href="#Matrix">Matrix</a> |
| <a href="#SkMatrix_isScaleTranslate">isScaleTranslate</a> | returns if transform is limited to scale and translate |
| <a href="#SkMatrix_isSimilarity">isSimilarity</a> | returns if transform is limited to square scale and rotation |
| <a href="#SkMatrix_isTranslate">isTranslate</a> | returns if transform is limited to translate |
| <a href="#SkMatrix_mapHomogeneousPoints">mapHomogeneousPoints</a> | maps <a href="undocumented#Point3">Point3</a> array |
| <a href="#SkMatrix_mapPoints">mapPoints</a> | maps <a href="SkPoint_Reference#Point">Point</a> array |
| <a href="#SkMatrix_mapRadius">mapRadius</a> | returns mean radius of mapped <a href="undocumented#Circle">Circle</a> |
| <a href="#SkMatrix_mapRect">mapRect</a> | returns bounds of mapped <a href="SkRect_Reference#Rect">Rect</a> |
| <a href="#SkMatrix_mapRectScaleTranslate">mapRectScaleTranslate</a> | returns bounds of mapped <a href="SkRect_Reference#Rect">Rect</a> |
| <a href="#SkMatrix_mapRectToQuad">mapRectToQuad</a> | maps <a href="SkRect_Reference#Rect">Rect</a> to <a href="SkPoint_Reference#Point">Point</a> array |
| <a href="#SkMatrix_mapVector">mapVector</a> | maps <a href="SkPoint_Reference#Vector">Vector</a> |
| <a href="#SkMatrix_mapVectors">mapVectors</a> | maps <a href="SkPoint_Reference#Vector">Vector</a> array |
| <a href="#SkMatrix_mapXY">mapXY</a> | maps <a href="SkPoint_Reference#Point">Point</a> |
| <a href="#SkMatrix_postConcat">postConcat</a> | post-multiplies <a href="#Matrix">Matrix</a> by <a href="#Matrix">Matrix</a> parameter |
| <a href="#SkMatrix_postIDiv">postIDiv</a> | post-multiplies <a href="#Matrix">Matrix</a> by inverse scale |
| <a href="#SkMatrix_postRotate">postRotate</a> | post-multiplies <a href="#Matrix">Matrix</a> by rotation |
| <a href="#SkMatrix_postScale">postScale</a> | post-multiplies <a href="#Matrix">Matrix</a> by scale |
| <a href="#SkMatrix_postSkew">postSkew</a> | post-multiplies <a href="#Matrix">Matrix</a> by skew |
| <a href="#SkMatrix_postTranslate">postTranslate</a> | post-multiplies <a href="#Matrix">Matrix</a> by translation |
| <a href="#SkMatrix_preConcat">preConcat</a> | pre-multiplies <a href="#Matrix">Matrix</a> by <a href="#Matrix">Matrix</a> parameter |
| <a href="#SkMatrix_preRotate">preRotate</a> | pre-multiplies <a href="#Matrix">Matrix</a> by rotation |
| <a href="#SkMatrix_preScale">preScale</a> | pre-multiplies <a href="#Matrix">Matrix</a> by scale |
| <a href="#SkMatrix_preSkew">preSkew</a> | pre-multiplies <a href="#Matrix">Matrix</a> by skew |
| <a href="#SkMatrix_preTranslate">preTranslate</a> | pre-multiplies <a href="#Matrix">Matrix</a> by translation |
| <a href="#SkMatrix_preservesAxisAlignment">preservesAxisAlignment</a> | returns if mapping restricts to 90 degree multiples and mirroring |
| <a href="#SkMatrix_preservesRightAngles">preservesRightAngles</a> | returns if mapped 90 angle remains 90 degrees |
| <a href="#SkMatrix_rectStaysRect">rectStaysRect</a> | returns if mapped <a href="SkRect_Reference#Rect">Rect</a> can be represented by another <a href="SkRect_Reference#Rect">Rect</a> |
| <a href="#SkMatrix_reset">reset</a> | sets <a href="#Matrix">Matrix</a> to identity |
| <a href="#SkMatrix_set">set</a> | sets one value |
| <a href="#SkMatrix_set9">set9</a> | sets all values from <a href="#Scalar">Scalar</a> array |
| <a href="#SkMatrix_setAffine">setAffine</a> | sets left two columns |
| <a href="#SkMatrix_setAll">setAll</a> | sets all values from parameters |
| <a href="#SkMatrix_setConcat">setConcat</a> | sets to <a href="#Matrix">Matrix</a> parameter multiplied by <a href="#Matrix">Matrix</a> parameter |
| <a href="#SkMatrix_setIdentity">setIdentity</a> | sets <a href="#Matrix">Matrix</a> to identity |
| <a href="#SkMatrix_setPerspX">setPerspX</a> | sets input x perspective factor |
| <a href="#SkMatrix_setPerspY">setPerspY</a> | sets input y perspective factor |
| <a href="#SkMatrix_setPolyToPoly">setPolyToPoly</a> | sets to map one to four points to an equal array of points |
| <a href="#SkMatrix_setRSXform">setRSXform</a> | sets to rotate, scale, and translate |
| <a href="#SkMatrix_setRectToRect">setRectToRect</a> | sets to map one <a href="SkRect_Reference#Rect">Rect</a> to another |
| <a href="#SkMatrix_setRotate">setRotate</a> | sets to rotate about a point |
| <a href="#SkMatrix_setScale">setScale</a> | sets to scale about a point |
| <a href="#SkMatrix_setScaleTranslate">setScaleTranslate</a> | sets to scale and translate |
| <a href="#SkMatrix_setScaleX">setScaleX</a> | sets horizontal scale factor |
| <a href="#SkMatrix_setScaleY">setScaleY</a> | sets vertical scale factor |
| <a href="#SkMatrix_setSinCos">setSinCos</a> | sets to rotate and scale about a point |
| <a href="#SkMatrix_setSkew">setSkew</a> | sets to skew about a point |
| <a href="#SkMatrix_setSkewX">setSkewX</a> | sets horizontal skew factor |
| <a href="#SkMatrix_setSkewY">setSkewY</a> | sets vertical skew factor |
| <a href="#SkMatrix_setTranslate">setTranslate</a> | sets to translate in x and y |
| <a href="#SkMatrix_setTranslateX">setTranslateX</a> | sets horizontal translation |
| <a href="#SkMatrix_setTranslateY">setTranslateY</a> | sets vertical translation |
| <a href="#SkMatrix_toString">toString</a> | converts <a href="#Matrix">Matrix</a> to machine readable form |
<a name="SkMatrix_MakeScale"></a>
## MakeScale

View File

@ -3,6 +3,19 @@ SkPaint Reference
# <a name="Paint"></a> Paint
## <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| <a href="#Classes_and_Structs">Classes and Structs</a> | embedded struct and class members |
| <a href="#Constants">Constants</a> | enum and enum class, const values |
| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkPaint_Reference#SkPaint">SkPaint</a> |
| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="#Operators">Operators</a> | operator overloading methods |
| <a href="#Related_Functions">Related Functions</a> | similar methods grouped together |
# <a name="SkPaint"></a> Class SkPaint
<a href="#Paint">Paint</a> controls options applied when drawing and measuring. <a href="#Paint">Paint</a> collects all
options outside of the <a href="#Clip">Canvas Clip</a> and <a href="#Matrix">Canvas Matrix</a>.
@ -30,53 +43,46 @@ is set in <a href="#Paint">Paint</a>.
Multiple colors are drawn either by using multiple paints or with objects like
<a href="undocumented#Shader">Shader</a> attached to <a href="#Paint">Paint</a>.
# <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| <a href="#Overview_Classes_and_Structs">Classes and Structs</a> | embedded struct and class members |
| <a href="#Overview_Constants">Constants</a> | enum and enum class, const values |
| <a href="#Overview_Constructors">Constructors</a> | list of functions that construct <a href="SkPath_Reference#SkPath">SkPath</a> |
| <a href="#Overview_Member_Functions">Member Functions</a> | list of static functions and member methods |
| <a href="#Overview_Operators">Operators</a> | operator overloading methods |
| <a href="#Overview_Related_Functions">Related Functions</a> | similar methods grouped together |
## <a name="Related_Functions"></a> Related Functions
| name | description |
| --- | --- |
| --- | --- |
| <a href="#Alpha_Methods">Alpha Methods</a> | get and set <a href="#Alpha">Alpha</a> |
| Anti-alias | approximating coverage with transparency |
| <a href="#Automatic_Hinting">Automatic Hinting</a> | always adjust glyph paths |
| <a href="#Blend_Mode_Methods">Blend Mode Methods</a> | get and set <a href="undocumented#Blend_Mode">Blend Mode</a> |
| <a href="#Color_Filter_Methods">Color Filter Methods</a> | get and set <a href="undocumented#Color_Filter">Color Filter</a> |
| <a href="#Color_Methods">Color Methods</a> | get and set <a href="undocumented#Color">Color</a> |
| Destructor | paint termination |
| <a href="#Device_Text">Device Text</a> | increase precision of glyph position |
| <a href="#Dither">Dither</a> | distributing color error |
| <a href="#Draw_Looper_Methods">Draw Looper Methods</a> | get and set <a href="undocumented#Draw_Looper">Draw Looper</a> |
| <a href="#Fake_Bold">Fake Bold</a> | approximate font styles |
| <a href="#Fast_Bounds">Fast Bounds</a> | approximate area required by <a href="#Paint">Paint</a> |
| Fill | fill and stroke |
| <a href="#Fill_Path">Fill Path</a> | make <a href="SkPath_Reference#Path">Path</a> from <a href="undocumented#Path_Effect">Path Effect</a>, stroking |
| <a href="#Filter_Quality_Methods">Filter Quality Methods</a> | get and set <a href="undocumented#Filter_Quality">Filter Quality</a> |
| <a href="#SkPaint_Flags">Flags</a> | attributes represented by single bits |
| <a href="SkPaint_Reference#Font_Embedded_Bitmaps">Font Embedded Bitmaps</a> | custom sized bitmap <a href="#Glyph">Glyphs</a> |
| <a href="#Font_Metrics">Font Metrics</a> | common glyph dimensions |
| <a href="SkPaint_Reference#Full_Hinting_Spacing">Full Hinting Spacing</a> | glyph spacing affected by hinting |
| <a href="#Hairline">Hairline</a> | lines and curves with minimal width |
| <a href="#SkPaint_Hinting">Hinting</a> | glyph outline adjustment |
| <a href="#Image_Filter_Methods">Image Filter Methods</a> | get and set <a href="undocumented#Image_Filter">Image Filter</a> |
| <a href="#Initializers">Initializers</a> | constructors and initialization |
| <a href="SkPaint_Reference#LCD_Text">LCD Text</a> | text relying on the order of <a href="#RGB">Color RGB</a> stripes |
| <a href="SkPaint_Reference#Linear_Text">Linear Text</a> | selects text rendering as <a href="undocumented#Glyph">Glyph</a> or <a href="SkPath_Reference#Path">Path</a> |
| <a href="#Management">Management</a> | paint copying, moving, comparing |
| <a href="#Mask_Filter_Methods">Mask Filter Methods</a> | get and set <a href="undocumented#Mask_Filter">Mask Filter</a> |
| <a href="#Measure_Text">Measure Text</a> | width, height, bounds of text |
| <a href="#Miter_Limit">Miter Limit</a> | maximum length of stroked corners |
| <a href="#Path_Effect_Methods">Path Effect Methods</a> | get and set <a href="undocumented#Path_Effect">Path Effect</a> |
| <a href="#Shader_Methods">Shader Methods</a> | get and set <a href="undocumented#Shader">Shader</a> |
| Stroke | lines and curves with width |
| <a href="#Stroke_Cap">Stroke Cap</a> | decorations at ends of open strokes |
| <a href="#Stroke_Join">Stroke Join</a> | decoration at corners of strokes |
| <a href="#Stroke_Width">Stroke Width</a> | thickness perpendicular to geometry |
| <a href="#SkPaint_Style">Style</a> | geometry filling, stroking |
| <a href="SkPaint_Reference#Subpixel_Text">Subpixel Text</a> | uses pixel transparency to represent fractional offset |
| <a href="#Text_Align">Text Align</a> | text placement relative to position |
| <a href="#Text_Encoding">Text Encoding</a> | text encoded as characters or <a href="#Glyph">Glyphs</a> |
| <a href="#Text_Intercepts">Text Intercepts</a> | advanced underline, strike through |
@ -90,35 +96,37 @@ Multiple colors are drawn either by using multiple paints or with objects like
## <a name="Constants"></a> Constants
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkPaint_Align">Align</a> | glyph locations relative to text position |
| <a href="#SkPaint_Cap">Cap</a> | start and end geometry on stroked shapes |
| <a href="#SkPaint_Flags">Flags</a> | values described by bits and masks |
| <a href="#SkPaint_FontMetrics_FontMetricsFlags">FontMetrics::FontMetricsFlags</a> | valid <a href="#Font_Metrics">Font Metrics</a> |
| <a href="#SkPaint_Hinting">Hinting</a> | level of glyph outline adjustment |
| <a href="#SkPaint_Join">Join</a> | corner geometry on stroked shapes |
| <a href="#SkPaint_ReserveFlags">ReserveFlags</a> | values described by bits and masks |
| <a href="#SkPaint_Style">Style</a> | stroke, fill, or both |
| <a href="#SkPaint_TextEncoding">TextEncoding</a> | character or glyph encoded size |
| _anonymous | number of <a href="#SkPaint_Style">Style</a> defines |
| _anonymous_2 | number of <a href="#Text_Align">Text Align</a> values |
## <a name="Classes_and_Structs"></a> Classes and Structs
| name | description |
| --- | --- |
| <a href="#SkPaint_FontMetrics">FontMetrics</a> | typeface values |
| --- | --- |
| <a href="#SkPaint_FontMetrics">FontMetrics</a> | values computed by <a href="undocumented#Font_Manager">Font Manager</a> using <a href="undocumented#Typeface">Typeface</a> |
## <a name="Constructors"></a> Constructors
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkPaint_empty_constructor">SkPaint()</a> | constructs with default values |
| <a href="#SkPaint_move_SkPaint">SkPaint(SkPaint&& paint)</a> | moves paint without copying it |
| <a href="#SkPaint_copy_const_SkPaint">SkPaint(const SkPaint& paint)</a> | makes a shallow copy |
| | decreases <a href="undocumented#Reference_Count">Reference Count</a> of owned objects |
| <a href="#SkPaint_destructor">~SkPaint()</a> | decreases <a href="undocumented#Reference_Count">Reference Count</a> of owned objects |
## <a name="Operators"></a> Operators
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkPaint_notequal_operator">operator!=(const SkPaint& a, const SkPaint& b)</a> | compares paints for inequality |
| <a href="#SkPaint_move_operator">operator=(SkPaint&& paint)</a> | moves paint without copying it |
| <a href="#SkPaint_copy_operator">operator=(const SkPaint& paint)</a> | makes a shallow copy |
@ -127,7 +135,7 @@ Multiple colors are drawn either by using multiple paints or with objects like
## <a name="Member_Functions"></a> Member Functions
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkPaint_breakText">breakText</a> | returns text that fits in a width |
| <a href="#SkPaint_canComputeFastBounds">canComputeFastBounds</a> | returns true if settings allow for fast bounds computation |
| <a href="#SkPaint_computeFastBounds">computeFastBounds</a> | returns fill bounds for quick reject tests |
@ -150,6 +158,7 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_getHash">getHash</a> | returns a shallow hash for equality checks |
| <a href="#SkPaint_getHinting">getHinting</a> | returns <a href="#SkPaint_Hinting">Hinting</a>, glyph outline adjustment level |
| <a href="#SkPaint_getImageFilter">getImageFilter</a> | returns <a href="undocumented#Image_Filter">Image Filter</a>, alter pixels; blur |
| <a href="#SkPaint_getLooper">getLooper</a> | deprecated |
| <a href="#SkPaint_getMaskFilter">getMaskFilter</a> | returns <a href="undocumented#Mask_Filter">Mask Filter</a>, alterations to <a href="undocumented#Mask_Alpha">Mask Alpha</a> |
| <a href="#SkPaint_getPathEffect">getPathEffect</a> | returns <a href="undocumented#Path_Effect">Path Effect</a>, modifications to path geometry; dashing |
| <a href="#SkPaint_getPosTextHIntercepts">getPosTextHIntercepts</a> | returns where lines intersect horizontally positioned text; underlines |
@ -179,6 +188,7 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_isEmbeddedBitmapText">isEmbeddedBitmapText</a> | returns true if <a href="SkPaint_Reference#Font_Embedded_Bitmaps">Font Embedded Bitmaps</a> is set |
| <a href="#SkPaint_isFakeBoldText">isFakeBoldText</a> | returns true if <a href="#Fake_Bold">Fake Bold</a> is set |
| <a href="#SkPaint_isLCDRenderText">isLCDRenderText</a> | returns true if <a href="SkPaint_Reference#LCD_Text">LCD Text</a> is set |
| <a href="#SkPaint_isLinearText">isLinearText</a> | returns true if text is converted to <a href="SkPath_Reference#Path">Path</a> |
| <a href="#SkPaint_isSrcOver">isSrcOver</a> | returns true if <a href="undocumented#Blend_Mode">Blend Mode</a> is <a href="#SkBlendMode_kSrcOver">SkBlendMode::kSrcOver</a> |
| <a href="#SkPaint_isSubpixelText">isSubpixelText</a> | returns true if <a href="SkPaint_Reference#Subpixel_Text">Subpixel Text</a> is set |
| <a href="#SkPaint_isVerticalText">isVerticalText</a> | returns true if <a href="#Vertical_Text">Vertical Text</a> is set |
@ -209,6 +219,8 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_setHinting">setHinting</a> | sets <a href="#SkPaint_Hinting">Hinting</a>, glyph outline adjustment level |
| <a href="#SkPaint_setImageFilter">setImageFilter</a> | sets <a href="undocumented#Image_Filter">Image Filter</a>, alter pixels; blur |
| <a href="#SkPaint_setLCDRenderText">setLCDRenderText</a> | sets or clears <a href="SkPaint_Reference#LCD_Text">LCD Text</a> |
| <a href="#SkPaint_setLinearText">setLinearText</a> | converts to <a href="SkPath_Reference#Path">Path</a> before draw or measure |
| <a href="#SkPaint_setLooper">setLooper</a> | deprecated |
| <a href="#SkPaint_setMaskFilter">setMaskFilter</a> | sets <a href="undocumented#Mask_Filter">Mask Filter</a>, alterations to <a href="undocumented#Mask_Alpha">Mask Alpha</a> |
| <a href="#SkPaint_setPathEffect">setPathEffect</a> | sets <a href="undocumented#Path_Effect">Path Effect</a>, modifications to path geometry; dashing |
| <a href="#SkPaint_setShader">setShader</a> | sets <a href="undocumented#Shader">Shader</a>, multiple drawing colors; gradients |
@ -229,7 +241,7 @@ Multiple colors are drawn either by using multiple paints or with objects like
| <a href="#SkPaint_toString">toString</a> | converts <a href="#Paint">Paint</a> to machine readable form |
| <a href="#SkPaint_unflatten">unflatten</a> | populates from a serialized stream |
# <a name="Initializers"></a> Initializers
## <a name="Initializers"></a> Initializers
<a name="SkPaint_empty_constructor"></a>
## SkPaint
@ -392,8 +404,6 @@ paint1 == paint2
---
# <a name="Destructor"></a> Destructor
<a name="SkPaint_destructor"></a>
## ~SkPaint
@ -407,7 +417,7 @@ objects containing <a href="undocumented#Reference_Count">Reference Count</a> go
---
# <a name="Management"></a> Management
## <a name="Management"></a> Management
<a name="SkPaint_copy_operator"></a>
## operator=
@ -651,7 +661,7 @@ false if the <a href="#SkPaint_unflatten_buffer">buffer</a> contains invalid dat
---
# <a name="Hinting"></a> Hinting
## <a name="Hinting"></a> Hinting
## <a name="SkPaint_Hinting"></a> Enum SkPaint::Hinting
@ -774,7 +784,7 @@ paint1 == paint2
---
# <a name="Flags"></a> Flags
## <a name="Flags"></a> Flags
## <a name="SkPaint_Flags"></a> Enum SkPaint::Flags
@ -930,7 +940,8 @@ paint.isDither()
---
# <a name="Anti-alias"></a> Anti-alias
## <a name="Anti-alias"></a> Anti-alias
Anti-alias drawing approximates partial pixel coverage with transparency.
If <a href="#SkPaint_kAntiAlias_Flag">kAntiAlias Flag</a> is clear, pixel centers contained by the shape edge are drawn opaque.
If <a href="#SkPaint_kAntiAlias_Flag">kAntiAlias Flag</a> is set, pixels are drawn with <a href="#Alpha">Color Alpha</a> equal to their coverage.
@ -1022,7 +1033,8 @@ paint1 == paint2
---
# <a name="Dither"></a> Dither
## <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="SkImageInfo_Reference#SkColorType">kRGB 565 SkColorType</a>
@ -1121,7 +1133,8 @@ paint1 == paint2
Gradient <a href="#RGB">Color RGB</a>-565
# <a name="Device_Text"></a> Device Text
## <a name="Device_Text"></a> Device Text
<a href="SkPaint_Reference#LCD_Text">LCD Text</a> and <a href="SkPaint_Reference#Subpixel_Text">Subpixel Text</a> increase the precision of glyph position.
When set, <a href="#SkPaint_Flags">Flags</a> <a href="#SkPaint_kLCDRenderText_Flag">kLCDRenderText Flag</a> takes advantage of the organization of <a href="#RGB">Color RGB</a> stripes that
@ -1346,7 +1359,8 @@ paint1 == paint2
---
# <a name="Font_Embedded_Bitmaps"></a> Font Embedded Bitmaps
## <a name="Font_Embedded_Bitmaps"></a> Font Embedded Bitmaps
<a href="SkPaint_Reference#Font_Embedded_Bitmaps">Font Embedded Bitmaps</a> allows selecting custom sized bitmap <a href="#Glyph">Glyphs</a>.
<a href="#SkPaint_Flags">Flags</a> <a href="#SkPaint_kEmbeddedBitmapText_Flag">kEmbeddedBitmapText Flag</a> when set chooses an embedded bitmap glyph over an outline contained
in a font if the platform supports this option.
@ -1448,7 +1462,8 @@ paint1 == paint2
---
# <a name="Automatic_Hinting"></a> Automatic Hinting
## <a name="Automatic_Hinting"></a> Automatic Hinting
If <a href="#SkPaint_Hinting">Hinting</a> is set to <a href="#SkPaint_kNormal_Hinting">kNormal Hinting</a> or <a href="#SkPaint_kFull_Hinting">kFull Hinting</a>, <a href="#Automatic_Hinting">Automatic Hinting</a>
instructs the <a href="undocumented#Font_Manager">Font Manager</a> to always hint <a href="#Glyph">Glyphs</a>.
<a href="#Automatic_Hinting">Automatic Hinting</a> has no effect if <a href="#SkPaint_Hinting">Hinting</a> is set to <a href="#SkPaint_kNo_Hinting">kNo Hinting</a> or
@ -1526,7 +1541,8 @@ setting for <a href="#SkPaint_kAutoHinting_Flag">kAutoHinting Flag</a></td>
---
# <a name="Vertical_Text"></a> Vertical Text
## <a name="Vertical_Text"></a> Vertical Text
<a href="undocumented#Text">Text</a> may be drawn by positioning each glyph, or by positioning the first glyph and
using <a href="#Advance">Font Advance</a> to position subsequent <a href="#Glyph">Glyphs</a>. By default, each successive glyph
is positioned to the right of the preceding glyph. <a href="#Vertical_Text">Vertical Text</a> sets successive
@ -1615,7 +1631,8 @@ paint1 == paint2
---
# <a name="Fake_Bold"></a> Fake Bold
## <a name="Fake_Bold"></a> Fake Bold
<a href="#Fake_Bold">Fake Bold</a> approximates the bold font style accompanying a normal font when a bold font face
is not available. Skia does not provide font substitution; it is up to the client to find the
bold font face using the platform <a href="undocumented#Font_Manager">Font Manager</a>.
@ -1697,7 +1714,8 @@ paint1 == paint2
---
# <a name="Full_Hinting_Spacing"></a> Full Hinting Spacing
## <a name="Full_Hinting_Spacing"></a> Full Hinting Spacing
if <a href="#SkPaint_Hinting">Hinting</a> is set to <a href="#SkPaint_kFull_Hinting">kFull Hinting</a>, <a href="SkPaint_Reference#Full_Hinting_Spacing">Full Hinting Spacing</a> adjusts the character
spacing by the difference of the hinted and Unhinted <a href="undocumented#Left_Side_Bearing">Left Side Bearing</a> and
<a href="undocumented#Right_Side_Bearing">Right Side Bearing</a>. <a href="SkPaint_Reference#Full_Hinting_Spacing">Full Hinting Spacing</a> only applies to platforms that use
@ -1760,7 +1778,8 @@ paint1 == paint2
---
# <a name="Filter_Quality_Methods"></a> Filter Quality Methods
## <a name="Filter_Quality_Methods"></a> Filter Quality Methods
<a href="undocumented#Filter_Quality">Filter Quality</a> trades speed for image filtering when the image is scaled.
A lower <a href="undocumented#Filter_Quality">Filter Quality</a> draws faster, but has less fidelity.
A higher <a href="undocumented#Filter_Quality">Filter Quality</a> draws slower, but looks better.
@ -1850,7 +1869,7 @@ kHigh_SkFilterQuality == paint.getFilterQuality()
---
# <a name="Color_Methods"></a> Color Methods
## <a name="Color_Methods"></a> Color Methods
| name | description |
| --- | --- |
@ -2051,7 +2070,8 @@ transRed1 == transRed2
---
# <a name="Style"></a> Style
## <a name="Style"></a> Style
<a href="#Style">Style</a> specifies if the geometry is filled, stroked, or both filled and stroked.
Some shapes ignore <a href="#Style">Style</a> and are always drawn filled or stroked.
@ -2211,7 +2231,8 @@ one of: <a href="#SkPaint_kFill_Style">kFill Style</a>, <a href="#SkPaint_kStrok
<a href="#Fill_Type">Path Fill Type</a> <a href="undocumented#Path_Effect">Path Effect</a> <a href="#Style_Fill">Style Fill</a> <a href="#Style_Stroke">Style Stroke</a>
# <a name="Stroke_Width"></a> Stroke Width
## <a name="Stroke_Width"></a> Stroke Width
<a href="#Stroke_Width">Stroke Width</a> sets the width for stroking. The width is the thickness
of the stroke perpendicular to the path direction when the paint style is
set to <a href="#SkPaint_kStroke_Style">kStroke Style</a> or <a href="#SkPaint_kStrokeAndFill_Style">kStrokeAndFill Style</a>.
@ -2290,7 +2311,8 @@ zero thickness for <a href="#Hairline">Hairline</a>; greater than zero for pen t
---
# <a name="Miter_Limit"></a> Miter Limit
## <a name="Miter_Limit"></a> Miter Limit
<a href="#Miter_Limit">Miter Limit</a> specifies the maximum miter length,
relative to the stroke width.
@ -2395,7 +2417,7 @@ default miter limit == 8
---
# <a name="Stroke_Cap"></a> Stroke Cap
## <a name="Stroke_Cap"></a> Stroke Cap
## <a name="SkPaint_Cap"></a> Enum SkPaint::Cap
@ -2528,7 +2550,8 @@ kRound_Cap == paint.getStrokeCap()
---
# <a name="Stroke_Join"></a> Stroke Join
## <a name="Stroke_Join"></a> Stroke Join
<a href="#Stroke_Join">Stroke Join</a> draws at the sharp corners of an open or closed <a href="#Contour">Path Contour</a>.
Stroke describes the area covered by a pen of <a href="#Stroke_Width">Stroke Width</a> as it
@ -2674,7 +2697,8 @@ kMiter_Join == paint.getStrokeJoin()
<a href="#Miter_Limit">Miter Limit</a>
# <a name="Fill_Path"></a> Fill Path
## <a name="Fill_Path"></a> Fill Path
<a href="#Fill_Path">Fill Path</a> creates a <a href="SkPath_Reference#Path">Path</a> by applying the <a href="undocumented#Path_Effect">Path Effect</a>, followed by the <a href="#Style_Stroke">Style Stroke</a>.
If <a href="#Paint">Paint</a> contains <a href="undocumented#Path_Effect">Path Effect</a>, <a href="undocumented#Path_Effect">Path Effect</a> operates on the source <a href="SkPath_Reference#Path">Path</a>; the result
@ -2762,7 +2786,8 @@ true if the path represents <a href="#Style_Fill">Style Fill</a>, or false if it
<a href="#Style_Stroke">Style Stroke</a> <a href="#Stroke_Width">Stroke Width</a> <a href="undocumented#Path_Effect">Path Effect</a>
# <a name="Shader_Methods"></a> Shader Methods
## <a name="Shader_Methods"></a> Shader Methods
<a href="undocumented#Shader">Shader</a> defines the colors used when drawing a shape.
<a href="undocumented#Shader">Shader</a> may be an image, a gradient, or a computed fill.
If <a href="#Paint">Paint</a> has no <a href="undocumented#Shader">Shader</a>, then <a href="undocumented#Color">Color</a> fills the shape.
@ -2868,7 +2893,8 @@ how geometry is filled with color; if nullptr, <a href="undocumented#Color">Colo
---
# <a name="Color_Filter_Methods"></a> Color Filter Methods
## <a name="Color_Filter_Methods"></a> Color Filter Methods
<a href="undocumented#Color_Filter">Color Filter</a> alters the color used when drawing a shape.
<a href="undocumented#Color_Filter">Color Filter</a> may apply <a href="undocumented#Blend_Mode">Blend Mode</a>, transform the color through a matrix, or composite multiple filters.
If <a href="#Paint">Paint</a> has no <a href="undocumented#Color_Filter">Color Filter</a>, the color is unaltered.
@ -2962,7 +2988,8 @@ Increments filter <a href="undocumented#Reference_Count">Reference Count</a> by
---
# <a name="Blend_Mode_Methods"></a> Blend Mode Methods
## <a name="Blend_Mode_Methods"></a> Blend Mode Methods
<a href="undocumented#Blend_Mode">Blend Mode</a> describes how <a href="undocumented#Color">Color</a> combines with the destination color.
The default setting, <a href="#SkBlendMode_kSrcOver">SkBlendMode::kSrcOver</a>, draws the source color
over the destination color.
@ -3064,7 +3091,8 @@ isSrcOver != true
---
# <a name="Path_Effect_Methods"></a> Path Effect Methods
## <a name="Path_Effect_Methods"></a> Path Effect Methods
<a href="undocumented#Path_Effect">Path Effect</a> modifies the path geometry before drawing it.
<a href="undocumented#Path_Effect">Path Effect</a> may implement dashing, custom fill effects and custom stroke effects.
If <a href="#Paint">Paint</a> has no <a href="undocumented#Path_Effect">Path Effect</a>, the path geometry is unaltered when filled or stroked.
@ -3160,7 +3188,8 @@ replace <a href="SkPath_Reference#Path">Path</a> with a modification when drawn<
---
# <a name="Mask_Filter_Methods"></a> Mask Filter Methods
## <a name="Mask_Filter_Methods"></a> Mask Filter Methods
<a href="undocumented#Mask_Filter">Mask Filter</a> uses coverage of the shape drawn to create <a href="undocumented#Mask_Alpha">Mask Alpha</a>.
<a href="undocumented#Mask_Filter">Mask Filter</a> takes a <a href="undocumented#Mask">Mask</a>, and returns a <a href="undocumented#Mask">Mask</a>.
@ -3257,7 +3286,8 @@ modifies clipping mask generated from drawn geometry</td>
---
# <a name="Typeface_Methods"></a> Typeface Methods
## <a name="Typeface_Methods"></a> Typeface Methods
<a href="undocumented#Typeface">Typeface</a> identifies the font used when drawing and measuring text.
<a href="undocumented#Typeface">Typeface</a> may be specified by name, from a file, or from a data stream.
The default <a href="undocumented#Typeface">Typeface</a> defers to the platform-specific default font
@ -3348,7 +3378,8 @@ font and style used to draw text</td>
---
# <a name="Image_Filter_Methods"></a> Image Filter Methods
## <a name="Image_Filter_Methods"></a> Image Filter Methods
<a href="undocumented#Image_Filter">Image Filter</a> operates on the pixel representation of the shape, as modified by <a href="#Paint">Paint</a>
with <a href="undocumented#Blend_Mode">Blend Mode</a> set to <a href="#SkBlendMode_kSrcOver">SkBlendMode::kSrcOver</a>. <a href="undocumented#Image_Filter">Image Filter</a> creates a new bitmap,
which is drawn to the device using the set <a href="undocumented#Blend_Mode">Blend Mode</a>.
@ -3446,7 +3477,8 @@ how <a href="SkImage_Reference#Image">Image</a> is sampled when transformed</td>
---
# <a name="Draw_Looper_Methods"></a> Draw Looper Methods
## <a name="Draw_Looper_Methods"></a> Draw Looper Methods
<a href="undocumented#Draw_Looper">Draw Looper</a> sets a modifier that communicates state from one <a href="undocumented#Draw_Layer">Draw Layer</a>
to another to construct the draw.
@ -3580,7 +3612,7 @@ sets <a href="undocumented#Draw_Looper">Draw Looper</a> to <a href="#SkPaint_set
</table>
# <a name="Text_Align"></a> Text Align
## <a name="Text_Align"></a> Text Align
## <a name="SkPaint_Align"></a> Enum SkPaint::Align
@ -3701,7 +3733,8 @@ alignment out of range has no effect.</div></fiddle-embed></div>
---
# <a name="Text_Size"></a> Text Size
## <a name="Text_Size"></a> Text Size
<a href="#Text_Size">Text Size</a> adjusts the overall text size in points.
<a href="#Text_Size">Text Size</a> can be set to any positive value or zero.
<a href="#Text_Size">Text Size</a> defaults to 12.
@ -3753,7 +3786,8 @@ typographic height of text</td>
---
# <a name="Text_Scale_X"></a> Text Scale X
## <a name="Text_Scale_X"></a> Text Scale X
<a href="#Text_Scale_X">Text Scale X</a> adjusts the text horizontal scale.
<a href="undocumented#Text">Text</a> scaling approximates condensed and expanded type faces when the actual face
is not available.
@ -3807,7 +3841,8 @@ text horizontal scale</td>
---
# <a name="Text_Skew_X"></a> Text Skew X
## <a name="Text_Skew_X"></a> Text Skew X
<a href="#Text_Skew_X">Text Skew X</a> adjusts the text horizontal slant.
<a href="undocumented#Text">Text</a> skewing approximates italic and oblique type faces when the actual face
is not available.
@ -3861,7 +3896,7 @@ additional shear in x-axis relative to y-axis</td>
---
# <a name="Text_Encoding"></a> Text Encoding
## <a name="Text_Encoding"></a> Text Encoding
## <a name="SkPaint_TextEncoding"></a> Enum SkPaint::TextEncoding
@ -3981,7 +4016,8 @@ one of: <a href="#SkPaint_kUTF8_TextEncoding">kUTF8 TextEncoding</a>, <a href="#
---
# <a name="Font_Metrics"></a> Font Metrics
## <a name="Font_Metrics"></a> Font Metrics
<a href="#Font_Metrics">Font Metrics</a> describe dimensions common to the <a href="#Glyph">Glyphs</a> in <a href="undocumented#Typeface">Typeface</a>.
The dimensions are computed by <a href="undocumented#Font_Manager">Font Manager</a> from font data and do not take
<a href="#Paint">Paint</a> settings other than <a href="#Text_Size">Text Size</a> into account.
@ -4543,7 +4579,7 @@ storage for character codes, one per glyph</td>
---
# <a name="Measure_Text"></a> Measure Text
## <a name="Measure_Text"></a> Measure Text
<a name="SkPaint_measureText"></a>
## measureText
@ -4709,7 +4745,8 @@ The underlines show the <a href="#SkPaint_getTextWidths_text">text</a> advance,
---
# <a name="Text_Path"></a> Text Path
## <a name="Text_Path"></a> Text Path
<a href="#Text_Path">Text Path</a> describes the geometry of <a href="#Glyph">Glyphs</a> used to draw text.
<a name="SkPaint_getTextPath"></a>
@ -4780,7 +4817,8 @@ geometry of the <a href="#Glyph">Glyphs</a></td>
---
# <a name="Text_Intercepts"></a> Text Intercepts
## <a name="Text_Intercepts"></a> Text Intercepts
<a href="#Text_Intercepts">Text Intercepts</a> describe the intersection of drawn text <a href="#Glyph">Glyphs</a> with a pair
of lines parallel to the text advance. <a href="#Text_Intercepts">Text Intercepts</a> permits creating a
underline that skips Descenders.
@ -4992,7 +5030,8 @@ alpha 0 nothing to draw: true
---
# <a name="Fast_Bounds"></a> Fast Bounds
## <a name="Fast_Bounds"></a> Fast Bounds
<a href="#Fast_Bounds">Fast Bounds</a> methods conservatively outset a drawing bounds by additional area
<a href="#Paint">Paint</a> may draw to.

View File

@ -2,6 +2,19 @@ SkPath Reference
===
# <a name="Path"></a> Path
## <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| <a href="#Classes_and_Structs">Classes and Structs</a> | embedded struct and class members |
| <a href="#Constants">Constants</a> | enum and enum class, const values |
| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkPath_Reference#SkPath">SkPath</a> |
| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="#Operators">Operators</a> | operator overloading methods |
| <a href="#Related_Functions">Related Functions</a> | similar methods grouped together |
<a href="#Path">Path</a> contains <a href="#Line">Lines</a> and <a href="#Curve">Curves</a> which can be stroked or filled. <a href="#Contour">Contour</a> is
composed of a series of connected <a href="#Line">Lines</a> and <a href="#Curve">Curves</a>. <a href="#Path">Path</a> may contain zero,
one, or more <a href="#Contour">Contours</a>.
@ -90,41 +103,28 @@ overlapping contours.
Internally, <a href="#Path">Path</a> lazily computes metrics likes bounds and convexity. Call
<a href="#SkPath_updateBoundsCache">SkPath::updateBoundsCache</a> to make <a href="#Path">Path</a> thread safe.
# <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| <a href="#Overview_Classes_and_Structs">Classes and Structs</a> | embedded struct and class members |
| <a href="#Overview_Constants">Constants</a> | enum and enum class, const values |
| <a href="#Overview_Constructors">Constructors</a> | functions that construct <a href="#SkPath">SkPath</a> |
| <a href="#Overview_Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="#Overview_Operators">Operators</a> | operator overloading methods |
| <a href="#Overview_Related_Functions">Related Functions</a> | similar methods grouped together |
## <a name="Related_Functions"></a> Related Functions
| name | description |
| --- | --- |
| --- | --- |
| <a href="#Arc">Arc</a> | part of <a href="undocumented#Oval">Oval</a> or <a href="undocumented#Circle">Circle</a> |
| <a href="#Conic">Conic</a> | conic section defined by three points and a weight |
| <a href="#Conic_Weight">Conic Weight</a> | strength of control <a href="SkPoint_Reference#Point">Point</a> in <a href="#Conic">Conic</a> |
| <a href="#Contour">Contour</a> | loop of lines and curves |
| <a href="#SkPath_Convexity">Convexity</a> | if <a href="#Path">Path</a> is concave or convex |
| <a href="#Cubic">Cubic Bezier</a> | third order curve defined by four points |
| <a href="#Cubic">Cubic</a> | Bezier_Curve described by third-order polynomial |
| <a href="#SkPath_Direction">Direction</a> | <a href="#Path">Path</a> contour orientation |
| <a href="#Fill_Type">Fill Type</a> | <a href="#Path">Path</a> fill rule, normal and inverted |
| <a href="#Generation_ID">Generation ID</a> | value reflecting contents change |
| <a href="#Last_Point">Last Point</a> | final <a href="SkPoint_Reference#Point">Point</a> in <a href="#Contour">Contour</a> |
| <a href="#Point_Array">Point Array</a> | end points and control points for lines and curves |
| <a href="#Quad">Quadratic Bezier</a> | parabolic section defined by three points |
| <a href="#Quad">Quad</a> | Bezier_Curve described by second-order polynomial |
| <a href="#SkPath_Verb">Verb</a> | line and curve type |
| <a href="#Verb_Array">Verb Array</a> | line and curve type for points |
| <a href="#Verb">Verbs</a> | <a href="#Path">Path</a> line and curve type |
| <a href="SkPath_Reference#Zero_Length">Zero Length Contour</a> | consideration when contour has no length |
| Weight | strength of <a href="#Conic">Conic</a> control <a href="SkPoint_Reference#Point">Point</a> |
## <a name="Constants"></a> Constants
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkPath_AddPathMode">AddPathMode</a> | sets <a href="#SkPath_addPath">addPath</a> options |
| <a href="#SkPath_ArcSize">ArcSize</a> | used by <a href="#SkPath_arcTo">arcTo</a> variation |
| <a href="#SkPath_Convexity">Convexity</a> | returns if <a href="#Path">Path</a> is convex or concave |
@ -136,22 +136,22 @@ Internally, <a href="#Path">Path</a> lazily computes metrics likes bounds and co
## <a name="Classes_and_Structs"></a> Classes and Structs
| name | description |
| --- | --- |
| <a href="#SkPath_Iter">Iter</a> | iterates through lines and curves, skipping degenerates |
| <a href="#SkPath_RawIter">RawIter</a> | iterates through lines and curves, including degenerates |
| --- | --- |
| <a href="#SkPath_Iter">Iter</a> | <a href="#Path">Path</a> data iterator |
| <a href="#SkPath_RawIter">RawIter</a> | <a href="#Path">Path</a> raw data iterator |
## <a name="Constructors"></a> Constructors
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkPath_empty_constructor">SkPath()</a> | constructs with default values |
| <a href="#SkPath_copy_const_SkPath">SkPath(const SkPath& path)</a> | makes a shallow copy |
| | decreases <a href="undocumented#Reference_Count">Reference Count</a> of owned objects |
| <a href="#SkPath_destructor">~SkPath()</a> | decreases <a href="undocumented#Reference_Count">Reference Count</a> of owned objects |
## <a name="Operators"></a> Operators
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkPath_notequal_operator">operator!=(const SkPath& a, const SkPath& b)</a> | compares paths for inequality |
| <a href="#SkPath_copy_operator">operator=(const SkPath& path)</a> | makes a shallow copy |
| <a href="#SkPath_equal_operator">operator==(const SkPath& a, const SkPath& b)</a> | compares paths for equality |
@ -159,7 +159,7 @@ Internally, <a href="#Path">Path</a> lazily computes metrics likes bounds and co
## <a name="Member_Functions"></a> Member Functions
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkPath_ConvertConicToQuads">ConvertConicToQuads</a> | approximates <a href="#Conic">Conic</a> with <a href="#Quad">Quad</a> array |
| <a href="#SkPath_ConvertToNonInverseFillType">ConvertToNonInverseFillType</a> | returns <a href="#Fill_Type">Fill Type</a> representing inside geometry |
| <a href="#SkPath_IsCubicDegenerate">IsCubicDegenerate</a> | returns if <a href="#Cubic">Cubic</a> is very small |
@ -2633,7 +2633,8 @@ offset from <a href="#Last_Point">Last Point</a> x to <a href="#Cubic">Cubic</a>
---
# <a name="Arc"></a> Arc
## <a name="Arc"></a> Arc
<a href="#Arc">Arc</a> can be constructed in a number of ways. <a href="#Arc">Arc</a> may be described by part of <a href="undocumented#Oval">Oval</a> and angles,
by start point and end point, and by radius and tangent lines. Each construction has advantages,
and some constructions correspond to <a href="#Arc">Arc</a> drawing in graphics standards.

View File

@ -3,6 +3,16 @@ SkPixmap Reference
# <a name="Pixmap"></a> Pixmap
## <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkPixmap_Reference#SkPixmap">SkPixmap</a> |
| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="#Related_Functions">Related Functions</a> | similar methods grouped together |
# <a name="SkPixmap"></a> Class SkPixmap
<a href="#Pixmap">Pixmap</a> provides a utility to pair <a href="SkImageInfo_Reference#SkImageInfo">SkImageInfo</a> with pixels and row bytes.
<a href="#Pixmap">Pixmap</a> is a low level class which provides convenience functions to access
@ -15,20 +25,10 @@ pixels referenced by <a href="#Pixmap">Pixmap</a>.
<a href="#Pixmap">Pixmap</a> does not try to manage the lifetime of the pixel memory. Use <a href="undocumented#Pixel_Ref">Pixel Ref</a>
to manage pixel memory; <a href="undocumented#Pixel_Ref">Pixel Ref</a> is safe across threads.
# <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| <a href="#Overview_Constructors">Constructors</a> | list of functions that construct <a href="SkPath_Reference#SkPath">SkPath</a> |
| <a href="#Overview_Member_Functions">Member Functions</a> | list of static functions and member methods |
| <a href="#Overview_Related_Functions">Related Functions</a> | similar methods grouped together |
## <a name="Related_Functions"></a> Related Functions
| name | description |
| --- | --- |
| --- | --- |
| <a href="#Image_Info_Access">Image Info Access</a> | returns all or part of <a href="SkImageInfo_Reference#Image_Info">Image Info</a> |
| <a href="#Initialization">Initialization</a> | sets fields for use |
| <a href="#Readable_Address">Readable Address</a> | returns read only pixels |
@ -38,15 +38,15 @@ to manage pixel memory; <a href="undocumented#Pixel_Ref">Pixel Ref</a> is safe a
## <a name="Constructors"></a> Constructors
| | description |
| --- | --- |
| name | description |
| --- | --- |
| <a href="#SkPixmap_empty_constructor">SkPixmap()</a> | constructs with default values |
| <a href="#SkPixmap_const_SkImageInfo_const_star">SkPixmap(const SkImageInfo& info, const void* addr, size t rowBytes)</a> | constructs from <a href="SkImageInfo_Reference#Image_Info">Image Info</a>, pixels |
## <a name="Member_Functions"></a> Member Functions
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkPixmap_addr">addr</a> | returns readable pixel address as void pointer |
| <a href="#SkPixmap_addr16">addr16</a> | returns readable pixel address as 16-bit pointer |
| <a href="#SkPixmap_addr32">addr32</a> | returns readable pixel address as 32-bit pointer |

View File

@ -3,64 +3,75 @@ SkPoint Reference
# <a name="Point"></a> Point
# <a name="SkPoint"></a> Struct SkPoint
# <a name="Overview"></a> Overview
## <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| topics | description |
| --- | --- |
| name | description |
| --- | --- |
| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkPoint_Reference#SkPoint">SkPoint</a> |
| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="#Members">Members</a> | member values |
| <a href="#Operators">Operators</a> | operator overloading methods |
# <a name="SkPoint"></a> Struct SkPoint
## <a name="Constructors"></a> Constructors
| name | description |
| --- | --- |
| <a href="#SkPoint_Make">Make</a> | Constructs from <a href="undocumented#SkScalar">SkScalar</a> inputs. |
| --- | --- |
| <a href="#SkPoint_Make">Make</a> | constructs from <a href="undocumented#SkScalar">SkScalar</a> inputs |
## <a name="Operators"></a> Operators
| 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 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 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. |
| void <a href="#SkPoint_addto_operator">operator+=(const SkVector& v)</a> | Adds <a href="SkPoint_Reference#Vector">Vector</a> to <a href="#Point">Point</a>. |
| void <a href="#SkPoint_subtractfrom_operator">operator-=(const SkVector& v)</a> | Subtracts <a href="SkPoint_Reference#Vector">Vector</a> from <a href="#Point">Point</a>. |
| --- | --- |
| <a href="#SkPoint_notequal_operator">operator!=(const SkPoint& a, const SkPoint& b)</a> | returns true if <a href="#Point">Point</a> are unequal |
| <a href="#SkPoint_multiply_operator">operator*(SkScalar scale) const</a> | returns <a href="#Point">Point</a> multiplied by scale |
| <a href="#SkPoint_multiplyby_operator">operator*=(SkScalar scale)</a> | multiplies <a href="#Point">Point</a> by scale factor |
| <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_addto_operator">operator+=(const SkVector& v)</a> | adds <a href="SkPoint_Reference#Vector">Vector</a> to <a href="#Point">Point</a> |
| <a href="#SkPoint_minus_operator">operator-() const</a> | reverses sign of <a href="#Point">Point</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> |
| <a href="#SkPoint_subtractfrom_operator">operator-=(const SkVector& v)</a> | subtracts <a href="SkPoint_Reference#Vector">Vector</a> from <a href="#Point">Point</a> |
| <a href="#SkPoint_equal_operator">operator==(const SkPoint& a, const SkPoint& b)</a> | returns true if <a href="#Point">Point</a> are equal |
## <a name="Member_Functions"></a> Member Functions
| name | description |
| --- | --- |
| <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 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 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 cross product. |
| <a href="#SkPoint_distanceToOrigin">distanceToOrigin</a> | Returns straight-line distance to origin. |
| <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 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 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 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 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 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 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 cross product |
| <a href="#SkPoint_distanceToOrigin">distanceToOrigin</a> | returns straight-line distance to origin |
| <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 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 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 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="Members"></a> Members
| name | description |
| --- | --- |
| <a href="#SkPoint_fX">fX</a> | x-axis value |
| <a href="#SkPoint_fY">fY</a> | y-axis value |
<a name="SkPoint_fX"> <code><strong>SkScalar fX</strong></code> </a>

View File

@ -3,12 +3,12 @@ SkRect Reference
# <a name="Rect"></a> Rect
# <a name="Overview"></a> Overview
## <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| --- | --- |
| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkRect_Reference#SkRect">SkRect</a> |
| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
| <a href="#Members">Members</a> | member values |
@ -28,7 +28,7 @@ integer input cannot convert to <a href="undocumented#SkScalar">SkScalar</a> wit
## <a name="Related_Functions"></a> Related Functions
| name | description |
| --- | --- |
| --- | --- |
| <a href="#As_Points">As Points</a> | conversion to and from <a href="#Point">Points</a> |
| <a href="#From_Integers">From Integers</a> | set <a href="#Scalar">Scalar</a> values from integer input |
| <a href="#Inset_Outset_Offset">Inset Outset Offset</a> | moves sides |
@ -41,8 +41,8 @@ integer input cannot convert to <a href="undocumented#SkScalar">SkScalar</a> wit
## <a name="Member_Functions"></a> Member Functions
| description | function |
| --- | --- |
| name | description |
| --- | --- |
| <a href="#SkRect_Intersects">Intersects</a> | returns true if areas overlap |
| <a href="#SkRect_Make">Make</a> | constructs from <a href="undocumented#ISize">ISize</a> returning (0, 0, width, height) |
| <a href="#SkRect_MakeEmpty">MakeEmpty</a> | constructs from bounds of (0, 0, 0, 0) |
@ -100,6 +100,13 @@ integer input cannot convert to <a href="undocumented#SkScalar">SkScalar</a> wit
## <a name="Members"></a> Members
| name | description |
| --- | --- |
| <a href="#SkRect_fBottom">fBottom</a> | larger y-axis bounds |
| <a href="#SkRect_fLeft">fLeft</a> | smaller x-axis bounds |
| <a href="#SkRect_fRight">fRight</a> | larger x-axis bounds |
| <a href="#SkRect_fTop">fTop</a> | smaller y-axis bounds |
<a name="SkRect_fLeft"> <code><strong>SkScalar fLeft</strong></code> </a>
May contain any value, including infinities and NaN. The smaller of the

View File

@ -3,6 +3,16 @@ SkSurface Reference
# <a name="Surface"></a> Surface
## <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| name | description |
| --- | --- |
| Constants | enum and enum class, const values |
| <a href="#Constructors">Constructors</a> | functions that construct <a href="SkSurface_Reference#SkSurface">SkSurface</a> |
| <a href="#Member_Functions">Member Functions</a> | static functions and member methods |
# <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).
@ -11,19 +21,10 @@ surface-><a href="#SkSurface_getCanvas">getCanvas</a> to use that canvas (but do
<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.
# <a name="Overview"></a> Overview
## <a name="Subtopics"></a> Subtopics
| topics | description |
| --- | --- |
| <a href="#Overview_Constructors">Constructors</a> | functions that construct <a href="SkIPoint16_Reference#SkIPoint16">SkIPoint16</a> |
| <a href="#Overview_Member_Functions">Member Functions</a> | static functions and member methods |
## <a name="Constructors"></a> Constructors
| name | description |
| --- | --- |
| --- | --- |
| <a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a> | creates <a href="#Surface">Surface</a> from GPU memory buffer |
| <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 |
@ -33,13 +34,13 @@ of the requested dimensions are zero, then nullptr will be returned.
| <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="SkImageInfo_Reference#Image_Info">Image Info</a>, <a href="#Properties">Surface Properties</a> |
| <a href="#SkSurface_makeImageSnapshot">makeImageSnapshot</a> | creates <a href="SkImage_Reference#Image">Image</a> capturing <a href="#Surface">Surface</a> contents |
| <a href="#SkSurface_makeSurface">makeSurface</a> | creates a compatible <a href="#Surface">Surface</a> |
## <a name="Member_Functions"></a> Member Functions
| description | function |
| --- | --- |
| name | description |
| --- | --- |
| <a href="#SkSurface_MakeFromBackendRenderTarget">MakeFromBackendRenderTarget</a> | creates <a href="#Surface">Surface</a> from GPU memory buffer |
| <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 |
@ -309,7 +310,7 @@ Allocates raster <a href="#Surface">Surface</a>. <a href="SkCanvas_Reference#Can
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="SkImageInfo_Reference#Image_Info">Image Info</a> to width, height, <a href="SkImageInfo_Reference#Native_Color_Type">Native Color Type</a>, and
Internally, sets <a href="SkImageInfo_Reference#Image_Info">Image Info</a> to width, height, <a href="SkImageInfo_Reference#Color_Type">Native Color Type</a>, and
<a href="SkImageInfo_Reference#SkAlphaType">kPremul SkAlphaType</a>.
<a href="#Surface">Surface</a> is returned if width and height are greater than zero.

View File

@ -34,6 +34,8 @@ DEFINE_bool2(skip, z, false, "Skip degenerate missed in legacy preprocessor.");
find include/core -type f -name '*.h' -print -exec git blame {} \; > ~/all.blame.txt
todos:
add new markup to associate typedef SaveLayerFlags with Enum so that, for
documentation purposes, this enum is named rather than anonymous
check column 1 of subtopic tables to see that they start lowercase and don't have a trailing period
space table better for Constants
should Return be on same line as 'Return Value'?
@ -197,7 +199,8 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
this->setAsParent(definition);
}
{
const string& fullTopic = hasEnd ? fParent->fFiddle : definition->fFiddle;
SkASSERT(hasEnd ? fParent : definition);
string fullTopic = hasEnd ? fParent->fFiddle : definition->fFiddle;
Definition* defPtr = fTopicMap[fullTopic];
if (hasEnd) {
if (!definition) {
@ -343,7 +346,6 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
case MarkType::kAnchor:
case MarkType::kDefine:
case MarkType::kDuration:
case MarkType::kError:
case MarkType::kFile:
case MarkType::kHeight:
case MarkType::kImage:
@ -352,6 +354,7 @@ bool BmhParser::addDefinition(const char* defStart, bool hasEnd, MarkType markTy
case MarkType::kLiteral:
case MarkType::kOutdent:
case MarkType::kPlatform:
case MarkType::kPopulate:
case MarkType::kSeeAlso:
case MarkType::kSet:
case MarkType::kSubstitute:
@ -873,13 +876,21 @@ bool HackParser::hackFiles() {
SkASSERT(!root->fParent);
fStart = root->fStart;
fChar = fStart;
fClassesAndStructs = nullptr;
fConstants = nullptr;
fConstructors = nullptr;
fOperators = nullptr;
fMemberFunctions = nullptr;
fMembers = nullptr;
fOperators = nullptr;
fRelatedFunctions = nullptr;
this->topicIter(root);
fprintf(fOut, "%.*s\n", (int) (root->fTerminator - fChar), fChar);
fprintf(fOut, "%.*s", (int) (fEnd - fChar), fChar);
fclose(fOut);
SkDebugf("wrote %s\n", filename.c_str());
if (this->writtenFileDiffers(filename, root->fFileName)) {
SkDebugf("wrote %s\n", filename.c_str());
} else {
remove(filename.c_str());
}
return true;
}
@ -896,7 +907,8 @@ string HackParser::searchTable(const Definition* tableHolder, const Definition*
const Definition* col0 = row->fChildren[0];
size_t len = col0->fContentEnd - col0->fContentStart;
string method = string(col0->fContentStart, len);
if (len - 2 == method.find("()") && islower(method[0])) {
if (len - 2 == method.find("()") && islower(method[0])
&& Definition::MethodType::kOperator != match->fMethodType) {
method = method.substr(0, len - 2);
}
if (string::npos == match->fName.find(method)) {
@ -922,85 +934,148 @@ string HackParser::searchTable(const Definition* tableHolder, const Definition*
// returns true if topic has method
void HackParser::topicIter(const Definition* topic) {
if (string::npos != topic->fName.find("Member_Functions")) {
SkASSERT(!fMemberFunctions);
fMemberFunctions = topic;
if (string::npos != topic->fName.find(MdOut::kClassesAndStructs)) {
SkASSERT(!fClassesAndStructs);
fClassesAndStructs = topic;
}
if (string::npos != topic->fName.find("Constructors")) {
if (string::npos != topic->fName.find(MdOut::kConstants)) {
SkASSERT(!fConstants);
fConstants = topic;
}
if (string::npos != topic->fName.find(MdOut::kConstructors)) {
SkASSERT(!fConstructors);
fConstructors = topic;
}
if (string::npos != topic->fName.find("Operators")) {
if (string::npos != topic->fName.find(MdOut::kMemberFunctions)) {
SkASSERT(!fMemberFunctions);
fMemberFunctions = topic;
}
if (string::npos != topic->fName.find(MdOut::kMembers)) {
SkASSERT(!fMembers);
fMembers = topic;
}
if (string::npos != topic->fName.find(MdOut::kOperators)) {
SkASSERT(!fOperators);
fOperators = topic;
}
if (string::npos != topic->fName.find(MdOut::kRelatedFunctions)) {
SkASSERT(!fRelatedFunctions);
fRelatedFunctions = topic;
}
for (auto child : topic->fChildren) {
if (MarkType::kMethod == child->fMarkType) {
bool hasIn = MarkType::kTopic != topic->fMarkType &&
MarkType::kSubtopic != topic->fMarkType; // don't write #In if parent is class
bool hasLine = child->fClone;
for (auto part : child->fChildren) {
hasIn |= MarkType::kIn == part->fMarkType;
hasLine |= MarkType::kLine == part->fMarkType;
}
string oneLiner;
if (!hasLine) {
// find member_functions, add entry 2nd column text to #Line
for (auto tableHolder : { fMemberFunctions, fConstructors, fOperators }) {
if (!tableHolder) {
continue;
}
if (Definition::MethodType::kConstructor == child->fMethodType
&& fConstructors != tableHolder) {
continue;
}
if (Definition::MethodType::kOperator == child->fMethodType
&& fOperators != tableHolder) {
continue;
}
string temp = this->searchTable(tableHolder, child);
if ("" != temp) {
SkASSERT("" == oneLiner || temp == oneLiner);
oneLiner = temp;
}
}
if ("" == oneLiner) {
#ifdef SK_DEBUG
const Definition* rootParent = topic;
while (rootParent->fParent && MarkType::kClass != rootParent->fMarkType
&& MarkType::kStruct != rootParent->fMarkType) {
rootParent = rootParent->fParent;
}
#endif
SkASSERT(rootParent);
SkASSERT(MarkType::kClass == rootParent->fMarkType
|| MarkType::kStruct == rootParent->fMarkType);
hasLine = true;
}
}
if (hasIn && hasLine) {
continue;
}
const char* start = fChar;
const char* end = child->fContentStart;
fprintf(fOut, "%.*s", (int) (end - start), start);
fChar = end;
// write to method markup header end
if (!hasIn) {
fprintf(fOut, "\n#In %s", topic->fName.c_str());
}
if (!hasLine) {
fprintf(fOut, "\n#Line # %s ##", oneLiner.c_str());
}
string oneLiner;
bool hasIn = false;
bool hasLine = false;
for (auto part : child->fChildren) {
hasIn |= MarkType::kIn == part->fMarkType;
hasLine |= MarkType::kLine == part->fMarkType;
}
if (MarkType::kTopic == child->fMarkType || MarkType::kSubtopic == child->fMarkType ||
MarkType::kStruct == child->fMarkType || MarkType::kClass == child->fMarkType) {
this->topicIter(child);
switch (child->fMarkType) {
case MarkType::kMethod: {
if (Definition::MethodType::kOperator == child->fMethodType) {
SkDebugf("");
}
hasIn |= MarkType::kTopic != topic->fMarkType &&
MarkType::kSubtopic != topic->fMarkType; // don't write #In if parent is class
hasLine |= child->fClone;
if (!hasLine) {
// find member_functions, add entry 2nd column text to #Line
for (auto tableHolder : { fMemberFunctions, fConstructors, fOperators }) {
if (!tableHolder) {
continue;
}
if (Definition::MethodType::kConstructor == child->fMethodType
&& fConstructors != tableHolder) {
continue;
}
if (Definition::MethodType::kOperator == child->fMethodType
&& fOperators != tableHolder) {
continue;
}
string temp = this->searchTable(tableHolder, child);
if ("" != temp) {
SkASSERT("" == oneLiner || temp == oneLiner);
oneLiner = temp;
}
}
if ("" == oneLiner) {
const Definition* csParent = child->csParent();
if (!csParent || !csParent->csParent()) {
SkDebugf("");
}
#ifdef SK_DEBUG
const Definition* rootParent = topic;
while (rootParent->fParent && MarkType::kClass != rootParent->fMarkType
&& MarkType::kStruct != rootParent->fMarkType) {
rootParent = rootParent->fParent;
}
#endif
SkASSERT(rootParent);
SkASSERT(MarkType::kClass == rootParent->fMarkType
|| MarkType::kStruct == rootParent->fMarkType);
hasLine = true;
}
}
if (hasIn && hasLine) {
continue;
}
const char* start = fChar;
const char* end = child->fContentStart;
fprintf(fOut, "%.*s", (int) (end - start), start);
fChar = end;
// write to method markup header end
if (!hasIn) {
fprintf(fOut, "\n#In %s", topic->fName.c_str());
}
if (!hasLine) {
fprintf(fOut, "\n#Line # %s ##", oneLiner.c_str());
}
} break;
case MarkType::kTopic:
case MarkType::kSubtopic:
this->addOneLiner(fRelatedFunctions, child, hasLine, true);
this->topicIter(child);
break;
case MarkType::kStruct:
case MarkType::kClass:
this->addOneLiner(fClassesAndStructs, child, hasLine, false);
this->topicIter(child);
break;
case MarkType::kEnum:
case MarkType::kEnumClass:
this->addOneLiner(fConstants, child, hasLine, true);
break;
case MarkType::kMember:
this->addOneLiner(fMembers, child, hasLine, false);
break;
default:
;
}
}
}
void HackParser::addOneLiner(const Definition* defTable, const Definition* child, bool hasLine,
bool lfAfter) {
if (hasLine) {
return;
}
string oneLiner = this->searchTable(defTable, child);
if ("" == oneLiner) {
return;
}
const char* start = fChar;
const char* end = child->fContentStart;
fprintf(fOut, "%.*s", (int) (end - start), start);
fChar = end;
if (!lfAfter) {
fprintf(fOut, "\n");
}
fprintf(fOut, "#Line # %s ##", oneLiner.c_str());
if (lfAfter) {
fprintf(fOut, "\n");
}
}
bool BmhParser::hasEndToken() const {
const char* last = fLine + this->lineLength();
@ -1424,7 +1499,6 @@ vector<string> BmhParser::typeName(MarkType markType, bool* checkEnd) {
case MarkType::kDefine:
case MarkType::kDefinedBy:
case MarkType::kDuration:
case MarkType::kError:
case MarkType::kFile:
case MarkType::kHeight:
case MarkType::kImage:
@ -1432,6 +1506,7 @@ vector<string> BmhParser::typeName(MarkType markType, bool* checkEnd) {
case MarkType::kLiteral:
case MarkType::kOutdent:
case MarkType::kPlatform:
case MarkType::kPopulate:
case MarkType::kReturn:
case MarkType::kSeeAlso:
case MarkType::kSet:

View File

@ -99,7 +99,6 @@ enum class MarkType {
kDuration,
kEnum,
kEnumClass,
kError,
kExample,
kExperimental,
kExternal,
@ -121,6 +120,7 @@ enum class MarkType {
kOutdent,
kParam,
kPlatform,
kPopulate,
kPrivate,
kReturn,
kRoot,
@ -826,6 +826,18 @@ public:
bool crossCheck2(const Definition& includeToken) const;
bool crossCheck(const Definition& includeToken) const;
bool crossCheckInside(const char* start, const char* end, const Definition& includeToken) const;
const Definition* csParent() const {
Definition* test = fParent;
while (test) {
if (MarkType::kStruct == test->fMarkType || MarkType::kClass == test->fMarkType) {
return test;
}
test = test->fParent;
}
return nullptr;
}
bool exampleToScript(string* result, ExampleOptions ) const;
string extractText(TrimExtract trimExtract) const;
string fiddleName() const;
@ -834,7 +846,6 @@ public:
bool hasMatch(const string& name) const;
const Definition* hasParam(const string& ref) const;
bool isClone() const { return fClone; }
bool isStructOrClass() const;
Definition* iRootParent() {
Definition* test = fParent;
@ -848,6 +859,7 @@ public:
}
virtual bool isRoot() const { return false; }
bool isStructOrClass() const;
int length() const {
return (int) (fContentEnd - fContentStart);
@ -1224,7 +1236,6 @@ public:
, { "Duration", nullptr, MarkType::kDuration, R_N, E_N, M(Example) | M(NoExample) }
, { "Enum", &fEnumMap, MarkType::kEnum, R_Y, E_O, M_CSST | M(Root) }
, { "EnumClass", &fClassMap, MarkType::kEnumClass, R_Y, E_O, M_CSST | M(Root) }
, { "Error", nullptr, MarkType::kError, R_N, E_N, M(Example) | M(NoExample) }
, { "Example", nullptr, MarkType::kExample, R_O, E_N, M_CSST | M_E | M(Method) }
, { "Experimental", nullptr, MarkType::kExperimental, R_Y, E_N, 0 }
, { "External", nullptr, MarkType::kExternal, R_Y, E_N, M(Root) }
@ -1249,6 +1260,7 @@ public:
, { "Outdent", nullptr, MarkType::kOutdent, R_N, E_N, M(Code) }
, { "Param", nullptr, MarkType::kParam, R_Y, E_N, M(Method) }
, { "Platform", nullptr, MarkType::kPlatform, R_N, E_N, M(Example) | M(NoExample) }
, { "Populate", nullptr, MarkType::kPopulate, R_N, E_N, M(Subtopic) }
, { "Private", nullptr, MarkType::kPrivate, R_N, E_N, 0 }
, { "Return", nullptr, MarkType::kReturn, R_Y, E_N, M(Method) }
, { "", nullptr, MarkType::kRoot, R_Y, E_N, 0 }
@ -1422,7 +1434,6 @@ public:
, { nullptr, MarkType::kDuration }
, { &fIEnumMap, MarkType::kEnum }
, { &fIEnumMap, MarkType::kEnumClass }
, { nullptr, MarkType::kError }
, { nullptr, MarkType::kExample }
, { nullptr, MarkType::kExperimental }
, { nullptr, MarkType::kExternal }
@ -1444,6 +1455,7 @@ public:
, { nullptr, MarkType::kOutdent }
, { nullptr, MarkType::kParam }
, { nullptr, MarkType::kPlatform }
, { nullptr, MarkType::kPopulate }
, { nullptr, MarkType::kPrivate }
, { nullptr, MarkType::kReturn }
, { nullptr, MarkType::kRoot }
@ -1980,6 +1992,9 @@ public:
this->reset();
}
void addOneLiner(const Definition* defTable, const Definition* child, bool hasLine,
bool lfAfter);
bool parseFromFile(const char* path) override {
if (!INHERITED::parseSetup(path)) {
return false;
@ -1997,9 +2012,13 @@ public:
private:
const BmhParser& fBmhParser;
const Definition* fClassesAndStructs;
const Definition* fConstants;
const Definition* fConstructors;
const Definition* fOperators;
const Definition* fMemberFunctions;
const Definition* fMembers;
const Definition* fOperators;
const Definition* fRelatedFunctions;
bool hackFiles();
typedef ParserCommon INHERITED;
@ -2014,6 +2033,17 @@ public:
bool buildReferences(const char* docDir, const char* mdOutDirOrFile);
bool buildStatus(const char* docDir, const char* mdOutDir);
static constexpr const char* kClassesAndStructs = "Classes_and_Structs";
static constexpr const char* kConstants = "Constants";
static constexpr const char* kConstructors = "Constructors";
static constexpr const char* kMemberFunctions = "Member_Functions";
static constexpr const char* kMembers = "Members";
static constexpr const char* kOperators = "Operators";
static constexpr const char* kOverview = "Overview";
static constexpr const char* kRelatedFunctions = "Related_Functions";
static constexpr const char* kSubtopics = "Subtopics";
private:
enum class TableState {
kNone,
@ -2025,6 +2055,7 @@ private:
bool buildRefFromFile(const char* fileName, const char* outDir);
bool checkParamReturnBody(const Definition* def) const;
void childrenOut(const Definition* def, const char* contentStart);
const Definition* csParent() const;
const Definition* findParamType();
const Definition* isDefined(const TextParser& parser, const string& ref, bool report) const;
string linkName(const Definition* ) const;
@ -2034,8 +2065,11 @@ private:
void mdHeaderOut(int depth) { mdHeaderOutLF(depth, 2); }
void mdHeaderOutLF(int depth, int lf);
void overviewOut();
bool parseFromFile(const char* path) override {
return true;
bool parseFromFile(const char* path) override { return true; }
void populateTables(const Definition* def);
vector<const Definition*>& populator(const char* key) {
return fPopulators.find(key)->second.fMembers;
}
void reset() override {
@ -2068,12 +2102,22 @@ private:
}
void resolveOut(const char* start, const char* end, BmhParser::Resolvable );
void subtopicOut(const Definition* subtopic, vector<Definition*>& data);
void rowOut(const char * name, const string& description);
void subtopicOut(vector<const Definition*>& data);
void subtopicsOut();
struct TableContents {
string fDescription;
vector<const Definition*> fMembers;
};
unordered_map<string, TableContents> fPopulators;
vector<const Definition*> fClassStack;
const BmhParser& fBmhParser;
const Definition* fEnumClass;
Definition* fMethod;
RootDefinition* fRoot;
const RootDefinition* fRoot;
const Definition* fLastParam;
TableState fTableState;
bool fHasFiddle;

View File

@ -533,9 +533,6 @@ bool Definition::exampleToScript(string* result, ExampleOptions exampleOptions)
case MarkType::kDuration:
durationStr = string(iter->fContentStart, iter->fContentEnd - iter->fContentStart);
break;
case MarkType::kError:
result->clear();
return true;
case MarkType::kHeight:
heightStr = string(iter->fContentStart, iter->fContentEnd - iter->fContentStart);
break;

View File

@ -232,13 +232,13 @@ string MdOut::addReferences(const char* refStart, const char* refEnd,
continue;
}
}
Definition* test = fRoot;
const Definition* test = fRoot;
do {
if (!test->isRoot()) {
continue;
}
for (string prefix : { "_", "::" } ) {
RootDefinition* root = test->asRoot();
const RootDefinition* root = test->asRoot();
string prefixed = root->fName + prefix + ref;
if (const Definition* def = root->find(prefixed,
RootDefinition::AllowParens::kYes)) {
@ -357,6 +357,15 @@ bool MdOut::buildRefFromFile(const char* name, const char* outDir) {
this->lfAlways(1);
FPRINTF("===");
}
fPopulators[kClassesAndStructs].fDescription = "embedded struct and class members";
fPopulators[kConstants].fDescription = "enum and enum class, const values";
fPopulators[kConstructors].fDescription = "functions that construct";
fPopulators[kMemberFunctions].fDescription = "static functions and member methods";
fPopulators[kMembers].fDescription = "member values";
fPopulators[kOperators].fDescription = "operator overloading methods";
fPopulators[kRelatedFunctions].fDescription = "similar methods grouped together";
fPopulators[kSubtopics].fDescription = "";
this->populateTables(fRoot);
this->markTypeOut(topicDef);
}
if (fOut) {
@ -424,6 +433,24 @@ void MdOut::childrenOut(const Definition* def, const char* start) {
}
}
const Definition* MdOut::csParent() const {
const Definition* csParent = fRoot->csParent();
if (!csParent) {
const Definition* topic = fRoot;
while (topic && MarkType::kTopic != topic->fMarkType) {
topic = topic->fParent;
}
for (auto child : topic->fChildren) {
if (child->isStructOrClass() || MarkType::kTypedef == child->fMarkType) {
csParent = child;
break;
}
}
SkASSERT(csParent || string::npos == fRoot->fFileName.find("Sk"));
}
return csParent;
}
const Definition* MdOut::findParamType() {
SkASSERT(fMethod);
TextParser parser(fMethod->fFileName, fMethod->fStart, fMethod->fContentStart,
@ -486,12 +513,12 @@ const Definition* MdOut::isDefined(const TextParser& parser, const string& ref,
if (const Definition* definition = fRoot->find(ref, RootDefinition::AllowParens::kYes)) {
return definition;
}
Definition* test = fRoot;
const Definition* test = fRoot;
do {
if (!test->isRoot()) {
continue;
}
RootDefinition* root = test->asRoot();
const RootDefinition* root = test->asRoot();
for (auto& leaf : root->fBranches) {
if (ref == leaf.first) {
return leaf.second;
@ -626,7 +653,7 @@ string MdOut::linkRef(const string& leadingSpaces, const Definition* def,
const string* str = &def->fFiddle;
SkASSERT(str->length() > 0);
size_t under = str->find('_');
Definition* curRoot = fRoot;
const Definition* curRoot = fRoot;
string classPart = string::npos != under ? str->substr(0, under) : *str;
bool classMatch = curRoot->fName == classPart;
while (curRoot->fParent) {
@ -798,8 +825,6 @@ void MdOut::markTypeOut(Definition* def) {
FPRINTF("<a name=\"%s\"></a> Enum %s", def->fFiddle.c_str(), def->fName.c_str());
this->lf(2);
break;
case MarkType::kError:
break;
case MarkType::kExample: {
this->mdHeaderOut(3);
FPRINTF("Example\n"
@ -816,7 +841,7 @@ void MdOut::markTypeOut(Definition* def) {
gpuAndCpu = platParse.strnstr("cpu", platParse.fEnd);
}
}
if (fHasFiddle && !def->hasChild(MarkType::kError)) {
if (fHasFiddle) {
SkASSERT(def->fHash.length() > 0);
FPRINTF("<div><fiddle-embed name=\"%s\"", def->fHash.c_str());
if (showGpu) {
@ -944,6 +969,18 @@ void MdOut::markTypeOut(Definition* def) {
} break;
case MarkType::kPlatform:
break;
case MarkType::kPopulate: {
SkASSERT(MarkType::kSubtopic == def->fParent->fMarkType);
string name = def->fParent->fName;
if (kSubtopics == name) {
this->subtopicsOut();
} else {
SkASSERT(kClassesAndStructs == name || kConstants == name || kConstructors == name
|| kMemberFunctions == name || kMembers == name || kOperators == name
|| kRelatedFunctions == name);
this->subtopicOut(this->populator(name.c_str()));
}
} break;
case MarkType::kPrivate:
break;
case MarkType::kReturn:
@ -1147,32 +1184,55 @@ void MdOut::mdHeaderOutLF(int depth, int lf) {
FPRINTF(" ");
}
void MdOut::overviewOut() {
#if 0 // under development
// substitute $1 with def (e.g. Subtopics); substitute $2 with ref (e.g. SkRect)
const char header[] =
"## $1\n"
"\n"
"| name | description |\n"
"| --- | --- |\n";
const char* topics[] = {
"Classes_and_Structs", "embedded struct and class members",
"Constants", "enum and enum class, const values",
"Constructors", "functions that construct $2",
"Member_Function", "static functions and member methods",
"Members", "member values",
"Operator", "operator overloading methods",
"Related_Functions", "similar methods grouped together",
};
int found = 0;
vector<Definition*> classesAndStructs;
vector<Definition*> constants;
vector<Definition*> constructors;
vector<Definition*> memberFunctions;
vector<Definition*> members;
vector<Definition*> operators;
vector<Definition*> relatedFunctions;
#endif
void MdOut::populateTables(const Definition* def) {
const Definition* csParent = this->csParent();
for (auto child : def->fChildren) {
if (MarkType::kTopic == child->fMarkType || MarkType::kSubtopic == child->fMarkType) {
bool legacyTopic = fPopulators.end() != fPopulators.find(child->fName);
if (!legacyTopic && child->fName != kOverview) {
this->populator(kRelatedFunctions).push_back(child);
}
this->populateTables(child);
continue;
}
if (child->isStructOrClass()) {
if (fClassStack.size() > 0) {
this->populator(kClassesAndStructs).push_back(child);
}
fClassStack.push_back(child);
this->populateTables(child);
fClassStack.pop_back();
continue;
}
if (MarkType::kEnum == child->fMarkType || MarkType::kEnumClass == child->fMarkType) {
this->populator(kConstants).push_back(child);
continue;
}
if (MarkType::kMember == child->fMarkType) {
this->populator(kMembers).push_back(child);
continue;
}
if (MarkType::kMethod != child->fMarkType) {
continue;
}
if (child->fClone) {
continue;
}
if (Definition::MethodType::kConstructor == child->fMethodType
|| Definition::MethodType::kDestructor == child->fMethodType) {
this->populator(kConstructors).push_back(child);
continue;
}
if (Definition::MethodType::kOperator == child->fMethodType) {
this->populator(kOperators).push_back(child);
continue;
}
this->populator(kMemberFunctions).push_back(child);
if (csParent && (0 == child->fName.find(csParent->fName + "::Make")
|| 0 == child->fName.find(csParent->fName + "::make"))) {
this->populator(kConstructors).push_back(child);
}
}
}
void MdOut::resolveOut(const char* start, const char* end, BmhParser::Resolvable resolvable) {
@ -1253,3 +1313,62 @@ void MdOut::resolveOut(const char* start, const char* end, BmhParser::Resolvable
#endif
}
}
void MdOut::rowOut(const char* name, const string& description) {
this->lfAlways(1);
FPRINTF("| ");
this->resolveOut(name, name + strlen(name), BmhParser::Resolvable::kYes);
FPRINTF(" | ");
this->resolveOut(&description.front(), &description.back() + 1, BmhParser::Resolvable::kYes);
FPRINTF(" |");
this->lf(1);
}
void MdOut::subtopicsOut() {
const Definition* csParent = this->csParent();
SkASSERT(csParent);
this->rowOut("name", "description");
this->rowOut("---", "---");
for (auto item : { kClassesAndStructs, kConstants, kConstructors, kMemberFunctions,
kMembers, kOperators, kRelatedFunctions } ) {
for (auto entry : this->populator(item)) {
if (entry->csParent() == csParent) {
string description = fPopulators.find(item)->second.fDescription;
if (kConstructors == item) {
description += " " + csParent->fName;
}
this->rowOut(item, description);
break;
}
}
}
}
void MdOut::subtopicOut(vector<const Definition*>& data) {
const Definition* csParent = this->csParent();
SkASSERT(csParent);
fRoot = csParent->asRoot();
this->rowOut("name", "description");
this->rowOut("---", "---");
std::map<string, const Definition*> items;
for (auto entry : data) {
if (entry->csParent() != csParent) {
continue;
}
size_t start = entry->fName.find_last_of("::");
string name = entry->fName.substr(string::npos == start ? 0 : start + 1);
items[name] = entry;
}
for (auto entry : items) {
const Definition* oneLiner = nullptr;
for (auto child : entry.second->fChildren) {
if (MarkType::kLine == child->fMarkType) {
oneLiner = child;
break;
}
}
SkASSERT(oneLiner);
this->rowOut(entry.first.c_str(), string(oneLiner->fContentStart,
oneLiner->fContentEnd - oneLiner->fContentStart));
}
}

View File

@ -66,7 +66,7 @@ protected:
// should be 'creators' instead of constructors?
bool checkConstructorsSummary() {
for (auto& rootChild : fRoot->fChildren) {
if (!this->isStructOrClass(rootChild)) {
if (!rootChild->isStructOrClass()) {
continue;
}
auto& cs = rootChild;
@ -357,7 +357,7 @@ protected:
const Definition* classOrStruct() {
for (auto& rootChild : fRoot->fChildren) {
if (this->isStructOrClass(rootChild)) {
if (rootChild->isStructOrClass()) {
return rootChild;
}
}
@ -460,17 +460,6 @@ protected:
return true;
}
bool isStructOrClass(const Definition* definition) const {
if (MarkType::kStruct != definition->fMarkType &&
MarkType::kClass != definition->fMarkType) {
return false;
}
if (string::npos != definition->fFileName.find("undocumented.bmh")) {
return false;
}
return true;
}
private:
const BmhParser& fBmhParser;
RootDefinition* fRoot;

View File

@ -187,8 +187,6 @@ bool SpellCheck::check(Definition* def) {
case MarkType::kEnumClass:
this->wordCheck(def->fName);
break;
case MarkType::kError:
break;
case MarkType::kExample:
break;
case MarkType::kExperimental: