From d7a7586b0d2f2ea7b5dd059d9d75882bd6e1ab66 Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Wed, 31 Oct 2018 17:17:14 -0400 Subject: [PATCH] delete color4f pin from docs TBR=brianosman@google.com NOTRY=true Docs-Preview: https://skia.org/?cl=167102 Bug: skia: Change-Id: Iafd1680f99531a466291680d53b97635af5c8780 Reviewed-on: https://skia-review.googlesource.com/c/167102 Commit-Queue: Cary Clark Auto-Submit: Cary Clark Reviewed-by: Cary Clark --- docs/SkColor4f_Reference.bmh | 77 ---------------------------- site/user/api/SkColor4f_Reference.md | 62 ---------------------- site/user/api/catalog.htm | 16 ------ 3 files changed, 155 deletions(-) diff --git a/docs/SkColor4f_Reference.bmh b/docs/SkColor4f_Reference.bmh index 16746d365c341..2fc02ccc76fc3 100644 --- a/docs/SkColor4f_Reference.bmh +++ b/docs/SkColor4f_Reference.bmh @@ -237,83 +237,6 @@ if Alpha not valid. # ------------------------------------------------------------------------------ -#Method static SkRGBA4f Pin(float r, float g, float b, float a) -#In Utility_Functions -#Line # sets components to valid range ## - -Constructs and returns SkRGBA4f with each component pinned from zero to one. - -#Param r red component ## -#Param g green component ## -#Param b blue component ## -#Param a Alpha component ## - -#Return Color4f with valid components ## - -#Example -#Height 40 - uint32_t storage[8]; - SkImageInfo info = SkImageInfo::MakeN32Premul(8, 1); - SkPixmap pixmap(info, storage, info.minRowBytes()); - pixmap.erase(SK_ColorWHITE); - SkIRect bounds = {0, 0, 1, 1}; - SkColor4f colors[] = { SkColor4f::Pin(1.5, 0.45f, 0.0, 1), - SkColor4f::Pin(1, 0.45f, -0.25, 1), - {1.5, 0.45f, 0.0, 1}, - {1, 0.45f, -0.25, 1}, - }; - for (auto color4f : colors) { - pixmap.erase(color4f, &bounds); - bounds.offset(2, 0); - } - SkBitmap bitmap; - canvas->scale(20, 20); - bitmap.installPixels(pixmap); - canvas->drawBitmap(bitmap, 0, 0); -## - -#SeeAlso pin() FromColor - -#Method ## - -# ------------------------------------------------------------------------------ - -#Method SkRGBA4f pin() const -#In Utility_Functions -#Line # sets components to valid range ## - -Returns SkRGBA4f with all components in the range from zero to one. - -#Return SkRGBA4f with valid components ## - -#Example -#Height 40 - uint32_t storage[8]; - SkImageInfo info = SkImageInfo::MakeN32Premul(8, 1); - SkPixmap pixmap(info, storage, info.minRowBytes()); - pixmap.erase(SK_ColorWHITE); - SkIRect bounds = {0, 0, 1, 1}; - SkColor4f colors[] = { {1.5, 0.45f, 0.0, 1}, - {1, 0.45f, -0.25, 1}, - }; - for (auto color4f : colors) { - pixmap.erase(color4f, &bounds); - bounds.offset(2, 0); - pixmap.erase(color4f.pin(), &bounds); - bounds.offset(2, 0); - } - SkBitmap bitmap; - canvas->scale(20, 20); - bitmap.installPixels(pixmap); - canvas->drawBitmap(bitmap, 0, 0); -## - -#SeeAlso Pin - -#Method ## - -# ------------------------------------------------------------------------------ - #Method static SkRGBA4f FromColor(SkColor) #In Utility_Functions #Line # sets components from Color ## diff --git a/site/user/api/SkColor4f_Reference.md b/site/user/api/SkColor4f_Reference.md index 49fcc12b8a904..a79d2f583606a 100644 --- a/site/user/api/SkColor4f_Reference.md +++ b/site/user/api/SkColor4f_Reference.md @@ -26,8 +26,6 @@ struct SkRGBA4f { float operator[](int index)_const; float& operator[](int index); bool isOpaque() const; - static SkRGBA4f Pin(float r, float g, float b, float a); - SkRGBA4f pin() const; static SkRGBA4f FromColor(SkColor); SkColor toSkColor() const; static SkRGBA4f FromPMColor(SkPMColor); @@ -349,66 +347,6 @@ true if Alpha is one vec[2] SkColorGetA - - ---- - -
-static SkRGBA4f Pin(float r, float g, float b, float a)
-
- -Constructs and returns SkRGBA4f with each component pinned from zero to one. - -### Parameters - - - - - - - - - - - - - -
rred component
ggreen component
bblue component
aAlpha component
- -### Return Value - -Color4f with valid components - -### Example - -
- -### See Also - -pin() FromColor - - - ---- - -
-SkRGBA4f pin() const
-
- -Returns SkRGBA4f with all components in the range from zero to one. - -### Return Value - -SkRGBA4f with valid components - -### Example - -
- -### See Also - -Pin - --- diff --git a/site/user/api/catalog.htm b/site/user/api/catalog.htm index e4ae0762f2027..6d4cdbe6516e1 100644 --- a/site/user/api/catalog.htm +++ b/site/user/api/catalog.htm @@ -8218,22 +8218,6 @@ "hash": "0bcc0f86a2aefc899f3500503dce6968", "file": "SkColor_Reference", "name": "SkPreMultiplyColor" -}, - "SkRGBA4f_Pin": { - "code": "void draw(SkCanvas* canvas) {\n uint32_t storage[8];\n SkImageInfo info = SkImageInfo::MakeN32Premul(8, 1);\n SkPixmap pixmap(info, storage, info.minRowBytes());\n pixmap.erase(SK_ColorWHITE);\n SkIRect bounds = {0, 0, 1, 1};\n SkColor4f colors[] = { SkColor4f::Pin(1.5, 0.45f, 0.0, 1), \n SkColor4f::Pin(1, 0.45f, -0.25, 1),\n {1.5, 0.45f, 0.0, 1},\n {1, 0.45f, -0.25, 1},\n };\n for (auto color4f : colors) {\n pixmap.erase(color4f, &bounds);\n bounds.offset(2, 0);\n }\n SkBitmap bitmap;\n canvas->scale(20, 20);\n bitmap.installPixels(pixmap);\n canvas->drawBitmap(bitmap, 0, 0);\n}", - "width": 256, - "height": 40, - "hash": "c989cf16c7f8849874eb008cd701af76", - "file": "SkColor4f_Reference", - "name": "SkRGBA4f::Pin" -}, - "SkRGBA4f_pin": { - "code": "void draw(SkCanvas* canvas) {\n uint32_t storage[8];\n SkImageInfo info = SkImageInfo::MakeN32Premul(8, 1);\n SkPixmap pixmap(info, storage, info.minRowBytes());\n pixmap.erase(SK_ColorWHITE);\n SkIRect bounds = {0, 0, 1, 1};\n SkColor4f colors[] = { {1.5, 0.45f, 0.0, 1},\n {1, 0.45f, -0.25, 1},\n };\n for (auto color4f : colors) {\n pixmap.erase(color4f, &bounds);\n bounds.offset(2, 0);\n pixmap.erase(color4f.pin(), &bounds);\n bounds.offset(2, 0);\n }\n SkBitmap bitmap;\n canvas->scale(20, 20);\n bitmap.installPixels(pixmap);\n canvas->drawBitmap(bitmap, 0, 0);\n}", - "width": 256, - "height": 40, - "hash": "9e349862c5189a44d2acef5da24f2e79", - "file": "SkColor4f_Reference", - "name": "SkRGBA4f::pin()" }, "SkRGBToHSV": { "code": "void draw(SkCanvas* canvas) {\n canvas->drawBitmap(source, 0, 0);\n SkPaint bgPaint;\n bgPaint.setColor(0xafffffff);\n canvas->drawRect({20, 30, 110, 90}, bgPaint);\n SkScalar hsv[3];\n SkColor c = source.getColor(226, 128);\n SkRGBToHSV(SkColorGetR(c), SkColorGetG(c), SkColorGetB(c), hsv);\n canvas->drawString((\"h: \" + std::to_string(hsv[0]).substr(0, 6)).c_str(), 27, 45, SkPaint());\n canvas->drawString((\"s: \" + std::to_string(hsv[1]).substr(0, 6)).c_str(), 27, 65, SkPaint());\n canvas->drawString((\"v: \" + std::to_string(hsv[2]).substr(0, 6)).c_str(), 27, 85, SkPaint());\n canvas->drawLine(110, 90, 226, 128, SkPaint());\n}",