本文整理汇总了C++中SVGAnimationElement::targetElement方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGAnimationElement::targetElement方法的具体用法?C++ SVGAnimationElement::targetElement怎么用?C++ SVGAnimationElement::targetElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVGAnimationElement
的用法示例。
在下文中一共展示了SVGAnimationElement::targetElement方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: animationsByElement
SVGTimer::TargetAnimationMap SVGTimer::animationsByElement(double elapsedSeconds)
{
// Build a list of all animations which apply to each element
// FIXME: This list should be sorted by animation priority
ExceptionCode ec = 0;
TargetAnimationMap targetMap;
SVGNotifySet::const_iterator end = m_notifySet.end();
for (SVGNotifySet::const_iterator it = m_notifySet.begin(); it != end; ++it) {
SVGAnimationElement* animation = *it;
// If we're dealing with a disabled element with fill="freeze",
// we have to take it into account for further calculations.
if (!m_enabledNotifySet.contains(animation)) {
if (!animation->isFrozen())
continue;
if (elapsedSeconds <= (animation->getStartTime() + animation->getSimpleDuration(ec)))
continue;
}
SVGElement* target = const_cast<SVGElement*>(animation->targetElement());
TargetAnimationMap::iterator i = targetMap.find(target);
if (i != targetMap.end())
i->second.append(animation);
else {
Vector<SVGAnimationElement*> list;
list.append(animation);
targetMap.set(target, list);
}
}
return targetMap;
}
示例2: targetElementAttrGetter
static v8::Handle<v8::Value> targetElementAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.SVGAnimationElement.targetElement._get");
SVGAnimationElement* imp = V8SVGAnimationElement::toNative(info.Holder());
return toV8(imp->targetElement());
}