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 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1299 friend class SkCanvasStateUtils; | 1299 friend class SkCanvasStateUtils; |
1300 | 1300 |
1301 // call this each time we attach ourselves to a device | 1301 // call this each time we attach ourselves to a device |
1302 // - constructor | 1302 // - constructor |
1303 // - internalSaveLayer | 1303 // - internalSaveLayer |
1304 void setupDevice(SkBaseDevice*); | 1304 void setupDevice(SkBaseDevice*); |
1305 | 1305 |
1306 SkBaseDevice* init(SkBaseDevice*, InitFlags); | 1306 SkBaseDevice* init(SkBaseDevice*, InitFlags); |
1307 | 1307 |
1308 /** | 1308 /** |
1309 * DEPRECATED | |
1310 * | |
1311 * Specify a device for this canvas to draw into. If it is not null, its | |
1312 * reference count is incremented. If the canvas was already holding a | |
1313 * device, its reference count is decremented. The new device is returned. | |
1314 */ | |
1315 SkBaseDevice* setRootDevice(SkBaseDevice* device); | |
1316 | |
1317 /** | |
1318 * Gets the size/origin of the top level layer in global canvas coordinates.
We don't want this | 1309 * Gets the size/origin of the top level layer in global canvas coordinates.
We don't want this |
1319 * to be public because it exposes decisions about layer sizes that are inte
rnal to the canvas. | 1310 * to be public because it exposes decisions about layer sizes that are inte
rnal to the canvas. |
1320 */ | 1311 */ |
1321 SkISize getTopLayerSize() const; | 1312 SkISize getTopLayerSize() const; |
1322 SkIPoint getTopLayerOrigin() const; | 1313 SkIPoint getTopLayerOrigin() const; |
1323 | 1314 |
1324 // internal methods are not virtual, so they can safely be called by other | 1315 // internal methods are not virtual, so they can safely be called by other |
1325 // canvas apis, without confusing subclasses (like SkPictureRecording) | 1316 // canvas apis, without confusing subclasses (like SkPictureRecording) |
1326 void internalDrawBitmap(const SkBitmap&, const SkMatrix& m, const SkPaint* p
aint); | 1317 void internalDrawBitmap(const SkBitmap&, const SkMatrix& m, const SkPaint* p
aint); |
1327 void internalDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, | 1318 void internalDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 | 1491 |
1501 class SkCanvasClipVisitor { | 1492 class SkCanvasClipVisitor { |
1502 public: | 1493 public: |
1503 virtual ~SkCanvasClipVisitor(); | 1494 virtual ~SkCanvasClipVisitor(); |
1504 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1495 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1505 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1496 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1506 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1497 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1507 }; | 1498 }; |
1508 | 1499 |
1509 #endif | 1500 #endif |
OLD | NEW |