JSValue* jsSVGLocatablePrototypeFunctionGetScreenCTM(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args) { if (!thisValue->isObject(&JSSVGLocatable::s_info)) return throwError(exec, TypeError); JSSVGLocatable* castedThisObj = static_cast<JSSVGLocatable*>(thisValue); SVGLocatable* imp = static_cast<SVGLocatable*>(castedThisObj->impl()); JSC::JSValue* result = toJS(exec, JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getScreenCTM()).get(), castedThisObj->context()); return result; }
JSValue JSC_HOST_CALL jsSVGLocatablePrototypeFunctionGetScreenCTM(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); if (!thisValue.isObject(&JSSVGLocatable::s_info)) return throwError(exec, TypeError); JSSVGLocatable* castedThisObj = static_cast<JSSVGLocatable*>(asObject(thisValue)); SVGLocatable* imp = static_cast<SVGLocatable*>(castedThisObj->impl()); JSC::JSValue result = toJS(exec, JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp->getScreenCTM()).get(), castedThisObj->context()); return result; }
JSValue* jsSVGLocatablePrototypeFunctionGetTransformToElement(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args) { if (!thisValue->isObject(&JSSVGLocatable::s_info)) return throwError(exec, TypeError); JSSVGLocatable* castedThisObj = static_cast<JSSVGLocatable*>(thisValue); SVGLocatable* imp = static_cast<SVGLocatable*>(castedThisObj->impl()); ExceptionCode ec = 0; SVGElement* element = toSVGElement(args.at(exec, 0)); JSC::JSValue* result = toJS(exec, JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp->getTransformToElement(element, ec)).get(), castedThisObj->context()); setDOMException(exec, ec); return result; }