MCPcopy Create free account
hub / github.com/axmolengine/axmol / commandResolutionSubCommandEmpty

Method commandResolutionSubCommandEmpty

core/base/Console.cpp:1117–1139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1115}
1116
1117void Console::commandResolutionSubCommandEmpty(socket_native_type fd, std::string_view /*args*/)
1118{
1119 auto director = Director::getInstance();
1120 Vec2 points = director->getWinSize();
1121 Vec2 pixels = director->getWinSizeInPixels();
1122 auto renderView = director->getRenderView();
1123 Vec2 design = renderView->getDesignResolutionSize();
1124 ResolutionPolicy res = renderView->getResolutionPolicy();
1125 Rect visibleRect = renderView->getVisibleRect();
1126
1127 Console::Utility::mydprintf(fd,
1128 "Window size:\n"
1129 "\t%d x %d (points)\n"
1130 "\t%d x %d (pixels)\n"
1131 "\t%d x %d (design resolution)\n"
1132 "Resolution Policy: %d\n"
1133 "Visible Rect:\n"
1134 "\torigin: %d x %d\n"
1135 "\tsize: %d x %d\n",
1136 (int)points.width, (int)points.height, (int)pixels.width, (int)pixels.height,
1137 (int)design.width, (int)design.height, (int)res, (int)visibleRect.origin.x,
1138 (int)visibleRect.origin.y, (int)visibleRect.size.width, (int)visibleRect.size.height);
1139}
1140
1141void Console::commandSceneGraph(socket_native_type fd, std::string_view /*args*/)
1142{

Callers

nothing calls this directly

Calls 3

getInstanceFunction · 0.85
getWinSizeInPixelsMethod · 0.80
getVisibleRectMethod · 0.45

Tested by

no test coverage detected