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


C++ FillLayer::setNext方法代码示例

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


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

示例1: applyValue

 virtual void applyValue(CSSStyleSelector* selector, CSSValue* value) const
 {
     FillLayer* currChild = (selector->style()->*m_accessLayers)();
     FillLayer* prevChild = 0;
     if (value->isValueList()) {
         /* Walk each value and put it into a layer, creating new layers as needed. */
         CSSValueList* valueList = static_cast<CSSValueList*>(value);
         for (unsigned int i = 0; i < valueList->length(); i++) {
             if (!currChild) {
                 /* Need to make a new layer to hold this value */
                 currChild = new FillLayer(m_fillLayerType);
                 prevChild->setNext(currChild);
             }
             (selector->*m_mapFill)(m_propertyId, currChild, valueList->itemWithoutBoundsCheck(i));
             prevChild = currChild;
             currChild = currChild->next();
         }
     } else {
         (selector->*m_mapFill)(m_propertyId, currChild, value);
         currChild = currChild->next();
     }
     while (currChild) {
         /* Reset all remaining layers to not have the property set. */
         (currChild->*m_clear)();
         currChild = currChild->next();
     }
 }
开发者ID:studiomobile,项目名称:webcore,代码行数:27,代码来源:CSSStyleApplyProperty.cpp

示例2: applyInheritValue

    virtual void applyInheritValue(CSSStyleSelector* selector) const
    {
        FillLayer* currChild = (selector->style()->*m_accessLayers)();
        FillLayer* prevChild = 0;
        const FillLayer* currParent = (selector->parentStyle()->*m_layers)();
        while (currParent && (currParent->*m_test)()) {
            if (!currChild) {
                /* Need to make a new layer.*/
                currChild = new FillLayer(m_fillLayerType);
                prevChild->setNext(currChild);
            }
            (currChild->*m_set)((currParent->*m_get)());
            prevChild = currChild;
            currChild = prevChild->next();
            currParent = currParent->next();
        }

        while (currChild) {
            /* Reset any remaining layers to not have the property set. */
            (currChild->*m_clear)();
            currChild = currChild->next();
        }
    }
开发者ID:studiomobile,项目名称:webcore,代码行数:23,代码来源:CSSStyleApplyProperty.cpp


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