mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-01 00:13:37 +00:00
Merge pull request #1778 from ahankinson/partial-fix-issue578
This fix adds a missing `isClockwise` property
This commit is contained in:
@@ -113,7 +113,7 @@ function CGPathAddArc(aPath, aTransform, x, y, aRadius, aStartAngle, anEndAngle,
|
||||
}
|
||||
|
||||
aPath.current = _CGPointMake(x + aRadius * COS(anEndAngle), y + aRadius * SIN(anEndAngle));
|
||||
aPath.elements[aPath.count++] = { type:kCGPathElementAddArc, x:x, y:y, radius:aRadius, startAngle:aStartAngle, endAngle:anEndAngle };
|
||||
aPath.elements[aPath.count++] = { type:kCGPathElementAddArc, x:x, y:y, radius:aRadius, startAngle:aStartAngle, endAngle:anEndAngle, isClockwise:isClockwise};
|
||||
}
|
||||
|
||||
function CGPathAddArcToPoint(aPath, aTransform, x1, y1, x2, y2, aRadius)
|
||||
@@ -183,36 +183,43 @@ function CGPathAddPath(aPath, aTransform, anotherPath)
|
||||
|
||||
switch (element.type)
|
||||
{
|
||||
case kCGPathElementAddLineToPoint: CGPathAddLineToPoint(aPath, aTransform, element.x, element.y);
|
||||
break;
|
||||
case kCGPathElementAddLineToPoint:
|
||||
CGPathAddLineToPoint(aPath, aTransform, element.x, element.y);
|
||||
break;
|
||||
|
||||
case kCGPathElementAddCurveToPoint: CGPathAddCurveToPoint(aPath, aTransform,
|
||||
element.cp1x, element.cp1y,
|
||||
element.cp2x, element.cp2y,
|
||||
element.x, element.y);
|
||||
break;
|
||||
case kCGPathElementAddCurveToPoint:
|
||||
CGPathAddCurveToPoint(aPath, aTransform,
|
||||
element.cp1x, element.cp1y,
|
||||
element.cp2x, element.cp2y,
|
||||
element.x, element.y);
|
||||
break;
|
||||
|
||||
case kCGPathElementAddArc: CGPathAddArc(aPath, aTransform, element.x, element.y,
|
||||
element.radius, element.startAngle,
|
||||
element.endAngle, element.isClockwise);
|
||||
break;
|
||||
case kCGPathElementAddArc:
|
||||
CGPathAddArc(aPath, aTransform, element.x, element.y,
|
||||
element.radius, element.startAngle,
|
||||
element.endAngle, element.isClockwise);
|
||||
break;
|
||||
|
||||
case kCGPathElementAddArcToPoint: CGPathAddArcToPoint(aPath, aTransform,
|
||||
element.p1x, element.p1y,
|
||||
element.p2x, element.p2y,
|
||||
element.radius);
|
||||
break;
|
||||
case kCGPathElementAddArcToPoint:
|
||||
CGPathAddArcToPoint(aPath, aTransform,
|
||||
element.p1x, element.p1y,
|
||||
element.p2x, element.p2y,
|
||||
element.radius);
|
||||
break;
|
||||
|
||||
case kCGPathElementAddQuadCurveToPoint: CGPathAddQuadCurveToPoint(aPath, aTransform,
|
||||
element.cpx, element.cpy,
|
||||
element.x, element.y);
|
||||
break;
|
||||
case kCGPathElementAddQuadCurveToPoint:
|
||||
CGPathAddQuadCurveToPoint(aPath, aTransform,
|
||||
element.cpx, element.cpy,
|
||||
element.x, element.y);
|
||||
break;
|
||||
|
||||
case kCGPathElementMoveToPoint: CGPathMoveToPoint(aPath, aTransform, element.x, element.y);
|
||||
break;
|
||||
case kCGPathElementMoveToPoint:
|
||||
CGPathMoveToPoint(aPath, aTransform, element.x, element.y);
|
||||
break;
|
||||
|
||||
case kCGPathElementCloseSubpath: CGPathCloseSubpath(aPath);
|
||||
break;
|
||||
case kCGPathElementCloseSubpath:
|
||||
CGPathCloseSubpath(aPath);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,8 +47,6 @@ GLOBAL(objj_ivar) = function(/*String*/ aName, /*String*/ aType)
|
||||
this.type = aType;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(objj_ivar);
|
||||
|
||||
GLOBAL(objj_method) = function(/*String*/ aName, /*IMP*/ anImplementation, /*String*/ types)
|
||||
{
|
||||
this.name = aName;
|
||||
@@ -56,8 +54,6 @@ GLOBAL(objj_method) = function(/*String*/ aName, /*IMP*/ anImplementation, /*Str
|
||||
this.types = types;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(objj_method);
|
||||
|
||||
GLOBAL(objj_class) = function(displayName)
|
||||
{
|
||||
this.isa = NULL;
|
||||
@@ -89,16 +85,12 @@ GLOBAL(objj_class) = function(displayName)
|
||||
this._UID = -1;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(objj_class);
|
||||
|
||||
GLOBAL(objj_object) = function()
|
||||
{
|
||||
this.isa = NULL;
|
||||
this._UID = -1;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(objj_object);
|
||||
|
||||
// Working with Classes
|
||||
|
||||
GLOBAL(class_getName) = function(/*Class*/ aClass)
|
||||
@@ -109,8 +101,6 @@ GLOBAL(class_getName) = function(/*Class*/ aClass)
|
||||
return aClass.name;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_getName);
|
||||
|
||||
GLOBAL(class_isMetaClass) = function(/*Class*/ aClass)
|
||||
{
|
||||
if (!aClass)
|
||||
@@ -119,8 +109,6 @@ GLOBAL(class_isMetaClass) = function(/*Class*/ aClass)
|
||||
return ISMETA(aClass);
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_isMetaClass);
|
||||
|
||||
GLOBAL(class_getSuperclass) = function(/*Class*/ aClass)
|
||||
{
|
||||
if (aClass == Nil)
|
||||
@@ -129,8 +117,6 @@ GLOBAL(class_getSuperclass) = function(/*Class*/ aClass)
|
||||
return aClass.super_class;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_getSuperclass)
|
||||
|
||||
GLOBAL(class_setSuperclass) = function(/*Class*/ aClass, /*Class*/ aSuperClass)
|
||||
{
|
||||
// Set up the actual class hierarchy.
|
||||
@@ -138,8 +124,6 @@ GLOBAL(class_setSuperclass) = function(/*Class*/ aClass, /*Class*/ aSuperClass)
|
||||
aClass.isa.super_class = aSuperClass.isa;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_setSuperclass);
|
||||
|
||||
GLOBAL(class_addIvar) = function(/*Class*/ aClass, /*String*/ aName, /*String*/ aType)
|
||||
{
|
||||
var thePrototype = aClass.allocator.prototype;
|
||||
@@ -158,8 +142,6 @@ GLOBAL(class_addIvar) = function(/*Class*/ aClass, /*String*/ aName, /*String*/
|
||||
return YES;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_addIvar);
|
||||
|
||||
GLOBAL(class_addIvars) = function(/*Class*/ aClass, /*Array*/ivars)
|
||||
{
|
||||
var index = 0,
|
||||
@@ -182,15 +164,11 @@ GLOBAL(class_addIvars) = function(/*Class*/ aClass, /*Array*/ivars)
|
||||
}
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_addIvars);
|
||||
|
||||
GLOBAL(class_copyIvarList) = function(/*Class*/ aClass)
|
||||
{
|
||||
return aClass.ivar_list.slice(0);
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_copyIvarList);
|
||||
|
||||
//#define class_copyIvarList(aClass) (aClass.ivar_list.slice(0))
|
||||
|
||||
#define METHOD_DISPLAY_NAME(aClass, aMethod) (ISMETA(aClass) ? '+' : '-') + " [" + class_getName(aClass) + ' ' + method_getName(aMethod) + ']'
|
||||
@@ -216,8 +194,6 @@ GLOBAL(class_addMethod) = function(/*Class*/ aClass, /*SEL*/ aName, /*IMP*/ anIm
|
||||
return YES;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_addMethod);
|
||||
|
||||
GLOBAL(class_addMethods) = function(/*Class*/ aClass, /*Array*/ methods)
|
||||
{
|
||||
var index = 0,
|
||||
@@ -245,8 +221,6 @@ GLOBAL(class_addMethods) = function(/*Class*/ aClass, /*Array*/ methods)
|
||||
class_addMethods(GETMETA(aClass), methods);
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_addMethods);
|
||||
|
||||
GLOBAL(class_getInstanceMethod) = function(/*Class*/ aClass, /*SEL*/ aSelector)
|
||||
{
|
||||
if (!aClass || !aSelector)
|
||||
@@ -257,8 +231,6 @@ GLOBAL(class_getInstanceMethod) = function(/*Class*/ aClass, /*SEL*/ aSelector)
|
||||
return method ? method : NULL;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_getInstanceMethod);
|
||||
|
||||
GLOBAL(class_getInstanceVariable) = function(/*Class*/ aClass, /*String*/ aName)
|
||||
{
|
||||
if (!aClass || !aName)
|
||||
@@ -270,8 +242,6 @@ GLOBAL(class_getInstanceVariable) = function(/*Class*/ aClass, /*String*/ aName)
|
||||
return variable;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_getInstanceVariable);
|
||||
|
||||
GLOBAL(class_getClassMethod) = function(/*Class*/ aClass, /*SEL*/ aSelector)
|
||||
{
|
||||
if (!aClass || !aSelector)
|
||||
@@ -282,36 +252,26 @@ GLOBAL(class_getClassMethod) = function(/*Class*/ aClass, /*SEL*/ aSelector)
|
||||
return method ? method : NULL;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_getClassMethod);
|
||||
|
||||
GLOBAL(class_respondsToSelector) = function(/*Class*/ aClass, /*SEL*/ aSelector)
|
||||
{
|
||||
return class_getClassMethod(aClass, aSelector) != NULL;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_respondsToSelector);
|
||||
|
||||
GLOBAL(class_copyMethodList) = function(/*Class*/ aClass)
|
||||
{
|
||||
return aClass.method_list.slice(0);
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_copyMethodList);
|
||||
|
||||
GLOBAL(class_getVersion) = function(/*Class*/ aClass)
|
||||
{
|
||||
return aClass.version;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_getVersion);
|
||||
|
||||
GLOBAL(class_setVersion) = function(/*Class*/ aClass, /*Integer*/ aVersion)
|
||||
{
|
||||
aClass.version = parseInt(aVersion, 10);
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_setVersion);
|
||||
|
||||
GLOBAL(class_replaceMethod) = function(/*Class*/ aClass, /*SEL*/ aSelector, /*IMP*/ aMethodImplementation)
|
||||
{
|
||||
if (!aClass || !aSelector)
|
||||
@@ -328,8 +288,6 @@ GLOBAL(class_replaceMethod) = function(/*Class*/ aClass, /*SEL*/ aSelector, /*IM
|
||||
return method_imp;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_replaceMethod);
|
||||
|
||||
var _class_initialize = function(/*Class*/ aClass)
|
||||
{
|
||||
var meta = GETMETA(aClass);
|
||||
@@ -422,8 +380,6 @@ GLOBAL(class_getMethodImplementation) = function(/*Class*/ aClass, /*SEL*/ aSele
|
||||
return implementation;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_getMethodImplementation);
|
||||
|
||||
// Adding Classes
|
||||
var REGISTERED_CLASSES = { };
|
||||
|
||||
@@ -470,8 +426,6 @@ GLOBAL(objj_allocateClassPair) = function(/*Class*/ superclass, /*String*/ aName
|
||||
return classObject;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(objj_allocateClassPair);
|
||||
|
||||
var CONTEXT_BUNDLE = nil;
|
||||
|
||||
GLOBAL(objj_registerClassPair) = function(/*Class*/ aClass)
|
||||
@@ -482,8 +436,6 @@ GLOBAL(objj_registerClassPair) = function(/*Class*/ aClass)
|
||||
addClassToBundle(aClass, CONTEXT_BUNDLE);
|
||||
}
|
||||
|
||||
DISPLAY_NAME(objj_registerClassPair);
|
||||
|
||||
GLOBAL(objj_resetRegisterClasses) = function()
|
||||
{
|
||||
for (var key in REGISTERED_CLASSES)
|
||||
@@ -494,8 +446,6 @@ GLOBAL(objj_resetRegisterClasses) = function()
|
||||
resetBundle();
|
||||
}
|
||||
|
||||
DISPLAY_NAME(objj_resetRegisterClasses);
|
||||
|
||||
// Instantiating Classes
|
||||
|
||||
GLOBAL(class_createInstance) = function(/*Class*/ aClass)
|
||||
@@ -511,8 +461,6 @@ GLOBAL(class_createInstance) = function(/*Class*/ aClass)
|
||||
return object;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(class_createInstance);
|
||||
|
||||
// Opera 9.5.1 has a bug where prototypes "inheret" members from instances when "with" is used.
|
||||
// Given that the Opera team is so fond of bug-testing instead of version-testing, we'll go
|
||||
// ahead and do that.
|
||||
@@ -570,8 +518,6 @@ GLOBAL(object_getClassName) = function(/*id*/ anObject)
|
||||
return theClass ? class_getName(theClass) : "";
|
||||
}
|
||||
|
||||
DISPLAY_NAME(object_getClassName);
|
||||
|
||||
//objc_getClassList
|
||||
GLOBAL(objj_lookUpClass) = function(/*String*/ aName)
|
||||
{
|
||||
@@ -580,8 +526,6 @@ GLOBAL(objj_lookUpClass) = function(/*String*/ aName)
|
||||
return theClass ? theClass : Nil;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(objj_lookUpClass);
|
||||
|
||||
GLOBAL(objj_getClass) = function(/*String*/ aName)
|
||||
{
|
||||
var theClass = REGISTERED_CLASSES[aName];
|
||||
@@ -603,8 +547,6 @@ GLOBAL(objj_getClass) = function(/*String*/ aName)
|
||||
return theClass ? theClass : Nil;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(objj_getClass);
|
||||
|
||||
//objc_getRequiredClass
|
||||
GLOBAL(objj_getMetaClass) = function(/*String*/ aName)
|
||||
{
|
||||
@@ -613,8 +555,6 @@ GLOBAL(objj_getMetaClass) = function(/*String*/ aName)
|
||||
return GETMETA(theClass);
|
||||
}
|
||||
|
||||
DISPLAY_NAME(objj_getMetaClass);
|
||||
|
||||
// Working with Instance Variables
|
||||
|
||||
GLOBAL(ivar_getName) = function(anIvar)
|
||||
@@ -622,15 +562,11 @@ GLOBAL(ivar_getName) = function(anIvar)
|
||||
return anIvar.name;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(ivar_getName);
|
||||
|
||||
GLOBAL(ivar_getTypeEncoding) = function(anIvar)
|
||||
{
|
||||
return anIvar.type;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(ivar_getTypeEncoding);
|
||||
|
||||
// Sending Messages
|
||||
|
||||
#ifdef MAXIMUM_RECURSION_CHECKS
|
||||
@@ -669,8 +605,6 @@ GLOBAL(objj_msgSend) = function(/*id*/ aReceiver, /*SEL*/ aSelector)
|
||||
#endif
|
||||
}
|
||||
|
||||
DISPLAY_NAME(objj_msgSend);
|
||||
|
||||
GLOBAL(objj_msgSendSuper) = function(/*id*/ aSuper, /*SEL*/ aSelector)
|
||||
{
|
||||
var super_class = aSuper.super_class;
|
||||
@@ -682,8 +616,6 @@ GLOBAL(objj_msgSendSuper) = function(/*id*/ aSuper, /*SEL*/ aSelector)
|
||||
return implementation.apply(aSuper.receiver, arguments);
|
||||
}
|
||||
|
||||
DISPLAY_NAME(objj_msgSendSuper);
|
||||
|
||||
// Working with Methods
|
||||
|
||||
GLOBAL(method_getName) = function(/*Method*/ aMethod)
|
||||
@@ -691,15 +623,11 @@ GLOBAL(method_getName) = function(/*Method*/ aMethod)
|
||||
return aMethod.name;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(method_getName);
|
||||
|
||||
GLOBAL(method_getImplementation) = function(/*Method*/ aMethod)
|
||||
{
|
||||
return aMethod.method_imp;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(method_getImplementation);
|
||||
|
||||
GLOBAL(method_setImplementation) = function(/*Method*/ aMethod, /*IMP*/ anImplementation)
|
||||
{
|
||||
var oldImplementation = aMethod.method_imp;
|
||||
@@ -709,8 +637,6 @@ GLOBAL(method_setImplementation) = function(/*Method*/ aMethod, /*IMP*/ anImplem
|
||||
return oldImplementation;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(method_setImplementation);
|
||||
|
||||
GLOBAL(method_exchangeImplementations) = function(/*Method*/ lhs, /*Method*/ rhs)
|
||||
{
|
||||
var lhs_imp = method_getImplementation(lhs),
|
||||
@@ -720,8 +646,6 @@ GLOBAL(method_exchangeImplementations) = function(/*Method*/ lhs, /*Method*/ rhs
|
||||
method_setImplementation(rhs, lhs_imp);
|
||||
}
|
||||
|
||||
DISPLAY_NAME(method_exchangeImplementations);
|
||||
|
||||
// Working with Selectors
|
||||
|
||||
GLOBAL(sel_getName) = function(aSelector)
|
||||
@@ -729,29 +653,21 @@ GLOBAL(sel_getName) = function(aSelector)
|
||||
return aSelector ? aSelector : "<null selector>";
|
||||
}
|
||||
|
||||
DISPLAY_NAME(sel_getName);
|
||||
|
||||
GLOBAL(sel_getUid) = function(/*String*/ aName)
|
||||
{
|
||||
return aName;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(sel_getUid);
|
||||
|
||||
GLOBAL(sel_isEqual) = function(/*SEL*/ lhs, /*SEL*/ rhs)
|
||||
{
|
||||
return lhs === rhs;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(sel_isEqual);
|
||||
|
||||
GLOBAL(sel_registerName) = function(/*String*/ aName)
|
||||
{
|
||||
return aName;
|
||||
}
|
||||
|
||||
DISPLAY_NAME(sel_registerName);
|
||||
|
||||
objj_class.prototype.toString = objj_object.prototype.toString = function()
|
||||
{
|
||||
var isa = this.isa;
|
||||
|
||||
Reference in New Issue
Block a user