From 0d225395faf27690c724619af35243985bf6e2df Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Thu, 7 Jun 2018 09:59:07 -0400 Subject: 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 Commit-Queue: Cary Clark Auto-Submit: Cary Clark --- site/user/api/SkColor_Reference.md | 35 +++++++++++++++++++++-------------- site/user/api/SkImage_Reference.md | 4 ++-- 2 files changed, 23 insertions(+), 16 deletions(-) (limited to 'site') diff --git a/site/user/api/SkColor_Reference.md b/site/user/api/SkColor_Reference.md index 7677ebd971..33316148c9 100644 --- a/site/user/api/SkColor_Reference.md +++ b/site/user/api/SkColor_Reference.md @@ -2,6 +2,7 @@ SkColor Reference === # Color +Types, consts, functions, and macros for colors. ## Overview @@ -203,7 +204,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 SkColor @@ -761,8 +762,14 @@ modulo 360, where zero degrees is red. ## HSV Saturation +Saturation represents the intensity of the color. Saturation varies from zero, +with no Hue contribution; to one, with full Hue contribution. + ## HSV Value +Value represents the lightness of the color. Value varies from zero, black; to +one, full brightness. + ## SkRGBToHSV @@ -771,9 +778,9 @@ void SkRGBToHSV(U8CPU 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. ### Parameters @@ -809,9 +816,9 @@ void SkColorToHSV(SkColor col 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. ### Parameters @@ -841,9 +848,9 @@ Converts ARGB to its HSV components. Alpha 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. @@ -877,10 +884,10 @@ ARGB equivalent to HSV SkColor SkHSVToColor(const SkScalar hsv[3]) -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/site/user/api/SkImage_Reference.md b/site/user/api/SkImage_Reference.md index 59ea10bfdc..e43d9082ce 100644 --- a/site/user/api/SkImage_Reference.md +++ b/site/user/api/SkImage_Reference.md @@ -2510,8 +2510,8 @@ By translating canvas by returned offse typedef std::function 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. ## MakeBackendTextureFromSkImage -- cgit v1.2.3