MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / LoadClassCanvas

Function LoadClassCanvas

src/Core/Bindings/obe/Graphics/Canvas/Canvas.cpp:59–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 bindBezier["Type"] = sol::var(obe::Graphics::Canvas::Bezier::Type);
58 }
59 void LoadClassCanvas(sol::state_view state)
60 {
61 sol::table CanvasNamespace = state["obe"]["Graphics"]["Canvas"].get<sol::table>();
62 sol::usertype<obe::Graphics::Canvas::Canvas> bindCanvas
63 = CanvasNamespace.new_usertype<obe::Graphics::Canvas::Canvas>("Canvas",
64 sol::call_constructor,
65 sol::constructors<obe::Graphics::Canvas::Canvas(
66 unsigned int, unsigned int)>());
67 bindCanvas["Line"] = static_cast<obe::Graphics::Canvas::Line& (
68 obe::Graphics::Canvas::Canvas::*)(const std::string&)>(
69 &obe::Graphics::Canvas::Canvas::add);
70 bindCanvas["Rectangle"] = static_cast<obe::Graphics::Canvas::Rectangle& (
71 obe::Graphics::Canvas::Canvas::*)(const std::string&)>(
72 &obe::Graphics::Canvas::Canvas::add);
73 bindCanvas["Text"] = static_cast<obe::Graphics::Canvas::Text& (
74 obe::Graphics::Canvas::Canvas::*)(const std::string&)>(
75 &obe::Graphics::Canvas::Canvas::add);
76 bindCanvas["Circle"] = static_cast<obe::Graphics::Canvas::Circle& (
77 obe::Graphics::Canvas::Canvas::*)(const std::string&)>(
78 &obe::Graphics::Canvas::Canvas::add);
79 bindCanvas["Polygon"] = static_cast<obe::Graphics::Canvas::Polygon& (
80 obe::Graphics::Canvas::Canvas::*)(const std::string&)>(
81 &obe::Graphics::Canvas::Canvas::add);
82 bindCanvas["Bezier"] = static_cast<obe::Graphics::Canvas::Bezier& (
83 obe::Graphics::Canvas::Canvas::*)(const std::string&)>(
84 &obe::Graphics::Canvas::Canvas::add);
85 bindCanvas["get"] = &obe::Graphics::Canvas::Canvas::get;
86 bindCanvas["render"] = &obe::Graphics::Canvas::Canvas::render;
87 bindCanvas["clear"] = &obe::Graphics::Canvas::Canvas::clear;
88 bindCanvas["remove"] = &obe::Graphics::Canvas::Canvas::remove;
89 bindCanvas["getTexture"] = &obe::Graphics::Canvas::Canvas::getTexture;
90 bindCanvas["requiresSort"] = &obe::Graphics::Canvas::Canvas::requiresSort;
91 state.script_file("Lib/Internal/Canvas.lua"_fs);
92 }
93 void LoadClassCanvasElement(sol::state_view state)
94 {
95 sol::table CanvasNamespace = state["obe"]["Graphics"]["Canvas"].get<sol::table>();

Callers

nothing calls this directly

Calls 1

script_fileMethod · 0.80

Tested by

no test coverage detected