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

Side by Side Diff: include/core/SkCanvas.h

Issue 2130643004: drawTextRSXform (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « gm/drawatlas.cpp ('k') | include/core/SkDevice.h » ('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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 SkCanvas_DEFINED 8 #ifndef SkCanvas_DEFINED
9 #define SkCanvas_DEFINED 9 #define SkCanvas_DEFINED
10 10
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 /** Draw the text, with origin at (x,y), using the specified paint, along 979 /** Draw the text, with origin at (x,y), using the specified paint, along
980 the specified path. The paint's Align setting determins where along the 980 the specified path. The paint's Align setting determins where along the
981 path to start the text. 981 path to start the text.
982 @param text The text to be drawn 982 @param text The text to be drawn
983 @param byteLength The number of bytes to read from the text parameter 983 @param byteLength The number of bytes to read from the text parameter
984 @param path The path the text should follow for its baseline 984 @param path The path the text should follow for its baseline
985 @param matrix (may be null) Applied to the text before it is 985 @param matrix (may be null) Applied to the text before it is
986 mapped onto the path 986 mapped onto the path
987 @param paint The paint used for the text 987 @param paint The paint used for the text
988 */ 988 */
989 void drawTextOnPath(const void* text, size_t byteLength, const SkPath& path, 989 void drawTextOnPath(const void* text, size_t byteLength, const SkPath& path,
f(malita) 2016/07/07 16:51:05 Could this be refactored as a drawTextRSXform wrap
reed1 2016/07/07 18:51:50 Oddly, no. This guy warps each glyph, bending stra
990 const SkMatrix* matrix, const SkPaint& paint); 990 const SkMatrix* matrix, const SkPaint& paint);
991 991
992 void drawTextRSXform(const void* text, size_t byteLength, const SkRSXform[],
f(malita) 2016/07/07 16:51:05 + Docs.
reed1 2016/07/07 18:51:50 Done.
993 const SkPaint& paint);
994
992 /** Draw the text blob, offset by (x,y), using the specified paint. 995 /** Draw the text blob, offset by (x,y), using the specified paint.
993 @param blob The text blob to be drawn 996 @param blob The text blob to be drawn
994 @param x The x-offset of the text being drawn 997 @param x The x-offset of the text being drawn
995 @param y The y-offset of the text being drawn 998 @param y The y-offset of the text being drawn
996 @param paint The paint used for the text (e.g. color, size, style) 999 @param paint The paint used for the text (e.g. color, size, style)
997 */ 1000 */
998 void drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPa int& paint); 1001 void drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPa int& paint);
999 1002
1000 /** Draw the picture into this canvas. This method effective brackets the 1003 /** Draw the picture into this canvas. This method effective brackets the
1001 playback of the picture's draw calls with save/restore, so the state 1004 playback of the picture's draw calls with save/restore, so the state
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 virtual void onDrawPosText(const void* text, size_t byteLength, 1320 virtual void onDrawPosText(const void* text, size_t byteLength,
1318 const SkPoint pos[], const SkPaint& paint); 1321 const SkPoint pos[], const SkPaint& paint);
1319 1322
1320 virtual void onDrawPosTextH(const void* text, size_t byteLength, 1323 virtual void onDrawPosTextH(const void* text, size_t byteLength,
1321 const SkScalar xpos[], SkScalar constY, 1324 const SkScalar xpos[], SkScalar constY,
1322 const SkPaint& paint); 1325 const SkPaint& paint);
1323 1326
1324 virtual void onDrawTextOnPath(const void* text, size_t byteLength, 1327 virtual void onDrawTextOnPath(const void* text, size_t byteLength,
1325 const SkPath& path, const SkMatrix* matrix, 1328 const SkPath& path, const SkMatrix* matrix,
1326 const SkPaint& paint); 1329 const SkPaint& paint);
1330 virtual void onDrawTextRSXform(const void* text, size_t byteLength, const Sk RSXform[],
f(malita) 2016/07/07 16:51:04 + 100000000 overrides in all SkCanvas subclasses.
reed1 2016/07/07 18:51:50 Eventually. The base impl calls through to a base-
1331 const SkPaint& paint);
1327 1332
1328 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, 1333 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
1329 const SkPaint& paint); 1334 const SkPaint& paint);
1330 1335
1331 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], 1336 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
1332 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); 1337 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint);
1333 1338
1334 virtual void onDrawDrawable(SkDrawable*, const SkMatrix*); 1339 virtual void onDrawDrawable(SkDrawable*, const SkMatrix*);
1335 1340
1336 virtual void onDrawPaint(const SkPaint&); 1341 virtual void onDrawPaint(const SkPaint&);
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 1590
1586 class SkCanvasClipVisitor { 1591 class SkCanvasClipVisitor {
1587 public: 1592 public:
1588 virtual ~SkCanvasClipVisitor(); 1593 virtual ~SkCanvasClipVisitor();
1589 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1594 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1590 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; 1595 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0;
1591 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1596 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1592 }; 1597 };
1593 1598
1594 #endif 1599 #endif
OLDNEW
« no previous file with comments | « gm/drawatlas.cpp ('k') | include/core/SkDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698