本文整理汇总了C++中AtomicString::toFloat方法的典型用法代码示例。如果您正苦于以下问题:C++ AtomicString::toFloat方法的具体用法?C++ AtomicString::toFloat怎么用?C++ AtomicString::toFloat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AtomicString
的用法示例。
在下文中一共展示了AtomicString::toFloat方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parseAttribute
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);
}
示例2: parseAttribute
void SVGFEDropShadowElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (!isSupportedAttribute(name)) {
SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value);
return;
}
if (name == SVGNames::stdDeviationAttr) {
float x, y;
if (parseNumberOptionalNumber(value, x, y)) {
setStdDeviationXBaseValue(x);
setStdDeviationYBaseValue(y);
}
return;
}
if (name == SVGNames::inAttr) {
setIn1BaseValue(value);
return;
}
if (name == SVGNames::dxAttr) {
setDxBaseValue(value.toFloat());
return;
}
if (name == SVGNames::dyAttr) {
setDyBaseValue(value.toFloat());
return;
}
ASSERT_NOT_REACHED();
}
示例3: parseAttribute
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();
}
示例4: parseAttribute
void SVGPathElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (!isSupportedAttribute(name)) {
SVGGraphicsElement::parseAttribute(name, value);
return;
}
if (name == SVGNames::dAttr) {
if (!buildSVGPathByteStreamFromString(value, m_pathByteStream.get(), UnalteredParsing))
document().accessSVGExtensions()->reportError("Problem parsing d=\"" + value + "\"");
return;
}
if (name == SVGNames::pathLengthAttr) {
setPathLengthBaseValue(value.toFloat());
if (pathLengthBaseValue() < 0)
document().accessSVGExtensions()->reportError("A negative value for path attribute <pathLength> is not allowed");
return;
}
if (SVGLangSpace::parseAttribute(name, value))
return;
if (SVGExternalResourcesRequired::parseAttribute(name, value))
return;
ASSERT_NOT_REACHED();
}
示例5: parseAttribute
void SVGFECompositeElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (!isSupportedAttribute(name)) {
SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value);
return;
}
if (name == SVGNames::operatorAttr) {
CompositeOperationType propertyValue = SVGPropertyTraits<CompositeOperationType>::fromString(value);
if (propertyValue > 0)
setSVGOperatorBaseValue(propertyValue);
return;
}
if (name == SVGNames::inAttr) {
setIn1BaseValue(value);
return;
}
if (name == SVGNames::in2Attr) {
setIn2BaseValue(value);
return;
}
if (name == SVGNames::k1Attr) {
setK1BaseValue(value.toFloat());
return;
}
if (name == SVGNames::k2Attr) {
setK2BaseValue(value.toFloat());
return;
}
if (name == SVGNames::k3Attr) {
setK3BaseValue(value.toFloat());
return;
}
if (name == SVGNames::k4Attr) {
setK4BaseValue(value.toFloat());
return;
}
ASSERT_NOT_REACHED();
}
示例6: parseAttribute
void SVGFEOffsetElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (!isSupportedAttribute(name)) {
SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value);
return;
}
if (name == SVGNames::dxAttr) {
setDxBaseValue(value.toFloat());
return;
}
if (name == SVGNames::dyAttr) {
setDyBaseValue(value.toFloat());
return;
}
if (name == SVGNames::inAttr) {
setIn1BaseValue(value);
return;
}
ASSERT_NOT_REACHED();
}
示例7: parseAttribute
void SVGStopElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (!isSupportedAttribute(name)) {
SVGElement::parseAttribute(name, value);
return;
}
if (name == SVGNames::offsetAttr) {
if (value.endsWith('%'))
setOffsetBaseValue(value.string().left(value.length() - 1).toFloat() / 100.0f);
else
setOffsetBaseValue(value.toFloat());
return;
}
ASSERT_NOT_REACHED();
}
示例8: parseAttribute
void SVGFETurbulenceElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (!isSupportedAttribute(name)) {
SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value);
return;
}
if (name == SVGNames::typeAttr) {
TurbulenceType propertyValue = SVGPropertyTraits<TurbulenceType>::fromString(value);
if (propertyValue > 0)
setTypeBaseValue(propertyValue);
return;
}
if (name == SVGNames::stitchTilesAttr) {
SVGStitchOptions propertyValue = SVGPropertyTraits<SVGStitchOptions>::fromString(value);
if (propertyValue > 0)
setStitchTilesBaseValue(propertyValue);
return;
}
if (name == SVGNames::baseFrequencyAttr) {
float x, y;
if (parseNumberOptionalNumber(value, x, y)) {
setBaseFrequencyXBaseValue(x);
setBaseFrequencyYBaseValue(y);
}
return;
}
if (name == SVGNames::seedAttr) {
setSeedBaseValue(value.toFloat());
return;
}
if (name == SVGNames::numOctavesAttr) {
setNumOctavesBaseValue(value.string().toUIntStrict());
return;
}
ASSERT_NOT_REACHED();
}
示例9: parseAttribute
void SVGFEDisplacementMapElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (!isSupportedAttribute(name)) {
SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value);
return;
}
if (name == SVGNames::xChannelSelectorAttr) {
ChannelSelectorType propertyValue = SVGPropertyTraits<ChannelSelectorType>::fromString(value);
if (propertyValue > 0)
setXChannelSelectorBaseValue(propertyValue);
return;
}
if (name == SVGNames::yChannelSelectorAttr) {
ChannelSelectorType propertyValue = SVGPropertyTraits<ChannelSelectorType>::fromString(value);
if (propertyValue > 0)
setYChannelSelectorBaseValue(propertyValue);
return;
}
if (name == SVGNames::inAttr) {
setIn1BaseValue(value);
return;
}
if (name == SVGNames::in2Attr) {
setIn2BaseValue(value);
return;
}
if (name == SVGNames::scaleAttr) {
setScaleBaseValue(value.toFloat());
return;
}
ASSERT_NOT_REACHED();
}
示例10: parseAttribute
void SVGFEConvolveMatrixElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (!isSupportedAttribute(name)) {
SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value);
return;
}
if (name == SVGNames::inAttr) {
setIn1BaseValue(value);
return;
}
if (name == SVGNames::orderAttr) {
float x, y;
if (parseNumberOptionalNumber(value, x, y) && x >= 1 && y >= 1) {
setOrderXBaseValue(x);
setOrderYBaseValue(y);
} else
document().accessSVGExtensions()->reportWarning(
"feConvolveMatrix: problem parsing order=\"" + value
+ "\". Filtered element will not be displayed.");
return;
}
if (name == SVGNames::edgeModeAttr) {
EdgeModeType propertyValue = SVGPropertyTraits<EdgeModeType>::fromString(value);
if (propertyValue > 0)
setEdgeModeBaseValue(propertyValue);
else
document().accessSVGExtensions()->reportWarning(
"feConvolveMatrix: problem parsing edgeMode=\"" + value
+ "\". Filtered element will not be displayed.");
return;
}
if (name == SVGNames::kernelMatrixAttr) {
SVGNumberList newList;
newList.parse(value);
detachAnimatedKernelMatrixListWrappers(newList.size());
setKernelMatrixBaseValue(newList);
return;
}
if (name == SVGNames::divisorAttr) {
float divisor = value.toFloat();
if (divisor)
setDivisorBaseValue(divisor);
else
document().accessSVGExtensions()->reportWarning(
"feConvolveMatrix: problem parsing divisor=\"" + value
+ "\". Filtered element will not be displayed.");
return;
}
if (name == SVGNames::biasAttr) {
setBiasBaseValue(value.toFloat());
return;
}
if (name == SVGNames::targetXAttr) {
setTargetXBaseValue(value.string().toUIntStrict());
return;
}
if (name == SVGNames::targetYAttr) {
setTargetYBaseValue(value.string().toUIntStrict());
return;
}
if (name == SVGNames::kernelUnitLengthAttr) {
float x, y;
if (parseNumberOptionalNumber(value, x, y) && x > 0 && y > 0) {
setKernelUnitLengthXBaseValue(x);
setKernelUnitLengthYBaseValue(y);
} else
document().accessSVGExtensions()->reportWarning(
"feConvolveMatrix: problem parsing kernelUnitLength=\"" + value
+ "\". Filtered element will not be displayed.");
return;
}
if (name == SVGNames::preserveAlphaAttr) {
if (value == "true")
setPreserveAlphaBaseValue(true);
else if (value == "false")
setPreserveAlphaBaseValue(false);
else
document().accessSVGExtensions()->reportWarning(
"feConvolveMatrix: problem parsing preserveAlphaAttr=\"" + value
+ "\". Filtered element will not be displayed.");
return;
}
ASSERT_NOT_REACHED();
}