MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / render

Method render

src/components/ScrollableContainer.cpp:10–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8}
9
10void ScrollableContainer::render(const Eigen::Affine3f& parentTrans)
11{
12 Eigen::Affine3f trans = parentTrans * getTransform();
13
14 Eigen::Vector2i clipPos((int)trans.translation().x(), (int)trans.translation().y());
15
16 Eigen::Vector3f dimScaled = trans * Eigen::Vector3f(mSize.x(), mSize.y(), 0);
17 Eigen::Vector2i clipDim((int)dimScaled.x() - trans.translation().x(), (int)dimScaled.y() - trans.translation().y());
18
19 Renderer::pushClipRect(clipPos, clipDim);
20
21 trans.translate(Eigen::Vector3f((float)-mScrollPos.x(), (float)-mScrollPos.y(), 0));
22 Renderer::setMatrix(trans);
23
24 GuiComponent::renderChildren(trans);
25
26 Renderer::popClipRect();
27}
28
29void ScrollableContainer::setAutoScroll(int delay, double speed)
30{

Callers

nothing calls this directly

Calls 3

pushClipRectFunction · 0.85
setMatrixFunction · 0.85
popClipRectFunction · 0.85

Tested by

no test coverage detected