Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1732)

Unified Diff: site/user/sample/pdf.md

Issue 2377473002: SkPDF/Documentation: backend limitations (Closed)
Patch Set: clean up text Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: site/user/sample/pdf.md
diff --git a/site/user/sample/pdf.md b/site/user/sample/pdf.md
index 1668f3939a05358d724ad2983cdf586b1cde569d..54ed2336fd3f882442e52c70b2b5ab55a1a74299 100644
--- a/site/user/sample/pdf.md
+++ b/site/user/sample/pdf.md
@@ -1,8 +1,8 @@
Using Skia's PDF Backend
========================
-Here is an example of using Skia's PDF backend in the recommended way:
-via the SkDocument and SkCanvas APIs.
+Here is an example of using Skia's PDF backend (SkPDF) via the
+SkDocument and SkCanvas APIs.
<!--?prettify lang=cc?-->
@@ -39,3 +39,96 @@ via the SkDocument and SkCanvas APIs.
}
return pdfDocument->close();
}
+
+* * *
+
+<span id="limits">SkPDF Limitations</span>
+------------------------------------------
+
+There are several corners of Skia's public API that SkPDF does not
djsollen 2016/09/29 13:12:39 SkPDF currently does not
hal.canary 2016/09/29 15:31:13 Done.
+handle because either no one has asked for it or there is no simple
djsollen 2016/09/29 13:12:40 replace "no one has asked for it" with "no known c
hal.canary 2016/09/29 15:31:13 Done.
+PDF-ish way to handle it.
+
+**drop** means to draw nothing.
djsollen 2016/09/29 13:12:40 put a heading above these 3 terms indicating they
hal.canary 2016/09/29 15:31:13 Done.
+
+**ignore** mean to draw without the effect
+
+**expand** means to implement something in a non-PDF-ish way.
djsollen 2016/09/29 13:12:40 does non-PDF-ish mean rasterized content instead o
hal.canary 2016/09/29 15:31:13 Done. + **expand** means to implement something
+
+ - *SkMaskFilter* — Mask filters are either dropped (drawText calls)
djsollen 2016/09/29 13:12:39 these first 3 bullets (and the last one) say the
hal.canary 2016/09/29 15:31:13 Done.
+ or ignored (other draw calls).
+
+ - *SkPathEffect* — Path effects are either ignored (drawText calls)
+ or expanded (other draw calls).
+
+ - *SkColorFilter* — Color filters are either expanded (drawImage /
+ drawBitmap calls) or ignored (everything else);
+
+ - *SkImageFilter* — ImageFilter is always expanded. (Text-as-text is lost).
+
+ - *SkXferMode* — Transfer modes that are not natively supported by
+ PDF are ignored: DstOver, SrcIn, DstIn, SrcOut, DstOut, SrcATop,
+ DstATop, and Modulate.
+
+ - *SkShader* — Non-gradient shaders are expanded.
+
+<style scoped><!--
+#pdftable {border-collapse:collapse;}
+#pdftable tr th, #pdftable tr td {border:#888888 2px solid;padding: 5px;}
+--></style>
+<table id="pdftable">
+ <tr>
+ <th>Effect</th>
+ <th>text</th>
+ <th>images</th>
+ <th>everything else</th>
+ </tr>
+ <tr>
+ <th>SkMaskFilter</th>
+ <td>drop</td>
+ <td>ignore</td>
+ <td>ignore</td>
+ </tr>
+ <tr>
+ <th>SkPathEffect</th>
+ <td>ignore</td>
+ <td>n/a</td>
+ <td>expand</td>
+ </tr>
+ <tr>
+ <th>SkColorFilter</th>
+ <td>ignore</td>
+ <td>expand</td>
+ <td>ignore</td>
+ </tr>
+ <tr>
+ <th>SkImageFilter</th>
+ <td>expand</td>
+ <td>expand</td>
+ <td>expand</td>
+ </tr>
+ <tr>
+ <th>unsupported SkXferModes</th>
+ <td>ignore</td>
+ <td>ignore</td>
+ <td>ignore</td>
+ </tr>
+ <tr>
+ <th>non-gradient SkShader</th>
+ <td>expand</td>
+ <td>n/a</td>
+ <td>expand</td>
+ </tr>
+</table>
+
+Other limitations:
+
+ - *VerticalText* — drop. (No clients seem to make use of VerticalText.)
+
+ - *drawTextOnPath* — expand. (Text-as-text is lost.)
+
+ - *drawVertices* — drop.
+
+ - *drawPatch* — drop.
+
+* * *
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698