本文整理汇总了C++中RenderStyle::accessBackgroundLayers方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderStyle::accessBackgroundLayers方法的具体用法?C++ RenderStyle::accessBackgroundLayers怎么用?C++ RenderStyle::accessBackgroundLayers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderStyle
的用法示例。
在下文中一共展示了RenderStyle::accessBackgroundLayers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: applyProperty
// FIXME: Generate this function.
void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverState& state, const AnimatableValue* value)
{
ASSERT(CSSPropertyMetadata::isAnimatableProperty(property));
if (value->isUnknown()) {
StyleBuilder::applyProperty(property, state, toAnimatableUnknown(value)->toCSSValue().get());
return;
}
RenderStyle* style = state.style();
switch (property) {
case CSSPropertyBackgroundColor:
style->setBackgroundColor(toAnimatableColor(value)->color());
return;
case CSSPropertyBackgroundImage:
setOnFillLayers<CSSPropertyBackgroundImage>(style->accessBackgroundLayers(), value, state);
return;
case CSSPropertyBackgroundPositionX:
setOnFillLayers<CSSPropertyBackgroundPositionX>(style->accessBackgroundLayers(), value, state);
return;
case CSSPropertyBackgroundPositionY:
setOnFillLayers<CSSPropertyBackgroundPositionY>(style->accessBackgroundLayers(), value, state);
return;
case CSSPropertyBackgroundSize:
setOnFillLayers<CSSPropertyBackgroundSize>(style->accessBackgroundLayers(), value, state);
return;
case CSSPropertyBorderBottomColor:
style->setBorderBottomColor(toAnimatableColor(value)->color());
return;
case CSSPropertyBorderBottomLeftRadius:
style->setBorderBottomLeftRadius(animatableValueToLengthSize(value, state, ValueRangeNonNegative));
return;
case CSSPropertyBorderBottomRightRadius:
style->setBorderBottomRightRadius(animatableValueToLengthSize(value, state, ValueRangeNonNegative));
return;
case CSSPropertyBorderBottomWidth:
style->setBorderBottomWidth(animatableValueRoundClampTo<unsigned>(value));
return;
case CSSPropertyBorderImageOutset:
style->setBorderImageOutset(animatableValueToBorderImageLengthBox(value, state));
return;
case CSSPropertyBorderImageSlice:
style->setBorderImageSlices(animatableValueToLengthBox(value, state, ValueRangeNonNegative));
return;
case CSSPropertyBorderImageSource:
style->setBorderImageSource(state.styleImage(property, toAnimatableImage(value)->toCSSValue()));
return;
case CSSPropertyBorderImageWidth:
style->setBorderImageWidth(animatableValueToBorderImageLengthBox(value, state));
return;
case CSSPropertyBorderLeftColor:
style->setBorderLeftColor(toAnimatableColor(value)->color());
return;
case CSSPropertyBorderLeftWidth:
style->setBorderLeftWidth(animatableValueRoundClampTo<unsigned>(value));
return;
case CSSPropertyBorderRightColor:
style->setBorderRightColor(toAnimatableColor(value)->color());
return;
case CSSPropertyBorderRightWidth:
style->setBorderRightWidth(animatableValueRoundClampTo<unsigned>(value));
return;
case CSSPropertyBorderTopColor:
style->setBorderTopColor(toAnimatableColor(value)->color());
return;
case CSSPropertyBorderTopLeftRadius:
style->setBorderTopLeftRadius(animatableValueToLengthSize(value, state, ValueRangeNonNegative));
return;
case CSSPropertyBorderTopRightRadius:
style->setBorderTopRightRadius(animatableValueToLengthSize(value, state, ValueRangeNonNegative));
return;
case CSSPropertyBorderTopWidth:
style->setBorderTopWidth(animatableValueRoundClampTo<unsigned>(value));
return;
case CSSPropertyBottom:
style->setBottom(animatableValueToLength(value, state));
return;
case CSSPropertyBoxShadow:
case CSSPropertyWebkitBoxShadow:
style->setBoxShadow(toAnimatableShadow(value)->shadowList());
return;
case CSSPropertyClip:
style->setClip(animatableValueToLengthBox(value, state));
return;
case CSSPropertyColor:
style->setColor(toAnimatableColor(value)->color());
return;
case CSSPropertyFlexGrow:
style->setFlexGrow(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0));
return;
case CSSPropertyFlexShrink:
style->setFlexShrink(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0));
return;
case CSSPropertyFlexBasis:
style->setFlexBasis(animatableValueToLength(value, state, ValueRangeNonNegative));
return;
case CSSPropertyFontSize:
style->setFontSize(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0));
return;
case CSSPropertyFontStretch:
style->setFontStretch(animatableValueToFontStretch(value));
//.........这里部分代码省略.........
示例2: applyProperty
// FIXME: Generate this function.
void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverState& state, const AnimatableValue* value)
{
ASSERT(CSSPropertyMetadata::isAnimatableProperty(property));
if (value->isUnknown()) {
StyleBuilder::applyProperty(property, state, toAnimatableUnknown(value)->toCSSValue().get());
return;
}
RenderStyle* style = state.style();
switch (property) {
case CSSPropertyBackgroundColor:
style->setBackgroundColor(toAnimatableColor(value)->color());
style->setVisitedLinkBackgroundColor(toAnimatableColor(value)->visitedLinkColor());
return;
case CSSPropertyBackgroundImage:
setOnFillLayers<CSSPropertyBackgroundImage>(style->accessBackgroundLayers(), value, state);
return;
case CSSPropertyBackgroundPositionX:
setOnFillLayers<CSSPropertyBackgroundPositionX>(style->accessBackgroundLayers(), value, state);
return;
case CSSPropertyBackgroundPositionY:
setOnFillLayers<CSSPropertyBackgroundPositionY>(style->accessBackgroundLayers(), value, state);
return;
case CSSPropertyBackgroundSize:
setOnFillLayers<CSSPropertyBackgroundSize>(style->accessBackgroundLayers(), value, state);
return;
case CSSPropertyBaselineShift:
style->setBaselineShiftValue(toAnimatableSVGLength(value)->toSVGLength());
return;
case CSSPropertyBorderBottomColor:
style->setBorderBottomColor(toAnimatableColor(value)->color());
style->setVisitedLinkBorderBottomColor(toAnimatableColor(value)->visitedLinkColor());
return;
case CSSPropertyBorderBottomLeftRadius:
style->setBorderBottomLeftRadius(animatableValueToLengthSize(value, state, ValueRangeNonNegative));
return;
case CSSPropertyBorderBottomRightRadius:
style->setBorderBottomRightRadius(animatableValueToLengthSize(value, state, ValueRangeNonNegative));
return;
case CSSPropertyBorderBottomWidth:
style->setBorderBottomWidth(animatableValueRoundClampTo<unsigned>(value));
return;
case CSSPropertyBorderImageOutset:
style->setBorderImageOutset(animatableValueToBorderImageLengthBox(value, state));
return;
case CSSPropertyBorderImageSlice:
style->setBorderImageSlices(animatableValueToLengthBox(value, state, ValueRangeNonNegative));
return;
case CSSPropertyBorderImageSource:
style->setBorderImageSource(state.styleImage(property, toAnimatableImage(value)->toCSSValue()));
return;
case CSSPropertyBorderImageWidth:
style->setBorderImageWidth(animatableValueToBorderImageLengthBox(value, state));
return;
case CSSPropertyBorderLeftColor:
style->setBorderLeftColor(toAnimatableColor(value)->color());
style->setVisitedLinkBorderLeftColor(toAnimatableColor(value)->visitedLinkColor());
return;
case CSSPropertyBorderLeftWidth:
style->setBorderLeftWidth(animatableValueRoundClampTo<unsigned>(value));
return;
case CSSPropertyBorderRightColor:
style->setBorderRightColor(toAnimatableColor(value)->color());
style->setVisitedLinkBorderRightColor(toAnimatableColor(value)->visitedLinkColor());
return;
case CSSPropertyBorderRightWidth:
style->setBorderRightWidth(animatableValueRoundClampTo<unsigned>(value));
return;
case CSSPropertyBorderTopColor:
style->setBorderTopColor(toAnimatableColor(value)->color());
style->setVisitedLinkBorderTopColor(toAnimatableColor(value)->visitedLinkColor());
return;
case CSSPropertyBorderTopLeftRadius:
style->setBorderTopLeftRadius(animatableValueToLengthSize(value, state, ValueRangeNonNegative));
return;
case CSSPropertyBorderTopRightRadius:
style->setBorderTopRightRadius(animatableValueToLengthSize(value, state, ValueRangeNonNegative));
return;
case CSSPropertyBorderTopWidth:
style->setBorderTopWidth(animatableValueRoundClampTo<unsigned>(value));
return;
case CSSPropertyBottom:
style->setBottom(animatableValueToLength(value, state));
return;
case CSSPropertyBoxShadow:
case CSSPropertyWebkitBoxShadow:
style->setBoxShadow(toAnimatableShadow(value)->shadowList());
return;
case CSSPropertyClip:
style->setClip(animatableValueToLengthBox(value, state));
return;
case CSSPropertyColor:
style->setColor(toAnimatableColor(value)->color());
style->setVisitedLinkColor(toAnimatableColor(value)->visitedLinkColor());
return;
case CSSPropertyFillOpacity:
style->setFillOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0, 1));
return;
case CSSPropertyFill:
{
//.........这里部分代码省略.........