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

Method UpdateWindowSize

core/platform/winrt/RenderViewImpl-winrt.cpp:554–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

552}
553
554void RenderViewImpl::UpdateWindowSize()
555{
556 float width, height;
557
558 width = m_width;
559 height = m_height;
560
561 // CCSize designSize = getDesignResolutionSize();
562 if (!m_initialized)
563 {
564 m_initialized = true;
565 RenderView::setFrameSize(width, height);
566 }
567
568 auto view = Director::getInstance()->getRenderView();
569 if (view && view->getResolutionPolicy() != ResolutionPolicy::UNKNOWN)
570 {
571 Size resSize = view->getDesignResolutionSize();
572 ResolutionPolicy resPolicy = view->getResolutionPolicy();
573 view->setFrameSize(width, height);
574 view->setDesignResolutionSize(resSize.width, resSize.height, resPolicy);
575 auto director = Director::getInstance();
576 director->setViewport();
577 director->setProjection(director->getProjection());
578 }
579}
580
581ax::Vec2 RenderViewImpl::TransformToOrientation(Windows::Foundation::Point const& p)
582{

Callers

nothing calls this directly

Calls 5

getInstanceFunction · 0.85
setProjectionMethod · 0.80
setFrameSizeMethod · 0.45
setViewportMethod · 0.45

Tested by

no test coverage detected