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

Side by Side Diff: experimental/PdfViewer/SkPdfGraphicsState.cpp

Issue 1266093003: Remove experimental/PdfViewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-03 (Monday) 10:43:56 EDT Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « experimental/PdfViewer/SkPdfGraphicsState.h ('k') | experimental/PdfViewer/SkPdfReporter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "SkPdfGraphicsState.h"
9
10 #include "SkDashPathEffect.h"
11
12 void SkPdfGraphicsState::applyGraphicsState(SkPaint* paint, bool stroking) {
13 if (stroking) {
14 fStroking.applyGraphicsState(paint);
15 } else {
16 fNonStroking.applyGraphicsState(paint);
17 }
18
19 // TODO(edisonn): Perf, we should load this option from pdfContext->options,
20 // or pdfContext->addPaintOptions(&paint);
21 paint->setAntiAlias(true);
22
23 // TODO(edisonn): miter, ...
24 if (stroking) {
25 paint->setStrokeWidth(SkDoubleToScalar(fLineWidth));
26 // TODO(edisonn): perf, avoid allocs of the intervals
27 if (fDashArrayLength > 0) {
28 paint->setPathEffect(SkDashPathEffect::Create(fDashArray,
29 fDashArrayLength,
30 fDashPhase))->unref();
31 }
32 }
33
34 // TODO(edisonn): NYI multiple blend modes
35 if (fBlendModesLength == 1 && fBlendModes[0] != SkXfermode::kSrc_Mode) {
36 paint->setXfermodeMode(fBlendModes[0]);
37 }
38
39 //paint->setStrokeMiter(SkDoubleToScalar(fMiterLimit));
40 // TODO(edisonn): impl cap and join
41 }
OLDNEW
« no previous file with comments | « experimental/PdfViewer/SkPdfGraphicsState.h ('k') | experimental/PdfViewer/SkPdfReporter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698