Gura_ImplementMethod(image, opengl) { Signal &sig = env.GetSignal(); Object_image *pThis = Object_image::GetObjectThis(arg); if (!pThis->GetImage()->CheckValid(sig)) return Value::Nil; if (!DoGLSection(env, sig, arg, pThis->GetImage())) return Value::Nil; return arg.GetValueThis(); }
Gura_ImplementMethod(image, drawtext) { Signal &sig = env.GetSignal(); Object_image *pObjImage = Object_image::GetObjectThis(arg); Object_font *pObjFont = Object_font::GetObject(arg, 0); int x = arg.GetInt(1); int y = arg.GetInt(2); String str = arg.GetStringSTL(3); const Function *pFuncDeco = nullptr; if (arg.IsBlockSpecified()) { pFuncDeco = arg.GetBlockFunc(env, GetSymbolForBlock()); if (pFuncDeco == nullptr) return Value::Nil; } if (pObjFont->DrawOnImage(env, sig, pObjImage->GetImage(), x, y, str, pFuncDeco)) return Value::Nil; return arg.GetValueThis(); }