Source

cappuccino-docs / cappuccino docs / cappuccino.org / learn / documentation / _c_g_context_8j_source.html

Full commit
  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
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<!-- Mirrored from cappuccino.org/learn/documentation/_c_g_context_8j_source.html by HTTrack Website Copier/3.x [XR&CO'2006], Mon, 20 Sep 2010 02:19:28 GMT -->
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Cappuccino API: AppKit/CoreGraphics/CGContext.j Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
<h1>AppKit/CoreGraphics/CGContext.j</h1><a href="_c_g_context_8j.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * CGContext.j</span>
<a name="l00003"></a>00003 <span class="comment"> * AppKit</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * Created by Francisco Tolmasky.</span>
<a name="l00006"></a>00006 <span class="comment"> * Copyright 2008, 280 North, Inc.</span>
<a name="l00007"></a>00007 <span class="comment"> *</span>
<a name="l00008"></a>00008 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
<a name="l00009"></a>00009 <span class="comment"> * modify it under the terms of the GNU Lesser General Public</span>
<a name="l00010"></a>00010 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00011"></a>00011 <span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00012"></a>00012 <span class="comment"> *</span>
<a name="l00013"></a>00013 <span class="comment"> * This library is distributed in the hope that it will be useful,</span>
<a name="l00014"></a>00014 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00015"></a>00015 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
<a name="l00016"></a>00016 <span class="comment"> * Lesser General Public License for more details.</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> * You should have received a copy of the GNU Lesser General Public</span>
<a name="l00019"></a>00019 <span class="comment"> * License along with this library; if not, write to the Free Software</span>
<a name="l00020"></a>00020 <span class="comment"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA</span>
<a name="l00021"></a>00021 <span class="comment"> */</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;<a class="code" href="_c_g_geometry_8h.html">CGGeometry.h</a>&quot;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;<a class="code" href="_c_g_affine_transform_8h.html">CGAffineTransform.h</a>&quot;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 @<span class="keyword">import</span> <span class="stringliteral">&quot;CGGeometry.j&quot;</span>
<a name="l00027"></a>00027 @<span class="keyword">import</span> <span class="stringliteral">&quot;CGAffineTransform.j&quot;</span>
<a name="l00028"></a>00028 @<span class="keyword">import</span> <span class="stringliteral">&quot;CGPath.j&quot;</span>
<a name="l00029"></a>00029 
<a name="l00030"></a><a class="code" href="_c_g_context_8j.html#a1a5570ca1c27ae7c70b96d7359fd91f8">00030</a> <a class="code" href="_c_g_context_8j.html#a1a5570ca1c27ae7c70b96d7359fd91f8">kCGLineCapButt</a>              = 0;
<a name="l00031"></a><a class="code" href="_c_g_context_8j.html#a1fdaeb47d40a3129ff8d8ddb466beec9">00031</a> <a class="code" href="_c_g_context_8j.html#a1fdaeb47d40a3129ff8d8ddb466beec9">kCGLineCapRound</a>             = 1; 
<a name="l00032"></a><a class="code" href="_c_g_context_8j.html#af685524fb01c06de8b0412967e526cc3">00032</a> <a class="code" href="_c_g_context_8j.html#af685524fb01c06de8b0412967e526cc3">kCGLineCapSquare</a>            = 2;
<a name="l00033"></a>00033 
<a name="l00034"></a><a class="code" href="_c_g_context_8j.html#a1464c521f36a2eba7cd7bc21d8cb5796">00034</a> <a class="code" href="_c_g_context_8j.html#a1464c521f36a2eba7cd7bc21d8cb5796">kCGLineJoinMiter</a>            = 0;
<a name="l00035"></a><a class="code" href="_c_g_context_8j.html#ac9d55c7017586ffe98cc0d105498731b">00035</a> <a class="code" href="_c_g_context_8j.html#ac9d55c7017586ffe98cc0d105498731b">kCGLineJoinRound</a>            = 1;
<a name="l00036"></a><a class="code" href="_c_g_context_8j.html#a61edb6b7ac8da217d9ca31c33d4b4467">00036</a> <a class="code" href="_c_g_context_8j.html#a61edb6b7ac8da217d9ca31c33d4b4467">kCGLineJoinBevel</a>            = 2;
<a name="l00037"></a>00037 
<a name="l00038"></a><a class="code" href="_c_g_context_8j.html#aac8571f0496bc11265484d681934efaf">00038</a> <a class="code" href="_c_g_context_8j.html#aac8571f0496bc11265484d681934efaf">kCGPathFill</a>                 = 0;
<a name="l00039"></a><a class="code" href="_c_g_context_8j.html#acfadf8b304c6a0713f2f26ce602656a3">00039</a> <a class="code" href="_c_g_context_8j.html#acfadf8b304c6a0713f2f26ce602656a3">kCGPathEOFill</a>               = 1;
<a name="l00040"></a><a class="code" href="_c_g_context_8j.html#a8a5478dd8a6263acdc0d712c7da25c57">00040</a> <a class="code" href="_c_g_context_8j.html#a8a5478dd8a6263acdc0d712c7da25c57">kCGPathStroke</a>               = 2;
<a name="l00041"></a><a class="code" href="_c_g_context_8j.html#ad7123ac2c8b7a7b1a22ea0037ff42d97">00041</a> <a class="code" href="_c_g_context_8j.html#ad7123ac2c8b7a7b1a22ea0037ff42d97">kCGPathFillStroke</a>           = 3;
<a name="l00042"></a><a class="code" href="_c_g_context_8j.html#ae31316ac6d9cd297bca4045260cb723c">00042</a> <a class="code" href="_c_g_context_8j.html#ae31316ac6d9cd297bca4045260cb723c">kCGPathEOFillStroke</a>         = 4;
<a name="l00043"></a>00043 
<a name="l00048"></a><a class="code" href="_c_g_context_8j.html#a094f97564ae6e1384aa6d25593caea40">00048</a> <a class="code" href="_c_g_context_8j.html#a094f97564ae6e1384aa6d25593caea40">kCGBlendModeNormal</a>          = 0;
<a name="l00049"></a><a class="code" href="_c_g_context_8j.html#a07a283f018de5a6d4206ba4991dec4ac">00049</a> <a class="code" href="_c_g_context_8j.html#a07a283f018de5a6d4206ba4991dec4ac">kCGBlendModeMultiply</a>        = 1;
<a name="l00050"></a><a class="code" href="_c_g_context_8j.html#ab391cd0147f5d6986b7e0214fd6a220a">00050</a> <a class="code" href="_c_g_context_8j.html#ab391cd0147f5d6986b7e0214fd6a220a">kCGBlendModeScreen</a>          = 2;
<a name="l00051"></a><a class="code" href="_c_g_context_8j.html#a68ddda7f708e3f5e64adad0b0b5adb98">00051</a> <a class="code" href="_c_g_context_8j.html#a68ddda7f708e3f5e64adad0b0b5adb98">kCGBlendModeOverlay</a>         = 3;
<a name="l00052"></a><a class="code" href="_c_g_context_8j.html#a74b91c43c80d3770c94e86a7241ec549">00052</a> <a class="code" href="_c_g_context_8j.html#a74b91c43c80d3770c94e86a7241ec549">kCGBlendModeDarken</a>          = 4;
<a name="l00053"></a><a class="code" href="_c_g_context_8j.html#aa96fe9e31adcff92880892e9b47ab435">00053</a> <a class="code" href="_c_g_context_8j.html#aa96fe9e31adcff92880892e9b47ab435">kCGBlendModeLighten</a>         = 5;
<a name="l00054"></a><a class="code" href="_c_g_context_8j.html#a1998686dbb48e8004816e21f8f199a94">00054</a> <a class="code" href="_c_g_context_8j.html#a1998686dbb48e8004816e21f8f199a94">kCGBlendModeColorDodge</a>      = 6;
<a name="l00055"></a><a class="code" href="_c_g_context_8j.html#a96e7c383f66b5bb796065d701d40cc04">00055</a> <a class="code" href="_c_g_context_8j.html#a96e7c383f66b5bb796065d701d40cc04">kCGBlendModeColorBurn</a>       = 7;
<a name="l00056"></a><a class="code" href="_c_g_context_8j.html#afe750d052aec815e74cf73e7e8eaf506">00056</a> <a class="code" href="_c_g_context_8j.html#afe750d052aec815e74cf73e7e8eaf506">kCGBlendModeSoftLight</a>       = 8;
<a name="l00057"></a><a class="code" href="_c_g_context_8j.html#af3f57c745c32c5e03cdbf1c9be8e601c">00057</a> <a class="code" href="_c_g_context_8j.html#af3f57c745c32c5e03cdbf1c9be8e601c">kCGBlendModeHardLight</a>       = 9;
<a name="l00058"></a><a class="code" href="_c_g_context_8j.html#a6425f3e5cbeb8730aab758fb207bf269">00058</a> <a class="code" href="_c_g_context_8j.html#a6425f3e5cbeb8730aab758fb207bf269">kCGBlendModeDifference</a>      = 10;
<a name="l00059"></a><a class="code" href="_c_g_context_8j.html#af6d1fb0668df55bfef5f95063a59ae9f">00059</a> <a class="code" href="_c_g_context_8j.html#af6d1fb0668df55bfef5f95063a59ae9f">kCGBlendModeExclusion</a>       = 11;
<a name="l00060"></a><a class="code" href="_c_g_context_8j.html#a50298c37ff84ab2f03c880625725ed14">00060</a> <a class="code" href="_c_g_context_8j.html#a50298c37ff84ab2f03c880625725ed14">kCGBlendModeHue</a>             = 12;
<a name="l00061"></a><a class="code" href="_c_g_context_8j.html#a420d0c947586e7cda8300fc0bbdfdc83">00061</a> <a class="code" href="_c_g_context_8j.html#a420d0c947586e7cda8300fc0bbdfdc83">kCGBlendModeSaturation</a>      = 13;
<a name="l00062"></a><a class="code" href="_c_g_context_8j.html#a1c59048dcde9a44a175f713039f2b3ae">00062</a> <a class="code" href="_c_g_context_8j.html#a1c59048dcde9a44a175f713039f2b3ae">kCGBlendModeColor</a>           = 14;
<a name="l00063"></a><a class="code" href="_c_g_context_8j.html#a1402ab54a3a52c9e38e2ca9d6ad2515b">00063</a> <a class="code" href="_c_g_context_8j.html#a1402ab54a3a52c9e38e2ca9d6ad2515b">kCGBlendModeLuminosity</a>      = 15;
<a name="l00064"></a><a class="code" href="_c_g_context_8j.html#abf69382d1a17841d693e886ddf033ca9">00064</a> <a class="code" href="_c_g_context_8j.html#abf69382d1a17841d693e886ddf033ca9">kCGBlendModeClear</a>           = 16;
<a name="l00065"></a><a class="code" href="_c_g_context_8j.html#a3559ca722ee7f0f4d380831a8ea220a8">00065</a> <a class="code" href="_c_g_context_8j.html#a3559ca722ee7f0f4d380831a8ea220a8">kCGBlendModeCopy</a>            = 17;
<a name="l00066"></a><a class="code" href="_c_g_context_8j.html#a4039982290d28c49a7ba8a962cccef01">00066</a> <a class="code" href="_c_g_context_8j.html#a4039982290d28c49a7ba8a962cccef01">kCGBlendModeSourceIn</a>        = 18;
<a name="l00067"></a><a class="code" href="_c_g_context_8j.html#a024870d6d084c2b7773df7af006ed9c0">00067</a> <a class="code" href="_c_g_context_8j.html#a024870d6d084c2b7773df7af006ed9c0">kCGBlendModeSourceOut</a>       = 19;
<a name="l00068"></a><a class="code" href="_c_g_context_8j.html#a14fba2dd3e82ce1c79936c04fbc73276">00068</a> <a class="code" href="_c_g_context_8j.html#a14fba2dd3e82ce1c79936c04fbc73276">kCGBlendModeSourceAtop</a>      = 20;
<a name="l00069"></a><a class="code" href="_c_g_context_8j.html#aeae21deacaf7de726d01e9b97984222c">00069</a> <a class="code" href="_c_g_context_8j.html#aeae21deacaf7de726d01e9b97984222c">kCGBlendModeDestinationOver</a> = 21;
<a name="l00070"></a><a class="code" href="_c_g_context_8j.html#a4b592714615861a800877fd8a8977aaf">00070</a> <a class="code" href="_c_g_context_8j.html#a4b592714615861a800877fd8a8977aaf">kCGBlendModeDestinationIn</a>   = 22;
<a name="l00071"></a><a class="code" href="_c_g_context_8j.html#a28d57d0a55941f02ac7333a94f390127">00071</a> <a class="code" href="_c_g_context_8j.html#a28d57d0a55941f02ac7333a94f390127">kCGBlendModeDestinationOut</a>  = 23;
<a name="l00072"></a><a class="code" href="_c_g_context_8j.html#a9f2c124a37b1f621be6dc4cc9f8d7fde">00072</a> <a class="code" href="_c_g_context_8j.html#a9f2c124a37b1f621be6dc4cc9f8d7fde">kCGBlendModeDestinationAtop</a> = 24;
<a name="l00073"></a><a class="code" href="_c_g_context_8j.html#a631fe401761d8bdce7fca5f5593f1443">00073</a> <a class="code" href="_c_g_context_8j.html#a631fe401761d8bdce7fca5f5593f1443">kCGBlendModeXOR</a>             = 25;
<a name="l00074"></a><a class="code" href="_c_g_context_8j.html#ae52fc6d6724a7f051052687306f0a08b">00074</a> <a class="code" href="_c_g_context_8j.html#ae52fc6d6724a7f051052687306f0a08b">kCGBlendModePlusDarker</a>      = 26;
<a name="l00075"></a><a class="code" href="_c_g_context_8j.html#aa6c8843195c498611845521a8dcc7692">00075</a> <a class="code" href="_c_g_context_8j.html#aa6c8843195c498611845521a8dcc7692">kCGBlendModePlusLighter</a>     = 27;
<a name="l00076"></a>00076 
<a name="l00087"></a><a class="code" href="group__coregraphics.html#ga1e30391a3ec3aee01f9319432d7fc8e0">00087</a> function <a class="code" href="group__coregraphics.html#ga1e30391a3ec3aee01f9319432d7fc8e0">CGContextRelease</a>()
<a name="l00088"></a>00088 {
<a name="l00089"></a>00089 }
<a name="l00090"></a>00090 
<a name="l00097"></a><a class="code" href="group__coregraphics.html#gacc29190d7e4fb4b5c0f6abde1e9875a8">00097</a> function <a class="code" href="group__coregraphics.html#gacc29190d7e4fb4b5c0f6abde1e9875a8">CGContextRetain</a>(aContext)
<a name="l00098"></a>00098 {
<a name="l00099"></a>00099     <span class="keywordflow">return</span> aContext;
<a name="l00100"></a>00100 }
<a name="l00101"></a>00101 
<a name="l00105"></a>00105 <span class="comment">// BEGIN CANVAS IF</span>
<a name="l00106"></a>00106 <span class="keywordflow">if</span> (!<a class="code" href="_c_p_compatibility_8j.html#a1fbfe7ca6b2cef354ecfe78f6cfd6659">CPFeatureIsCompatible</a>(<a class="code" href="_c_p_compatibility_8j.html#a3665bae1ce94c5c2c3d9e65fb78d0f15">CPHTMLCanvasFeature</a>))
<a name="l00107"></a>00107 {
<a name="l00116"></a><a class="code" href="group__coregraphics.html#ga87c74b1cb5839a6ee6a8f78b8dd6446c">00116</a> function <a class="code" href="group__coregraphics.html#ga87c74b1cb5839a6ee6a8f78b8dd6446c">CGGStateCreate</a>()
<a name="l00117"></a>00117 {
<a name="l00118"></a>00118     <span class="keywordflow">return</span> { alpha:1.0, strokeStyle:<span class="stringliteral">&quot;#000&quot;</span>, fillStyle:<span class="stringliteral">&quot;#ccc&quot;</span>, lineWidth:1.0, lineJoin:<a class="code" href="_c_g_context_8j.html#a1464c521f36a2eba7cd7bc21d8cb5796">kCGLineJoinMiter</a>, lineCap:<a class="code" href="_c_g_context_8j.html#a1a5570ca1c27ae7c70b96d7359fd91f8">kCGLineCapButt</a>, miterLimit:10.0, globalAlpha:1.0, 
<a name="l00119"></a>00119         blendMode:<a class="code" href="_c_g_context_8j.html#a094f97564ae6e1384aa6d25593caea40">kCGBlendModeNormal</a>, 
<a name="l00120"></a>00120         shadowOffset:_CGSizeMakeZero(), shadowBlur:0.0, shadowColor:NULL, CTM:_CGAffineTransformMakeIdentity() };
<a name="l00121"></a>00121 }
<a name="l00122"></a>00122 
<a name="l00128"></a><a class="code" href="group__coregraphics.html#ga595c3087b43c50d551a4786ba6dadbeb">00128</a> function <a class="code" href="group__coregraphics.html#ga595c3087b43c50d551a4786ba6dadbeb">CGGStateCreateCopy</a>(aGState)
<a name="l00129"></a>00129 {
<a name="l00130"></a>00130     <span class="keywordflow">return</span> { alpha:aGState.alpha, strokeStyle:aGState.strokeStyle, fillStyle:aGState.fillStyle, lineWidth:aGState.lineWidth, 
<a name="l00131"></a>00131         lineJoin:aGState.lineJoin, lineCap:aGState.lineCap, miterLimit:aGState.miterLimit, globalAlpha:aGState.globalAlpha, 
<a name="l00132"></a>00132         blendMode:aGState.blendMode, 
<a name="l00133"></a>00133         shadowOffset:aGState.shadowOffset, shadowBlur:aGState.shadowBlur, shadowColor:aGState.shadowColor, CTM:_CGAffineTransformMakeCopy(aGState.CTM) };
<a name="l00134"></a>00134 }
<a name="l00135"></a>00135 
<a name="l00140"></a><a class="code" href="group__coregraphics.html#ga792b63f505ae560e354bdd49de62307c">00140</a> function <a class="code" href="group__coregraphics.html#ga792b63f505ae560e354bdd49de62307c">CGBitmapGraphicsContextCreate</a>()
<a name="l00141"></a>00141 {
<a name="l00142"></a>00142     <span class="keywordflow">return</span> { DOMElement:document.createElement(<span class="stringliteral">&quot;div&quot;</span>), path:NULL, gState:<a class="code" href="group__coregraphics.html#ga87c74b1cb5839a6ee6a8f78b8dd6446c">CGGStateCreate</a>(), gStateStack:[] };
<a name="l00143"></a>00143 }
<a name="l00144"></a>00144 
<a name="l00150"></a><a class="code" href="group__coregraphics.html#ga3044141e2efee5c87c2d2cf7a034442d">00150</a> function <a class="code" href="group__coregraphics.html#ga3044141e2efee5c87c2d2cf7a034442d">CGContextSaveGState</a>(aContext)
<a name="l00151"></a>00151 {
<a name="l00152"></a>00152     aContext.gStateStack.push(<a class="code" href="group__coregraphics.html#ga595c3087b43c50d551a4786ba6dadbeb">CGGStateCreateCopy</a>(aContext.gState));
<a name="l00153"></a>00153 }
<a name="l00154"></a>00154 
<a name="l00160"></a><a class="code" href="group__coregraphics.html#ga017455e56ea37b37ba671c0443764576">00160</a> function <a class="code" href="group__coregraphics.html#ga017455e56ea37b37ba671c0443764576">CGContextRestoreGState</a>(aContext)
<a name="l00161"></a>00161 {
<a name="l00162"></a>00162     aContext.gState = aContext.gStateStack.pop();
<a name="l00163"></a>00163 }
<a name="l00164"></a>00164 
<a name="l00165"></a><a class="code" href="group__coregraphics.html#ga27478973daa43b1ba32a37dad435549b">00165</a> function <a class="code" href="group__coregraphics.html#ga27478973daa43b1ba32a37dad435549b">CGContextSetLineCap</a>(aContext, aLineCap)
<a name="l00166"></a>00166 {
<a name="l00167"></a>00167     aContext.gState.lineCap = aLineCap;
<a name="l00168"></a>00168 }
<a name="l00169"></a>00169 
<a name="l00170"></a><a class="code" href="group__coregraphics.html#gad212e3fb640ac5f830477b13197585b3">00170</a> function <a class="code" href="group__coregraphics.html#gad212e3fb640ac5f830477b13197585b3">CGContextSetLineJoin</a>(aContext, aLineJoin)
<a name="l00171"></a>00171 {
<a name="l00172"></a>00172     aContext.gState.lineJoin = aLineJoin;
<a name="l00173"></a>00173 }
<a name="l00174"></a>00174 
<a name="l00175"></a><a class="code" href="group__coregraphics.html#ga96bba0be21dd53a15a84c8f23eb7cc70">00175</a> function <a class="code" href="group__coregraphics.html#ga96bba0be21dd53a15a84c8f23eb7cc70">CGContextSetLineWidth</a>(aContext, aLineWidth)
<a name="l00176"></a>00176 {
<a name="l00177"></a>00177     aContext.gState.lineWidth = aLineWidth;
<a name="l00178"></a>00178 }
<a name="l00179"></a>00179 
<a name="l00180"></a><a class="code" href="group__coregraphics.html#ga472ae3ee4dce3d163b9ff53a4bcc1a23">00180</a> function <a class="code" href="group__coregraphics.html#ga472ae3ee4dce3d163b9ff53a4bcc1a23">CGContextSetMiterLimit</a>(aContext, aMiterLimit)
<a name="l00181"></a>00181 {
<a name="l00182"></a>00182     aContext.gState.miterLimit = aMiterLimit;
<a name="l00183"></a>00183 }
<a name="l00184"></a>00184 
<a name="l00185"></a><a class="code" href="group__coregraphics.html#ga565e47763ab20231c4c911586936146f">00185</a> function <a class="code" href="group__coregraphics.html#ga565e47763ab20231c4c911586936146f">CGContextSetBlendMode</a>(aContext, aBlendMode)
<a name="l00186"></a>00186 {
<a name="l00187"></a>00187     aContext.gState.blendMode = aBlendMode;
<a name="l00188"></a>00188 }
<a name="l00189"></a>00189 
<a name="l00190"></a><a class="code" href="group__coregraphics.html#gac3f1c96dd9247e1ebc30d89b1b2acf13">00190</a> function <a class="code" href="group__coregraphics.html#gac3f1c96dd9247e1ebc30d89b1b2acf13">CGContextAddArc</a>(aContext, x, y, radius, startAngle, endAngle, clockwise)
<a name="l00191"></a>00191 {
<a name="l00192"></a>00192     <a class="code" href="group__coregraphics.html#ga609d0ae9dc6594969ffdcafde2523654">CGPathAddArc</a>(aContext.path, aContext.gState.CTM, x, y, radius, startAngle, endAngle, clockwise);
<a name="l00193"></a>00193 }
<a name="l00194"></a>00194 
<a name="l00205"></a><a class="code" href="group__coregraphics.html#ga917be14f02e018002bc478dda09d1db8">00205</a> function <a class="code" href="group__coregraphics.html#ga917be14f02e018002bc478dda09d1db8">CGContextAddArcToPoint</a>(aContext, x1, y1, x2, y2, radius)
<a name="l00206"></a>00206 {
<a name="l00207"></a>00207     <a class="code" href="group__coregraphics.html#ga2331232fbb23066768f072066df64cd0">CGPathAddArcToPoint</a>(aContext.path, aContext.gState.CTM, x1, y1, x2, y2, radius);
<a name="l00208"></a>00208 }
<a name="l00209"></a>00209 
<a name="l00221"></a><a class="code" href="group__coregraphics.html#ga4d0b41532294635e2f412038f5a1b4e1">00221</a> function <a class="code" href="group__coregraphics.html#ga4d0b41532294635e2f412038f5a1b4e1">CGContextAddCurveToPoint</a>(aContext, cp1x, cp1y, cp2x, cp2y, x, y)
<a name="l00222"></a>00222 {
<a name="l00223"></a>00223     <a class="code" href="group__coregraphics.html#ga9fa7ff189d8cb4cab0913a27b0442d38">CGPathAddCurveToPoint</a>(aContext.path, aContext.gState.CTM, cp1x, cp1y, cp2x, cp2y, x, y);
<a name="l00224"></a>00224 }
<a name="l00225"></a>00225 
<a name="l00233"></a><a class="code" href="group__coregraphics.html#ga0ca6b203cebf8ac7752c49e8c3300876">00233</a> function <a class="code" href="group__coregraphics.html#ga0ca6b203cebf8ac7752c49e8c3300876">CGContextAddLines</a>(aContext, points, count)
<a name="l00234"></a>00234 {
<a name="l00235"></a>00235     <a class="code" href="group__coregraphics.html#ga397919e24ec9f7eab1439d4b22566814">CGPathAddLines</a>(aContext.path, aContext.gState.CTM, points, count);
<a name="l00236"></a>00236 }
<a name="l00237"></a>00237 
<a name="l00245"></a><a class="code" href="group__coregraphics.html#ga834b9d5848989453730d162f251a29c3">00245</a> function <a class="code" href="group__coregraphics.html#ga834b9d5848989453730d162f251a29c3">CGContextAddLineToPoint</a>(aContext, x, y)
<a name="l00246"></a>00246 {
<a name="l00247"></a>00247     <a class="code" href="group__coregraphics.html#gaafe01f38e6f142275ffba02b4fc2a6c7">CGPathAddLineToPoint</a>(aContext.path, aContext.gState.CTM, x, y);
<a name="l00248"></a>00248 }
<a name="l00249"></a>00249 
<a name="l00256"></a><a class="code" href="group__coregraphics.html#ga9076c7c9efcc889fa980c49028fca6b8">00256</a> function <a class="code" href="group__coregraphics.html#ga9076c7c9efcc889fa980c49028fca6b8">CGContextAddPath</a>(aContext, aPath)
<a name="l00257"></a>00257 {
<a name="l00258"></a>00258     <span class="keywordflow">if</span> (!aContext || <a class="code" href="group__coregraphics.html#ga75236063f073e7f232d97c103185f170">CGPathIsEmpty</a>(aPath))
<a name="l00259"></a>00259         <span class="keywordflow">return</span>;
<a name="l00260"></a>00260         
<a name="l00261"></a>00261     <span class="keywordflow">if</span> (!aContext.path)
<a name="l00262"></a>00262         aContext.path = <a class="code" href="group__coregraphics.html#ga5c5e8119e6c51f303e5b3ee1c5f04b7c">CGPathCreateMutable</a>();
<a name="l00263"></a>00263         
<a name="l00264"></a>00264     <a class="code" href="group__coregraphics.html#ga758aacdf42c884b1ed81bf27cf5823dc">CGPathAddPath</a>(aContext.path, aContext.gState.CTM, aPath);
<a name="l00265"></a>00265 }
<a name="l00266"></a>00266 
<a name="l00276"></a><a class="code" href="group__coregraphics.html#ga4a84c8201ae6dbfd7831d48c6455eced">00276</a> function <a class="code" href="group__coregraphics.html#ga4a84c8201ae6dbfd7831d48c6455eced">CGContextAddQuadCurveToPoint</a>(aContext, cpx, cpy, x, y)
<a name="l00277"></a>00277 {
<a name="l00278"></a>00278     <a class="code" href="group__coregraphics.html#gac6cbdbc5a13b6a3833318cf9f728b2c1">CGPathAddQuadCurveToPoint</a>(aContext.path, aContext.gState.CTM, cpx, cpy, x, y);
<a name="l00279"></a>00279 }
<a name="l00280"></a>00280 
<a name="l00287"></a><a class="code" href="group__coregraphics.html#ga63142912cf5a80c8c72c29d55cd7f730">00287</a> function <a class="code" href="group__coregraphics.html#ga63142912cf5a80c8c72c29d55cd7f730">CGContextAddRect</a>(aContext, aRect)
<a name="l00288"></a>00288 {
<a name="l00289"></a>00289     <a class="code" href="group__coregraphics.html#ga82164232a876aeb3d205102748a382c6">CGPathAddRect</a>(aContext.path, aContext.gState.CTM, aRect);
<a name="l00290"></a>00290 }
<a name="l00291"></a>00291 
<a name="l00299"></a><a class="code" href="group__coregraphics.html#ga9e2deb0c9030f957dbf60a759c8b89bf">00299</a> function <a class="code" href="group__coregraphics.html#ga9e2deb0c9030f957dbf60a759c8b89bf">CGContextAddRects</a>(aContext, rects, count)
<a name="l00300"></a>00300 {
<a name="l00301"></a>00301     <a class="code" href="group__coregraphics.html#ga45e1bd9d3a46c2ad9d2bb63004746c1e">CGPathAddRects</a>(aContext.path, aContext.gState.CTM, rects, count);
<a name="l00302"></a>00302 }
<a name="l00303"></a>00303 
<a name="l00309"></a><a class="code" href="group__coregraphics.html#ga02cca9368e5aacc0bef423d724635376">00309</a> function <a class="code" href="group__coregraphics.html#ga02cca9368e5aacc0bef423d724635376">CGContextBeginPath</a>(aContext)
<a name="l00310"></a>00310 {
<a name="l00311"></a>00311     <span class="comment">// This clears any previous path.</span>
<a name="l00312"></a>00312     aContext.path = <a class="code" href="group__coregraphics.html#ga5c5e8119e6c51f303e5b3ee1c5f04b7c">CGPathCreateMutable</a>();
<a name="l00313"></a>00313 }
<a name="l00314"></a>00314 
<a name="l00320"></a><a class="code" href="group__coregraphics.html#gaaf20d10c7501084913e6fdee367f3efa">00320</a> function <a class="code" href="group__coregraphics.html#gaaf20d10c7501084913e6fdee367f3efa">CGContextClosePath</a>(aContext)
<a name="l00321"></a>00321 {
<a name="l00322"></a>00322     <a class="code" href="group__coregraphics.html#gaa94d983b7a2900b1f08c503b8a9915ec">CGPathCloseSubpath</a>(aContext.path);
<a name="l00323"></a>00323 }
<a name="l00324"></a>00324 
<a name="l00332"></a><a class="code" href="group__coregraphics.html#ga44dc04bb1efb98ff834308c997d10dc5">00332</a> function <a class="code" href="group__coregraphics.html#ga44dc04bb1efb98ff834308c997d10dc5">CGContextMoveToPoint</a>(aContext, x, y)
<a name="l00333"></a>00333 {
<a name="l00334"></a>00334     <span class="keywordflow">if</span> (!aContext.path)
<a name="l00335"></a>00335         aContext.path = <a class="code" href="group__coregraphics.html#ga5c5e8119e6c51f303e5b3ee1c5f04b7c">CGPathCreateMutable</a>();
<a name="l00336"></a>00336     
<a name="l00337"></a>00337     <a class="code" href="group__coregraphics.html#ga727565004dc7c879456429f3fa3b5d8c">CGPathMoveToPoint</a>(aContext.path, aContext.gState.CTM, x, y);
<a name="l00338"></a>00338 }
<a name="l00339"></a>00339 
<a name="l00346"></a><a class="code" href="group__coregraphics.html#ga74c13e165c00cc434a54bb8c2148e1ba">00346</a> function <a class="code" href="group__coregraphics.html#ga74c13e165c00cc434a54bb8c2148e1ba">CGContextFillRect</a>(aContext, aRect)
<a name="l00347"></a>00347 {
<a name="l00348"></a>00348     <a class="code" href="group__coregraphics.html#gae5c660cd580263dc63f6d0ae8af0232e">CGContextFillRects</a>(aContext, [aRect], 1);
<a name="l00349"></a>00349 }
<a name="l00350"></a>00350 
<a name="l00358"></a><a class="code" href="group__coregraphics.html#gae5c660cd580263dc63f6d0ae8af0232e">00358</a> function <a class="code" href="group__coregraphics.html#gae5c660cd580263dc63f6d0ae8af0232e">CGContextFillRects</a>(aContext, rects, count)
<a name="l00359"></a>00359 {
<a name="l00360"></a>00360     <span class="keywordflow">if</span> (arguments[2] === undefined)
<a name="l00361"></a>00361         var count = rects.length;
<a name="l00362"></a>00362     
<a name="l00363"></a>00363     <a class="code" href="group__coregraphics.html#ga02cca9368e5aacc0bef423d724635376">CGContextBeginPath</a>(aContext);
<a name="l00364"></a>00364     <a class="code" href="group__coregraphics.html#ga9e2deb0c9030f957dbf60a759c8b89bf">CGContextAddRects</a>(aContext, rects, count);
<a name="l00365"></a>00365     <a class="code" href="group__coregraphics.html#gaaf20d10c7501084913e6fdee367f3efa">CGContextClosePath</a>(aContext);
<a name="l00366"></a>00366     
<a name="l00367"></a>00367     <a class="code" href="_c_g_context_canvas_8j.html#a50a84bacbbad420fe66e560fd51a9e53">CGContextDrawPath</a>(aContext, <a class="code" href="_c_g_context_8j.html#aac8571f0496bc11265484d681934efaf">kCGPathFill</a>);
<a name="l00368"></a>00368 }
<a name="l00369"></a>00369 
<a name="l00376"></a><a class="code" href="group__coregraphics.html#ga97161b64abcac5e58a722ecb0767993a">00376</a> function <a class="code" href="group__coregraphics.html#ga97161b64abcac5e58a722ecb0767993a">CGContextStrokeRect</a>(aContext, aRect)
<a name="l00377"></a>00377 {   
<a name="l00378"></a>00378     <a class="code" href="group__coregraphics.html#ga02cca9368e5aacc0bef423d724635376">CGContextBeginPath</a>(aContext);
<a name="l00379"></a>00379     <a class="code" href="group__coregraphics.html#ga63142912cf5a80c8c72c29d55cd7f730">CGContextAddRect</a>(aContext, aRect);
<a name="l00380"></a>00380     <a class="code" href="group__coregraphics.html#gaaf20d10c7501084913e6fdee367f3efa">CGContextClosePath</a>(aContext);
<a name="l00381"></a>00381     
<a name="l00382"></a>00382     <a class="code" href="_c_g_context_canvas_8j.html#a50a84bacbbad420fe66e560fd51a9e53">CGContextDrawPath</a>(aContext, <a class="code" href="_c_g_context_8j.html#a8a5478dd8a6263acdc0d712c7da25c57">kCGPathStroke</a>);
<a name="l00383"></a>00383 }
<a name="l00384"></a>00384 
<a name="l00392"></a><a class="code" href="group__coregraphics.html#ga77346891155c2ce6db56dfba94d4a0d4">00392</a> function <a class="code" href="group__coregraphics.html#ga77346891155c2ce6db56dfba94d4a0d4">CGContextStrokeRectWithWidth</a>(aContext, aRect, aWidth)
<a name="l00393"></a>00393 {
<a name="l00394"></a>00394     <a class="code" href="group__coregraphics.html#ga3044141e2efee5c87c2d2cf7a034442d">CGContextSaveGState</a>(aContext);
<a name="l00395"></a>00395     
<a name="l00396"></a>00396     <a class="code" href="group__coregraphics.html#ga96bba0be21dd53a15a84c8f23eb7cc70">CGContextSetLineWidth</a>(aContext, aWidth);
<a name="l00397"></a>00397     <a class="code" href="group__coregraphics.html#ga97161b64abcac5e58a722ecb0767993a">CGContextStrokeRect</a>(aContext, aRect);
<a name="l00398"></a>00398     
<a name="l00399"></a>00399     <a class="code" href="group__coregraphics.html#ga017455e56ea37b37ba671c0443764576">CGContextRestoreGState</a>(aContext);
<a name="l00400"></a>00400 }
<a name="l00401"></a>00401 
<a name="l00408"></a><a class="code" href="group__coregraphics.html#ga0f2dc89da432a179558067fd023a9315">00408</a> function <a class="code" href="group__coregraphics.html#ga0f2dc89da432a179558067fd023a9315">CGContextConcatCTM</a>(aContext, aTransform)
<a name="l00409"></a>00409 {
<a name="l00410"></a>00410     var CTM = aContext.gState.CTM;
<a name="l00411"></a>00411     
<a name="l00412"></a>00412     _CGAffineTransformConcatTo(CTM, aTransform, CTM);
<a name="l00413"></a>00413 }
<a name="l00414"></a>00414 
<a name="l00420"></a><a class="code" href="group__coregraphics.html#ga9426cc59e5ed8459afe9abfa71246db4">00420</a> function <a class="code" href="group__coregraphics.html#ga9426cc59e5ed8459afe9abfa71246db4">CGContextGetCTM</a>(aContext)
<a name="l00421"></a>00421 {
<a name="l00422"></a>00422     <span class="keywordflow">return</span> aContext.gState.CTM;
<a name="l00423"></a>00423 }
<a name="l00424"></a>00424 
<a name="l00432"></a><a class="code" href="group__coregraphics.html#gab03a594a5cfc77ecdd7ab6c38e33592a">00432</a> function <a class="code" href="group__coregraphics.html#gab03a594a5cfc77ecdd7ab6c38e33592a">CGContextRotateCTM</a>(aContext, anAngle)
<a name="l00433"></a>00433 {
<a name="l00434"></a>00434     var gState = aContext.gState;
<a name="l00435"></a>00435     
<a name="l00436"></a>00436     gState.CTM = <a class="code" href="_c_g_affine_transform_8j.html#a49a88e45ec9dfbb6761a0c25c5fda7b7">CGAffineTransformRotate</a>(gState.CTM, anAngle);
<a name="l00437"></a>00437 }
<a name="l00438"></a>00438 
<a name="l00446"></a><a class="code" href="group__coregraphics.html#gac8e6ebe6d154412e36ac869e47b2e796">00446</a> function <a class="code" href="group__coregraphics.html#gac8e6ebe6d154412e36ac869e47b2e796">CGContextScaleCTM</a>(aContext, sx, sy)
<a name="l00447"></a>00447 {
<a name="l00448"></a>00448     var gState = aContext.gState;
<a name="l00449"></a>00449     
<a name="l00450"></a>00450     gState.CTM = _CGAffineTransformScale(gState.CTM, sx, sy);
<a name="l00451"></a>00451 }
<a name="l00452"></a>00452 
<a name="l00460"></a><a class="code" href="group__coregraphics.html#ga2351bbe153eb35f881d0de33de240e02">00460</a> function <a class="code" href="group__coregraphics.html#ga2351bbe153eb35f881d0de33de240e02">CGContextTranslateCTM</a>(aContext, tx, ty)
<a name="l00461"></a>00461 {
<a name="l00462"></a>00462     var gState = aContext.gState;
<a name="l00463"></a>00463     
<a name="l00464"></a>00464     gState.CTM = _CGAffineTransformTranslate(gState.CTM, tx, ty);
<a name="l00465"></a>00465 }
<a name="l00466"></a>00466 
<a name="l00475"></a><a class="code" href="group__coregraphics.html#ga98c027a31e3e5f63331a4b3bda776924">00475</a> function <a class="code" href="group__coregraphics.html#ga98c027a31e3e5f63331a4b3bda776924">CGContextSetShadow</a>(aContext, aSize, aBlur)
<a name="l00476"></a>00476 {
<a name="l00477"></a>00477     var gState = aContext.gState;
<a name="l00478"></a>00478     
<a name="l00479"></a>00479     gState.shadowOffset = _CGSizeMakeCopy(aSize);
<a name="l00480"></a>00480     gState.shadowBlur = aBlur;
<a name="l00481"></a>00481     gState.shadowColor = [<a class="code" href="class_c_p_color.html">CPColor</a> shadowColor];
<a name="l00482"></a>00482 }
<a name="l00483"></a>00483 
<a name="l00492"></a><a class="code" href="group__coregraphics.html#ga478b28f5bf3b1854a37d456cd773bfe5">00492</a> function <a class="code" href="group__coregraphics.html#ga478b28f5bf3b1854a37d456cd773bfe5">CGContextSetShadowWithColor</a>(aContext, aSize, aBlur, aColor)
<a name="l00493"></a>00493 {
<a name="l00494"></a>00494     var gState = aContext.gState;
<a name="l00495"></a>00495     
<a name="l00496"></a>00496     gState.shadowOffset = _CGSizeMakeCopy(aSize);
<a name="l00497"></a>00497     gState.shadowBlur = aBlur;
<a name="l00498"></a>00498     gState.shadowColor = aColor;
<a name="l00499"></a>00499 }
<a name="l00500"></a>00500 
<a name="l00507"></a><a class="code" href="group__coregraphics.html#gaf226610351555b43c7a120bc79abb115">00507</a> function <a class="code" href="group__coregraphics.html#gaf226610351555b43c7a120bc79abb115">CGContextSetAlpha</a>(aContext, anAlpha)
<a name="l00508"></a>00508 {
<a name="l00509"></a>00509     aContext.gState.alpha = <a class="code" href="_c_p_obj_j_runtime_8j.html#a45f5f88d061da0c18bcb6b6a854fe898">MAX</a>(<a class="code" href="_c_p_obj_j_runtime_8j.html#a4fca277171215842609dc38a6f0c19fb">MIN</a>(anAlpha, 1.0), 0.0);
<a name="l00510"></a>00510 }
<a name="l00511"></a>00511 
<a name="l00515"></a>00515 }   <span class="comment">// END CANVAS IF</span>
<a name="l00520"></a>00520 <span class="comment"></span><span class="comment">// GOOD.</span>
<a name="l00526"></a><a class="code" href="group__coregraphics.html#gaeb90358a23381016e0480441d416f5c9">00526</a> <span class="comment"></span>function <a class="code" href="group__coregraphics.html#gaeb90358a23381016e0480441d416f5c9">CGContextEOFillPath</a>(aContext)
<a name="l00527"></a>00527 {
<a name="l00528"></a>00528     <a class="code" href="_c_g_context_canvas_8j.html#a50a84bacbbad420fe66e560fd51a9e53">CGContextDrawPath</a>(aContext, <a class="code" href="_c_g_context_8j.html#acfadf8b304c6a0713f2f26ce602656a3">kCGPathEOFill</a>);
<a name="l00529"></a>00529 }
<a name="l00530"></a>00530 
<a name="l00536"></a><a class="code" href="group__coregraphics.html#ga5619db65db539d72c1ab275d1d5f54a1">00536</a> function <a class="code" href="group__coregraphics.html#ga5619db65db539d72c1ab275d1d5f54a1">CGContextFillPath</a>(aContext)
<a name="l00537"></a>00537 {
<a name="l00538"></a>00538     <a class="code" href="_c_g_context_canvas_8j.html#a50a84bacbbad420fe66e560fd51a9e53">CGContextDrawPath</a>(aContext, <a class="code" href="_c_g_context_8j.html#aac8571f0496bc11265484d681934efaf">kCGPathFill</a>);
<a name="l00539"></a>00539 }
<a name="l00540"></a>00540 
<a name="l00541"></a><a class="code" href="group__coregraphics.html#ga84c7e8fc9dcd63753a99f0e6514128d8">00541</a> var <a class="code" href="group__coregraphics.html#ga84c7e8fc9dcd63753a99f0e6514128d8">KAPPA</a> = 4.0 * ((SQRT2 - 1.0) / 3.0);
<a name="l00542"></a>00542 
<a name="l00549"></a><a class="code" href="group__coregraphics.html#ga04222ab8d4b57e13d0014454f305ff65">00549</a> function <a class="code" href="group__coregraphics.html#ga04222ab8d4b57e13d0014454f305ff65">CGContextAddEllipseInRect</a>(aContext, aRect)
<a name="l00550"></a>00550 {
<a name="l00551"></a>00551     <a class="code" href="group__coregraphics.html#ga02cca9368e5aacc0bef423d724635376">CGContextBeginPath</a>(aContext);
<a name="l00552"></a>00552     <a class="code" href="group__coregraphics.html#ga9076c7c9efcc889fa980c49028fca6b8">CGContextAddPath</a>(aContext, <a class="code" href="group__coregraphics.html#gaec591c72b040abcdef2724e23c756cbf">CGPathWithEllipseInRect</a>(aRect));
<a name="l00553"></a>00553     <a class="code" href="group__coregraphics.html#gaaf20d10c7501084913e6fdee367f3efa">CGContextClosePath</a>(aContext);
<a name="l00554"></a>00554 }
<a name="l00555"></a>00555 
<a name="l00562"></a><a class="code" href="group__coregraphics.html#ga1cb43657585f2221f029a98d7db3b689">00562</a> function <a class="code" href="group__coregraphics.html#ga1cb43657585f2221f029a98d7db3b689">CGContextFillEllipseInRect</a>(aContext, aRect)
<a name="l00563"></a>00563 {
<a name="l00564"></a>00564     <a class="code" href="group__coregraphics.html#ga02cca9368e5aacc0bef423d724635376">CGContextBeginPath</a>(aContext);
<a name="l00565"></a>00565     <a class="code" href="group__coregraphics.html#ga04222ab8d4b57e13d0014454f305ff65">CGContextAddEllipseInRect</a>(aContext, aRect);
<a name="l00566"></a>00566     <a class="code" href="group__coregraphics.html#gaaf20d10c7501084913e6fdee367f3efa">CGContextClosePath</a>(aContext);
<a name="l00567"></a>00567     <a class="code" href="group__coregraphics.html#ga5619db65db539d72c1ab275d1d5f54a1">CGContextFillPath</a>(aContext);
<a name="l00568"></a>00568 }
<a name="l00569"></a>00569 
<a name="l00576"></a><a class="code" href="group__coregraphics.html#gab6e04d0c787c9f065d87534fd4654cbf">00576</a> function <a class="code" href="group__coregraphics.html#gab6e04d0c787c9f065d87534fd4654cbf">CGContextStrokeEllipseInRect</a>(aContext, aRect)
<a name="l00577"></a>00577 {
<a name="l00578"></a>00578     <a class="code" href="group__coregraphics.html#ga02cca9368e5aacc0bef423d724635376">CGContextBeginPath</a>(aContext);
<a name="l00579"></a>00579     <a class="code" href="group__coregraphics.html#ga04222ab8d4b57e13d0014454f305ff65">CGContextAddEllipseInRect</a>(aContext, aRect);
<a name="l00580"></a>00580     <a class="code" href="group__coregraphics.html#gaaf20d10c7501084913e6fdee367f3efa">CGContextClosePath</a>(aContext);
<a name="l00581"></a>00581     <a class="code" href="group__coregraphics.html#ga03bda4b6dc1763d22d122d565e027012">CGContextStrokePath</a>(aContext);
<a name="l00582"></a>00582 }
<a name="l00583"></a>00583 
<a name="l00589"></a><a class="code" href="group__coregraphics.html#ga03bda4b6dc1763d22d122d565e027012">00589</a> function <a class="code" href="group__coregraphics.html#ga03bda4b6dc1763d22d122d565e027012">CGContextStrokePath</a>(aContext)
<a name="l00590"></a>00590 {
<a name="l00591"></a>00591     <a class="code" href="_c_g_context_canvas_8j.html#a50a84bacbbad420fe66e560fd51a9e53">CGContextDrawPath</a>(aContext, <a class="code" href="_c_g_context_8j.html#a8a5478dd8a6263acdc0d712c7da25c57">kCGPathStroke</a>);
<a name="l00592"></a>00592 }
<a name="l00593"></a>00593 
<a name="l00604"></a><a class="code" href="group__coregraphics.html#gae37d73ed577cdc93f9c1e4166b3eb460">00604</a> function <a class="code" href="group__coregraphics.html#gae37d73ed577cdc93f9c1e4166b3eb460">CGContextStrokeLineSegments</a>(aContext, points, count)
<a name="l00605"></a>00605 {
<a name="l00606"></a>00606     var i = 0;
<a name="l00607"></a>00607     
<a name="l00608"></a>00608     <span class="keywordflow">if</span> (arguments[<span class="stringliteral">&quot;count&quot;</span>] == NULL)
<a name="l00609"></a>00609         var count = points.length;
<a name="l00610"></a>00610     
<a name="l00611"></a>00611     <a class="code" href="group__coregraphics.html#ga02cca9368e5aacc0bef423d724635376">CGContextBeginPath</a>(aContext);
<a name="l00612"></a>00612 
<a name="l00613"></a>00613     <span class="keywordflow">for</span> (; i &lt; count; i += 2)
<a name="l00614"></a>00614     {
<a name="l00615"></a>00615         <a class="code" href="group__coregraphics.html#ga44dc04bb1efb98ff834308c997d10dc5">CGContextMoveToPoint</a>(aContext, points[i].x, points[i].y);
<a name="l00616"></a>00616         <a class="code" href="group__coregraphics.html#ga834b9d5848989453730d162f251a29c3">CGContextAddLineToPoint</a>(aContext, points[i + 1].x, points[i + 1].y);
<a name="l00617"></a>00617     }
<a name="l00618"></a>00618     
<a name="l00619"></a>00619     <a class="code" href="group__coregraphics.html#ga03bda4b6dc1763d22d122d565e027012">CGContextStrokePath</a>(aContext);
<a name="l00620"></a>00620 }
<a name="l00621"></a>00621 
<a name="l00622"></a>00622 
<a name="l00623"></a>00623 <span class="comment">//FIXME: THIS IS WRONG!!!</span>
<a name="l00624"></a>00624 
<a name="l00632"></a><a class="code" href="group__coregraphics.html#ga800a3e5b0c46359d28b091376630bb0e">00632</a> function <a class="code" href="group__coregraphics.html#ga800a3e5b0c46359d28b091376630bb0e">CGContextSetFillColor</a>(aContext, aColor)
<a name="l00633"></a>00633 {
<a name="l00634"></a>00634     <span class="keywordflow">if</span> (aColor)
<a name="l00635"></a>00635         aContext.gState.fillStyle = [aColor cssString];
<a name="l00636"></a>00636 }
<a name="l00637"></a>00637 
<a name="l00644"></a><a class="code" href="group__coregraphics.html#gac13f17a8bed76d16b9e5252106d196e0">00644</a> function <a class="code" href="group__coregraphics.html#gac13f17a8bed76d16b9e5252106d196e0">CGContextSetStrokeColor</a>(aContext, aColor)
<a name="l00645"></a>00645 {
<a name="l00646"></a>00646     <span class="keywordflow">if</span> (aColor)
<a name="l00647"></a>00647         aContext.gState.strokeStyle = [aColor cssString];
<a name="l00648"></a>00648 }
<a name="l00649"></a>00649 
<a name="l00661"></a><a class="code" href="group__coregraphics.html#ga76628754093e198ead6806bf8a934d35">00661</a> function <a class="code" href="group__coregraphics.html#ga76628754093e198ead6806bf8a934d35">CGContextFillRoundedRectangleInRect</a>(aContext, aRect, aRadius, ne, se, sw, nw)
<a name="l00662"></a>00662 {
<a name="l00663"></a>00663     <a class="code" href="group__coregraphics.html#ga02cca9368e5aacc0bef423d724635376">CGContextBeginPath</a>(aContext);
<a name="l00664"></a>00664     <a class="code" href="group__coregraphics.html#ga9076c7c9efcc889fa980c49028fca6b8">CGContextAddPath</a>(aContext, <a class="code" href="group__coregraphics.html#ga0a87d3c8d7ee70ba362e676777139442">CGPathWithRoundedRectangleInRect</a>(aRect, aRadius, aRadius, ne, se, sw, nw));
<a name="l00665"></a>00665     <a class="code" href="group__coregraphics.html#gaaf20d10c7501084913e6fdee367f3efa">CGContextClosePath</a>(aContext);
<a name="l00666"></a>00666     <a class="code" href="group__coregraphics.html#ga5619db65db539d72c1ab275d1d5f54a1">CGContextFillPath</a>(aContext);
<a name="l00667"></a>00667 }
<a name="l00668"></a>00668 
<a name="l00680"></a><a class="code" href="group__coregraphics.html#ga183a83821529224dc910a3ffd9f07f91">00680</a> function <a class="code" href="group__coregraphics.html#ga183a83821529224dc910a3ffd9f07f91">CGContextStrokeRoundedRectangleInRect</a>(aContext, aRect, aRadius, ne, se, sw, nw)
<a name="l00681"></a>00681 {
<a name="l00682"></a>00682     <a class="code" href="group__coregraphics.html#ga02cca9368e5aacc0bef423d724635376">CGContextBeginPath</a>(aContext);
<a name="l00683"></a>00683     <a class="code" href="group__coregraphics.html#ga9076c7c9efcc889fa980c49028fca6b8">CGContextAddPath</a>(aContext, <a class="code" href="group__coregraphics.html#ga0a87d3c8d7ee70ba362e676777139442">CGPathWithRoundedRectangleInRect</a>(aRect, aRadius, aRadius, ne, se, sw, nw));              
<a name="l00684"></a>00684     <a class="code" href="group__coregraphics.html#gaaf20d10c7501084913e6fdee367f3efa">CGContextClosePath</a>(aContext);
<a name="l00685"></a>00685     <a class="code" href="group__coregraphics.html#ga03bda4b6dc1763d22d122d565e027012">CGContextStrokePath</a>(aContext);
<a name="l00686"></a>00686 }
<a name="l00687"></a>00687 
<a name="l00695"></a>00695 <span class="keywordflow">if</span> (<a class="code" href="_c_p_compatibility_8j.html#a1fbfe7ca6b2cef354ecfe78f6cfd6659">CPFeatureIsCompatible</a>(<a class="code" href="_c_p_compatibility_8j.html#a3665bae1ce94c5c2c3d9e65fb78d0f15">CPHTMLCanvasFeature</a>))
<a name="l00696"></a>00696 {
<a name="l00697"></a>00697 <span class="preprocessor">#include &quot;<a class="code" href="_c_g_context_canvas_8j.html">CGContextCanvas.j</a>&quot;</span>
<a name="l00698"></a>00698 }
<a name="l00699"></a>00699 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="_c_p_compatibility_8j.html#a1fbfe7ca6b2cef354ecfe78f6cfd6659">CPFeatureIsCompatible</a>(<a class="code" href="_c_p_compatibility_8j.html#a2be8cd24d9a8d22af8266c52d497dd30">CPVMLFeature</a>))
<a name="l00700"></a>00700 {
<a name="l00701"></a>00701 <span class="preprocessor">#include &quot;<a class="code" href="_c_g_context_v_m_l_8j.html">CGContextVML.j</a>&quot;</span>
<a name="l00702"></a>00702 }
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Tue Apr 6 10:32:54 2010 for Cappuccino API by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>

<!-- Mirrored from cappuccino.org/learn/documentation/_c_g_context_8j_source.html by HTTrack Website Copier/3.x [XR&CO'2006], Mon, 20 Sep 2010 02:19:28 GMT -->
</html>