当前位置: 首页>>代码示例>>C++>>正文


C++ InterpolationEnvironment类代码示例

本文整理汇总了C++中InterpolationEnvironment的典型用法代码示例。如果您正苦于以下问题:C++ InterpolationEnvironment类的具体用法?C++ InterpolationEnvironment怎么用?C++ InterpolationEnvironment使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了InterpolationEnvironment类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: maybeConvertLength

PassOwnPtr<InterpolationValue> CSSLengthInterpolationType::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const
{
    Length underlyingLength;
    if (!LengthPropertyFunctions::getLength(cssProperty(), *environment.state().style(), underlyingLength))
        return nullptr;
    return maybeConvertLength(underlyingLength, effectiveZoom(*environment.state().style()));
}
开发者ID:shaoboyan,项目名称:chromium-crosswalk,代码行数:7,代码来源:CSSLengthInterpolationType.cpp

示例2: maybeConvertUnderlyingValue

InterpolationValue CSSLengthListInterpolationType::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const
{
    Vector<Length> underlyingLengthList;
    if (!LengthListPropertyFunctions::getLengthList(cssProperty(), *environment.state().style(), underlyingLengthList))
        return nullptr;
    return maybeConvertLengthList(underlyingLengthList, environment.state().style()->effectiveZoom());
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:7,代码来源:CSSLengthListInterpolationType.cpp

示例3: apply

void CSSBorderImageLengthBoxInterpolationType::apply(
    const InterpolableValue& interpolableValue,
    const NonInterpolableValue* nonInterpolableValue,
    InterpolationEnvironment& environment) const {
  const SideNumbers& sideNumbers =
      toCSSBorderImageLengthBoxNonInterpolableValue(nonInterpolableValue)
          ->sideNumbers();
  const Vector<RefPtr<NonInterpolableValue>>& nonInterpolableValues =
      toCSSBorderImageLengthBoxNonInterpolableValue(nonInterpolableValue)
          ->sideNonInterpolableValues();
  const InterpolableList& list = toInterpolableList(interpolableValue);
  const auto& convertSide =
      [&sideNumbers, &list, &environment,
       &nonInterpolableValues](size_t index) -> BorderImageLength {
    if (sideNumbers.isNumber[index])
      return clampTo<double>(toInterpolableNumber(list.get(index))->value(), 0);
    return LengthInterpolationFunctions::createLength(
        *list.get(index), nonInterpolableValues[index].get(),
        environment.state().cssToLengthConversionData(), ValueRangeNonNegative);
  };
  BorderImageLengthBox box(convertSide(SideTop), convertSide(SideRight),
                           convertSide(SideBottom), convertSide(SideLeft));
  BorderImageLengthBoxPropertyFunctions::setBorderImageLengthBox(
      cssProperty(), *environment.state().style(), box);
}
开发者ID:mirror,项目名称:chromium,代码行数:25,代码来源:CSSBorderImageLengthBoxInterpolationType.cpp

示例4: apply

void CSSColorInterpolationType::apply(const InterpolableValue& interpolableValue, const NonInterpolableValue*, InterpolationEnvironment& environment) const
{
    const InterpolableList& colorPair = toInterpolableList(interpolableValue);
    ASSERT(colorPair.length() == InterpolableColorPairIndexCount);
    ColorPropertyFunctions::setUnvisitedColor(cssProperty(), *environment.state().style(),
        resolveInterpolableColor(*colorPair.get(Unvisited), environment.state(), false, cssProperty() == CSSPropertyTextDecorationColor));
    ColorPropertyFunctions::setVisitedColor(cssProperty(), *environment.state().style(),
        resolveInterpolableColor(*colorPair.get(Visited), environment.state(), true, cssProperty() == CSSPropertyTextDecorationColor));
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:9,代码来源:CSSColorInterpolationType.cpp

示例5: apply

void CSSPaintInterpolationType::apply(
    const InterpolableValue& interpolableColor,
    const NonInterpolableValue*,
    InterpolationEnvironment& environment) const {
  PaintPropertyFunctions::setColor(
      cssProperty(), *environment.state().style(),
      CSSColorInterpolationType::resolveInterpolableColor(interpolableColor,
                                                          environment.state()));
}
开发者ID:mirror,项目名称:chromium,代码行数:9,代码来源:CSSPaintInterpolationType.cpp

示例6: apply

void CSSImageInterpolationType::apply(
    const InterpolableValue& interpolableValue,
    const NonInterpolableValue* nonInterpolableValue,
    InterpolationEnvironment& environment) const {
  ImagePropertyFunctions::setStyleImage(
      cssProperty(), *environment.state().style(),
      resolveStyleImage(cssProperty(), interpolableValue, nonInterpolableValue,
                        environment.state()));
}
开发者ID:mirror,项目名称:chromium,代码行数:9,代码来源:CSSImageInterpolationType.cpp

示例7: setFlagIfInheritUsed

void InvalidatableInterpolation::setFlagIfInheritUsed(InterpolationEnvironment& environment) const
{
    if (!m_property.isCSSProperty() && !m_property.isPresentationAttribute())
        return;
    if (!environment.state().parentStyle())
        return;
    const CSSValue* startValue = toCSSPropertySpecificKeyframe(m_startKeyframe)->value();
    const CSSValue* endValue = toCSSPropertySpecificKeyframe(m_endKeyframe)->value();
    if ((startValue && startValue->isInheritedValue())
        || (endValue && endValue->isInheritedValue())) {
        environment.state().parentStyle()->setHasExplicitlyInheritedProperties();
    }
}
开发者ID:joone,项目名称:chromium-crosswalk,代码行数:13,代码来源:InvalidatableInterpolation.cpp

示例8: isValid

 bool isValid(const InterpolationEnvironment& environment, const UnderlyingValue&) const final
 {
     Length parentLength;
     if (!LengthPropertyFunctions::getLength(m_property, *environment.state().parentStyle(), parentLength))
         return false;
     return parentLength == m_length;
 }
开发者ID:shaoboyan,项目名称:chromium-crosswalk,代码行数:7,代码来源:CSSLengthInterpolationType.cpp

示例9: apply

void SVGInterpolationType::apply(
    const InterpolableValue& interpolableValue,
    const NonInterpolableValue* nonInterpolableValue,
    InterpolationEnvironment& environment) const {
  environment.svgElement().setWebAnimatedAttribute(
      attribute(), appliedSVGValue(interpolableValue, nonInterpolableValue));
}
开发者ID:mirror,项目名称:chromium,代码行数:7,代码来源:SVGInterpolationType.cpp

示例10: isValid

 bool isValid(const InterpolationEnvironment& environment, const InterpolationValue& underlying) const final
 {
     StyleColor parentColor;
     if (!PaintPropertyFunctions::getColor(m_property, *environment.state().parentStyle(), parentColor))
         return !m_validColor;
     return m_validColor && parentColor == m_color;
 }
开发者ID:endlessm,项目名称:chromium-browser,代码行数:7,代码来源:CSSPaintInterpolationType.cpp

示例11: maybeConvertUnderlyingValue

InterpolationValue CSSImageInterpolationType::maybeConvertUnderlyingValue(
    const InterpolationEnvironment& environment) const {
  return maybeConvertStyleImage(
      ImagePropertyFunctions::getStyleImage(cssProperty(),
                                            *environment.state().style()),
      true);
}
开发者ID:mirror,项目名称:chromium,代码行数:7,代码来源:CSSImageInterpolationType.cpp

示例12: maybeConvertUnderlyingValue

InterpolationValue CSSPaintInterpolationType::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const
{
    // TODO(alancutter): Support capturing and animating with the visited paint color.
    StyleColor underlyingColor;
    if (!PaintPropertyFunctions::getColor(cssProperty(), *environment.state().style(), underlyingColor))
        return nullptr;
    return InterpolationValue(CSSColorInterpolationType::createInterpolableColor(underlyingColor));
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:8,代码来源:CSSPaintInterpolationType.cpp

示例13: apply

void CSSLengthListInterpolationType::apply(const InterpolableValue& interpolableValue, const NonInterpolableValue* nonInterpolableValue, InterpolationEnvironment& environment) const
{
    const InterpolableList& interpolableList = toInterpolableList(interpolableValue);
    const size_t length = interpolableList.length();
    ASSERT(length > 0);
    const NonInterpolableList& nonInterpolableList = toNonInterpolableList(*nonInterpolableValue);
    ASSERT(nonInterpolableList.length() == length);
    Vector<Length> result(length);
    for (size_t i = 0; i < length; i++) {
        result[i] = CSSLengthInterpolationType::resolveInterpolableLength(
            *interpolableList.get(i),
            nonInterpolableList.get(i),
            environment.state().cssToLengthConversionData(),
            m_valueRange);
    }
    LengthListPropertyFunctions::setLengthList(cssProperty(), *environment.state().style(), std::move(result));
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:17,代码来源:CSSLengthListInterpolationType.cpp

示例14: 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);
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:8,代码来源:SVGInterpolationType.cpp

示例15: convertBorderImageLengthBox

InterpolationValue
CSSBorderImageLengthBoxInterpolationType::maybeConvertUnderlyingValue(
    const InterpolationEnvironment& environment) const {
  const ComputedStyle& style = *environment.state().style();
  return convertBorderImageLengthBox(
      BorderImageLengthBoxPropertyFunctions::getBorderImageLengthBox(
          cssProperty(), style),
      style.effectiveZoom());
}
开发者ID:mirror,项目名称:chromium,代码行数:9,代码来源:CSSBorderImageLengthBoxInterpolationType.cpp


注:本文中的InterpolationEnvironment类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。