aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFUtils.h
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2015-10-06 09:41:47 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-06 09:41:47 -0700
commit8b2bc252faed7c751cf9248c3833c0631f498b7d (patch)
tree0693d95235ab8657e306fa16939aec6a26135f93 /src/pdf/SkPDFUtils.h
parent4a339529612a43871d021877e58698e067d6c4cd (diff)
SkPDF: when drawing stroked path, draw using SVG rules for zero-length segments
The "zeroPath" and emptystroke GMs capture this issue. This CL changes the following PDF GMs: emptystroke dashing4 lineclosepath dashing3 zeroPath linepath complexclip3_complex complexclip3_simple roundrects degeneratesegments filltypes strokerect pathfill inverse_paths desk_chalkboard.skp After this change, all PDF GMs look better (closer to 8888). The dashing4, emptystroke, and zeroPath GMs still need a lot of work to make them look right. BUG=538726 Review URL: https://codereview.chromium.org/1374383004
Diffstat (limited to 'src/pdf/SkPDFUtils.h')
-rw-r--r--src/pdf/SkPDFUtils.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pdf/SkPDFUtils.h b/src/pdf/SkPDFUtils.h
index 38f300aacf..0aa05a088a 100644
--- a/src/pdf/SkPDFUtils.h
+++ b/src/pdf/SkPDFUtils.h
@@ -46,7 +46,11 @@ public:
SkScalar dstX, SkScalar dstY, SkWStream* content);
static void AppendRectangle(const SkRect& rect, SkWStream* content);
static void EmitPath(const SkPath& path, SkPaint::Style paintStyle,
- SkWStream* content);
+ bool doConsumeDegerates, SkWStream* content);
+ static void EmitPath(const SkPath& path, SkPaint::Style paintStyle,
+ SkWStream* content) {
+ SkPDFUtils::EmitPath(path, paintStyle, true, content);
+ }
static void ClosePath(SkWStream* content);
static void PaintPath(SkPaint::Style style, SkPath::FillType fill,
SkWStream* content);