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


C++ InterpolationEnvironment::state方法代码示例

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


在下文中一共展示了InterpolationEnvironment::state方法的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: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: maybeConvertUnderlyingValue

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

示例9: 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

示例10: 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

示例11: apply

void CSSScaleInterpolationType::apply(
    const InterpolableValue& interpolableValue,
    const NonInterpolableValue*,
    InterpolationEnvironment& environment) const {
  Scale scale(interpolableValue);
  environment.state().style()->setScale(ScaleTransformOperation::create(
      scale.array[0], scale.array[1], scale.array[2],
      TransformOperation::Scale3D));
}
开发者ID:ollie314,项目名称:chromium,代码行数:9,代码来源:CSSScaleInterpolationType.cpp

示例12: 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

示例13: apply

void CSSTransformInterpolationType::apply(
    const InterpolableValue& interpolableValue,
    const NonInterpolableValue* untypedNonInterpolableValue,
    InterpolationEnvironment& environment) const {
  double progress = toInterpolableNumber(interpolableValue).value();
  const CSSTransformNonInterpolableValue& nonInterpolableValue =
      toCSSTransformNonInterpolableValue(*untypedNonInterpolableValue);
  environment.state().style()->setTransform(
      nonInterpolableValue.getInterpolatedTransform(progress));
}
开发者ID:ollie314,项目名称:chromium,代码行数:10,代码来源:CSSTransformInterpolationType.cpp

示例14: isValid

 bool isValid(const InterpolationEnvironment& environment,
              const InterpolationValue& underlying) const final {
   const StyleImage* inheritedImage = ImagePropertyFunctions::getStyleImage(
       m_property, *environment.state().parentStyle());
   if (!m_inheritedImage && !inheritedImage)
     return true;
   if (!m_inheritedImage || !inheritedImage)
     return false;
   return *m_inheritedImage == *inheritedImage;
 }
开发者ID:mirror,项目名称:chromium,代码行数:10,代码来源:CSSImageInterpolationType.cpp

示例15: apply

void CSSImageListInterpolationType::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);
    StyleImageList imageList(length);
    for (size_t i = 0; i < length; i++)
        imageList[i] = CSSImageInterpolationType::resolveStyleImage(cssProperty(), *interpolableList.get(i), nonInterpolableList.get(i), environment.state());
    ImageListPropertyFunctions::setImageList(cssProperty(), *environment.state().style(), imageList);
}
开发者ID:howardroark2018,项目名称:chromium,代码行数:12,代码来源:CSSImageListInterpolationType.cpp


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