本文整理汇总了C++中SVGFELightElement::specularExponent方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGFELightElement::specularExponent方法的具体用法?C++ SVGFELightElement::specularExponent怎么用?C++ SVGFELightElement::specularExponent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVGFELightElement
的用法示例。
在下文中一共展示了SVGFELightElement::specularExponent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setFilterEffectAttribute
bool SVGFESpecularLightingElement::setFilterEffectAttribute(FilterEffect* effect, const QualifiedName& attrName)
{
FESpecularLighting* specularLighting = static_cast<FESpecularLighting*>(effect);
if (attrName == SVGNames::lighting_colorAttr) {
RenderObject* renderer = this->renderer();
ASSERT(renderer);
ASSERT(renderer->style());
return specularLighting->setLightingColor(renderer->style()->svgStyle()->lightingColor());
}
if (attrName == SVGNames::surfaceScaleAttr)
return specularLighting->setSurfaceScale(m_surfaceScale->currentValue()->value());
if (attrName == SVGNames::specularConstantAttr)
return specularLighting->setSpecularConstant(m_specularConstant->currentValue()->value());
if (attrName == SVGNames::specularExponentAttr)
return specularLighting->setSpecularExponent(m_specularExponent->currentValue()->value());
LightSource* lightSource = const_cast<LightSource*>(specularLighting->lightSource());
SVGFELightElement* lightElement = SVGFELightElement::findLightElement(*this);
ASSERT(lightSource);
ASSERT(lightElement);
if (attrName == SVGNames::azimuthAttr)
return lightSource->setAzimuth(lightElement->azimuth()->currentValue()->value());
if (attrName == SVGNames::elevationAttr)
return lightSource->setElevation(lightElement->elevation()->currentValue()->value());
if (attrName == SVGNames::xAttr)
return lightSource->setX(lightElement->x()->currentValue()->value());
if (attrName == SVGNames::yAttr)
return lightSource->setY(lightElement->y()->currentValue()->value());
if (attrName == SVGNames::zAttr)
return lightSource->setZ(lightElement->z()->currentValue()->value());
if (attrName == SVGNames::pointsAtXAttr)
return lightSource->setPointsAtX(lightElement->pointsAtX()->currentValue()->value());
if (attrName == SVGNames::pointsAtYAttr)
return lightSource->setPointsAtY(lightElement->pointsAtY()->currentValue()->value());
if (attrName == SVGNames::pointsAtZAttr)
return lightSource->setPointsAtZ(lightElement->pointsAtZ()->currentValue()->value());
if (attrName == SVGNames::specularExponentAttr)
return lightSource->setSpecularExponent(lightElement->specularExponent()->currentValue()->value());
if (attrName == SVGNames::limitingConeAngleAttr)
return lightSource->setLimitingConeAngle(lightElement->limitingConeAngle()->currentValue()->value());
ASSERT_NOT_REACHED();
return false;
}