| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 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 SkSVGDevice_DEFINED | 8 #ifndef SkSVGDevice_DEFINED |
| 9 #define SkSVGDevice_DEFINED | 9 #define SkSVGDevice_DEFINED |
| 10 | 10 |
| 11 #include "SkDevice.h" | 11 #include "SkDevice.h" |
| 12 #include "SkTemplates.h" | 12 #include "SkTemplates.h" |
| 13 | 13 |
| 14 class SkXMLWriter; | 14 class SkXMLWriter; |
| 15 | 15 |
| 16 class SkSVGDevice : public SkBaseDevice { | 16 class SkSVGDevice : public SkBaseDevice { |
| 17 public: | 17 public: |
| 18 static SkBaseDevice* Create(const SkISize& size, SkXMLWriter* writer); | 18 static SkBaseDevice* Create(const SkISize& size, SkXMLWriter* writer); |
| 19 | 19 |
| 20 SkImageInfo imageInfo() const override; | |
| 21 | |
| 22 protected: | 20 protected: |
| 23 void drawPaint(const SkDraw&, const SkPaint& paint) override; | 21 void drawPaint(const SkDraw&, const SkPaint& paint) override; |
| 24 void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count, | 22 void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count, |
| 25 const SkPoint[], const SkPaint& paint) override; | 23 const SkPoint[], const SkPaint& paint) override; |
| 26 void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint) override
; | 24 void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint) override
; |
| 27 void drawOval(const SkDraw&, const SkRect& oval, const SkPaint& paint) overr
ide; | 25 void drawOval(const SkDraw&, const SkRect& oval, const SkPaint& paint) overr
ide; |
| 28 void drawRRect(const SkDraw&, const SkRRect& rr, const SkPaint& paint) overr
ide; | 26 void drawRRect(const SkDraw&, const SkRRect& rr, const SkPaint& paint) overr
ide; |
| 29 void drawPath(const SkDraw&, const SkPath& path, | 27 void drawPath(const SkDraw&, const SkPath& path, |
| 30 const SkPaint& paint, | 28 const SkPaint& paint, |
| 31 const SkMatrix* prePathMatrix = nullptr, | 29 const SkMatrix* prePathMatrix = nullptr, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 61 virtual ~SkSVGDevice(); | 59 virtual ~SkSVGDevice(); |
| 62 | 60 |
| 63 void drawBitmapCommon(const SkDraw& draw, const SkBitmap& bm, const SkPaint&
paint); | 61 void drawBitmapCommon(const SkDraw& draw, const SkBitmap& bm, const SkPaint&
paint); |
| 64 | 62 |
| 65 class AutoElement; | 63 class AutoElement; |
| 66 class ResourceBucket; | 64 class ResourceBucket; |
| 67 | 65 |
| 68 SkXMLWriter* fWriter; | 66 SkXMLWriter* fWriter; |
| 69 SkAutoTDelete<AutoElement> fRootElement; | 67 SkAutoTDelete<AutoElement> fRootElement; |
| 70 SkAutoTDelete<ResourceBucket> fResourceBucket; | 68 SkAutoTDelete<ResourceBucket> fResourceBucket; |
| 71 SkISize fSize; | |
| 72 | 69 |
| 73 typedef SkBaseDevice INHERITED; | 70 typedef SkBaseDevice INHERITED; |
| 74 }; | 71 }; |
| 75 | 72 |
| 76 #endif // SkSVGDevice_DEFINED | 73 #endif // SkSVGDevice_DEFINED |
| OLD | NEW |