void SVGFESpecularLightingElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { if (name == SVGNames::inAttr) { setIn1BaseValue(value); return; } if (name == SVGNames::surfaceScaleAttr) { setSurfaceScaleBaseValue(value.toFloat()); return; } if (name == SVGNames::specularConstantAttr) { setSpecularConstantBaseValue(value.toFloat()); return; } if (name == SVGNames::specularExponentAttr) { setSpecularExponentBaseValue(value.toFloat()); return; } if (name == SVGNames::kernelUnitLengthAttr) { float x, y; if (parseNumberOptionalNumber(value, x, y)) { setKernelUnitLengthXBaseValue(x); setKernelUnitLengthYBaseValue(y); } return; } SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); }
void SVGFELightElement::parseMappedAttribute(Attribute* attr) { const String& value = attr->value(); if (attr->name() == SVGNames::azimuthAttr) setAzimuthBaseValue(value.toFloat()); else if (attr->name() == SVGNames::elevationAttr) setElevationBaseValue(value.toFloat()); else if (attr->name() == SVGNames::xAttr) setXBaseValue(value.toFloat()); else if (attr->name() == SVGNames::yAttr) setYBaseValue(value.toFloat()); else if (attr->name() == SVGNames::zAttr) setZBaseValue(value.toFloat()); else if (attr->name() == SVGNames::pointsAtXAttr) setPointsAtXBaseValue(value.toFloat()); else if (attr->name() == SVGNames::pointsAtYAttr) setPointsAtYBaseValue(value.toFloat()); else if (attr->name() == SVGNames::pointsAtZAttr) setPointsAtZBaseValue(value.toFloat()); else if (attr->name() == SVGNames::specularExponentAttr) setSpecularExponentBaseValue(value.toFloat()); else if (attr->name() == SVGNames::limitingConeAngleAttr) setLimitingConeAngleBaseValue(value.toFloat()); else SVGElement::parseMappedAttribute(attr); }
void SVGFELightElement::parseAttribute(const QualifiedName& name, const AtomicString& value) { if (!isSupportedAttribute(name)) { SVGElement::parseAttribute(name, value); return; } if (name == SVGNames::azimuthAttr) { setAzimuthBaseValue(value.toFloat()); return; } if (name == SVGNames::elevationAttr) { setElevationBaseValue(value.toFloat()); return; } if (name == SVGNames::xAttr) { setXBaseValue(value.toFloat()); return; } if (name == SVGNames::yAttr) { setYBaseValue(value.toFloat()); return; } if (name == SVGNames::zAttr) { setZBaseValue(value.toFloat()); return; } if (name == SVGNames::pointsAtXAttr) { setPointsAtXBaseValue(value.toFloat()); return; } if (name == SVGNames::pointsAtYAttr) { setPointsAtYBaseValue(value.toFloat()); return; } if (name == SVGNames::pointsAtZAttr) { setPointsAtZBaseValue(value.toFloat()); return; } if (name == SVGNames::specularExponentAttr) { setSpecularExponentBaseValue(value.toFloat()); return; } if (name == SVGNames::limitingConeAngleAttr) { setLimitingConeAngleBaseValue(value.toFloat()); return; } ASSERT_NOT_REACHED(); }
void SVGFESpecularLightingElement::parseMappedAttribute(MappedAttribute* attr) { const String& value = attr->value(); if (attr->name() == SVGNames::inAttr) setIn1BaseValue(value); else if (attr->name() == SVGNames::surfaceScaleAttr) setSurfaceScaleBaseValue(value.toFloat()); else if (attr->name() == SVGNames::specularConstantAttr) setSpecularConstantBaseValue(value.toFloat()); else if (attr->name() == SVGNames::specularExponentAttr) setSpecularExponentBaseValue(value.toFloat()); else if (attr->name() == SVGNames::kernelUnitLengthAttr) { float x, y; if (parseNumberOptionalNumber(value, x, y)) { setKernelUnitLengthXBaseValue(x); setKernelUnitLengthYBaseValue(y); } } else SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr); }