本文整理汇总了C++中SVGTextContentElement类的典型用法代码示例。如果您正苦于以下问题:C++ SVGTextContentElement类的具体用法?C++ SVGTextContentElement怎么用?C++ SVGTextContentElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SVGTextContentElement类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: definesTextLengthWithSpacing
static bool definesTextLengthWithSpacing(const InlineFlowBox* start)
{
SVGTextContentElement* textContentElement = SVGTextContentElement::elementFromLayoutObject(&start->layoutObject());
return textContentElement
&& textContentElement->lengthAdjust()->currentValue()->enumValue() == SVGLengthAdjustSpacing
&& textContentElement->textLengthIsSpecifiedByUser();
}
示例2: jsSVGTextContentElementStyle
JSValue jsSVGTextContentElementStyle(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
JSSVGTextContentElement* castedThis = static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase()));
UNUSED_PARAM(exec);
SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThis->impl());
return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style()));
}
示例3: buildBezier
void
SVGTextPathElement::glTextTraverse(svgl::Context * svglContext, svgl::GLInfo* glinfo, svgl::TextInfo* textinfo)
{
_textinfo = textinfo;
buildBezier(svglContext, glinfo, textinfo);
for(dom::Node *n = getFirstChild(); n; n=n->getNextSibling()) {
_currentPCDATA = 0;
dom::Text * pcdata = dynamic_cast<dom::Text*>(n);
if(pcdata) {
_currentPCDATA = pcdata;
//SVGTransformable::glTraverse(svglContext, glinfo);
SVGStylable::glTraverse(svglContext, glinfo, false, true);
}
else {
SVGTextContentElement *e = dynamic_cast<SVGTextContentElement*>(n);
if(e) {
//std::cerr << "text may not be at the right place since transforms are not traversed" __FL__;
e->glTextTraverse(svglContext, glinfo, _textinfo);
//textinfo->dx = textinfo->distanceIterator->x;
//textinfo->dy = textinfo->distanceIterator->y;
}
}
}
delete _textinfo->distanceIterator;
_textinfo->distanceIterator=0;
}
示例4: jsSVGTextContentElementXmlspace
JSValue jsSVGTextContentElementXmlspace(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
JSSVGTextContentElement* castedThis = static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase()));
UNUSED_PARAM(exec);
SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThis->impl());
return jsString(exec, imp->xmlspace());
}
示例5: jsSVGTextContentElementExternalResourcesRequired
JSValue jsSVGTextContentElementExternalResourcesRequired(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
JSSVGTextContentElement* castedThis = static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase()));
UNUSED_PARAM(exec);
SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThis->impl());
RefPtr<SVGAnimatedBoolean> obj = imp->externalResourcesRequiredAnimated();
return toJS(exec, castedThis->globalObject(), obj.get(), imp);
}
示例6: jsSVGTextContentElementClassName
JSValue jsSVGTextContentElementClassName(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
JSSVGTextContentElement* castedThis = static_cast<JSSVGTextContentElement*>(asObject(slot.slotBase()));
UNUSED_PARAM(exec);
SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThis->impl());
RefPtr<SVGAnimatedString> obj = imp->classNameAnimated();
return toJS(exec, castedThis->globalObject(), obj.get(), imp);
}
示例7: jsSVGTextContentElementPrototypeFunctionGetComputedTextLength
JSValue* jsSVGTextContentElementPrototypeFunctionGetComputedTextLength(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
if (!thisValue->isObject(&JSSVGTextContentElement::s_info))
return throwError(exec, TypeError);
JSSVGTextContentElement* castedThisObj = static_cast<JSSVGTextContentElement*>(thisValue);
SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThisObj->impl());
JSC::JSValue* result = jsNumber(exec, imp->getComputedTextLength());
return result;
}
示例8: jsSVGTextContentElementPrototypeFunctionGetComputedTextLength
JSValue JSC_HOST_CALL jsSVGTextContentElementPrototypeFunctionGetComputedTextLength(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
if (!thisValue.inherits(&JSSVGTextContentElement::s_info))
return throwError(exec, TypeError);
JSSVGTextContentElement* castedThisObj = static_cast<JSSVGTextContentElement*>(asObject(thisValue));
SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThisObj->impl());
JSC::JSValue result = jsNumber(exec, imp->getComputedTextLength());
return result;
}
示例9: jsSVGTextContentElementPrototypeFunctionGetPresentationAttribute
JSValue* jsSVGTextContentElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
if (!thisValue->isObject(&JSSVGTextContentElement::s_info))
return throwError(exec, TypeError);
JSSVGTextContentElement* castedThisObj = static_cast<JSSVGTextContentElement*>(thisValue);
SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThisObj->impl());
const UString& name = args.at(exec, 0)->toString(exec);
JSC::JSValue* result = toJS(exec, WTF::getPtr(imp->getPresentationAttribute(name)));
return result;
}
示例10: jsSVGTextContentElementPrototypeFunctionHasExtension
JSValue* jsSVGTextContentElementPrototypeFunctionHasExtension(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
if (!thisValue->isObject(&JSSVGTextContentElement::s_info))
return throwError(exec, TypeError);
JSSVGTextContentElement* castedThisObj = static_cast<JSSVGTextContentElement*>(thisValue);
SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThisObj->impl());
const UString& extension = args.at(exec, 0)->toString(exec);
JSC::JSValue* result = jsBoolean(imp->hasExtension(extension));
return result;
}
示例11: jsSVGTextContentElementPrototypeFunctionGetCharNumAtPosition
JSValue* jsSVGTextContentElementPrototypeFunctionGetCharNumAtPosition(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
if (!thisValue->isObject(&JSSVGTextContentElement::s_info))
return throwError(exec, TypeError);
JSSVGTextContentElement* castedThisObj = static_cast<JSSVGTextContentElement*>(thisValue);
SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThisObj->impl());
FloatPoint point = toSVGPoint(args.at(exec, 0));
JSC::JSValue* result = jsNumber(exec, imp->getCharNumAtPosition(point));
return result;
}
示例12: jsSVGTextContentElementPrototypeFunctionHasExtension
JSValue JSC_HOST_CALL jsSVGTextContentElementPrototypeFunctionHasExtension(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
if (!thisValue.inherits(&JSSVGTextContentElement::s_info))
return throwError(exec, TypeError);
JSSVGTextContentElement* castedThisObj = static_cast<JSSVGTextContentElement*>(asObject(thisValue));
SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThisObj->impl());
const UString& extension = args.at(0).toString(exec);
JSC::JSValue result = jsBoolean(imp->hasExtension(extension));
return result;
}
示例13: jsSVGTextContentElementPrototypeFunctionGetPresentationAttribute
JSValue JSC_HOST_CALL jsSVGTextContentElementPrototypeFunctionGetPresentationAttribute(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
if (!thisValue.inherits(&JSSVGTextContentElement::s_info))
return throwError(exec, TypeError);
JSSVGTextContentElement* castedThisObj = static_cast<JSSVGTextContentElement*>(asObject(thisValue));
SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThisObj->impl());
const UString& name = args.at(0).toString(exec);
JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getPresentationAttribute(name)));
return result;
}
示例14: jsSVGTextContentElementPrototypeFunctionSelectSubString
JSValue* jsSVGTextContentElementPrototypeFunctionSelectSubString(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
if (!thisValue->isObject(&JSSVGTextContentElement::s_info))
return throwError(exec, TypeError);
JSSVGTextContentElement* castedThisObj = static_cast<JSSVGTextContentElement*>(thisValue);
SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThisObj->impl());
ExceptionCode ec = 0;
unsigned offset = args.at(exec, 0)->toInt32(exec);
unsigned length = args.at(exec, 1)->toInt32(exec);
imp->selectSubString(offset, length, ec);
setDOMException(exec, ec);
return jsUndefined();
}
示例15: jsSVGTextContentElementPrototypeFunctionGetRotationOfChar
JSValue* jsSVGTextContentElementPrototypeFunctionGetRotationOfChar(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
if (!thisValue->isObject(&JSSVGTextContentElement::s_info))
return throwError(exec, TypeError);
JSSVGTextContentElement* castedThisObj = static_cast<JSSVGTextContentElement*>(thisValue);
SVGTextContentElement* imp = static_cast<SVGTextContentElement*>(castedThisObj->impl());
ExceptionCode ec = 0;
unsigned offset = args.at(exec, 0)->toInt32(exec);
JSC::JSValue* result = jsNumber(exec, imp->getRotationOfChar(offset, ec));
setDOMException(exec, ec);
return result;
}