/Frameworks/AppKit/rhino.platform/CPGraphicsContext.j

http://github.com/jfahrenkrug/MapKit-HelloWorld · Unknown · 32 lines · 32 code · 0 blank · 0 comment · 0 complexity · 11c89bdc796cb82a106ec6ecfe998532 MD5 · raw file

  1. c;960;
  2. var _1=nil;
  3. var _2=objj_allocateClassPair(CPObject,"CPGraphicsContext"),_3=_2.isa;
  4. class_addIvars(_2,[new objj_ivar("_graphicsPort")]);
  5. objj_registerClassPair(_2);
  6. objj_addClassForBundle(_2,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
  7. class_addMethods(_2,[new objj_method(sel_getUid("initWithGraphicsPort:"),function(_4,_5,_6){
  8. with(_4){
  9. _4=objj_msgSendSuper({receiver:_4,super_class:objj_getClass("CPObject")},"init");
  10. if(_4){
  11. _graphicsPort=_6;
  12. }
  13. return _4;
  14. }
  15. }),new objj_method(sel_getUid("graphicsPort"),function(_7,_8){
  16. with(_7){
  17. return _graphicsPort;
  18. }
  19. })]);
  20. class_addMethods(_3,[new objj_method(sel_getUid("currentContext"),function(_9,_a){
  21. with(_9){
  22. return _1;
  23. }
  24. }),new objj_method(sel_getUid("setCurrentContext:"),function(_b,_c,_d){
  25. with(_b){
  26. _1=_d;
  27. }
  28. }),new objj_method(sel_getUid("graphicsContextWithGraphicsPort:flipped:"),function(_e,_f,_10,_11){
  29. with(_e){
  30. return objj_msgSend(objj_msgSend(_e,"alloc"),"initWithGraphicsPort:",_10);
  31. }
  32. })]);