本文整理汇总了C++中TestTypedefs::setShadow方法的典型用法代码示例。如果您正苦于以下问题:C++ TestTypedefs::setShadow方法的具体用法?C++ TestTypedefs::setShadow怎么用?C++ TestTypedefs::setShadow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestTypedefs
的用法示例。
在下文中一共展示了TestTypedefs::setShadow方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setShadowMethod
static void setShadowMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
if (UNLIKELY(info.Length() < 3)) {
throwTypeError(ExceptionMessages::failedToExecute("setShadow", "TestTypedefs", ExceptionMessages::notEnoughArguments(3, info.Length())), info.GetIsolate());
return;
}
TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
V8TRYCATCH_VOID(float, width, static_cast<float>(info[0]->NumberValue()));
V8TRYCATCH_VOID(float, height, static_cast<float>(info[1]->NumberValue()));
V8TRYCATCH_VOID(float, blur, static_cast<float>(info[2]->NumberValue()));
if (UNLIKELY(info.Length() <= 3)) {
imp->setShadow(width, height, blur);
return;
}
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, color, info[3]);
if (UNLIKELY(info.Length() <= 4)) {
imp->setShadow(width, height, blur, color);
return;
}
V8TRYCATCH_VOID(float, alpha, static_cast<float>(info[4]->NumberValue()));
imp->setShadow(width, height, blur, color, alpha);
}