MCPcopy Create free account
hub / github.com/NodeRT/NodeRT / SizeToJs

Function SizeToJs

src/NodeRTLib/ProjectFiles/NodeRtUtils.cpp:619–629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

617}
618
619Local<Object> SizeToJs(::Windows::Foundation::Size size) {
620 EscapableHandleScope scope;
621 Local<Object> obj = Nan::New<Object>();
622
623 Nan::Set(obj, Nan::New<String>("height").ToLocalChecked(),
624 Nan::New<Number>(size.Height));
625 Nan::Set(obj, Nan::New<String>("width").ToLocalChecked(),
626 Nan::New<Number>(size.Width));
627
628 return scope.Escape(obj);
629}
630
631::Windows::Foundation::Size SizeFromJs(Local<Value> value) {
632 ::Windows::Foundation::Size size(0, 0);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected