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 --- docs/SkColor_Reference.bmh | 36 ++++++++++++++++++++++-------------- docs/SkImage_Reference.bmh | 4 ++-- docs/status.json | 6 +++--- 3 files changed, 27 insertions(+), 19 deletions(-) (limited to 'docs') 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 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" ] -- cgit v1.2.3