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

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

Issue 2300393002: SkPDF: implement drawTextBlob() (Closed)
Patch Set: 2016-09-02 (Friday) 10:00:45 EDT Created 4 years, 3 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
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 const SkImage*, 104 const SkImage*,
105 const SkRect* src, 105 const SkRect* src,
106 const SkRect& dst, 106 const SkRect& dst,
107 const SkPaint&, 107 const SkPaint&,
108 SkCanvas::SrcRectConstraint) override; 108 SkCanvas::SrcRectConstraint) override;
109 void drawText(const SkDraw&, const void* text, size_t len, 109 void drawText(const SkDraw&, const void* text, size_t len,
110 SkScalar x, SkScalar y, const SkPaint&) override; 110 SkScalar x, SkScalar y, const SkPaint&) override;
111 void drawPosText(const SkDraw&, const void* text, size_t len, 111 void drawPosText(const SkDraw&, const void* text, size_t len,
112 const SkScalar pos[], int scalarsPerPos, 112 const SkScalar pos[], int scalarsPerPos,
113 const SkPoint& offset, const SkPaint&) override; 113 const SkPoint& offset, const SkPaint&) override;
114 void drawTextBlob(const SkDraw&, const SkTextBlob*, SkScalar x, SkScalar y,
115 const SkPaint &, SkDrawFilter*) override;
114 void drawVertices(const SkDraw&, SkCanvas::VertexMode, 116 void drawVertices(const SkDraw&, SkCanvas::VertexMode,
115 int vertexCount, const SkPoint verts[], 117 int vertexCount, const SkPoint verts[],
116 const SkPoint texs[], const SkColor colors[], 118 const SkPoint texs[], const SkColor colors[],
117 SkXfermode* xmode, const uint16_t indices[], 119 SkXfermode* xmode, const uint16_t indices[],
118 int indexCount, const SkPaint& paint) override; 120 int indexCount, const SkPaint& paint) override;
119 void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, 121 void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y,
120 const SkPaint&) override; 122 const SkPaint&) override;
121 123
122 // PDF specific methods. 124 // PDF specific methods.
123 125
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 281
280 // returns nullptr when a valid SkFont can not be produced 282 // returns nullptr when a valid SkFont can not be produced
281 SkPDFFont* updateFont(SkTypeface* typeface, 283 SkPDFFont* updateFont(SkTypeface* typeface,
282 SkScalar textSize, 284 SkScalar textSize,
283 uint16_t glyphID, 285 uint16_t glyphID,
284 ContentEntry* contentEntry); 286 ContentEntry* contentEntry);
285 int getFontResourceIndex(SkTypeface* typeface, uint16_t glyphID); 287 int getFontResourceIndex(SkTypeface* typeface, uint16_t glyphID);
286 288
287 289
288 void internalDrawText(const SkDraw&, const void*, size_t, const SkScalar pos [], 290 void internalDrawText(const SkDraw&, const void*, size_t, const SkScalar pos [],
289 SkTextBlob::GlyphPositioning, SkPoint, const SkPaint&) ; 291 SkTextBlob::GlyphPositioning, SkPoint, const SkPaint&,
290 292 const uint32_t*, uint32_t, const char*);
291 293
292 void internalDrawPaint(const SkPaint& paint, ContentEntry* contentEntry); 294 void internalDrawPaint(const SkPaint& paint, ContentEntry* contentEntry);
293 295
294 void internalDrawImage(const SkMatrix& origMatrix, 296 void internalDrawImage(const SkMatrix& origMatrix,
295 const SkClipStack* clipStack, 297 const SkClipStack* clipStack,
296 const SkRegion& origClipRegion, 298 const SkRegion& origClipRegion,
297 SkImageBitmap imageBitmap, 299 SkImageBitmap imageBitmap,
298 const SkPaint& paint); 300 const SkPaint& paint);
299 301
300 bool handleInversePath(const SkDraw& d, const SkPath& origPath, 302 bool handleInversePath(const SkDraw& d, const SkPath& origPath,
301 const SkPaint& paint, bool pathIsMutable, 303 const SkPaint& paint, bool pathIsMutable,
302 const SkMatrix* prePathMatrix = nullptr); 304 const SkMatrix* prePathMatrix = nullptr);
303 void handlePointAnnotation(const SkPoint&, const SkMatrix&, const char key[] , SkData* value); 305 void handlePointAnnotation(const SkPoint&, const SkMatrix&, const char key[] , SkData* value);
304 void handlePathAnnotation(const SkPath&, const SkDraw& d, const char key[], SkData* value); 306 void handlePathAnnotation(const SkPath&, const SkDraw& d, const char key[], SkData* value);
305 307
306 typedef SkBaseDevice INHERITED; 308 typedef SkBaseDevice INHERITED;
307 309
308 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create 310 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create
309 // an SkPDFDevice 311 // an SkPDFDevice
310 //friend class SkDocument_PDF; 312 //friend class SkDocument_PDF;
311 //friend class SkPDFImageShader; 313 //friend class SkPDFImageShader;
312 }; 314 };
313 315
314 #endif 316 #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