本文整理汇总了C++中InterpolationEnvironment::svgBaseValue方法的典型用法代码示例。如果您正苦于以下问题:C++ InterpolationEnvironment::svgBaseValue方法的具体用法?C++ InterpolationEnvironment::svgBaseValue怎么用?C++ InterpolationEnvironment::svgBaseValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InterpolationEnvironment
的用法示例。
在下文中一共展示了InterpolationEnvironment::svgBaseValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: maybeConvertSingle
InterpolationValue SVGInterpolationType::maybeConvertSingle(const PropertySpecificKeyframe& keyframe, const InterpolationEnvironment& environment, const InterpolationValue& underlying, ConversionCheckers& conversionCheckers) const
{
if (keyframe.isNeutral())
return maybeConvertNeutral(underlying, conversionCheckers);
SVGPropertyBase* svgValue = environment.svgBaseValue().cloneForAnimation(toSVGPropertySpecificKeyframe(keyframe).value());
return maybeConvertSVGValue(*svgValue);
}
示例2: maybeConvertSingle
InterpolationValue SVGTransformListInterpolationType::maybeConvertSingle(
const PropertySpecificKeyframe& keyframe,
const InterpolationEnvironment& environment,
const InterpolationValue& underlying,
ConversionCheckers& conversionCheckers) const {
Vector<SVGTransformType> types;
Vector<std::unique_ptr<InterpolableValue>> interpolableParts;
if (keyframe.composite() == EffectModel::CompositeAdd) {
if (underlying) {
types.appendVector(getTransformTypes(underlying));
interpolableParts.append(underlying.interpolableValue->clone());
}
conversionCheckers.append(SVGTransformListChecker::create(underlying));
} else {
DCHECK(!keyframe.isNeutral());
}
if (!keyframe.isNeutral()) {
SVGPropertyBase* svgValue = environment.svgBaseValue().cloneForAnimation(
toSVGPropertySpecificKeyframe(keyframe).value());
InterpolationValue value = maybeConvertSVGValue(*svgValue);
if (!value)
return nullptr;
types.appendVector(getTransformTypes(value));
interpolableParts.append(std::move(value.interpolableValue));
}
std::unique_ptr<InterpolableList> interpolableList =
InterpolableList::create(types.size());
size_t interpolableListIndex = 0;
for (auto& part : interpolableParts) {
InterpolableList& list = toInterpolableList(*part);
for (size_t i = 0; i < list.length(); ++i) {
interpolableList->set(interpolableListIndex,
std::move(list.getMutable(i)));
++interpolableListIndex;
}
}
return InterpolationValue(std::move(interpolableList),
SVGTransformNonInterpolableValue::create(types));
}
示例3: maybeConvertUnderlyingValue
InterpolationValue SVGInterpolationType::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const
{
return maybeConvertSVGValue(environment.svgBaseValue());
}