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 <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
This commit is contained in:
Cary Clark 2018-10-31 17:17:14 -04:00 committed by Skia Commit-Bot
parent ff0e8409e1
commit d7a7586b0d
3 changed files with 0 additions and 155 deletions

View File

@ -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 ##

View File

@ -26,8 +26,6 @@ struct <a href='#SkRGBA4f'>SkRGBA4f</a> {
float <a href='#SkRGBA4f_array_operator'>operator[](int index)_const</a>;
float& <a href='#SkRGBA4f_array1_operator'>operator[](int index)</a>;
bool <a href='#SkRGBA4f_isOpaque'>isOpaque</a>() const;
static <a href='#SkRGBA4f'>SkRGBA4f</a> <a href='#SkRGBA4f_Pin'>Pin</a>(float r, float g, float b, float a);
<a href='#SkRGBA4f'>SkRGBA4f</a> <a href='#SkRGBA4f_pin'>pin</a>() const;
static <a href='#SkRGBA4f'>SkRGBA4f</a> <a href='#SkRGBA4f_FromColor'>FromColor</a>(<a href='SkColor_Reference#SkColor'>SkColor</a>);
<a href='SkColor_Reference#SkColor'>SkColor</a> <a href='#SkRGBA4f_toSkColor'>toSkColor</a>() const;
static <a href='#SkRGBA4f'>SkRGBA4f</a> <a href='#SkRGBA4f_FromPMColor'>FromPMColor</a>(<a href='SkColor_Reference#SkPMColor'>SkPMColor</a>);
@ -349,66 +347,6 @@ true if <a href='SkColor_Reference#Alpha'>Alpha</a> is one
<a href='#SkRGBA4f_vec'>vec</a><sup><a href='#SkRGBA4f_vec_2'>[2]</a></sup> <a href='SkColor_Reference#SkColorGetA'>SkColorGetA</a>
<a name='SkRGBA4f_Pin'></a>
---
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
static <a href='#SkRGBA4f'>SkRGBA4f</a> <a href='#SkRGBA4f_Pin'>Pin</a>(float r, float g, float b, float a)
</pre>
Constructs and returns <a href='#SkRGBA4f'>SkRGBA4f</a> with each component pinned from zero to one.
### Parameters
<table> <tr> <td><a name='SkRGBA4f_Pin_r'><code><strong>r</strong></code></a></td>
<td>red component</td>
</tr>
<tr> <td><a name='SkRGBA4f_Pin_g'><code><strong>g</strong></code></a></td>
<td>green component</td>
</tr>
<tr> <td><a name='SkRGBA4f_Pin_b'><code><strong>b</strong></code></a></td>
<td>blue component</td>
</tr>
<tr> <td><a name='SkRGBA4f_Pin_a'><code><strong>a</strong></code></a></td>
<td><a href='SkColor_Reference#Alpha'>Alpha</a> component</td>
</tr>
</table>
### Return Value
<a href='#Color4f'>Color4f</a> with valid components
### Example
<div><fiddle-embed name="c989cf16c7f8849874eb008cd701af76"></fiddle-embed></div>
### See Also
<a href='#SkRGBA4f_pin'>pin</a>() <a href='#SkRGBA4f_FromColor'>FromColor</a>
<a name='SkRGBA4f_pin'></a>
---
<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
<a href='#SkRGBA4f'>SkRGBA4f</a> <a href='#SkRGBA4f_pin'>pin</a>() const
</pre>
Returns <a href='#SkRGBA4f'>SkRGBA4f</a> with all components in the range from zero to one.
### Return Value
<a href='#SkRGBA4f'>SkRGBA4f</a> with valid components
### Example
<div><fiddle-embed name="9e349862c5189a44d2acef5da24f2e79"></fiddle-embed></div>
### See Also
<a href='#SkRGBA4f_Pin'>Pin</a>
<a name='SkRGBA4f_FromColor'></a>
---

View File

@ -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}",