|
Lines 24-34
WebCore/bindings/js/JSSVGMatrixCustom.cpp_sec1
|
| 24 |
|
24 |
|
| 25 |
#include "TransformationMatrix.h" |
25 |
#include "TransformationMatrix.h" |
| 26 |
#include "SVGException.h" |
26 |
#include "SVGException.h" |
|
|
27 |
#include <runtime/Error.h> |
| 27 |
|
28 |
|
| 28 |
using namespace JSC; |
29 |
using namespace JSC; |
| 29 |
|
30 |
|
| 30 |
namespace WebCore { |
31 |
namespace WebCore { |
| 31 |
|
32 |
|
|
|
33 |
JSValue JSSVGMatrix::multiply(ExecState* exec, const ArgList& args) |
| 34 |
{ |
| 35 |
if (!args.at(0).inherits(&JSSVGMatrix::s_info)) |
| 36 |
return throwError(exec, TypeError, "secondMatrix argument was not a SVGMatrix"); |
| 37 |
|
| 38 |
JSSVGMatrix* matrixObj = static_cast<JSSVGMatrix*>(asObject(args.at(0))); |
| 39 |
|
| 40 |
TransformationMatrix m1(*impl()); |
| 41 |
TransformationMatrix m2(*(matrixObj->impl())); |
| 42 |
|
| 43 |
JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(m1.multLeft(m2)).get(), m_context.get()); |
| 44 |
|
| 45 |
return result; |
| 46 |
} |
| 47 |
|
| 32 |
JSValue JSSVGMatrix::inverse(ExecState* exec, const ArgList&) |
48 |
JSValue JSSVGMatrix::inverse(ExecState* exec, const ArgList&) |
| 33 |
{ |
49 |
{ |
| 34 |
TransformationMatrix imp(*impl()); |
50 |
TransformationMatrix imp(*impl()); |