本文整理汇总了C++中SVGPathElement::createSVGPathSegClosePath方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGPathElement::createSVGPathSegClosePath方法的具体用法?C++ SVGPathElement::createSVGPathSegClosePath怎么用?C++ SVGPathElement::createSVGPathSegClosePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVGPathElement
的用法示例。
在下文中一共展示了SVGPathElement::createSVGPathSegClosePath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: callAsFunction
JSValue* JSSVGPathElementPrototypeFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
{
if (!thisObj->inherits(&JSSVGPathElement::info))
return throwError(exec, TypeError);
SVGPathElement* imp = static_cast<SVGPathElement*>(static_cast<JSSVGPathElement*>(thisObj)->impl());
switch (id) {
case JSSVGPathElement::GetTotalLengthFuncNum: {
KJS::JSValue* result = jsNumber(imp->getTotalLength());
return result;
}
case JSSVGPathElement::GetPointAtLengthFuncNum: {
float distance = args[0]->toFloat(exec);
KJS::JSValue* result = toJS(exec, new JSSVGPODTypeWrapper<FloatPoint>(imp->getPointAtLength(distance)));
return result;
}
case JSSVGPathElement::GetPathSegAtLengthFuncNum: {
float distance = args[0]->toFloat(exec);
KJS::JSValue* result = jsNumber(imp->getPathSegAtLength(distance));
return result;
}
case JSSVGPathElement::CreateSVGPathSegClosePathFuncNum: {
KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->createSVGPathSegClosePath()));
return result;
}
case JSSVGPathElement::CreateSVGPathSegMovetoAbsFuncNum: {
float x = args[0]->toFloat(exec);
float y = args[1]->toFloat(exec);
KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->createSVGPathSegMovetoAbs(x, y)));
return result;
}
case JSSVGPathElement::CreateSVGPathSegMovetoRelFuncNum: {
float x = args[0]->toFloat(exec);
float y = args[1]->toFloat(exec);
KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->createSVGPathSegMovetoRel(x, y)));
return result;
}
case JSSVGPathElement::CreateSVGPathSegLinetoAbsFuncNum: {
float x = args[0]->toFloat(exec);
float y = args[1]->toFloat(exec);
KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->createSVGPathSegLinetoAbs(x, y)));
return result;
}
case JSSVGPathElement::CreateSVGPathSegLinetoRelFuncNum: {
float x = args[0]->toFloat(exec);
float y = args[1]->toFloat(exec);
KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->createSVGPathSegLinetoRel(x, y)));
return result;
}
case JSSVGPathElement::CreateSVGPathSegCurvetoCubicAbsFuncNum: {
float x = args[0]->toFloat(exec);
float y = args[1]->toFloat(exec);
float x1 = args[2]->toFloat(exec);
float y1 = args[3]->toFloat(exec);
float x2 = args[4]->toFloat(exec);
float y2 = args[5]->toFloat(exec);
KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2)));
return result;
}
case JSSVGPathElement::CreateSVGPathSegCurvetoCubicRelFuncNum: {
float x = args[0]->toFloat(exec);
float y = args[1]->toFloat(exec);
float x1 = args[2]->toFloat(exec);
float y1 = args[3]->toFloat(exec);
float x2 = args[4]->toFloat(exec);
float y2 = args[5]->toFloat(exec);
KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->createSVGPathSegCurvetoCubicRel(x, y, x1, y1, x2, y2)));
return result;
}
case JSSVGPathElement::CreateSVGPathSegCurvetoQuadraticAbsFuncNum: {
float x = args[0]->toFloat(exec);
float y = args[1]->toFloat(exec);
float x1 = args[2]->toFloat(exec);
float y1 = args[3]->toFloat(exec);
KJS::JSValue* result = toJS(exec, WTF::getPtr(imp->createSVGPathSegCurvetoQuadraticAbs(x, y, x1, y1)));
return result;
}
//.........这里部分代码省略.........
示例2: createSVGPathSegClosePathCallback
static v8::Handle<v8::Value> createSVGPathSegClosePathCallback(const v8::Arguments& args)
{
SVGPathElement* imp = V8SVGPathElement::toNative(args.Holder());
return toV8Fast(imp->createSVGPathSegClosePath(), args, imp);
}