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 22 matching lines...) Expand all Loading... |
33 class SkRRect; | 33 class SkRRect; |
34 class SkSurface; | 34 class SkSurface; |
35 class SkSurface_Base; | 35 class SkSurface_Base; |
36 class SkTextBlob; | 36 class SkTextBlob; |
37 class GrContext; | 37 class GrContext; |
38 class GrRenderTarget; | 38 class GrRenderTarget; |
39 | 39 |
40 class SkCanvasState; | 40 class SkCanvasState; |
41 | 41 |
42 namespace SkCanvasStateUtils { | 42 namespace SkCanvasStateUtils { |
43 SkCanvasState* CaptureCanvasState(SkCanvas*);// needs gettotalclip() | 43 SK_API SkCanvasState* CaptureCanvasState(SkCanvas*); |
44 } | 44 } |
45 | 45 |
46 /** \class SkCanvas | 46 /** \class SkCanvas |
47 | 47 |
48 A Canvas encapsulates all of the state about drawing into a device (bitmap). | 48 A Canvas encapsulates all of the state about drawing into a device (bitmap). |
49 This includes a reference to the device itself, and a stack of matrix/clip | 49 This includes a reference to the device itself, and a stack of matrix/clip |
50 values. For any given draw call (e.g. drawRect), the geometry of the object | 50 values. For any given draw call (e.g. drawRect), the geometry of the object |
51 being drawn is transformed by the concatenation of all the matrices in the | 51 being drawn is transformed by the concatenation of all the matrices in the |
52 stack. The transformed geometry is clipped by the intersection of all of | 52 stack. The transformed geometry is clipped by the intersection of all of |
53 the clips in the stack. | 53 the clips in the stack. |
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1303 bool fDeviceCMDirty; // cleared by updateDeviceCMCache() | 1303 bool fDeviceCMDirty; // cleared by updateDeviceCMCache() |
1304 void updateDeviceCMCache(); | 1304 void updateDeviceCMCache(); |
1305 | 1305 |
1306 friend class SkDrawIter; // needs setupDrawForLayerDevice() | 1306 friend class SkDrawIter; // needs setupDrawForLayerDevice() |
1307 friend class AutoDrawLooper; | 1307 friend class AutoDrawLooper; |
1308 friend class SkLua; // needs top layer size and offset | 1308 friend class SkLua; // needs top layer size and offset |
1309 friend class SkDebugCanvas; // needs experimental fAllowSimplifyClip | 1309 friend class SkDebugCanvas; // needs experimental fAllowSimplifyClip |
1310 friend class SkDeferredDevice; // needs getTopDevice() | 1310 friend class SkDeferredDevice; // needs getTopDevice() |
1311 friend class SkSurface_Raster; // needs getDevice() | 1311 friend class SkSurface_Raster; // needs getDevice() |
1312 | 1312 |
1313 friend SkCanvasState* SkCanvasStateUtils::CaptureCanvasState(SkCanvas*);// n
eeds gettotalclip() | 1313 // needs gettotalclip() |
| 1314 friend SkCanvasState* SkCanvasStateUtils::CaptureCanvasState(SkCanvas*); |
1314 | 1315 |
1315 SkBaseDevice* createLayerDevice(const SkImageInfo&); | 1316 SkBaseDevice* createLayerDevice(const SkImageInfo&); |
1316 | 1317 |
1317 SkBaseDevice* init(SkBaseDevice*); | 1318 SkBaseDevice* init(SkBaseDevice*); |
1318 | 1319 |
1319 /** | 1320 /** |
1320 * DEPRECATED | 1321 * DEPRECATED |
1321 * | 1322 * |
1322 * Specify a device for this canvas to draw into. If it is not null, its | 1323 * Specify a device for this canvas to draw into. If it is not null, its |
1323 * reference count is incremented. If the canvas was already holding a | 1324 * reference count is incremented. If the canvas was already holding a |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1513 | 1514 |
1514 class SkCanvasClipVisitor { | 1515 class SkCanvasClipVisitor { |
1515 public: | 1516 public: |
1516 virtual ~SkCanvasClipVisitor(); | 1517 virtual ~SkCanvasClipVisitor(); |
1517 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1518 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1518 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1519 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1519 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1520 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1520 }; | 1521 }; |
1521 | 1522 |
1522 #endif | 1523 #endif |
OLD | NEW |