MCPcopy Create free account
hub / github.com/SFML/SFML / getScissor

Method getScissor

src/SFML/Graphics/RenderTarget.cpp:289–296  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

287
288////////////////////////////////////////////////////////////
289IntRect RenderTarget::getScissor(const View& view) const
290{
291 const auto [width, height] = Vector2f(getSize());
292 const FloatRect& scissor = view.getScissor();
293
294 return IntRect(Rect<long>({std::lround(width * scissor.position.x), std::lround(height * scissor.position.y)},
295 {std::lround(width * scissor.size.x), std::lround(height * scissor.size.y)}));
296}
297
298
299////////////////////////////////////////////////////////////

Callers 3

View.test.cppFile · 0.80
applyCurrentViewMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected