aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/SkRect_Reference.bmh
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2018-05-17 12:17:28 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-17 16:45:13 +0000
commitffb3d688b0e76ad7d1517657b00e4525cc603f40 (patch)
tree3b48887597f78b47214b2ac3c12b4e4cc2cf6bc6 /docs/SkRect_Reference.bmh
parent0b82a71c4ca4cd3d5a477ea0293b877132f0a411 (diff)
Color Documentation
- treat Color, ARGB, etc as things not requiring definitions - fix links to Anti-alias, RGB-565 - finish everything marked incomplete, color and elsewhere - add #Code blocks for #Typedef R=caryclark@google.com Docs-Preview: https://skia.org/?cl=128547 Bug: skia:6898 Change-Id: Icf12fe70bc2bf1a8b1a5b31380b2454610949f23 Reviewed-on: https://skia-review.googlesource.com/128547 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'docs/SkRect_Reference.bmh')
-rw-r--r--docs/SkRect_Reference.bmh17
1 files changed, 14 insertions, 3 deletions
diff --git a/docs/SkRect_Reference.bmh b/docs/SkRect_Reference.bmh
index 2adfecf5bc..12f5a6208d 100644
--- a/docs/SkRect_Reference.bmh
+++ b/docs/SkRect_Reference.bmh
@@ -904,14 +904,25 @@ added: nan, 8 count: 4 rect: 0, 0, 0, 0 success: false
#Method void setBoundsNoCheck(const SkPoint pts[], int count)
#In Set
#Line # sets to upper and lower limits of Point array ##
-Sets to bounds of Point array with count entries. If any point contains a non-finite value
-then the rect will also be non-finite.
+Sets to bounds of Point pts array with count entries. If any Point in pts
+contains Infinity or NaN, all Rect dimensions are set to NaN.
#Param pts Point array ##
#Param count entries in array ##
#Example
-// incomplete
+ SkPoint points[] = {{3, 4}, {1, 2}, {SkScalar_Inf, 6}, {SK_ScalarNaN, 8}};
+ for (int count = 0; count <= (int) SK_ARRAY_COUNT(points); ++count) {
+ SkRect rect;
+ rect.setBoundsNoCheck(points, count);
+ if (count > 0) {
+ SkDebugf("added: %3g, %g ", points[count - 1].fX, points[count - 1].fY);
+ } else {
+ SkDebugf("%14s", " ");
+ }
+ SkDebugf("count: %d rect: %g, %g, %g, %g\n", count,
+ rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
+ }
##
#SeeAlso setBoundsCheck