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

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

Issue 2130643004: drawTextRSXform (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update util canvases 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
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 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
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,
990 const SkMatrix* matrix, const SkPaint& paint); 990 const SkMatrix* matrix, const SkPaint& paint);
991 991
992 /**
993 * Draw the text with each character/glyph individually transformed by its xform.
994 * If cullRect is not null, it is a conservative bounds of what will be dra wn
robertphillips 2016/07/07 20:59:11 stray ')' ?
reed1 2016/07/07 22:51:45 Done.
995 * taking into account the xforms and the paint) and will be used to accele rate culling.
996 */
997 void drawTextRSXform(const void* text, size_t byteLength, const SkRSXform[],
998 const SkRect* cullRect, const SkPaint& paint);
999
992 /** Draw the text blob, offset by (x,y), using the specified paint. 1000 /** Draw the text blob, offset by (x,y), using the specified paint.
993 @param blob The text blob to be drawn 1001 @param blob The text blob to be drawn
994 @param x The x-offset of the text being drawn 1002 @param x The x-offset of the text being drawn
995 @param y The y-offset of the text being drawn 1003 @param y The y-offset of the text being drawn
996 @param paint The paint used for the text (e.g. color, size, style) 1004 @param paint The paint used for the text (e.g. color, size, style)
997 */ 1005 */
998 void drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPa int& paint); 1006 void drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPa int& paint);
999 1007
1000 /** Draw the picture into this canvas. This method effective brackets the 1008 /** 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 1009 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, 1325 virtual void onDrawPosText(const void* text, size_t byteLength,
1318 const SkPoint pos[], const SkPaint& paint); 1326 const SkPoint pos[], const SkPaint& paint);
1319 1327
1320 virtual void onDrawPosTextH(const void* text, size_t byteLength, 1328 virtual void onDrawPosTextH(const void* text, size_t byteLength,
1321 const SkScalar xpos[], SkScalar constY, 1329 const SkScalar xpos[], SkScalar constY,
1322 const SkPaint& paint); 1330 const SkPaint& paint);
1323 1331
1324 virtual void onDrawTextOnPath(const void* text, size_t byteLength, 1332 virtual void onDrawTextOnPath(const void* text, size_t byteLength,
1325 const SkPath& path, const SkMatrix* matrix, 1333 const SkPath& path, const SkMatrix* matrix,
1326 const SkPaint& paint); 1334 const SkPaint& paint);
1335 virtual void onDrawTextRSXform(const void* text, size_t byteLength, const Sk RSXform[],
1336 const SkRect* cullRect, const SkPaint& paint) ;
1327 1337
1328 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, 1338 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
1329 const SkPaint& paint); 1339 const SkPaint& paint);
1330 1340
1331 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], 1341 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
1332 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); 1342 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint);
1333 1343
1334 virtual void onDrawDrawable(SkDrawable*, const SkMatrix*); 1344 virtual void onDrawDrawable(SkDrawable*, const SkMatrix*);
1335 1345
1336 virtual void onDrawPaint(const SkPaint&); 1346 virtual void onDrawPaint(const SkPaint&);
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 1595
1586 class SkCanvasClipVisitor { 1596 class SkCanvasClipVisitor {
1587 public: 1597 public:
1588 virtual ~SkCanvasClipVisitor(); 1598 virtual ~SkCanvasClipVisitor();
1589 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1599 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1590 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; 1600 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0;
1591 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1601 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1592 }; 1602 };
1593 1603
1594 #endif 1604 #endif
OLDNEW
« no previous file with comments | « gm/drawatlas.cpp ('k') | include/core/SkDevice.h » ('j') | tools/debugger/SkDrawCommand.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698