OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkPDFDevice.h" | 8 #include "SkPDFDevice.h" |
9 | 9 |
10 #include "SkAnnotation.h" | 10 #include "SkAnnotation.h" |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 &fDstFormXObject); | 701 &fDstFormXObject); |
702 } | 702 } |
703 }; | 703 }; |
704 | 704 |
705 //////////////////////////////////////////////////////////////////////////////// | 705 //////////////////////////////////////////////////////////////////////////////// |
706 | 706 |
707 SkPDFDevice::SkPDFDevice(SkISize pageSize, | 707 SkPDFDevice::SkPDFDevice(SkISize pageSize, |
708 SkScalar rasterDpi, | 708 SkScalar rasterDpi, |
709 SkPDFCanon* canon, | 709 SkPDFCanon* canon, |
710 bool flip) | 710 bool flip) |
711 : fPageSize(pageSize) | 711 : INHERITED(SkSurfaceProps(0, kUnknown_SkPixelGeometry)) |
| 712 , fPageSize(pageSize) |
712 , fContentSize(pageSize) | 713 , fContentSize(pageSize) |
713 , fExistingClipRegion(SkIRect::MakeSize(pageSize)) | 714 , fExistingClipRegion(SkIRect::MakeSize(pageSize)) |
714 , fAnnotations(NULL) | 715 , fAnnotations(NULL) |
715 , fLastContentEntry(NULL) | 716 , fLastContentEntry(NULL) |
716 , fLastMarginContentEntry(NULL) | 717 , fLastMarginContentEntry(NULL) |
717 , fDrawingArea(kContent_DrawingArea) | 718 , fDrawingArea(kContent_DrawingArea) |
718 , fClipStack(NULL) | 719 , fClipStack(NULL) |
719 , fFontGlyphUsage(SkNEW(SkPDFGlyphSetMap)) | 720 , fFontGlyphUsage(SkNEW(SkPDFGlyphSetMap)) |
720 , fRasterDpi(rasterDpi) | 721 , fRasterDpi(rasterDpi) |
721 , fCanon(canon) { | 722 , fCanon(canon) { |
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2201 return; | 2202 return; |
2202 } | 2203 } |
2203 SkAutoTUnref<SkPDFObject> image(SkPDFBitmap::Create(fCanon, subsetBitmap)); | 2204 SkAutoTUnref<SkPDFObject> image(SkPDFBitmap::Create(fCanon, subsetBitmap)); |
2204 if (!image) { | 2205 if (!image) { |
2205 return; | 2206 return; |
2206 } | 2207 } |
2207 | 2208 |
2208 SkPDFUtils::DrawFormXObject(this->addXObjectResource(image.get()), | 2209 SkPDFUtils::DrawFormXObject(this->addXObjectResource(image.get()), |
2209 &content.entry()->fContent); | 2210 &content.entry()->fContent); |
2210 } | 2211 } |
OLD | NEW |