Files
XCEngine/docs/api/XCEngine/Rendering/RenderSurface/GetRenderArea.md

25 lines
771 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# RenderSurface::GetRenderArea
获取当前实际生效的渲染区域。
```cpp
Math::RectInt GetRenderArea() const;
```
## 返回值
- 如果没有启用自定义 render area返回 `(0, 0, width, height)`
- 如果启用了自定义 render area返回经过当前 surface 尺寸再次夹取后的矩形
## 行为说明
当前实现即使在 `SetRenderArea(...)` 时已经做过一次夹取,取回时也会再次调用内部 `ClampRenderArea(...)`。这保证了在 `SetSize(...)` 之后,返回值仍然不会越界。
## 相关文档
- [返回类型总览](RenderSurface.md)
- [SetRenderArea](SetRenderArea.md)
- [HasCustomRenderArea](HasCustomRenderArea.md)
- [GetRenderAreaWidth](GetRenderAreaWidth.md)
- [GetRenderAreaHeight](GetRenderAreaHeight.md)