本文整理汇总了C++中SVGFilterElement::setFilterRes方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGFilterElement::setFilterRes方法的具体用法?C++ SVGFilterElement::setFilterRes怎么用?C++ SVGFilterElement::setFilterRes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVGFilterElement
的用法示例。
在下文中一共展示了SVGFilterElement::setFilterRes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: callAsFunction
JSValue* JSSVGFilterElementPrototypeFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
{
if (!thisObj->inherits(&JSSVGFilterElement::info))
return throwError(exec, TypeError);
SVGFilterElement* imp = static_cast<SVGFilterElement*>(static_cast<JSSVGFilterElement*>(thisObj)->impl());
switch (id) {
case JSSVGFilterElement::SetFilterResFuncNum: {
bool filterResXOk;
unsigned filterResX = args[0]->toInt32(exec, filterResXOk);
if (!filterResXOk) {
setDOMException(exec, TYPE_MISMATCH_ERR);
return jsUndefined();
}
bool filterResYOk;
unsigned filterResY = args[1]->toInt32(exec, filterResYOk);
if (!filterResYOk) {
setDOMException(exec, TYPE_MISMATCH_ERR);
return jsUndefined();
}
imp->setFilterRes(filterResX, filterResY);
return jsUndefined();
}
}
return 0;
}
示例2: jsSVGFilterElementPrototypeFunctionSetFilterRes
JSValue JSC_HOST_CALL jsSVGFilterElementPrototypeFunctionSetFilterRes(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
if (!thisValue.isObject(&JSSVGFilterElement::s_info))
return throwError(exec, TypeError);
JSSVGFilterElement* castedThisObj = static_cast<JSSVGFilterElement*>(asObject(thisValue));
SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThisObj->impl());
unsigned filterResX = args.at(0).toInt32(exec);
unsigned filterResY = args.at(1).toInt32(exec);
imp->setFilterRes(filterResX, filterResY);
return jsUndefined();
}
示例3: jsSVGFilterElementPrototypeFunctionSetFilterRes
EncodedJSValue JSC_HOST_CALL jsSVGFilterElementPrototypeFunctionSetFilterRes(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
if (!thisValue.inherits(&JSSVGFilterElement::s_info))
return throwVMTypeError(exec);
JSSVGFilterElement* castedThis = static_cast<JSSVGFilterElement*>(asObject(thisValue));
ASSERT_GC_OBJECT_INHERITS(castedThis, &JSSVGFilterElement::s_info);
SVGFilterElement* imp = static_cast<SVGFilterElement*>(castedThis->impl());
unsigned filterResX(exec->argument(0).toUInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
unsigned filterResY(exec->argument(1).toUInt32(exec));
if (exec->hadException())
return JSValue::encode(jsUndefined());
imp->setFilterRes(filterResX, filterResY);
return JSValue::encode(jsUndefined());
}