PageRenderTime 35ms CodeModel.GetById 28ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Frameworks/Debug/AppKit/rhino.platform/CPShadow.j

http://github.com/jfahrenkrug/MapKit-HelloWorld
Unknown | 47 lines | 46 code | 1 blank | 0 comment | 0 complexity | 6b9e3439ab6842ae655f10d0fb8f5451 MD5 | raw file
 1I;21;Foundation/CPObject.jc;1833;
 2{var the_class = objj_allocateClassPair(CPObject, "CPShadow"),
 3meta_class = the_class.isa;class_addIvars(the_class, [new objj_ivar("_offset"), new objj_ivar("_blurRadius"), new objj_ivar("_color"), new objj_ivar("_cssString")]);
 4objj_registerClassPair(the_class);
 5objj_addClassForBundle(the_class, objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
 6class_addMethods(the_class, [new objj_method(sel_getUid("_initWithOffset:blurRadius:color:"), function $CPShadow___initWithOffset_blurRadius_color_(self, _cmd, anOffset, aBlurRadius, aColor)
 7{ with(self)
 8{
 9    self = objj_msgSendSuper({ receiver:self, super_class:objj_getClass("CPObject") }, "init");
10    if (self)
11    {
12        _offset = anOffset;
13        _blurRadius = aBlurRadius;
14        _color = aColor;
15        _cssString = objj_msgSend(_color, "cssString") + " " + Math.round(anOffset.width) + "px " + Math.round(anOffset.height) + "px " + Math.round(_blurRadius) + "px";
16    }
17    return self;
18}
19}), new objj_method(sel_getUid("shadowOffset"), function $CPShadow__shadowOffset(self, _cmd)
20{ with(self)
21{
22    return _offset;
23}
24}), new objj_method(sel_getUid("shadowBlurRadius"), function $CPShadow__shadowBlurRadius(self, _cmd)
25{ with(self)
26{
27    return _blurRadius;
28}
29}), new objj_method(sel_getUid("shadowColor"), function $CPShadow__shadowColor(self, _cmd)
30{ with(self)
31{
32    return _color;
33}
34}), new objj_method(sel_getUid("cssString"), function $CPShadow__cssString(self, _cmd)
35{ with(self)
36{
37    return _cssString;
38}
39})]);
40class_addMethods(meta_class, [new objj_method(sel_getUid("shadowWithOffset:blurRadius:color:"), function $CPShadow__shadowWithOffset_blurRadius_color_(self, _cmd, anOffset, aBlurRadius, aColor)
41{ with(self)
42{
43    return objj_msgSend(objj_msgSend(CPShadow, "alloc"), "_initWithOffset:blurRadius:color:", anOffset, aBlurRadius, aColor);
44}
45})]);
46}
47