aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/SkMatrix_Reference.bmh
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2018-02-01 09:37:32 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-01 15:09:17 +0000
commit08895c48144cedaf81006803afe4a5a2becfdb92 (patch)
tree395b9eece35410bc75115e16a2c6b86e6bf35de8 /docs/SkMatrix_Reference.bmh
parent4dab72f60664b50f66cdd1b26a59bfa873e899f7 (diff)
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>
Diffstat (limited to 'docs/SkMatrix_Reference.bmh')
-rw-r--r--docs/SkMatrix_Reference.bmh311
1 files changed, 100 insertions, 211 deletions
diff --git a/docs/SkMatrix_Reference.bmh b/docs/SkMatrix_Reference.bmh
index b39e913021..c1567b60f3 100644
--- a/docs/SkMatrix_Reference.bmh
+++ b/docs/SkMatrix_Reference.bmh
@@ -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
-#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 ##
+#Populate
+##
#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.