OLD | NEW |
---|---|
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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
291 * Helper for calling writePixels(info, ...) by passing its pixels and rowb ytes. If the bitmap | 291 * Helper for calling writePixels(info, ...) by passing its pixels and rowb ytes. If the bitmap |
292 * is just wrapping a texture, returns false and does nothing. | 292 * is just wrapping a texture, returns false and does nothing. |
293 */ | 293 */ |
294 bool writePixels(const SkBitmap& bitmap, int x, int y); | 294 bool writePixels(const SkBitmap& bitmap, int x, int y); |
295 | 295 |
296 /////////////////////////////////////////////////////////////////////////// | 296 /////////////////////////////////////////////////////////////////////////// |
297 | 297 |
298 enum SaveFlags { | 298 enum SaveFlags { |
299 /** save the matrix state, restoring it on restore() */ | 299 /** save the matrix state, restoring it on restore() */ |
300 // [deprecated] kMatrix_SaveFlag = 0x01, | 300 // [deprecated] kMatrix_SaveFlag = 0x01, |
301 kMatrix_SaveFlag = 0x01, | |
scroggo
2014/07/01 18:40:41
If you want to make it clear that no one should us
| |
301 /** save the clip state, restoring it on restore() */ | 302 /** save the clip state, restoring it on restore() */ |
302 // [deprecated] kClip_SaveFlag = 0x02, | 303 // [deprecated] kClip_SaveFlag = 0x02, |
304 kClip_SaveFlag = 0x02, | |
303 /** the layer needs to support per-pixel alpha */ | 305 /** the layer needs to support per-pixel alpha */ |
304 kHasAlphaLayer_SaveFlag = 0x04, | 306 kHasAlphaLayer_SaveFlag = 0x04, |
305 /** the layer needs to support 8-bits per color component */ | 307 /** the layer needs to support 8-bits per color component */ |
306 kFullColorLayer_SaveFlag = 0x08, | 308 kFullColorLayer_SaveFlag = 0x08, |
307 /** | 309 /** |
308 * the layer should clip against the bounds argument | 310 * the layer should clip against the bounds argument |
309 * | 311 * |
310 * if SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG is undefined, this is treated a s always on. | 312 * if SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG is undefined, this is treated a s always on. |
311 */ | 313 */ |
312 kClipToLayer_SaveFlag = 0x10, | 314 kClipToLayer_SaveFlag = 0x10, |
313 | 315 |
314 // helper masks for common choices | 316 // helper masks for common choices |
315 // [deprecated] kMatrixClip_SaveFlag = 0x03, | 317 // [deprecated] kMatrixClip_SaveFlag = 0x03, |
318 kMatrixClip_SaveFlag = 0x03, | |
316 #ifdef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG | 319 #ifdef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG |
317 kARGB_NoClipLayer_SaveFlag = 0x0F, | 320 kARGB_NoClipLayer_SaveFlag = 0x0F, |
318 #endif | 321 #endif |
319 kARGB_ClipLayer_SaveFlag = 0x1F | 322 kARGB_ClipLayer_SaveFlag = 0x1F |
320 }; | 323 }; |
321 | 324 |
322 /** This call saves the current matrix, clip, and drawFilter, and pushes a | 325 /** This call saves the current matrix, clip, and drawFilter, and pushes a |
323 copy onto a private stack. Subsequent calls to translate, scale, | 326 copy onto a private stack. Subsequent calls to translate, scale, |
324 rotate, skew, concat or clipRect, clipPath, and setDrawFilter all | 327 rotate, skew, concat or clipRect, clipPath, and setDrawFilter all |
325 operate on this copy. | 328 operate on this copy. |
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1474 | 1477 |
1475 class SkCanvasClipVisitor { | 1478 class SkCanvasClipVisitor { |
1476 public: | 1479 public: |
1477 virtual ~SkCanvasClipVisitor(); | 1480 virtual ~SkCanvasClipVisitor(); |
1478 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1481 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1479 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1482 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1480 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1483 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1481 }; | 1484 }; |
1482 | 1485 |
1483 #endif | 1486 #endif |
OLD | NEW |