MCPcopy Create free account
hub / github.com/YACReader/yacreader / setViewportSize

Method setViewportSize

YACReader/continuous_view_model.cpp:43–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void ContinuousViewModel::setViewportSize(int width, int height)
44{
45 width = std::max(0, width);
46 height = std::max(0, height);
47
48 if (viewportWidth == width && viewportHeightValue == height) {
49 return;
50 }
51
52 viewportWidth = width;
53 viewportHeightValue = height;
54 recompute(RecomputePolicy::PreserveViewportAnchor);
55}
56
57void ContinuousViewModel::setScrollYFromUser(int scrollY)
58{

Calls

no outgoing calls

Tested by

no test coverage detected