OLD | NEW |
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 protected: | 59 protected: |
60 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; | 60 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; |
61 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS
calar y, | 61 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS
calar y, |
62 const SkPaint&) SK_OVERRIDE; | 62 const SkPaint&) SK_OVERRIDE; |
63 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin
t pos[], | 63 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin
t pos[], |
64 const SkPaint&) SK_OVERRIDE; | 64 const SkPaint&) SK_OVERRIDE; |
65 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], | 65 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], |
66 SkScalar constY, const SkPaint&) SK_OVERRIDE; | 66 SkScalar constY, const SkPaint&) SK_OVERRIDE; |
67 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, | 67 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, |
68 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; | 68 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; |
| 69 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, |
| 70 const SkPaint& paint) SK_OVERRIDE; |
69 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], | 71 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], |
70 const SkPoint texCoords[4], SkXfermode* xmode, | 72 const SkPoint texCoords[4], SkXfermode* xmode, |
71 const SkPaint& paint) SK_OVERRIDE; | 73 const SkPaint& paint) SK_OVERRIDE; |
72 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*
) SK_OVERRIDE; | 74 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*
) SK_OVERRIDE; |
73 virtual void willSave() SK_OVERRIDE; | 75 virtual void willSave() SK_OVERRIDE; |
74 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; | 76 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; |
75 virtual void willRestore() SK_OVERRIDE; | 77 virtual void willRestore() SK_OVERRIDE; |
76 | 78 |
77 private: | 79 private: |
78 /** | 80 /** |
79 * Takes a bounding box in current canvas view space, accounts for stroking
and effects, and | 81 * Takes a bounding box in current canvas view space, accounts for stroking
and effects, and |
80 * computes an axis-aligned bounding box in device coordinates, then passes
it to handleBBox() | 82 * computes an axis-aligned bounding box in device coordinates, then passes
it to handleBBox() |
81 * returns false if the draw is completely clipped out, and may safely be ig
nored. | 83 * returns false if the draw is completely clipped out, and may safely be ig
nored. |
82 **/ | 84 **/ |
83 bool transformBounds(const SkRect& bounds, const SkPaint* paint); | 85 bool transformBounds(const SkRect& bounds, const SkPaint* paint); |
84 | 86 |
85 /** | 87 /** |
86 * Paints from currently-active saveLayers that need to be applied to boundi
ng boxes of all | 88 * Paints from currently-active saveLayers that need to be applied to boundi
ng boxes of all |
87 * primitives drawn inside them. We own these pointers. | 89 * primitives drawn inside them. We own these pointers. |
88 **/ | 90 **/ |
89 SkTDArray<const SkPaint*> fSaveStack; | 91 SkTDArray<const SkPaint*> fSaveStack; |
90 | 92 |
91 typedef SkPictureRecord INHERITED; | 93 typedef SkPictureRecord INHERITED; |
92 }; | 94 }; |
93 | 95 |
94 #endif | 96 #endif |
OLD | NEW |