diff options
author | halcanary <halcanary@google.com> | 2016-09-29 08:43:41 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-29 08:43:41 -0700 |
commit | 919f21f877a42b8c50531bcf813d7a1bc212f13c (patch) | |
tree | 3faa8cf86c12b97f5d0b8a013f36c459e30d1253 /site | |
parent | 2b7394b9fbfc6f430dc0ee1c1e9505fe5c736838 (diff) |
SkPDF/Documentation: backend limitations
NOTRY=true
Review-Url: https://codereview.chromium.org/2377473002
Diffstat (limited to 'site')
-rw-r--r-- | site/user/sample/pdf.md | 60 |
1 files changed, 58 insertions, 2 deletions
diff --git a/site/user/sample/pdf.md b/site/user/sample/pdf.md index 1668f3939a..d54172bc52 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,59 @@ 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 currently +does not handle because either no known client uses the feature or +there is no simple PDF-ish way to handle it. + +In this document: + + + **drop** means to draw nothing. + + + **ignore** mean to draw without the effect + + + **expand** means to implement something in a non-PDF-ish way. + This may mean to rasterize vector graphics, to expand paths with + path effects into many individual paths, or to convert text to + paths. + +<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> + +Notes: + + - *SkImageFilter*: When SkImageFilter is expanded, text-as-text is lost. + + - *SkXferMode*: The following transfer modes are not natively + supported by PDF: DstOver, SrcIn, DstIn, SrcOut, DstOut, SrcATop, + DstATop, and Modulate. + +Other limitations: + + - *drawText with VerticalText* — drop. No known clients seem to make use + of the VerticalText flag. + + - *drawTextOnPath* — expand. (Text-as-text is lost.) + + - *drawVertices* — drop. + + - *drawPatch* — drop. + +* * * |