1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkProxyCanvas.h"
SkProxyCanvas::SkProxyCanvas(SkCanvas* proxy) : fProxy(proxy) {
SkSafeRef(fProxy);
}
SkProxyCanvas::~SkProxyCanvas() {
SkSafeUnref(fProxy);
}
void SkProxyCanvas::setProxy(SkCanvas* proxy) {
SkRefCnt_SafeAssign(fProxy, proxy);
}
///////////////////////////////// Overrides ///////////
int SkProxyCanvas::save(SaveFlags flags) {
return fProxy->save(flags);
}
int SkProxyCanvas::saveLayer(const SkRect* bounds, const SkPaint* paint,
SaveFlags flags) {
return fProxy->saveLayer(bounds, paint, flags);
}
void SkProxyCanvas::restore() {
fProxy->restore();
}
bool SkProxyCanvas::translate(SkScalar dx, SkScalar dy) {
return fProxy->translate(dx, dy);
}
bool SkProxyCanvas::scale(SkScalar sx, SkScalar sy) {
return fProxy->scale(sx, sy);
}
bool SkProxyCanvas::rotate(SkScalar degrees) {
return fProxy->rotate(degrees);
}
bool SkProxyCanvas::skew(SkScalar sx, SkScalar sy) {
return fProxy->skew(sx, sy);
}
bool SkProxyCanvas::concat(const SkMatrix& matrix) {
return fProxy->concat(matrix);
}
void SkProxyCanvas::setMatrix(const SkMatrix& matrix) {
fProxy->setMatrix(matrix);
}
bool SkProxyCanvas::clipRect(const SkRect& rect, SkRegion::Op op, bool doAA) {
return fProxy->clipRect(rect, op, doAA);
}
bool SkProxyCanvas::clipPath(const SkPath& path, SkRegion::Op op, bool doAA) {
return fProxy->clipPath(path, op, doAA);
}
bool SkProxyCanvas::clipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
return fProxy->clipRegion(deviceRgn, op);
}
void SkProxyCanvas::drawPaint(const SkPaint& paint) {
fProxy->drawPaint(paint);
}
void SkProxyCanvas::drawPoints(PointMode mode, size_t count,
const SkPoint pts[], const SkPaint& paint) {
fProxy->drawPoints(mode, count, pts, paint);
}
void SkProxyCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
fProxy->drawRect(rect, paint);
}
void SkProxyCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
fProxy->drawPath(path, paint);
}
void SkProxyCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y,
const SkPaint* paint) {
fProxy->drawBitmap(bitmap, x, y, paint);
}
void SkProxyCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
const SkRect& dst, const SkPaint* paint) {
fProxy->drawBitmapRectToRect(bitmap, src, dst, paint);
}
void SkProxyCanvas::drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m,
const SkPaint* paint) {
fProxy->drawBitmapMatrix(bitmap, m, paint);
}
void SkProxyCanvas::drawSprite(const SkBitmap& bitmap, int x, int y,
const SkPaint* paint) {
fProxy->drawSprite(bitmap, x, y, paint);
}
void SkProxyCanvas::drawText(const void* text, size_t byteLength, SkScalar x,
SkScalar y, const SkPaint& paint) {
fProxy->drawText(text, byteLength, x, y, paint);
}
void SkProxyCanvas::drawPosText(const void* text, size_t byteLength,
const SkPoint pos[], const SkPaint& paint) {
fProxy->drawPosText(text, byteLength, pos, paint);
}
void SkProxyCanvas::drawPosTextH(const void* text, size_t byteLength,
const SkScalar xpos[], SkScalar constY,
const SkPaint& paint) {
fProxy->drawPosTextH(text, byteLength, xpos, constY, paint);
}
void SkProxyCanvas::drawTextOnPath(const void* text, size_t byteLength,
const SkPath& path, const SkMatrix* matrix,
const SkPaint& paint) {
fProxy->drawTextOnPath(text, byteLength, path, matrix, paint);
}
void SkProxyCanvas::drawPicture(SkPicture& picture) {
fProxy->drawPicture(picture);
}
void SkProxyCanvas::drawVertices(VertexMode vmode, int vertexCount,
const SkPoint vertices[], const SkPoint texs[],
const SkColor colors[], SkXfermode* xmode,
const uint16_t indices[], int indexCount,
const SkPaint& paint) {
fProxy->drawVertices(vmode, vertexCount, vertices, texs, colors,
xmode, indices, indexCount, paint);
}
void SkProxyCanvas::drawData(const void* data, size_t length) {
fProxy->drawData(data, length);
}
SkBounder* SkProxyCanvas::setBounder(SkBounder* bounder) {
return fProxy->setBounder(bounder);
}
SkDrawFilter* SkProxyCanvas::setDrawFilter(SkDrawFilter* filter) {
return fProxy->setDrawFilter(filter);
}
|