Revert "add color4f to docs"
This reverts commit 434b80f82fee3c21ae330363354ae2669ed137f5.
Reason for revert: Reverting 4f CL.
Original change's description:
> add color4f to docs
>
> Add SkPaint::setColor4f and getColor4f. Another pass will
> be required later once fiddle updates itself.
>
> Also add checks to bookmaker so it doesn't write status
> if generated files are unchanged; and deletes temporary
> files in working directory.
>
> R=​brianosman@google.com
>
> Docs-Preview: https://skia.org/?cl=151365
> Bug: skia:6898
> Change-Id: I8059641f19017a86fc4b63ebd9ff784716365967
> Reviewed-on: https://skia-review.googlesource.com/151365
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: Cary Clark <caryclark@skia.org>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,caryclark@skia.org
Change-Id: Ice33fe50105959f104b3907a07eb3e8c51641ec2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6898
Reviewed-on: https://skia-review.googlesource.com/151543
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/docs/SkPaint_Reference.bmh b/docs/SkPaint_Reference.bmh
index 099f555..f1cd262 100644
--- a/docs/SkPaint_Reference.bmh
+++ b/docs/SkPaint_Reference.bmh
@@ -1676,6 +1676,7 @@
##
#Method SkColor getColor() const
+
#In Color_Methods
#Line # returns Color_Alpha and RGB, one drawing color ##
Retrieves Alpha and RGB, Unpremultiplied, packed into 32 bits.
@@ -1696,36 +1697,12 @@
##
##
- #SeeAlso getColor4f SkColor
+ #SeeAlso SkColor
##
-#Method SkColor4f getColor4f() const
-#In Color_Methods
-#Line # returns Color_Alpha and RGB, one drawing color ##
- Retrieves alpha and RGB, unpmreultiplied, as four floating point values. RGB are
- are extended sRGB values (sRGB gamut, and encoded with the sRGB transfer function).
-
- #Return Unpremultiplied RGBA ##
-
- #ToDo enable and correct example once fiddle picks up getColor4f ##
- #NoExample
- SkPaint paint;
- paint.setColor(SK_ColorYELLOW);
- SkColor4f y = paint.getColor4f();
- SkDebugf("Yellow is %d%% red, %d%% green, and %d%% blue.\n", (int) (y.fR * 100),
- (int) (y.fG * 100), (int) (y.fB * 100));
-
- #StdOut
- Yellow is 100% red, 100% green, and 0% blue.
- ##
- ##
-
- #SeeAlso getColor SkColor
-##
-
-
#Method void setColor(SkColor color)
+
#In Color_Methods
#Line # sets Color_Alpha and RGB, one drawing color ##
Sets Alpha and RGB used when stroking and filling. The color is a 32-bit value,
@@ -1748,37 +1725,9 @@
##
##
- #SeeAlso SkColor setColor4f setARGB SkColorSetARGB
+ #SeeAlso SkColor setARGB SkColorSetARGB
##
-
-#Method void setColor4f(const SkColor4f& color, SkColorSpace* colorSpace)
-#In Color_Methods
-#Line # sets Color_Alpha and RGB, one drawing color ##
- Sets alpha and RGB used when stroking and filling. The color is four floating
- point values, unpremultiplied. The color values are interpreted as being in
- the colorSpace. If colorSpace is nullptr, then color is assumed to be in the
- sRGB color space.
-
- #Param color Unpremultiplied RGBA ##
- #Param colorSpace Color_Space describing the encoding of color ##
-
- #ToDo enable and correct example once fiddle picks up setColor4f ##
- #NoExample
- SkPaint green1, green2;
- green1.setColor4f({0, 1, 0, 1}, nullptr); // R=0 G=1 B=0 A=1
- green2.setColor(0xFF00FF00); // A=255 R=0 G=255 B=0
- SkDebugf("green1 %c= green2\n", green1 == green2 ? '=' : '!');
-
- #StdOut
- green1 == green2
- ##
- ##
-
- #SeeAlso SkColor setColor setARGB SkColorSetARGB
-
-##
-
#Subtopic Color_Methods ##
#Subtopic Alpha_Methods
diff --git a/site/user/api/SkPaint_Reference.md b/site/user/api/SkPaint_Reference.md
index 5e512bf..a8f4651 100644
--- a/site/user/api/SkPaint_Reference.md
+++ b/site/user/api/SkPaint_Reference.md
@@ -555,247 +555,239 @@
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='SkColor_Reference#Alpha'>Color Alpha</a> and RGB, one drawing color</td>
</tr>
<tr style='background-color: #f0f0f0; '>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getColor4f'>getColor4f</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='SkColor_Reference#Alpha'>Color Alpha</a> and RGB, one drawing color</td>
- </tr>
- <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getColorFilter'>getColorFilter</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='undocumented#Color_Filter'>Color Filter</a>, how colors are altered</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getDrawLooper'>getDrawLooper</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='undocumented#Draw_Looper'>Draw Looper</a>, multiple layers</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getFillPath'>getFillPath</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns fill path equivalent to stroke</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getFilterQuality'>getFilterQuality</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='undocumented#Filter_Quality'>Filter Quality</a>, image filtering level</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getFlags'>getFlags</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='#SkPaint_Flags'>Flags</a> stored in a bit field</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getFontBounds'>getFontBounds</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns union all glyph bounds</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getFontMetrics'>getFontMetrics</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='undocumented#Typeface'>Typeface</a> metrics scaled by text size</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getFontSpacing'>getFontSpacing</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns recommended spacing between lines</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getHash'>getHash</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns a shallow hash for equality checks</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getHinting'>getHinting</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='#SkPaint_Hinting'>Hinting</a>, glyph outline adjustment level</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getImageFilter'>getImageFilter</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='undocumented#Image_Filter'>Image Filter</a>, alter pixels; blur</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getMaskFilter'>getMaskFilter</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='undocumented#Mask_Filter'>Mask Filter</a>, alterations to <a href='undocumented#Mask_Alpha'>Mask Alpha</a></td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getPathEffect'>getPathEffect</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='undocumented#Path_Effect'>Path Effect</a>, modifications to path geometry; dashing</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getPosTextHIntercepts'>getPosTextHIntercepts</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns where lines intersect horizontally positioned text; underlines</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getPosTextIntercepts'>getPosTextIntercepts</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns where lines intersect positioned text; underlines</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getPosTextPath'>getPosTextPath</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='SkPath_Reference#Path'>Path</a> equivalent to positioned text</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getShader'>getShader</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='undocumented#Shader'>Shader</a>, multiple drawing colors; gradients</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getStrokeCap'>getStrokeCap</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='#SkPaint_Cap'>Cap</a>, the area drawn at path ends</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getStrokeJoin'>getStrokeJoin</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='#SkPaint_Join'>Join</a>, geometry on path corners</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getStrokeMiter'>getStrokeMiter</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='#Miter_Limit'>Miter Limit</a>, angles with sharp corners</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getStrokeWidth'>getStrokeWidth</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns thickness of the stroke</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getStyle'>getStyle</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='#SkPaint_Style'>Style</a>: stroke, fill, or both</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getTextAlign'>getTextAlign</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='#SkPaint_Align'>Align</a>: left, center, or right</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getTextBlobIntercepts'>getTextBlobIntercepts</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns where lines intersect <a href='SkTextBlob_Reference#Text_Blob'>Text Blob</a>; underlines</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getTextEncoding'>getTextEncoding</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns character or glyph encoded size</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getTextIntercepts'>getTextIntercepts</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns where lines intersect text; underlines</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getTextPath'>getTextPath</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='SkPath_Reference#Path'>Path</a> equivalent to text</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getTextScaleX'>getTextScaleX</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns the text horizontal scale; condensed text</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getTextSize'>getTextSize</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns text size in points</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getTextSkewX'>getTextSkewX</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns the text horizontal skew; oblique text</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getTextWidths'>getTextWidths</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns advance and bounds for each glyph in text</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_getTypeface'>getTypeface</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns <a href='undocumented#Typeface'>Typeface</a>, font description</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_glyphsToUnichars'>glyphsToUnichars</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>converts <a href='undocumented#Glyph'>Glyphs</a> into text</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_isAntiAlias'>isAntiAlias</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if <a href='#Anti_Alias'>Anti Alias</a> is set</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_isAutohinted'>isAutohinted</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if <a href='undocumented#Glyph'>Glyphs</a> are always hinted</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_isDither'>isDither</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if <a href='#Dither'>Dither</a> is set</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_isEmbeddedBitmapText'>isEmbeddedBitmapText</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if <a href='#Font_Embedded_Bitmaps'>Font Embedded Bitmaps</a> is set</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_isFakeBoldText'>isFakeBoldText</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if <a href='#Fake_Bold'>Fake Bold</a> is set</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_isLCDRenderText'>isLCDRenderText</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if <a href='#LCD_Text'>LCD Text</a> is set</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_isLinearText'>isLinearText</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if text is converted to <a href='SkPath_Reference#Path'>Path</a></td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_isSrcOver'>isSrcOver</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if <a href='SkBlendMode_Reference#Blend_Mode'>Blend Mode</a> is <a href='SkBlendMode_Reference#SkBlendMode_kSrcOver'>SkBlendMode::kSrcOver</a></td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_isSubpixelText'>isSubpixelText</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if <a href='#Subpixel_Text'>Subpixel Text</a> is set</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_isVerticalText'>isVerticalText</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if <a href='#Vertical_Text'>Vertical Text</a> is set</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_measureText'>measureText</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns advance width and bounds of text</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_nothingToDraw'>nothingToDraw</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>returns true if <a href='#Paint'>Paint</a> prevents all drawing</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_refColorFilter'>refColorFilter</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>references <a href='undocumented#Color_Filter'>Color Filter</a>, how colors are altered</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_refDrawLooper'>refDrawLooper</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>references <a href='undocumented#Draw_Looper'>Draw Looper</a>, multiple layers</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_refImageFilter'>refImageFilter</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>references <a href='undocumented#Image_Filter'>Image Filter</a>, alter pixels; blur</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_refMaskFilter'>refMaskFilter</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>references <a href='undocumented#Mask_Filter'>Mask Filter</a>, alterations to <a href='undocumented#Mask_Alpha'>Mask Alpha</a></td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_refPathEffect'>refPathEffect</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>references <a href='undocumented#Path_Effect'>Path Effect</a>, modifications to path geometry; dashing</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_refShader'>refShader</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>references <a href='undocumented#Shader'>Shader</a>, multiple drawing colors; gradients</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_refTypeface'>refTypeface</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>references <a href='undocumented#Typeface'>Typeface</a>, font description</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_reset'>reset</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>sets to default values</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_setARGB'>setARGB</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>sets color by component</td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_setAlpha'>setAlpha</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>sets <a href='SkColor_Reference#Alpha'>Color Alpha</a>, color opacity</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_setAntiAlias'>setAntiAlias</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>sets or clears <a href='#Anti_Alias'>Anti Alias</a></td>
</tr>
- <tr>
+ <tr style='background-color: #f0f0f0; '>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_setAutohinted'>setAutohinted</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>sets <a href='undocumented#Glyph'>Glyphs</a> to always be hinted</td>
</tr>
- <tr style='background-color: #f0f0f0; '>
+ <tr>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_setBlendMode'>setBlendMode</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>sets <a href='SkBlendMode_Reference#Blend_Mode'>Blend Mode</a>, how colors combine with destination</td>
</tr>
- <tr>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_setColor'>setColor</a></td>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>sets <a href='SkColor_Reference#Alpha'>Color Alpha</a> and RGB, one drawing color</td>
- </tr>
<tr style='background-color: #f0f0f0; '>
- <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_setColor4f'>setColor4f</a></td>
+ <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a href='#SkPaint_setColor'>setColor</a></td>
<td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>sets <a href='SkColor_Reference#Alpha'>Color Alpha</a> and RGB, one drawing color</td>
</tr>
<tr>
@@ -2595,33 +2587,7 @@
### See Also
-<a href='#SkPaint_getColor4f'>getColor4f</a> <a href='SkColor_Reference#SkColor'>SkColor</a>
-
----
-
-<a name='SkPaint_getColor4f'></a>
-## getColor4f
-
-<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-<a href='SkColor4f_Reference#SkColor4f'>SkColor4f</a> <a href='#SkPaint_getColor4f'>getColor4f</a>() const
-</pre>
-
-Retrieves alpha and RGB, unpmreultiplied, as four floating point values. RGB are
-are extended sRGB values (sRGB gamut, and encoded with the sRGB transfer function).
-
-### Return Value
-
-<a href='undocumented#Unpremultiply'>Unpremultiplied</a> RGBA
-
-#### Example Output
-
-~~~~
-Yellow is 100% red, 100% green, and 0% blue.
-~~~~
-
-### See Also
-
-<a href='#SkPaint_getColor'>getColor</a> <a href='SkColor_Reference#SkColor'>SkColor</a>
+<a href='SkColor_Reference#SkColor'>SkColor</a>
---
@@ -2656,41 +2622,7 @@
### See Also
-<a href='SkColor_Reference#SkColor'>SkColor</a> <a href='#SkPaint_setColor4f'>setColor4f</a> <a href='#SkPaint_setARGB'>setARGB</a> <a href='SkColor_Reference#SkColorSetARGB'>SkColorSetARGB</a>
-
----
-
-<a name='SkPaint_setColor4f'></a>
-## setColor4f
-
-<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
-void <a href='#SkPaint_setColor4f'>setColor4f</a>(const <a href='SkColor4f_Reference#SkColor4f'>SkColor4f</a>& color, <a href='undocumented#SkColorSpace'>SkColorSpace</a>* colorSpace)
-</pre>
-
-Sets alpha and RGB used when stroking and filling. The <a href='#SkPaint_setColor4f_color'>color</a> is four floating
-point values, unpremultiplied. The <a href='#SkPaint_setColor4f_color'>color</a> values are interpreted as being in
-the <a href='#SkPaint_setColor4f_colorSpace'>colorSpace</a>. If <a href='#SkPaint_setColor4f_colorSpace'>colorSpace</a> is nullptr, then <a href='#SkPaint_setColor4f_color'>color</a> is assumed to be in the
-sRGB <a href='#SkPaint_setColor4f_color'>color</a> space.
-
-### Parameters
-
-<table> <tr> <td><a name='SkPaint_setColor4f_color'><code><strong>color</strong></code></a></td>
- <td><a href='undocumented#Unpremultiply'>Unpremultiplied</a> RGBA</td>
- </tr>
- <tr> <td><a name='SkPaint_setColor4f_colorSpace'><code><strong>colorSpace</strong></code></a></td>
- <td><a href='undocumented#Color_Space'>Color Space</a> describing the encoding of <a href='#SkPaint_setColor4f_color'>color</a></td>
- </tr>
-</table>
-
-#### Example Output
-
-~~~~
-green1 == green2
-~~~~
-
-### See Also
-
-<a href='SkColor_Reference#SkColor'>SkColor</a> <a href='#SkPaint_setColor'>setColor</a> <a href='#SkPaint_setARGB'>setARGB</a> <a href='SkColor_Reference#SkColorSetARGB'>SkColorSetARGB</a>
+<a href='SkColor_Reference#SkColor'>SkColor</a> <a href='#SkPaint_setARGB'>setARGB</a> <a href='SkColor_Reference#SkColorSetARGB'>SkColorSetARGB</a>
---
diff --git a/tools/bookmaker/bookmaker.cpp b/tools/bookmaker/bookmaker.cpp
index 00c4868..c1a0569 100644
--- a/tools/bookmaker/bookmaker.cpp
+++ b/tools/bookmaker/bookmaker.cpp
@@ -997,8 +997,6 @@
if (ParserCommon::WrittenFileDiffers(oldFiddle, newFiddle)) {
ParserCommon::CopyToFile(oldFiddle, newFiddle);
SkDebugf("wrote %s\n", fiddleJsonFileName);
- } else {
- remove(newFiddle.c_str());
}
return true;
}
diff --git a/tools/bookmaker/cataloger.cpp b/tools/bookmaker/cataloger.cpp
index c027d58..5689813 100644
--- a/tools/bookmaker/cataloger.cpp
+++ b/tools/bookmaker/cataloger.cpp
@@ -79,8 +79,6 @@
if (ParserCommon::WrittenFileDiffers(fullName, kCatalogFileName)) {
ParserCommon::CopyToFile(fullName, kCatalogFileName);
SkDebugf("wrote %s\n", fullName.c_str());
- } else {
- remove(kCatalogFileName.c_str());
}
fOut = nullptr;
}
diff --git a/tools/bookmaker/mdOut.cpp b/tools/bookmaker/mdOut.cpp
index b6a5465..247c729 100644
--- a/tools/bookmaker/mdOut.cpp
+++ b/tools/bookmaker/mdOut.cpp
@@ -621,12 +621,16 @@
this->writePending();
fclose(fOut);
fflush(fOut);
- if (ParserCommon::WrittenFileDiffers(fullName, filename)) {
- ParserCommon::CopyToFile(fullName, filename);
- SkDebugf("wrote %s\n", fullName.c_str());
- } else {
- remove(filename.c_str());
+ if (ParserCommon::WrittenFileDiffers(filename, fullName)) {
+ fOut = fopen(fullName.c_str(), "wb");
+ int writtenSize;
+ const char* written = ReadToBuffer(filename, &writtenSize);
+ fwrite(written, 1, writtenSize, fOut);
+ fclose(fOut);
+ fflush(fOut);
+ SkDebugf("wrote updated %s\n", fullName.c_str());
}
+ remove(filename.c_str());
fOut = nullptr;
}
return !fAddRefFailed;