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

Side by Side Diff: src/core/SkBBoxRecord.h

Issue 22585002: Add SkCanvas::drawPosTextBounded. (Closed) Base URL: http://skia.googlecode.com/svn/trunk
Patch Set: spelling correction Created 7 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 | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef SkBBoxRecord_DEFINED 9 #ifndef SkBBoxRecord_DEFINED
10 #define SkBBoxRecord_DEFINED 10 #define SkBBoxRecord_DEFINED
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, 42 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
43 const SkPaint* paint = NULL) SK_OVERRIDE; 43 const SkPaint* paint = NULL) SK_OVERRIDE;
44 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, 44 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
45 const SkRect& dst, const SkPaint* paint) SK_OVER RIDE; 45 const SkRect& dst, const SkPaint* paint) SK_OVER RIDE;
46 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& mat, 46 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& mat,
47 const SkPaint* paint) SK_OVERRIDE; 47 const SkPaint* paint) SK_OVERRIDE;
48 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, 48 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
49 const SkRect& dst, const SkPaint* paint) SK_OVER RIDE; 49 const SkRect& dst, const SkPaint* paint) SK_OVER RIDE;
50 virtual void drawPosText(const void* text, size_t byteLength, 50 virtual void drawPosText(const void* text, size_t byteLength,
51 const SkPoint pos[], const SkPaint& paint) SK_OVERR IDE; 51 const SkPoint pos[], const SkPaint& paint) SK_OVERR IDE;
52 virtual void drawPosTextBounded(const void* text, size_t byteLength,
53 const SkPoint pos[], const SkRect& bbox,
54 const SkPaint& paint) SK_OVERRIDE;
52 virtual void drawPosTextH(const void* text, size_t byteLength, 55 virtual void drawPosTextH(const void* text, size_t byteLength,
53 const SkScalar xpos[], SkScalar constY, 56 const SkScalar xpos[], SkScalar constY,
54 const SkPaint& paint) SK_OVERRIDE; 57 const SkPaint& paint) SK_OVERRIDE;
55 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, 58 virtual void drawSprite(const SkBitmap& bitmap, int left, int top,
56 const SkPaint* paint) SK_OVERRIDE; 59 const SkPaint* paint) SK_OVERRIDE;
57 virtual void drawTextOnPath(const void* text, size_t byteLength, 60 virtual void drawTextOnPath(const void* text, size_t byteLength,
58 const SkPath& path, const SkMatrix* matrix, 61 const SkPath& path, const SkMatrix* matrix,
59 const SkPaint& paint) SK_OVERRIDE; 62 const SkPaint& paint) SK_OVERRIDE;
60 virtual void drawVertices(VertexMode mode, int vertexCount, 63 virtual void drawVertices(VertexMode mode, int vertexCount,
61 const SkPoint vertices[], const SkPoint texs[], 64 const SkPoint vertices[], const SkPoint texs[],
62 const SkColor colors[], SkXfermode* xfer, 65 const SkColor colors[], SkXfermode* xfer,
63 const uint16_t indices[], int indexCount, 66 const uint16_t indices[], int indexCount,
64 const SkPaint& paint) SK_OVERRIDE; 67 const SkPaint& paint) SK_OVERRIDE;
65 virtual void drawPicture(SkPicture& picture) SK_OVERRIDE; 68 virtual void drawPicture(SkPicture& picture) SK_OVERRIDE;
66 69
67 private: 70 private:
68 /** 71 /**
69 * Takes a bounding box in current canvas view space, accounts for stroking and effects, and 72 * Takes a bounding box in current canvas view space, accounts for stroking and effects, and
70 * computes an axis-aligned bounding box in device coordinates, then passes it to handleBBox() 73 * computes an axis-aligned bounding box in device coordinates, then passes it to handleBBox()
71 * returns false if the draw is completely clipped out, and may safely be ig nored. 74 * returns false if the draw is completely clipped out, and may safely be ig nored.
72 **/ 75 **/
73 bool transformBounds(const SkRect& bounds, const SkPaint* paint); 76 bool transformBounds(const SkRect& bounds, const SkPaint* paint);
74 77
75 typedef SkPictureRecord INHERITED; 78 typedef SkPictureRecord INHERITED;
76 }; 79 };
77 80
78 #endif 81 #endif
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | src/core/SkBBoxRecord.cpp » ('j') | src/core/SkBBoxRecord.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698