| 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 #ifndef SkPDFDevice_DEFINED | 8 #ifndef SkPDFDevice_DEFINED |
| 9 #define SkPDFDevice_DEFINED | 9 #define SkPDFDevice_DEFINED |
| 10 | 10 |
| 11 #include "SkBitmap.h" | 11 #include "SkBitmap.h" |
| 12 #include "SkCanvas.h" | 12 #include "SkCanvas.h" |
| 13 #include "SkClipStack.h" | 13 #include "SkClipStack.h" |
| 14 #include "SkData.h" | 14 #include "SkData.h" |
| 15 #include "SkDevice.h" | 15 #include "SkDevice.h" |
| 16 #include "SkPaint.h" | 16 #include "SkPaint.h" |
| 17 #include "SkRect.h" | 17 #include "SkRect.h" |
| 18 #include "SkRefCnt.h" | 18 #include "SkRefCnt.h" |
| 19 #include "SkSinglyLinkedList.h" | |
| 20 #include "SkStream.h" | 19 #include "SkStream.h" |
| 21 #include "SkTDArray.h" | 20 #include "SkTDArray.h" |
| 22 #include "SkTextBlob.h" | 21 |
| 22 #include "SkSinglyLinkedList.h" |
| 23 | 23 |
| 24 class SkImageBitmap; | 24 class SkImageBitmap; |
| 25 class SkPath; | 25 class SkPath; |
| 26 class SkPDFArray; | 26 class SkPDFArray; |
| 27 class SkPDFCanon; | 27 class SkPDFCanon; |
| 28 class SkPDFDevice; | 28 class SkPDFDevice; |
| 29 class SkPDFDocument; | 29 class SkPDFDocument; |
| 30 class SkPDFDict; | 30 class SkPDFDict; |
| 31 class SkPDFFont; | 31 class SkPDFFont; |
| 32 class SkPDFObject; | 32 class SkPDFObject; |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 const SkPaint& paint, | 288 const SkPaint& paint, |
| 289 bool hasText, | 289 bool hasText, |
| 290 GraphicStateEntry* entry); | 290 GraphicStateEntry* entry); |
| 291 int addGraphicStateResource(SkPDFObject* gs); | 291 int addGraphicStateResource(SkPDFObject* gs); |
| 292 int addXObjectResource(SkPDFObject* xObject); | 292 int addXObjectResource(SkPDFObject* xObject); |
| 293 | 293 |
| 294 // returns false when a valid SkFont can not be produced | 294 // returns false when a valid SkFont can not be produced |
| 295 bool updateFont(const SkPaint& paint, uint16_t glyphID, ContentEntry* conten
tEntry); | 295 bool updateFont(const SkPaint& paint, uint16_t glyphID, ContentEntry* conten
tEntry); |
| 296 int getFontResourceIndex(SkTypeface* typeface, uint16_t glyphID); | 296 int getFontResourceIndex(SkTypeface* typeface, uint16_t glyphID); |
| 297 | 297 |
| 298 | |
| 299 void internalDrawText(const SkDraw&, const void*, size_t, const SkScalar pos
[], | |
| 300 SkTextBlob::GlyphPositioning, SkPoint, const SkPaint&)
; | |
| 301 | |
| 302 | |
| 303 void internalDrawPaint(const SkPaint& paint, ContentEntry* contentEntry); | 298 void internalDrawPaint(const SkPaint& paint, ContentEntry* contentEntry); |
| 304 | 299 |
| 305 void internalDrawImage(const SkMatrix& origMatrix, | 300 void internalDrawImage(const SkMatrix& origMatrix, |
| 306 const SkClipStack* clipStack, | 301 const SkClipStack* clipStack, |
| 307 const SkRegion& origClipRegion, | 302 const SkRegion& origClipRegion, |
| 308 SkImageBitmap imageBitmap, | 303 SkImageBitmap imageBitmap, |
| 309 const SkPaint& paint); | 304 const SkPaint& paint); |
| 310 | 305 |
| 311 bool handleInversePath(const SkDraw& d, const SkPath& origPath, | 306 bool handleInversePath(const SkDraw& d, const SkPath& origPath, |
| 312 const SkPaint& paint, bool pathIsMutable, | 307 const SkPaint& paint, bool pathIsMutable, |
| 313 const SkMatrix* prePathMatrix = nullptr); | 308 const SkMatrix* prePathMatrix = nullptr); |
| 314 void handlePointAnnotation(const SkPoint&, const SkMatrix&, const char key[]
, SkData* value); | 309 void handlePointAnnotation(const SkPoint&, const SkMatrix&, const char key[]
, SkData* value); |
| 315 void handlePathAnnotation(const SkPath&, const SkDraw& d, const char key[],
SkData* value); | 310 void handlePathAnnotation(const SkPath&, const SkDraw& d, const char key[],
SkData* value); |
| 316 | 311 |
| 317 typedef SkBaseDevice INHERITED; | 312 typedef SkBaseDevice INHERITED; |
| 318 | 313 |
| 319 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create | 314 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create |
| 320 // an SkPDFDevice | 315 // an SkPDFDevice |
| 321 //friend class SkDocument_PDF; | 316 //friend class SkDocument_PDF; |
| 322 //friend class SkPDFImageShader; | 317 //friend class SkPDFImageShader; |
| 323 }; | 318 }; |
| 324 | 319 |
| 325 #endif | 320 #endif |
| OLD | NEW |