Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Side by Side Diff: experimental/svg/SkSVGDevice.h

Issue 892533002: Initial SVG backend stubbing (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: optional output file arg Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | experimental/svg/SkSVGDevice.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkSVGDevice_DEFINED
9 #define SkSVGDevice_DEFINED
10
11 #include "SkDevice.h"
12
13 class SkWStream;
14 class SkXMLWriter;
15
16 class SkSVGDevice : public SkBaseDevice {
17 public:
18 static SkBaseDevice* Create(const SkISize& size, SkWStream* wstream);
19
20 virtual SkImageInfo imageInfo() const SK_OVERRIDE;
21
22 protected:
23 virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE;
24 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t coun t,
25 const SkPoint[], const SkPaint& paint) SK_OVERRIDE;
26 virtual void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint) SK_OVERRIDE;
27 virtual void drawOval(const SkDraw&, const SkRect& oval, const SkPaint& pain t) SK_OVERRIDE;
28 virtual void drawRRect(const SkDraw&, const SkRRect& rr, const SkPaint& pain t) SK_OVERRIDE;
29 virtual void drawPath(const SkDraw&, const SkPath& path,
30 const SkPaint& paint,
31 const SkMatrix* prePathMatrix = NULL,
32 bool pathIsMutable = false) SK_OVERRIDE;
33
34 virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap,
35 const SkMatrix& matrix, const SkPaint& paint) SK_OVE RRIDE;
36 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap,
37 int x, int y, const SkPaint& paint) SK_OVERRIDE;
38 virtual void drawBitmapRect(const SkDraw&, const SkBitmap&,
39 const SkRect* srcOrNull, const SkRect& dst,
40 const SkPaint& paint,
41 SkCanvas::DrawBitmapRectFlags flags) SK_OVERRIDE ;
42
43 virtual void drawText(const SkDraw&, const void* text, size_t len,
44 SkScalar x, SkScalar y, const SkPaint& paint) SK_OVERR IDE;
45 virtual void drawPosText(const SkDraw&, const void* text, size_t len,
46 const SkScalar pos[], int scalarsPerPos,
47 const SkPoint& offset, const SkPaint& paint) SK_OVE RRIDE;
48 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len,
49 const SkPath& path, const SkMatrix* matrix,
50 const SkPaint& paint) SK_OVERRIDE;
51 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou nt,
52 const SkPoint verts[], const SkPoint texs[],
53 const SkColor colors[], SkXfermode* xmode,
54 const uint16_t indices[], int indexCount,
55 const SkPaint& paint) SK_OVERRIDE;
56
57 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y,
58 const SkPaint&) SK_OVERRIDE;
59 virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE;
60
61 private:
62 SkSVGDevice(const SkISize& size, SkWStream* wstream);
63 virtual ~SkSVGDevice();
64
65 void addPaint(const SkPaint& paint);
66 void addTransform(const SkMatrix& t);
67
68 SkXMLWriter* fWriter;
69 SkBitmap fLegacyBitmap;
70 };
71
72 #endif // SkSVGDevice_DEFINED
OLDNEW
« no previous file with comments | « no previous file | experimental/svg/SkSVGDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698