PassRefPtr<FilterEffect> SVGFEDisplacementMapElement::build(SVGFilterBuilder* filterBuilder) { FilterEffect* input1 = filterBuilder->getEffectById(in1()); FilterEffect* input2 = filterBuilder->getEffectById(in2()); if (!input1 || !input2) return 0; return FEDisplacementMap::create(input1, input2, static_cast<ChannelSelectorType>(xChannelSelector()), static_cast<ChannelSelectorType>(yChannelSelector()), scale()); }
bool SVGFEDisplacementMapElement::build(FilterBuilder* builder) { FilterEffect* input1 = builder->getEffectById(in1()); FilterEffect* input2 = builder->getEffectById(in2()); if(!input1 || !input2) return false; RefPtr<FilterEffect> addedEffect = FEDisplacementMap::create(input1, input2, static_cast<ChannelSelectorType> (xChannelSelector()), static_cast<ChannelSelectorType> (yChannelSelector()), scale()); builder->add(result(), addedEffect.release()); return true; }