//virtual Gui::CEffect* PSVGFEOffsetElement::Filter(Gui::RenderContext* renderContext, Gui::CEffect* inEffect[], PSVGFilterElement* pFilterElement, const gm::RectF& uRect, double scaleX, double scaleY) { SVGFEOffsetElement* psvgElement = static_cast<SVGFEOffsetElement*>(m_pNode); // LDraw::Bitmap* inImage = inImage[0]->m_outImage; double dx = psvgElement->get_dx()->get_animVal(); double dy = psvgElement->get_dy()->get_animVal(); SVGOffsetEffect* pEffect = new SVGOffsetEffect; pEffect->m_inEffect = inEffect[0]; pEffect->m_dx = (float)dx; pEffect->m_dy = (float)dy; #if 0 pEffect->m_technique = pO->m_res->m_d3d9_effect->GetTechniqueByName("RenderLinearGradient"); ASSERT(pEffect->m_technique); #endif m_effect = pEffect; return pEffect; #if 0 UI::Graphics out(new LDraw::GraphicsO(outImage)); out.DrawImage(inImage, (float)(dx*scaleX), (float)(dy*scaleY)); #endif return 0; }
static v8::Handle<v8::Value> resultAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { SVGFEOffsetElement* imp = V8SVGFEOffsetElement::toNative(info.Holder()); return toV8Fast(imp->resultAnimated(), info, imp); }
JSValue* JSSVGFEOffsetElement::getValueProperty(ExecState* exec, int token) const { switch (token) { case In1AttrNum: { SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedString> obj = imp->in1Animated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedString>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedString>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedString>(obj.get(), imp); } } return toJS(exec, obj.get()); } case DxAttrNum: { SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedNumber> obj = imp->dxAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp); } } return toJS(exec, obj.get()); } case DyAttrNum: { SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedNumber> obj = imp->dyAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedNumber>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedNumber>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedNumber>(obj.get(), imp); } } return toJS(exec, obj.get()); } case XAttrNum: { SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedLength> obj = imp->xAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp); } } return toJS(exec, obj.get()); } case YAttrNum: { SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedLength> obj = imp->yAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp); } } return toJS(exec, obj.get()); } case WidthAttrNum: { SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedLength> obj = imp->widthAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp); } } return toJS(exec, obj.get()); } case HeightAttrNum: { SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedLength> obj = imp->heightAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedLength>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedLength>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedLength>(obj.get(), imp); } } return toJS(exec, obj.get()); } case ResultAttrNum: { SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedString> obj = imp->resultAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedString>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedString>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedString>(obj.get(), imp); } } return toJS(exec, obj.get()); } case ClassNameAttrNum: { SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(impl()); ASSERT(exec && exec->dynamicInterpreter()); RefPtr<SVGAnimatedString> obj = imp->classNameAnimated(); Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); if (activeFrame) { SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); if (extensions) { if (extensions->hasGenericContext<SVGAnimatedString>(obj.get())) ASSERT(extensions->genericContext<SVGAnimatedString>(obj.get()) == imp); else extensions->setGenericContext<SVGAnimatedString>(obj.get(), imp); } } return toJS(exec, obj.get()); } case StyleAttrNum: { SVGFEOffsetElement* imp = static_cast<SVGFEOffsetElement*>(impl()); return toJS(exec, WTF::getPtr(imp->style())); } } return 0; }
static v8::Handle<v8::Value> getPresentationAttributeCallback(const v8::Arguments& args) { SVGFEOffsetElement* imp = V8SVGFEOffsetElement::toNative(args.Holder()); V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, name, MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)); return toV8Fast(imp->getPresentationAttribute(name), args, imp); }