Apply clang-format to code base

This commit is contained in:
clang-format-bot 2022-09-22 21:26:05 +03:00 committed by ζeh Matt
parent f37d0be806
commit ddb0522bbf
No known key found for this signature in database
GPG key ID: 18CE582C71A225B0
2199 changed files with 118692 additions and 114392 deletions

View file

@ -12,7 +12,8 @@ namespace osgMyGUI
public:
/// @param target The target to render to.
/// @param viewSize The size of the underlying layer node to render.
/// @param hoffset The horizontal rendering offset, specified as an offset from the left screen edge in range 0-1.
/// @param hoffset The horizontal rendering offset, specified as an offset from the left screen edge in range
/// 0-1.
/// @param voffset The vertical rendering offset, specified as an offset from the top screen edge in range 0-1.
ProxyRenderTarget(MyGUI::IRenderTarget* target, MyGUI::IntSize viewSize, float hoffset, float voffset)
: mTarget(target)
@ -22,15 +23,9 @@ namespace osgMyGUI
{
}
void begin() override
{
mTarget->begin();
}
void begin() override { mTarget->begin(); }
void end() override
{
mTarget->end();
}
void end() override { mTarget->end(); }
void doRender(MyGUI::IVertexBuffer* _buffer, MyGUI::ITexture* _texture, size_t _count) override
{
@ -54,7 +49,7 @@ namespace osgMyGUI
mutable MyGUI::RenderTargetInfo mInfo;
};
MyGUI::ILayerItem *ScalingLayer::getLayerItemByPoint(int _left, int _top) const
MyGUI::ILayerItem* ScalingLayer::getLayerItemByPoint(int _left, int _top) const
{
screenToLayerCoords(_left, _top);
@ -69,14 +64,14 @@ namespace osgMyGUI
MyGUI::IntSize globalViewSize = MyGUI::RenderManager::getInstance().getViewSize();
_left -= globalViewSize.width/2;
_top -= globalViewSize.height/2;
_left -= globalViewSize.width / 2;
_top -= globalViewSize.height / 2;
_left = static_cast<int>(_left/scale);
_top = static_cast<int>(_top/scale);
_left = static_cast<int>(_left / scale);
_top = static_cast<int>(_top / scale);
_left += mViewSize.width/2;
_top += mViewSize.height/2;
_left += mViewSize.width / 2;
_top += mViewSize.height / 2;
}
float ScalingLayer::getScaleFactor(const MyGUI::IntSize& _layerViewSize)
@ -96,7 +91,7 @@ namespace osgMyGUI
return MyGUI::IntPoint(_left, _top);
}
void ScalingLayer::renderToTarget(MyGUI::IRenderTarget *_target, bool _update)
void ScalingLayer::renderToTarget(MyGUI::IRenderTarget* _target, bool _update)
{
MyGUI::IntSize globalViewSize = MyGUI::RenderManager::getInstance().getViewSize();
MyGUI::IntSize viewSize = globalViewSize;
@ -104,15 +99,17 @@ namespace osgMyGUI
viewSize.width = static_cast<int>(viewSize.width / scale);
viewSize.height = static_cast<int>(viewSize.height / scale);
float hoffset = (globalViewSize.width - mViewSize.width*getScaleFactor(mViewSize))/2.f / static_cast<float>(globalViewSize.width);
float voffset = (globalViewSize.height - mViewSize.height*getScaleFactor(mViewSize))/2.f / static_cast<float>(globalViewSize.height);
float hoffset = (globalViewSize.width - mViewSize.width * getScaleFactor(mViewSize)) / 2.f
/ static_cast<float>(globalViewSize.width);
float voffset = (globalViewSize.height - mViewSize.height * getScaleFactor(mViewSize)) / 2.f
/ static_cast<float>(globalViewSize.height);
ProxyRenderTarget proxy(_target, viewSize, hoffset, voffset);
MyGUI::OverlappedLayer::renderToTarget(&proxy, _update);
}
void ScalingLayer::resizeView(const MyGUI::IntSize &_viewSize)
void ScalingLayer::resizeView(const MyGUI::IntSize& _viewSize)
{
// do nothing
}