/
Renderer.html
385 lines (381 loc) · 9.61 KB
/
Renderer.html
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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>CamanJS Documentation</title>
<link rel='stylesheet' href='../../assets/codo.css' type='text/css'>
<script src='../../assets/codo.js'></script>
<script src='../../assets/search_data.js'></script>
</head>
<body>
<div id='base' data-path='../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../README.md.html' title='CamanJS'>CamanJS</a>
»
<a href='../../class_index.html' title='Index'>Index</a>
»
<a href='../../classes/Caman.html' title='Caman'>Caman</a>
»
<span class='title'>Renderer</span>
<nav>
<ul>
<li class='noframes'>
(<a class='noframes' href='#'>no frames</a>)
</li>
</ul>
</nav>
<div id='search'>
<a id='class_list_link' href='../../class_list.html'>Classes</a>
<a id='file_list_link' href='../../file_list.html'>Files</a>
<a id='method_list_link' href='../../method_list.html'>Methods</a>
<a id='extra_list_link' href='../../extra_list.html'>Extras</a>
</div>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>Ctrl-T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
In frame mode you can toggle the list naviation frame on the left side:
</p>
<ul>
<li>
<span>Ctrl-L</span>
Toggle list view
</li>
</ul>
<p>
You can focus a list in frame mode or toggle a tab in frameless mode:
</p>
<ul>
<li>
<span>Ctrl-C</span>
Class list
</li>
<li>
<span>Ctrl-I</span>
Mixin list
</li>
<li>
<span>Ctrl-F</span>
File list
</li>
<li>
<span>Ctrl-M</span>
Method list
</li>
<li>
<span>Ctrl-E</span>
Extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>Ctrl-S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
<p>
In frameless mode you can close the list tab:
</p>
<ul>
<li>
<span>Esc</span>
Close list tab
</li>
</ul>
</div>
</div>
<div id='content'>
<h1>
Class:
Caman.Renderer
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src/core/renderer.coffee</td>
</tr>
</table>
<h2>Overview</h2>
<div class='docstring'>
<p>Handles all of the various rendering methods in Caman. Most of the image modification happens
here. A new Renderer object is created for every render operation.</p>
</div>
<div class='tags'>
</div>
<h2>Instance Method Summary</h2>
<ul class='summary'>
<li>
<span class='signature'>
<a href='#constructor-instance'>
- (void) <strong>constructor</strong>(c)
</a>
</span>
<span class='constructor note title'>Constructor</span>
<span class='desc'>
</span>
</li>
<li>
<span class='signature'>
<a href='#add-instance'>
- (void) <strong>add</strong>(job)
</a>
</span>
<span class='desc'>
</span>
</li>
<li>
<span class='signature'>
<a href='#processNext-instance'>
- (void) <strong>processNext</strong>()
</a>
</span>
<span class='bound note title'>Bound</span>
<span class='desc'>
Grabs the next operation from the render queue and passes it to Renderer for execution
</span>
</li>
<li>
<span class='signature'>
<a href='#execute-instance'>
- (void) <strong>execute</strong>(callback)
</a>
</span>
<span class='desc'>
</span>
</li>
<li>
<span class='signature'>
<a href='#eachBlock-instance'>
- (void) <strong>eachBlock</strong>(fn)
</a>
</span>
<span class='desc'>
</span>
</li>
<li>
<span class='signature'>
<a href='#executeFilter-instance'>
- (void) <strong>executeFilter</strong>()
</a>
</span>
<span class='desc'>
The core of the image rendering, this function executes the provided filter.
</span>
</li>
<li>
<span class='signature'>
<a href='#executePlugin-instance'>
- (void) <strong>executePlugin</strong>()
</a>
</span>
<span class='desc'>
Executes a standalone plugin
</span>
</li>
<li>
<span class='signature'>
<a href='#renderBlock-instance'>
- (void) <strong>renderBlock</strong>(bnum, start, end)
</a>
</span>
<span class='desc'>
Renders a single block of the canvas with the current filter function
</span>
</li>
<li>
<span class='signature'>
<a href='#renderKernel-instance'>
- (void) <strong>renderKernel</strong>(bnum, start, end)
</a>
</span>
<span class='desc'>
Applies an image kernel to the canvas
</span>
</li>
<li>
<span class='signature'>
<a href='#blockFinished-instance'>
- (void) <strong>blockFinished</strong>(bnum)
</a>
</span>
<span class='desc'>
Called when a single block is finished rendering.
</span>
</li>
<li>
<span class='signature'>
<a href='#processKernel-instance'>
- (void) <strong>processKernel</strong>(adjust, kernel, divisor, bias)
</a>
</span>
<span class='desc'>
The "filter function" for kernel adjustments.
</span>
</li>
<li>
<span class='signature'>
<a href='#loadOverlay-instance'>
- (void) <strong>loadOverlay</strong>(layer, src)
</a>
</span>
<span class='desc'>
Loads an image onto the current canvas
</span>
</li>
</ul>
<h2>Constructor Details</h2>
<div class='methods'>
<div class='method_details'>
<p class='signature' id='constructor-instance'>
- (void) <strong>constructor</strong>(c)
</p>
<div class='tags'>
</div>
</div>
</div>
<h2>Instance Method Details</h2>
<div class='methods'>
<div class='method_details'>
<p class='signature' id='add-instance'>
- (void) <strong>add</strong>(job)
</p>
<div class='tags'>
</div>
</div>
<div class='method_details'>
<p class='signature' id='processNext-instance'>
- (void) <strong>processNext</strong>()
(bound)
</p>
<div class='docstring'>
<p>Grabs the next operation from the render queue and passes it to Renderer
for execution</p>
</div>
<div class='tags'>
</div>
</div>
<div class='method_details'>
<p class='signature' id='execute-instance'>
- (void) <strong>execute</strong>(callback)
</p>
<div class='tags'>
</div>
</div>
<div class='method_details'>
<p class='signature' id='eachBlock-instance'>
- (void) <strong>eachBlock</strong>(fn)
</p>
<div class='tags'>
</div>
</div>
<div class='method_details'>
<p class='signature' id='executeFilter-instance'>
- (void) <strong>executeFilter</strong>()
</p>
<div class='docstring'>
<p>The core of the image rendering, this function executes the provided filter.</p><p>NOTE: this does not write the updated pixel data to the canvas. That happens when all filters
are finished rendering in order to be as fast as possible.</p>
</div>
<div class='tags'>
</div>
</div>
<div class='method_details'>
<p class='signature' id='executePlugin-instance'>
- (void) <strong>executePlugin</strong>()
</p>
<div class='docstring'>
<p>Executes a standalone plugin</p>
</div>
<div class='tags'>
</div>
</div>
<div class='method_details'>
<p class='signature' id='renderBlock-instance'>
- (void) <strong>renderBlock</strong>(bnum, start, end)
</p>
<div class='docstring'>
<p>Renders a single block of the canvas with the current filter function</p>
</div>
<div class='tags'>
</div>
</div>
<div class='method_details'>
<p class='signature' id='renderKernel-instance'>
- (void) <strong>renderKernel</strong>(bnum, start, end)
</p>
<div class='docstring'>
<p>Applies an image kernel to the canvas</p>
</div>
<div class='tags'>
</div>
</div>
<div class='method_details'>
<p class='signature' id='blockFinished-instance'>
- (void) <strong>blockFinished</strong>(bnum)
</p>
<div class='docstring'>
<p>Called when a single block is finished rendering. Once all blocks are done, we signal that this
filter is finished rendering and continue to the next step.</p>
</div>
<div class='tags'>
</div>
</div>
<div class='method_details'>
<p class='signature' id='processKernel-instance'>
- (void) <strong>processKernel</strong>(adjust, kernel, divisor, bias)
</p>
<div class='docstring'>
<p>The "filter function" for kernel adjustments.</p>
</div>
<div class='tags'>
</div>
</div>
<div class='method_details'>
<p class='signature' id='loadOverlay-instance'>
- (void) <strong>loadOverlay</strong>(layer, src)
</p>
<div class='docstring'>
<p>Loads an image onto the current canvas</p>
</div>
<div class='tags'>
</div>
</div>
</div>
</div>
<div id='footer'>
Generated on
Fri Jun 21 2013 23:13:05 GMT-0400 (EDT)
by
<a href='https://github.com/netzpirat/codo' title='CoffeeScript API documentation generator'>Codo</a>
v1.7.0
(Node.js v0.10.8).
✲
Press Ctrl-h to see the keyboard shortcuts
✲
<a href='http://twitter.com/#!/netzpirat'>@netzpirat</a>
✲
<a href='https://mksoft.ch'>mksoft.ch</a>
</div>
</body>
</html>