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

Side by Side Diff: src/pdf/SkPDFDevice.h

Issue 2241683005: SkPDF: unify drawText and drawPosText (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: stop assuming typeface has glyphs Created 4 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 | « no previous file | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
19 #include "SkStream.h" 20 #include "SkStream.h"
20 #include "SkTDArray.h" 21 #include "SkTDArray.h"
21 22 #include "SkTextBlob.h"
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
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
298 void internalDrawPaint(const SkPaint& paint, ContentEntry* contentEntry); 303 void internalDrawPaint(const SkPaint& paint, ContentEntry* contentEntry);
299 304
300 void internalDrawImage(const SkMatrix& origMatrix, 305 void internalDrawImage(const SkMatrix& origMatrix,
301 const SkClipStack* clipStack, 306 const SkClipStack* clipStack,
302 const SkRegion& origClipRegion, 307 const SkRegion& origClipRegion,
303 SkImageBitmap imageBitmap, 308 SkImageBitmap imageBitmap,
304 const SkPaint& paint); 309 const SkPaint& paint);
305 310
306 bool handleInversePath(const SkDraw& d, const SkPath& origPath, 311 bool handleInversePath(const SkDraw& d, const SkPath& origPath,
307 const SkPaint& paint, bool pathIsMutable, 312 const SkPaint& paint, bool pathIsMutable,
308 const SkMatrix* prePathMatrix = nullptr); 313 const SkMatrix* prePathMatrix = nullptr);
309 void handlePointAnnotation(const SkPoint&, const SkMatrix&, const char key[] , SkData* value); 314 void handlePointAnnotation(const SkPoint&, const SkMatrix&, const char key[] , SkData* value);
310 void handlePathAnnotation(const SkPath&, const SkDraw& d, const char key[], SkData* value); 315 void handlePathAnnotation(const SkPath&, const SkDraw& d, const char key[], SkData* value);
311 316
312 typedef SkBaseDevice INHERITED; 317 typedef SkBaseDevice INHERITED;
313 318
314 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create 319 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create
315 // an SkPDFDevice 320 // an SkPDFDevice
316 //friend class SkDocument_PDF; 321 //friend class SkDocument_PDF;
317 //friend class SkPDFImageShader; 322 //friend class SkPDFImageShader;
318 }; 323 };
319 324
320 #endif 325 #endif
OLDNEW
« no previous file with comments | « no previous file | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698