aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2018-06-07 09:59:07 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-07 14:22:38 +0000
commit0d225395faf27690c724619af35243985bf6e2df (patch)
tree4d5486c91ab2eeb52861030a8b0e7dc23c7e451f /docs
parentd07dc361bccbb0d1b07f47de42aceca3cff5c39c (diff)
generate SkColor include
bookmaker can now generate SkColor.h This required adding support for #define, typedef, global constexpr, and fixing various bugs, like forward declared structs between comments. Docs-Preview: https://skia.org/?cl=131260 Bug: skia:6898 TBR=caryclark@google.com Change-Id: I6bee0c6f5c3a6820b04472a318abde8a2523dbbb Reviewed-on: https://skia-review.googlesource.com/131260 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')
-rw-r--r--docs/SkColor_Reference.bmh36
-rw-r--r--docs/SkImage_Reference.bmh4
-rw-r--r--docs/status.json6
3 files changed, 27 insertions, 19 deletions
diff --git a/docs/SkColor_Reference.bmh b/docs/SkColor_Reference.bmh
index 50b4eb5590..a92e393853 100644
--- a/docs/SkColor_Reference.bmh
+++ b/docs/SkColor_Reference.bmh
@@ -1,6 +1,10 @@
#Topic Color
#Alias Color_Reference ##
+#File
+Types, consts, functions, and macros for colors.
+##
+
#Subtopic Overview
#Populate
##
@@ -47,7 +51,7 @@ zero, fully transparent, to one, fully opaque.
typedef uint8_t SkAlpha;
##
-8-bit type for an alpha value. 0xFF is 100% opaque, 0x00 is 100% transparent.
+8-bit type for an alpha value. 255 is 100% opaque, zero is 100% transparent.
#Typedef ##
@@ -607,9 +611,13 @@ modulo 360, where zero degrees is red.
##
#Subtopic Saturation
+Saturation represents the intensity of the color. Saturation varies from zero,
+with no Hue contribution; to one, with full Hue contribution.
##
#Subtopic Value
+Value represents the lightness of the color. Value varies from zero, black; to
+one, full brightness.
##
#Method void SkRGBToHSV(U8CPU red, U8CPU green, U8CPU blue, SkScalar hsv[3])
@@ -617,9 +625,9 @@ modulo 360, where zero degrees is red.
#Line # converts RGB to HSV ##
Converts RGB to its HSV components.
-hsv[0] contains Hue, a value from zero to less than 360.
-hsv[1] contains Saturation, a value from zero to one.
-hsv[2] contains Value, a value from zero to one.
+hsv[0] contains HSV_Hue, a value from zero to less than 360.
+hsv[1] contains HSV_Saturation, a value from zero to one.
+hsv[2] contains HSV_Value, a value from zero to one.
#Param red red component value from zero to 255 ##
#Param green green component value from zero to 255 ##
@@ -653,9 +661,9 @@ hsv[2] contains Value, a value from zero to one.
#Line # converts RGB to HSV ##
Converts ARGB to its HSV components. Alpha in ARGB is ignored.
-hsv[0] contains Hue, and is assigned a value from zero to less than 360.
-hsv[1] contains Saturation, a value from zero to one.
-hsv[2] contains Value, a value from zero to one.
+hsv[0] contains HSV_Hue, and is assigned a value from zero to less than 360.
+hsv[1] contains HSV_Saturation, a value from zero to one.
+hsv[2] contains HSV_Value, a value from zero to one.
#Param color ARGB color to convert
##
@@ -688,9 +696,9 @@ hsv[2] contains Value, a value from zero to one.
#Line # converts HSV with Alpha to RGB ##
Converts HSV components to an ARGB color. Alpha is passed through unchanged.
-hsv[0] represents Hue, an angle from zero to less than 360.
-hsv[1] represents Saturation, and varies from zero to one.
-hsv[2] represents Value, and varies from zero to one.
+hsv[0] represents HSV_Hue, an angle from zero to less than 360.
+hsv[1] represents HSV_Saturation, and varies from zero to one.
+hsv[2] represents HSV_Value, and varies from zero to one.
Out of range hsv values are pinned.
@@ -728,10 +736,10 @@ Out of range hsv values are pinned.
#In Function
#Line # converts HSV to RGB ##
-Convert HSV components to an ARGB color. Alpha is set to 0xFF.
-hsv[0] represents Hue, an angle from zero to less than 360.
-hsv[1] represents Saturation, and varies from zero to one.
-hsv[2] represents Value, and varies from zero to one.
+Converts HSV components to an ARGB color. Alpha is set to 255.
+hsv[0] represents HSV_Hue, an angle from zero to less than 360.
+hsv[1] represents HSV_Saturation, and varies from zero to one.
+hsv[2] represents HSV_Value, and varies from zero to one.
Out of range hsv values are pinned.
diff --git a/docs/SkImage_Reference.bmh b/docs/SkImage_Reference.bmh
index 03dcd16e02..a6a623ff9e 100644
--- a/docs/SkImage_Reference.bmh
+++ b/docs/SkImage_Reference.bmh
@@ -2012,8 +2012,8 @@ By translating canvas by returned offset, Image appears stationary.
typedef std::function<void(GrBackendTexture)> BackendTextureReleaseProc;
##
-Defines a function take one parameter of type
-GrBackendTexture with no return value.
+Defines a callback function, taking one parameter of type GrBackendTexture with
+no return value. Function is called when back-end texture is to be released.
##
# ------------------------------------------------------------------------------
diff --git a/docs/status.json b/docs/status.json
index a24da579a5..07563837bb 100644
--- a/docs/status.json
+++ b/docs/status.json
@@ -4,6 +4,7 @@
"core": [
"SkBitmap.h",
"SkCanvas.h",
+ "SkColor.h",
"SkImage.h",
"SkImageInfo.h",
"SkMatrix.h",
@@ -18,6 +19,8 @@
"docs": [
"SkAutoCanvasRestore_Reference.bmh",
"SkCanvas_Reference.bmh",
+ "SkColor_Reference.bmh",
+ "SkColor4f_Reference.bmh",
"SkPaint_Reference.bmh",
"SkPoint_Reference.bmh",
"SkIRect_Reference.bmh",
@@ -37,12 +40,9 @@
"InProgress": {
"include": {
"core": [
- "SkColor.h"
]
},
"docs": [
- "SkColor_Reference.bmh",
- "SkColor4f_Reference.bmh",
"overview.bmh",
"usingBookmaker.bmh"
]