120
120
return getStaticValueSlot<JSSVGMatrix, Base>(exec, &JSSVGMatrixTable, this, propertyName, slot);
123
JSValuePtr jsSVGMatrixA(ExecState* exec, const Identifier&, const PropertySlot& slot)
125
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl());
123
bool JSSVGMatrix::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
125
return getStaticValueDescriptor<JSSVGMatrix, Base>(exec, &JSSVGMatrixTable, this, propertyName, descriptor);
128
JSValue jsSVGMatrixA(ExecState* exec, const Identifier&, const PropertySlot& slot)
130
JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase()));
132
TransformationMatrix imp(*castedThis->impl());
126
133
return jsNumber(exec, imp.a());
129
JSValuePtr jsSVGMatrixB(ExecState* exec, const Identifier&, const PropertySlot& slot)
136
JSValue jsSVGMatrixB(ExecState* exec, const Identifier&, const PropertySlot& slot)
131
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl());
138
JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase()));
140
TransformationMatrix imp(*castedThis->impl());
132
141
return jsNumber(exec, imp.b());
135
JSValuePtr jsSVGMatrixC(ExecState* exec, const Identifier&, const PropertySlot& slot)
144
JSValue jsSVGMatrixC(ExecState* exec, const Identifier&, const PropertySlot& slot)
137
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl());
146
JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase()));
148
TransformationMatrix imp(*castedThis->impl());
138
149
return jsNumber(exec, imp.c());
141
JSValuePtr jsSVGMatrixD(ExecState* exec, const Identifier&, const PropertySlot& slot)
152
JSValue jsSVGMatrixD(ExecState* exec, const Identifier&, const PropertySlot& slot)
143
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl());
154
JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase()));
156
TransformationMatrix imp(*castedThis->impl());
144
157
return jsNumber(exec, imp.d());
147
JSValuePtr jsSVGMatrixE(ExecState* exec, const Identifier&, const PropertySlot& slot)
160
JSValue jsSVGMatrixE(ExecState* exec, const Identifier&, const PropertySlot& slot)
149
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl());
162
JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase()));
164
TransformationMatrix imp(*castedThis->impl());
150
165
return jsNumber(exec, imp.e());
153
JSValuePtr jsSVGMatrixF(ExecState* exec, const Identifier&, const PropertySlot& slot)
168
JSValue jsSVGMatrixF(ExecState* exec, const Identifier&, const PropertySlot& slot)
155
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(asObject(slot.slotBase()))->impl());
170
JSSVGMatrix* castedThis = static_cast<JSSVGMatrix*>(asObject(slot.slotBase()));
172
TransformationMatrix imp(*castedThis->impl());
156
173
return jsNumber(exec, imp.f());
159
void JSSVGMatrix::put(ExecState* exec, const Identifier& propertyName, JSValuePtr value, PutPropertySlot& slot)
176
void JSSVGMatrix::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
161
178
lookupPut<JSSVGMatrix, Base>(exec, propertyName, value, &JSSVGMatrixTable, this, slot);
164
void setJSSVGMatrixA(ExecState* exec, JSObject* thisObject, JSValuePtr value)
166
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
167
imp.setA(value->toNumber(exec));
168
static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
171
void setJSSVGMatrixB(ExecState* exec, JSObject* thisObject, JSValuePtr value)
173
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
174
imp.setB(value->toNumber(exec));
175
static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
178
void setJSSVGMatrixC(ExecState* exec, JSObject* thisObject, JSValuePtr value)
180
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
181
imp.setC(value->toNumber(exec));
182
static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
185
void setJSSVGMatrixD(ExecState* exec, JSObject* thisObject, JSValuePtr value)
187
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
188
imp.setD(value->toNumber(exec));
189
static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
192
void setJSSVGMatrixE(ExecState* exec, JSObject* thisObject, JSValuePtr value)
194
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
195
imp.setE(value->toNumber(exec));
196
static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
199
void setJSSVGMatrixF(ExecState* exec, JSObject* thisObject, JSValuePtr value)
201
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
202
imp.setF(value->toNumber(exec));
203
static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
206
JSValuePtr jsSVGMatrixPrototypeFunctionMultiply(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
208
if (!thisValue->isObject(&JSSVGMatrix::s_info))
181
void setJSSVGMatrixA(ExecState* exec, JSObject* thisObject, JSValue value)
183
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
184
imp.setA(value.toNumber(exec));
185
static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
188
void setJSSVGMatrixB(ExecState* exec, JSObject* thisObject, JSValue value)
190
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
191
imp.setB(value.toNumber(exec));
192
static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
195
void setJSSVGMatrixC(ExecState* exec, JSObject* thisObject, JSValue value)
197
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
198
imp.setC(value.toNumber(exec));
199
static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
202
void setJSSVGMatrixD(ExecState* exec, JSObject* thisObject, JSValue value)
204
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
205
imp.setD(value.toNumber(exec));
206
static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
209
void setJSSVGMatrixE(ExecState* exec, JSObject* thisObject, JSValue value)
211
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
212
imp.setE(value.toNumber(exec));
213
static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
216
void setJSSVGMatrixF(ExecState* exec, JSObject* thisObject, JSValue value)
218
TransformationMatrix imp(*static_cast<JSSVGMatrix*>(thisObject)->impl());
219
imp.setF(value.toNumber(exec));
220
static_cast<JSSVGMatrix*>(thisObject)->impl()->commitChange(imp, static_cast<JSSVGMatrix*>(thisObject)->context());
223
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionMultiply(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
226
if (!thisValue.inherits(&JSSVGMatrix::s_info))
209
227
return throwError(exec, TypeError);
210
228
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
211
return castedThisObj->multiply(exec, args);
229
JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
230
TransformationMatrix imp(*wrapper);
231
TransformationMatrix secondMatrix = toSVGMatrix(args.at(0));
234
JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.multiply(secondMatrix)).get(), castedThisObj->context());
214
JSValuePtr jsSVGMatrixPrototypeFunctionInverse(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
238
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionInverse(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
216
if (!thisValue->isObject(&JSSVGMatrix::s_info))
241
if (!thisValue.inherits(&JSSVGMatrix::s_info))
217
242
return throwError(exec, TypeError);
218
243
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
219
244
return castedThisObj->inverse(exec, args);
222
JSValuePtr jsSVGMatrixPrototypeFunctionTranslate(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
224
if (!thisValue->isObject(&JSSVGMatrix::s_info))
225
return throwError(exec, TypeError);
226
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
227
return castedThisObj->translate(exec, args);
230
JSValuePtr jsSVGMatrixPrototypeFunctionScale(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
232
if (!thisValue->isObject(&JSSVGMatrix::s_info))
233
return throwError(exec, TypeError);
234
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
235
return castedThisObj->scale(exec, args);
238
JSValuePtr jsSVGMatrixPrototypeFunctionScaleNonUniform(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
240
if (!thisValue->isObject(&JSSVGMatrix::s_info))
241
return throwError(exec, TypeError);
242
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
243
return castedThisObj->scaleNonUniform(exec, args);
246
JSValuePtr jsSVGMatrixPrototypeFunctionRotate(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
248
if (!thisValue->isObject(&JSSVGMatrix::s_info))
249
return throwError(exec, TypeError);
250
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
251
return castedThisObj->rotate(exec, args);
254
JSValuePtr jsSVGMatrixPrototypeFunctionRotateFromVector(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
256
if (!thisValue->isObject(&JSSVGMatrix::s_info))
247
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionTranslate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
250
if (!thisValue.inherits(&JSSVGMatrix::s_info))
251
return throwError(exec, TypeError);
252
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
253
JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
254
TransformationMatrix imp(*wrapper);
255
float x = args.at(0).toFloat(exec);
256
float y = args.at(1).toFloat(exec);
259
JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.translate(x, y)).get(), castedThisObj->context());
263
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionScale(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
266
if (!thisValue.inherits(&JSSVGMatrix::s_info))
267
return throwError(exec, TypeError);
268
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
269
JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
270
TransformationMatrix imp(*wrapper);
271
float scaleFactor = args.at(0).toFloat(exec);
274
JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.scale(scaleFactor)).get(), castedThisObj->context());
278
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionScaleNonUniform(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
281
if (!thisValue.inherits(&JSSVGMatrix::s_info))
282
return throwError(exec, TypeError);
283
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
284
JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
285
TransformationMatrix imp(*wrapper);
286
float scaleFactorX = args.at(0).toFloat(exec);
287
float scaleFactorY = args.at(1).toFloat(exec);
290
JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.scaleNonUniform(scaleFactorX, scaleFactorY)).get(), castedThisObj->context());
294
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionRotate(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
297
if (!thisValue.inherits(&JSSVGMatrix::s_info))
298
return throwError(exec, TypeError);
299
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
300
JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
301
TransformationMatrix imp(*wrapper);
302
float angle = args.at(0).toFloat(exec);
305
JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.rotate(angle)).get(), castedThisObj->context());
309
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionRotateFromVector(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
312
if (!thisValue.inherits(&JSSVGMatrix::s_info))
257
313
return throwError(exec, TypeError);
258
314
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
259
315
return castedThisObj->rotateFromVector(exec, args);
262
JSValuePtr jsSVGMatrixPrototypeFunctionFlipX(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
264
if (!thisValue->isObject(&JSSVGMatrix::s_info))
265
return throwError(exec, TypeError);
266
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
267
return castedThisObj->flipX(exec, args);
270
JSValuePtr jsSVGMatrixPrototypeFunctionFlipY(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
272
if (!thisValue->isObject(&JSSVGMatrix::s_info))
273
return throwError(exec, TypeError);
274
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
275
return castedThisObj->flipY(exec, args);
278
JSValuePtr jsSVGMatrixPrototypeFunctionSkewX(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
280
if (!thisValue->isObject(&JSSVGMatrix::s_info))
281
return throwError(exec, TypeError);
282
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
283
return castedThisObj->skewX(exec, args);
286
JSValuePtr jsSVGMatrixPrototypeFunctionSkewY(ExecState* exec, JSObject*, JSValuePtr thisValue, const ArgList& args)
288
if (!thisValue->isObject(&JSSVGMatrix::s_info))
289
return throwError(exec, TypeError);
290
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
291
return castedThisObj->skewY(exec, args);
294
JSC::JSValuePtr toJS(JSC::ExecState* exec, JSSVGPODTypeWrapper<TransformationMatrix>* object, SVGElement* context)
296
return getDOMObjectWrapper<JSSVGMatrix, JSSVGPODTypeWrapper<TransformationMatrix> >(exec, object, context);
298
TransformationMatrix toSVGMatrix(JSC::JSValuePtr value)
300
return value->isObject(&JSSVGMatrix::s_info) ? (TransformationMatrix) *static_cast<JSSVGMatrix*>(asObject(value))->impl() : TransformationMatrix();
318
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionFlipX(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
321
if (!thisValue.inherits(&JSSVGMatrix::s_info))
322
return throwError(exec, TypeError);
323
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
324
JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
325
TransformationMatrix imp(*wrapper);
328
JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.flipX()).get(), castedThisObj->context());
332
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionFlipY(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
335
if (!thisValue.inherits(&JSSVGMatrix::s_info))
336
return throwError(exec, TypeError);
337
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
338
JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
339
TransformationMatrix imp(*wrapper);
342
JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.flipY()).get(), castedThisObj->context());
346
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionSkewX(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
349
if (!thisValue.inherits(&JSSVGMatrix::s_info))
350
return throwError(exec, TypeError);
351
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
352
JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
353
TransformationMatrix imp(*wrapper);
354
float angle = args.at(0).toFloat(exec);
357
JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.skewX(angle)).get(), castedThisObj->context());
361
JSValue JSC_HOST_CALL jsSVGMatrixPrototypeFunctionSkewY(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
364
if (!thisValue.inherits(&JSSVGMatrix::s_info))
365
return throwError(exec, TypeError);
366
JSSVGMatrix* castedThisObj = static_cast<JSSVGMatrix*>(asObject(thisValue));
367
JSSVGPODTypeWrapper<TransformationMatrix>* wrapper = castedThisObj->impl();
368
TransformationMatrix imp(*wrapper);
369
float angle = args.at(0).toFloat(exec);
372
JSC::JSValue result = toJS(exec, deprecatedGlobalObjectForPrototype(exec), JSSVGStaticPODTypeWrapper<TransformationMatrix>::create(imp.skewY(angle)).get(), castedThisObj->context());
376
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, JSSVGPODTypeWrapper<TransformationMatrix>* object, SVGElement* context)
378
return getDOMObjectWrapper<JSSVGMatrix, JSSVGPODTypeWrapper<TransformationMatrix> >(exec, globalObject, object, context);
380
TransformationMatrix toSVGMatrix(JSC::JSValue value)
382
return value.inherits(&JSSVGMatrix::s_info) ? (TransformationMatrix) *static_cast<JSSVGMatrix*>(asObject(value))->impl() : TransformationMatrix();