本文整理汇总了C++中UnderlyingValueOwner::mutableValue方法的典型用法代码示例。如果您正苦于以下问题:C++ UnderlyingValueOwner::mutableValue方法的具体用法?C++ UnderlyingValueOwner::mutableValue怎么用?C++ UnderlyingValueOwner::mutableValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnderlyingValueOwner
的用法示例。
在下文中一共展示了UnderlyingValueOwner::mutableValue方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: composite
void CSSMotionRotationInterpolationType::composite(UnderlyingValueOwner& underlyingValueOwner, double underlyingFraction, const InterpolationValue& value) const
{
const MotionRotationType& underlyingType = toCSSMotionRotationNonInterpolableValue(*underlyingValueOwner.value().nonInterpolableValue).rotationType();
const MotionRotationType& rotationType = toCSSMotionRotationNonInterpolableValue(*value.nonInterpolableValue).rotationType();
if (underlyingType == rotationType)
underlyingValueOwner.mutableValue().interpolableValue->scaleAndAdd(underlyingFraction, *value.interpolableValue);
else
underlyingValueOwner.set(*this, value);
}
示例2: composite
void CSSClipInterpolationType::composite(UnderlyingValueOwner& underlyingValueOwner, double underlyingFraction, const InterpolationValue& value, double interpolationFraction) const
{
const ClipAutos& underlyingAutos = toCSSClipNonInterpolableValue(*underlyingValueOwner.value().nonInterpolableValue).clipAutos();
const ClipAutos& autos = toCSSClipNonInterpolableValue(*value.nonInterpolableValue).clipAutos();
if (underlyingAutos == autos)
underlyingValueOwner.mutableValue().interpolableValue->scaleAndAdd(underlyingFraction, *value.interpolableValue);
else
underlyingValueOwner.set(*this, value);
}
示例3: composite
void CSSBasicShapeInterpolationType::composite(UnderlyingValueOwner& underlyingValueOwner, double underlyingFraction, const InterpolationValue& value, double interpolationFraction) const
{
if (!BasicShapeInterpolationFunctions::shapesAreCompatible(*underlyingValueOwner.value().nonInterpolableValue, *value.nonInterpolableValue)) {
underlyingValueOwner.set(*this, value);
return;
}
underlyingValueOwner.mutableValue().interpolableValue->scaleAndAdd(underlyingFraction, *value.interpolableValue);
}
示例4: composite
void CSSImageSliceInterpolationType::composite(UnderlyingValueOwner& underlyingValueOwner, double underlyingFraction, const InterpolationValue& value, double interpolationFraction) const
{
const SliceTypes& underlyingTypes = toCSSImageSliceNonInterpolableValue(*underlyingValueOwner.value().nonInterpolableValue).types();
const SliceTypes& types = toCSSImageSliceNonInterpolableValue(*value.nonInterpolableValue).types();
if (underlyingTypes == types)
underlyingValueOwner.mutableValue().interpolableValue->scaleAndAdd(underlyingFraction, *value.interpolableValue);
else
underlyingValueOwner.set(*this, value);
}
示例5: composite
void ListInterpolationFunctions::composite(UnderlyingValueOwner& underlyingValueOwner, double underlyingFraction, const InterpolationType& type, const InterpolationValue& value, NonInterpolableValuesAreCompatibleCallback nonInterpolableValuesAreCompatible, CompositeItemCallback compositeItem)
{
size_t underlyingLength = toInterpolableList(*underlyingValueOwner.value().interpolableValue).length();
if (underlyingLength == 0) {
ASSERT(!underlyingValueOwner.value().nonInterpolableValue);
underlyingValueOwner.set(type, value);
return;
}
const InterpolableList& interpolableList = toInterpolableList(*value.interpolableValue);
size_t valueLength = interpolableList.length();
if (valueLength == 0) {
ASSERT(!value.nonInterpolableValue);
underlyingValueOwner.mutableValue().interpolableValue->scale(underlyingFraction);
return;
}
const NonInterpolableList& nonInterpolableList = toNonInterpolableList(*value.nonInterpolableValue);
size_t newLength = lowestCommonMultiple(underlyingLength, valueLength);
if (!nonInterpolableListsAreCompatible(toNonInterpolableList(*underlyingValueOwner.value().nonInterpolableValue), nonInterpolableList, newLength, nonInterpolableValuesAreCompatible)) {
underlyingValueOwner.set(type, value);
return;
}
InterpolationValue& underlyingValue = underlyingValueOwner.mutableValue();
if (underlyingLength < newLength)
repeatToLength(underlyingValue, newLength);
InterpolableList& underlyingInterpolableList = toInterpolableList(*underlyingValue.interpolableValue);
NonInterpolableList& underlyingNonInterpolableList = toNonInterpolableList(*underlyingValue.nonInterpolableValue);
for (size_t i = 0; i < newLength; i++) {
compositeItem(
underlyingInterpolableList.getMutable(i),
underlyingNonInterpolableList.getMutable(i),
underlyingFraction,
*interpolableList.get(i % valueLength),
nonInterpolableList.get(i % valueLength));
}
}
示例6: composite
void CSSScaleInterpolationType::composite(
UnderlyingValueOwner& underlyingValueOwner,
double underlyingFraction,
const InterpolationValue& value,
double interpolationFraction) const {
const CSSScaleNonInterpolableValue& metadata =
toCSSScaleNonInterpolableValue(*value.nonInterpolableValue);
DCHECK(metadata.isStartAdditive() || metadata.isEndAdditive());
InterpolableList& underlyingList = toInterpolableList(
*underlyingValueOwner.mutableValue().interpolableValue);
for (size_t i = 0; i < 3; i++) {
InterpolableNumber& underlying =
toInterpolableNumber(*underlyingList.getMutable(i));
double start = metadata.start().array[i] *
(metadata.isStartAdditive() ? underlying.value() : 1);
double end = metadata.end().array[i] *
(metadata.isEndAdditive() ? underlying.value() : 1);
underlying.set(blend(start, end, interpolationFraction));
}
}
示例7: composite
void CSSBorderImageLengthBoxInterpolationType::composite(
UnderlyingValueOwner& underlyingValueOwner,
double underlyingFraction,
const InterpolationValue& value,
double interpolationFraction) const {
const SideNumbers& underlyingSideNumbers =
toCSSBorderImageLengthBoxNonInterpolableValue(
*underlyingValueOwner.value().nonInterpolableValue)
.sideNumbers();
const auto& nonInterpolableValue =
toCSSBorderImageLengthBoxNonInterpolableValue(
*value.nonInterpolableValue);
const SideNumbers& sideNumbers = nonInterpolableValue.sideNumbers();
if (underlyingSideNumbers != sideNumbers) {
underlyingValueOwner.set(*this, value);
return;
}
InterpolationValue& underlyingValue = underlyingValueOwner.mutableValue();
InterpolableList& underlyingList =
toInterpolableList(*underlyingValue.interpolableValue);
Vector<RefPtr<NonInterpolableValue>>& underlyingSideNonInterpolableValues =
toCSSBorderImageLengthBoxNonInterpolableValue(
*underlyingValue.nonInterpolableValue)
.sideNonInterpolableValues();
const InterpolableList& list = toInterpolableList(*value.interpolableValue);
const Vector<RefPtr<NonInterpolableValue>>& sideNonInterpolableValues =
nonInterpolableValue.sideNonInterpolableValues();
for (size_t i = 0; i < SideIndexCount; i++) {
if (sideNumbers.isNumber[i])
underlyingList.getMutable(i)->scaleAndAdd(underlyingFraction,
*list.get(i));
else
LengthInterpolationFunctions::composite(
underlyingList.getMutable(i), underlyingSideNonInterpolableValues[i],
underlyingFraction, *list.get(i), sideNonInterpolableValues[i].get());
}
}