| OLD | NEW |
| 1 #include "SkPdfBasics.h" | 1 #include "SkPdfGraphicsState.h" |
| 2 #include "SkPdfNativeTokenizer.h" | 2 #include "SkPdfNativeTokenizer.h" |
| 3 | 3 |
| 4 #include "SkDashPathEffect.h" | 4 #include "SkDashPathEffect.h" |
| 5 | 5 |
| 6 PdfContext::PdfContext(SkNativeParsedPDF* doc) | 6 SkPdfContext::SkPdfContext(SkPdfNativeDoc* doc) |
| 7 : fPdfDoc(doc) | 7 : fPdfDoc(doc) |
| 8 , fTmpPageAllocator(new SkPdfAllocator()) { | 8 , fTmpPageAllocator(new SkPdfAllocator()) { |
| 9 } | 9 } |
| 10 | 10 |
| 11 PdfContext::~PdfContext() { | 11 SkPdfContext::~SkPdfContext() { |
| 12 delete fTmpPageAllocator; | 12 delete fTmpPageAllocator; |
| 13 } | 13 } |
| 14 | 14 |
| 15 void SkPdfGraphicsState::applyGraphicsState(SkPaint* paint, bool stroking) { | 15 void SkPdfGraphicsState::applyGraphicsState(SkPaint* paint, bool stroking) { |
| 16 if (stroking) { | 16 if (stroking) { |
| 17 fStroking.applyGraphicsState(paint); | 17 fStroking.applyGraphicsState(paint); |
| 18 } else { | 18 } else { |
| 19 fNonStroking.applyGraphicsState(paint); | 19 fNonStroking.applyGraphicsState(paint); |
| 20 } | 20 } |
| 21 | 21 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 34 } | 34 } |
| 35 | 35 |
| 36 // TODO(edisonn): NYI multiple blend modes | 36 // TODO(edisonn): NYI multiple blend modes |
| 37 if (fBlendModesLength == 1 && fBlendModes[0] != SkXfermode::kSrc_Mode) { | 37 if (fBlendModesLength == 1 && fBlendModes[0] != SkXfermode::kSrc_Mode) { |
| 38 paint->setXfermodeMode(fBlendModes[0]); | 38 paint->setXfermodeMode(fBlendModes[0]); |
| 39 } | 39 } |
| 40 | 40 |
| 41 //paint->setStrokeMiter(SkDoubleToScalar(fMiterLimit)); | 41 //paint->setStrokeMiter(SkDoubleToScalar(fMiterLimit)); |
| 42 // TODO(edisonn): impl cap and join | 42 // TODO(edisonn): impl cap and join |
| 43 } | 43 } |
| OLD | NEW |