aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/SkPicture_Reference.bmh
blob: a722a1deb6cecb377e72c18a5383c701efce0584 (plain)
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
#Topic Picture
#Alias Pictures ##
#Alias Picture_Reference ##

#Class SkPicture

An SkPicture records drawing commands made to a canvas to be played back at a later time.
This base class handles serialization and a few other miscellany.

#Subtopic Overview
#Populate
##

#Subtopic Class
#Populate
##

#Subtopic Member_Function
#Populate
##

# ------------------------------------------------------------------------------

#Class AbortCallback
#Line # incomplete ##

#Code
#ToDo fill this in manually ##
##

Subclasses of this can be passed to playback(). During the playback
of the picture, this callback will periodically be invoked. If its
abort() returns true, then picture playback will be interrupted.
The resulting drawing is undefined, as there is no guarantee how often the
callback will be invoked. If the abort happens inside some level of nested
calls to save(), restore will automatically be called to return the state
to the same level it was before the playback call was made.

# ------------------------------------------------------------------------------

#Method AbortCallback()
#In incomplete
#Line # incomplete ##

#Return incomplete ##

#Example
// incomplete
##

#SeeAlso incomplete

#Method ##

# ------------------------------------------------------------------------------

#Method virtual ~AbortCallback()
#In Constructor
#Line # incomplete ##

#Example
// incomplete
##

#SeeAlso incomplete

#Method ##

# ------------------------------------------------------------------------------

#Method virtual bool abort() = 0
#In incomplete
#Line # incomplete ##

#Return incomplete ##

#Example
// incomplete
##

#SeeAlso incomplete

#Method ##

#Class AbortCallback ##

# ------------------------------------------------------------------------------

#Method static sk_sp<SkPicture> MakeFromStream(SkStream* stream,
                                           const SkDeserialProcs* procs = nullptr)
#In incomplete
#Line # incomplete ##

Recreate a picture that was serialized into a stream or data.

#Param stream  incomplete ##
#Param procs  incomplete ##

#Return incomplete ##

#Example
// incomplete
##

#SeeAlso incomplete

#Method ##

# ------------------------------------------------------------------------------

#Method static sk_sp<SkPicture> MakeFromData(const SkData* data,
                                         const SkDeserialProcs* procs = nullptr)
#In incomplete
#Line # incomplete ##

#Param data  incomplete ##
#Param procs  incomplete ##

#Return incomplete ##

#Example
// incomplete
##

#SeeAlso incomplete

#Method ##

# ------------------------------------------------------------------------------

#Method static sk_sp<SkPicture> MakeFromData(const void* data, size_t size,
                                         const SkDeserialProcs* procs = nullptr)
#In incomplete
#Line # incomplete ##

#Param data  incomplete ##
#Param size  incomplete ##
#Param procs  incomplete ##

#Return incomplete ##

#Example
// incomplete
##

#SeeAlso incomplete

#Method ##

# ------------------------------------------------------------------------------

#Method virtual void playback(SkCanvas* canvas, AbortCallback* callback = nullptr) const = 0
#In incomplete
#Line # incomplete ##

Replays the drawing commands on the specified canvas. Note that
this has the effect of unfurling this picture into the destination
canvas. Using the SkCanvas::drawPicture entry point gives the destination
canvas the option of just taking a ref.

#Param canvas  the canvas receiving the drawing commands.
##
#Param callback  a callback that allows interruption of playback
##

#Return incomplete ##

#Example
// incomplete
##

#SeeAlso incomplete

#Method ##

# ------------------------------------------------------------------------------

#Method virtual SkRect cullRect() const = 0
#In incomplete
#Line # incomplete ##

Return a cull rect for this picture.
Ops recorded into this picture that attempt to draw outside the cull might not be drawn.

#Return incomplete ##

#Example
// incomplete
##

#SeeAlso incomplete

#Method ##

# ------------------------------------------------------------------------------

#Method uint32_t uniqueID() const
#In incomplete
#Line # incomplete ##

Returns a non-zero value unique among all pictures.

#Return incomplete ##

#Example
// incomplete
##

#SeeAlso incomplete

#Method ##

# ------------------------------------------------------------------------------

#Method sk_sp<SkData> serialize(const SkSerialProcs* procs = nullptr) const
#In incomplete
#Line # incomplete ##

#Param procs  incomplete ##

#Return incomplete ##

#Example
// incomplete
##

#SeeAlso incomplete

#Method ##

# ------------------------------------------------------------------------------

#Method void serialize(SkWStream* stream, const SkSerialProcs* procs = nullptr) const
#In incomplete
#Line # incomplete ##

#Param stream  incomplete ##
#Param procs  incomplete ##

#Example
// incomplete
##

#SeeAlso incomplete

#Method ##

# ------------------------------------------------------------------------------

#Method static sk_sp<SkPicture> MakePlaceholder(SkRect cull)
#In incomplete
#Line # incomplete ##

Return a placeholder SkPicture.
This placeholder does not draw anything itself.  It has a distinct uniqueID()
(just like all Pictures) and will always be visible to SkSerialProcs.

#Param cull  the placeholder's dimensions
##

#Return incomplete ##

#Example
// incomplete
##

#SeeAlso incomplete

#Method ##

# ------------------------------------------------------------------------------

#Method virtual int approximateOpCount() const = 0
#In incomplete
#Line # incomplete ##

Return the approximate number of operations in this picture.  This
number may be greater or less than the number of SkCanvas calls
recorded: some calls may be recorded as more than one operation, or some
calls may be optimized away.

#Return incomplete ##

#Example
// incomplete
##

#SeeAlso incomplete

#Method ##

# ------------------------------------------------------------------------------

#Method virtual size_t approximateBytesUsed() const = 0
#In incomplete
#Line # incomplete ##

Returns the approximate byte size of this picture, not including large ref'd objects.

#Return incomplete ##

#Example
// incomplete
##

#SeeAlso incomplete

#Method ##

#Class SkPicture ##

#Topic Picture ##